From fa898886864cdd575aa0d1d33f1db6f041070dcf Mon Sep 17 00:00:00 2001 From: Lucas Rosa Date: Thu, 12 Sep 2024 21:26:03 -0300 Subject: [PATCH 01/59] DOTCOM-3581: update deps and add typescript default config (#177) * update deps and add typescript default config * update prettier config --- .DS_Store | Bin 0 -> 6148 bytes .eslintignore | 1 + .eslintrc.js | 292 --- .github/workflows/node.js.yml | 48 +- .github/workflows/npm-publish.yml | 32 +- .gitignore | 1 + .travis.yml.bak | 37 - README.md | 24 +- eslint.config.cjs | 254 +++ lib/Error.js | 106 +- npm-shrinkwrap.json => package-lock.json | 580 +++--- package.json | 32 +- src/Types.d.ts | 46 + src/multipart.ts | 101 + src/utils.ts | 54 + tsconfig.json | 17 + yarn.lock | 2407 ---------------------- 17 files changed, 947 insertions(+), 3085 deletions(-) create mode 100644 .DS_Store delete mode 100644 .eslintrc.js delete mode 100644 .travis.yml.bak create mode 100644 eslint.config.cjs rename npm-shrinkwrap.json => package-lock.json (88%) create mode 100644 src/Types.d.ts create mode 100644 src/multipart.ts create mode 100644 src/utils.ts create mode 100644 tsconfig.json delete mode 100644 yarn.lock diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..0d64ba0e1ec031d25d87b7509e0e1fc4a99ca897 GIT binary patch literal 6148 zcmeHKyGjE=6uqMeEfl+SlIgm zg1_OpGnai3h201uaxct1vv=m~<=4NX_9Z(1UnghId*XaoRc1p+Cx7q$J)=qhJJZyD(aWt_aE??_axKSL2 z-ErIn#~XdzHTQ$(oof94kNA_5+;6{0urzd!D1!DOw3XKFJsezA;pTM@-tIS3-6hwK z;!O7<{Jie^VP`% zuN*M7uoJc+NzT?eaeUVLXoqMVJTGx*DM)f0+YTSa8)!B#=5q%a2qq3uLFgX=Yl9|r I;8z{^1T7@6{Qv*} literal 0 HcmV?d00001 diff --git a/.eslintignore b/.eslintignore index 5d08121..25ff267 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,3 +1,4 @@ *.node*.js node_modules +tsconfig.json lib/Error.js \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5d5f9bb..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1,292 +0,0 @@ -module.exports = { - 'env': { - 'node': true, - 'es6': true - }, - 'extends': 'eslint:recommended', - 'rules': { - 'accessor-pairs': 'error', - 'array-bracket-spacing': [ - 'error', - 'never' - ], - 'array-callback-return': 'off', - 'arrow-body-style': 'error', - 'arrow-parens': 'error', - 'arrow-spacing': 'error', - 'block-scoped-var': 'off', - 'block-spacing': 'off', - 'brace-style': [ - 'error', - '1tbs', - { - 'allowSingleLine': true - } - ], - 'camelcase': [ - 'error', - { - 'properties': 'never' - } - ], - 'capitalized-comments': 'off', - 'class-methods-use-this': 'error', - 'comma-dangle': 'off', - 'comma-spacing': 'off', - 'comma-style': [ - 'error', - 'last' - ], - 'complexity': 'error', - 'computed-property-spacing': [ - 'error', - 'never' - ], - 'consistent-return': 'off', - 'consistent-this': 'off', - 'curly': 'error', - 'default-case': 'off', - 'dot-location': [ - 'error', - 'property' - ], - 'dot-notation': 'error', - 'eol-last': 'error', - 'eqeqeq': 'off', - 'func-call-spacing': 'error', - 'func-name-matching': 'error', - 'func-names': 'off', - 'func-style': [ - 'error', - 'declaration' - ], - 'generator-star-spacing': 'error', - 'global-require': 'off', - 'guard-for-in': 'off', - 'handle-callback-err': 'off', - 'id-blacklist': 'error', - 'id-length': 'off', - 'id-match': 'error', - 'indent': ['error', 2], - 'init-declarations': 'off', - 'jsx-quotes': 'error', - 'key-spacing': 'error', - 'keyword-spacing': [ - 'error', - { - 'after': true, - 'before': true - } - ], - 'line-comment-position': 'off', - 'linebreak-style': [ - 'error', - 'unix' - ], - 'lines-around-comment': 'error', - 'lines-around-directive': 'error', - 'max-depth': 'error', - 'max-len': 'off', - 'max-lines': 'off', - 'max-nested-callbacks': 'error', - 'max-params': 'off', - 'max-statements': 'off', - 'max-statements-per-line': 'off', - 'multiline-ternary': 'off', - 'new-cap': 'error', - 'new-parens': 'error', - 'newline-after-var': 'off', - 'newline-before-return': 'off', - 'newline-per-chained-call': 'off', - 'no-alert': 'error', - 'no-array-constructor': 'error', - 'no-await-in-loop': 'error', - 'no-bitwise': 'off', - 'no-caller': 'error', - 'no-catch-shadow': 'off', - 'no-compare-neg-zero': 'error', - 'no-confusing-arrow': 'error', - 'no-continue': 'off', - 'no-div-regex': 'error', - 'no-duplicate-imports': 'error', - 'no-else-return': 'off', - 'no-empty-function': 'off', - 'no-eq-null': 'off', - 'no-eval': 'error', - 'no-extend-native': 'error', - 'no-extra-bind': 'error', - 'no-extra-label': 'error', - 'no-extra-parens': 'off', - 'no-floating-decimal': 'error', - 'no-implicit-globals': 'error', - 'no-implied-eval': 'error', - 'no-inline-comments': 'off', - 'no-inner-declarations': [ - 'error', - 'functions' - ], - 'no-invalid-this': 'off', - 'no-iterator': 'error', - 'no-label-var': 'error', - 'no-labels': 'error', - 'no-lone-blocks': 'error', - 'no-lonely-if': 'error', - 'no-loop-func': 'error', - 'no-magic-numbers': 'off', - 'no-mixed-operators': 'error', - 'no-mixed-requires': 'error', - 'no-multi-assign': 'off', - 'no-multi-spaces': 'error', - 'no-multi-str': 'error', - 'no-multiple-empty-lines': 'error', - 'no-native-reassign': 'error', - 'no-negated-condition': 'off', - 'no-negated-in-lhs': 'error', - 'no-nested-ternary': 'error', - 'no-new': 'error', - 'no-new-func': 'error', - 'no-new-object': 'error', - 'no-new-require': 'error', - 'no-new-wrappers': 'error', - 'no-octal-escape': 'error', - 'no-param-reassign': 'off', - 'no-path-concat': 'error', - 'no-plusplus': [ - 'error', - { - 'allowForLoopAfterthoughts': true - } - ], - 'no-process-env': 'off', - 'no-process-exit': 'error', - 'no-proto': 'error', - 'no-prototype-builtins': 'off', - 'no-restricted-globals': 'error', - 'no-restricted-imports': 'error', - 'no-restricted-modules': 'error', - 'no-restricted-properties': 'error', - 'no-restricted-syntax': 'error', - 'no-return-assign': 'error', - 'no-return-await': 'error', - 'no-script-url': 'error', - 'no-self-compare': 'error', - 'no-sequences': 'error', - 'no-shadow': 'off', - 'no-shadow-restricted-names': 'error', - 'no-spaced-func': 'error', - 'no-sync': 'error', - 'no-tabs': 'error', - 'no-template-curly-in-string': 'error', - 'no-ternary': 'off', - 'no-throw-literal': 'error', - 'no-trailing-spaces': 'error', - 'no-undef-init': 'error', - 'no-undefined': 'off', - 'no-underscore-dangle': 'off', - 'no-unmodified-loop-condition': 'error', - 'no-unneeded-ternary': 'error', - 'no-unused-expressions': 'error', - 'no-unused-vars': [ - 'error', - { - 'args': 'none' - } - ], - 'no-use-before-define': 'off', - 'no-useless-call': 'error', - 'no-useless-computed-key': 'error', - 'no-useless-concat': 'error', - 'no-useless-constructor': 'error', - 'no-useless-escape': 'off', - 'no-useless-rename': 'error', - 'no-useless-return': 'error', - 'no-var': 'off', - 'no-void': 'error', - 'no-warning-comments': 'error', - 'no-whitespace-before-property': 'error', - 'no-with': 'error', - 'nonblock-statement-body-position': 'error', - 'object-curly-newline': 'off', - 'object-curly-spacing': [ - 'error', - 'never' - ], - 'object-property-newline': 'off', - 'object-shorthand': 'off', - 'one-var': 'off', - 'one-var-declaration-per-line': 'error', - 'operator-assignment': [ - 'error', - 'always' - ], - 'operator-linebreak': 'off', - 'padded-blocks': 'off', - 'prefer-arrow-callback': 'off', - 'prefer-const': 'error', - 'prefer-destructuring': [ - 'error', - { - 'array': false, - 'object': false - } - ], - 'prefer-numeric-literals': 'error', - 'prefer-promise-reject-errors': 'error', - 'prefer-reflect': 'off', - 'prefer-rest-params': 'off', - 'prefer-spread': 'off', - 'prefer-template': 'off', - 'quote-props': 'off', - 'quotes': [ - 'error', - 'single', - { - 'avoidEscape': true - } - ], - 'radix': 'error', - 'require-await': 'error', - 'require-jsdoc': 'off', - 'rest-spread-spacing': 'error', - 'semi': 'off', - 'semi-spacing': [ - 'error', - { - 'after': true, - 'before': false - } - ], - 'sort-imports': 'error', - 'sort-keys': 'off', - 'sort-vars': 'error', - 'space-before-blocks': 'error', - 'space-before-function-paren': 'off', - 'space-in-parens': [ - 'error', - 'never' - ], - 'space-infix-ops': 'error', - 'space-unary-ops': 'error', - 'spaced-comment': [ - 'error', - 'always' - ], - 'strict': 'off', - 'symbol-description': 'error', - 'template-curly-spacing': 'error', - 'template-tag-spacing': 'error', - 'unicode-bom': [ - 'error', - 'never' - ], - 'valid-jsdoc': 'off', - 'vars-on-top': 'off', - 'wrap-iife': 'error', - 'wrap-regex': 'off', - 'yield-star-spacing': 'error', - 'yoda': [ - 'error', - 'never' - ] - } -}; diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 3770944..b110f94 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -5,46 +5,30 @@ name: CI on: push: - branches: [ master ] + branches: [master] pull_request: - branches: [ master ] + branches: [master] jobs: test: - runs-on: ubuntu-latest env: TELNYX_MOCK_OPEN_API_URI: https://raw.githubusercontent.com/team-telnyx/openapi/master/openapi/spec3.json strategy: matrix: - node-version: [18.x, 20.x] + node-version: [18.x, 20.x, 22.x] steps: - - uses: actions/checkout@v2 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - name: setup-telnyx-prism-mock - run: source ./.github/scripts/before_install.sh - - run: npm ci - - run: npm run build --if-present - - name: Node ${{ matrix.node-version }} - run: npm test - - name: Report - run: npm run report - # - name: Coveralls Parallel - # uses: coverallsapp/github-action@master - # with: - # github-token: ${{ secrets.github_token }} - # flag-name: run-${{ matrix.node-version }} - # parallel: true - # finish: - # needs: test - # runs-on: ubuntu-latest - # steps: - # - name: Coveralls Finished - # uses: coverallsapp/github-action@master - # with: - # github-token: ${{ secrets.github_token }} - # parallel-finished: true \ No newline at end of file + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - name: setup-telnyx-prism-mock + run: source ./.github/scripts/before_install.sh + - run: npm ci + - run: npm run build --if-present + - name: Node ${{ matrix.node-version }} + run: npm test + - name: Report + run: npm run report diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index be64353..4237372 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -14,28 +14,28 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-node@v1 with: - node-version: 18 + node-version: 20 test: runs-on: ubuntu-latest env: TELNYX_MOCK_OPEN_API_URI: https://raw.githubusercontent.com/team-telnyx/openapi/master/openapi/spec3.json strategy: matrix: - node-version: [18.x, 20.x] + node-version: [18.x, 20.x, 22.x] steps: - - uses: actions/checkout@v2 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - name: setup-telnyx-prism-mock - run: source ./.github/scripts/before_install.sh - - run: npm ci - - run: npm run build --if-present - - name: Node ${{ matrix.node-version }} - run: npm test - - name: Report - run: npm run report + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - name: setup-telnyx-prism-mock + run: source ./.github/scripts/before_install.sh + - run: npm ci + - run: npm run build --if-present + - name: Node ${{ matrix.node-version }} + run: npm test + - name: Report + run: npm run report publish-npm: needs: [build, test] @@ -44,7 +44,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-node@v1 with: - node-version: 18 + node-version: 20 registry-url: https://registry.npmjs.org/ - run: npm ci - run: npm publish diff --git a/.gitignore b/.gitignore index 6acb6b7..d42d993 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ node_modules +dist .npm-debug.log tags .nyc_output diff --git a/.travis.yml.bak b/.travis.yml.bak deleted file mode 100644 index 881f550..0000000 --- a/.travis.yml.bak +++ /dev/null @@ -1,37 +0,0 @@ -language: node_js - -node_js: - - "6" - - "8" - - "9" - - "10" - - "12" -sudo: false - -cache: - directories: - - telnyx-mock - -env: - global: - # If changing this number, please also look it at tests config. - - TELNYX_MOCK_VERSION=0.8.10 - -before_install: - # Unpack and start telnyx-mock so that the test suite can talk to it - - | - if [ ! -d "telnyx-mock/${TELNYX_MOCK_VERSION}" ]; then - mkdir -p telnyx-mock/${TELNYX_MOCK_VERSION} - curl -L "https://github.com/team-telnyx/telnyx-mock/releases/download/v${TELNYX_MOCK_VERSION}/telnyx-mock_${TELNYX_MOCK_VERSION}_linux_amd64.tar.gz" -o "telnyx-mock/${TELNYX_MOCK_VERSION}_linux_amd64.tar.gz" - tar -zxf "telnyx-mock/${TELNYX_MOCK_VERSION}_linux_amd64.tar.gz" -C "telnyx-mock/${TELNYX_MOCK_VERSION}/" - fi - - | - telnyx-mock/${TELNYX_MOCK_VERSION}/telnyx-mock > /dev/null & - TELNYX_MOCK_PID=$! - - export PATH="${PATH}:${PWD}/telnyx-mock/${TELNYX_MOCK_VERSION}" - -after_success: npm run report && npm run coveralls - -notifications: - slack: - secure: WHTtuszxPjFGo8nPpC/qNr5ZG3B4iWeD35i5orXa2E0SYhqEsr8O/jvfQxr4UASytgid4z3vU+qzaat5pLgmIXWapzlpmO8jWxIw+Ps3X2zInsnLve2HmB226tPS6ki5CziW2kKDXadeMIASJ3sm/fbhxgSug4fW7X7H5ziUhGHveXb1wUWPRqQXl20SNsSK1cfVwbQJr3vf/ThvnKI6AuT07ckROryIU5W0lyqdGpYBhHdrlq4rRihYySQX5gKYoBbbcltTly5ayUeHig3w1eo2NHpld3lcEgGxHLgAlL01A3af/a6IjdBxKiCghURGKwnHYUdL8U6vrH/2Sj3t9VdkgtlBurzpV42PXhtL8nTIpYQpGfQGhG8ZfXxEJA3e9lZkWUG54PXCDrLWnRBw/HrSyZoKhuWtdF8WTQuwMin+dzKRtHTbAxwPHCE+mHIk4sFu9nDi3FFHDQYnq3+XrMNk8+085KUE/bf5WToQBJ1yBO3NJKn3IDI2ifsLo02iL2tQeJ46+BN5iPnQcYdiqyto/PeCCuGtf5NuvmoeDvK0BV/lTQ0YBJWuBvd+VUO0DUrTkCC0SG8HlVjhVktqciwyCky8IosXS9TzfncooMq22gRoO/zt4fR19iTojcmZW5fu7LdadBnRHiCX7hEtaPpNMdsyj48a0VkRgM1dzHE= diff --git a/README.md b/README.md index 7f85d87..f4eb05f 100644 --- a/README.md +++ b/README.md @@ -313,10 +313,6 @@ The test suite depends on the [Prism Mock Server](https://github.com/stoplightio ```bash npm install -g @stoplight/prism-cli - -# OR - -yarn global add @stoplight/prism-cli ``` Once installed, start the prism mock service with the following command: @@ -335,7 +331,7 @@ One final step -- because the Node SDK originally expected to reach the legacy ` git clone git@github.com:team-telnyx/telnyx-prism-mock.git cd telnyx-prism-mock/proxy -yarn install +npm install node index.js ``` @@ -395,6 +391,24 @@ To view verbose debugging for `nock` run the tests with: $ DEBUG=nock.* npm test ``` +### Typescript + +Run: + +```bash +npm run build +``` + +Then check output in [dist](./dist) folder + +### Linter (Prettier) + +Add an [editor integration](https://prettier.io/docs/en/editors.html) or: + +```bash +$ npm run fix +``` + ## Acknowledgements The contributors and maintainers of Telnyx Node would like to extend their deep gratitude to the diff --git a/eslint.config.cjs b/eslint.config.cjs new file mode 100644 index 0000000..f70929d --- /dev/null +++ b/eslint.config.cjs @@ -0,0 +1,254 @@ +const eslintPluginPrettierRecommended = require('eslint-plugin-prettier/recommended'); + +module.exports = [ + { + files: ['./src/**/*.ts'], + rules: { + 'accessor-pairs': 'error', + 'array-bracket-spacing': ['error', 'never'], + 'array-callback-return': 'off', + 'arrow-body-style': 'error', + 'arrow-parens': 'error', + 'arrow-spacing': 'error', + 'block-scoped-var': 'off', + 'block-spacing': 'off', + 'brace-style': [ + 'error', + '1tbs', + { + allowSingleLine: true, + }, + ], + camelcase: [ + 'error', + { + properties: 'never', + }, + ], + 'capitalized-comments': 'off', + 'class-methods-use-this': 'error', + 'comma-dangle': 'off', + 'comma-spacing': 'off', + 'comma-style': ['error', 'last'], + complexity: 'error', + 'computed-property-spacing': ['error', 'never'], + 'consistent-return': 'off', + 'consistent-this': 'off', + curly: 'error', + 'default-case': 'off', + 'dot-location': ['error', 'property'], + 'dot-notation': 'error', + 'eol-last': 'error', + eqeqeq: 'off', + 'func-call-spacing': 'error', + 'func-name-matching': 'error', + 'func-names': 'off', + 'func-style': ['error', 'declaration'], + 'generator-star-spacing': 'error', + 'global-require': 'off', + 'guard-for-in': 'off', + 'handle-callback-err': 'off', + 'id-blacklist': 'error', + 'id-length': 'off', + 'id-match': 'error', + indent: ['error', 2], + 'init-declarations': 'off', + 'jsx-quotes': 'error', + 'key-spacing': 'error', + 'keyword-spacing': [ + 'error', + { + after: true, + before: true, + }, + ], + 'line-comment-position': 'off', + 'linebreak-style': ['error', 'unix'], + 'lines-around-comment': 'error', + 'lines-around-directive': 'error', + 'max-depth': 'error', + 'max-len': 'off', + 'max-lines': 'off', + 'max-nested-callbacks': 'error', + 'max-params': 'off', + 'max-statements': 'off', + 'max-statements-per-line': 'off', + 'multiline-ternary': 'off', + 'new-cap': 'error', + 'new-parens': 'error', + 'newline-after-var': 'off', + 'newline-before-return': 'off', + 'newline-per-chained-call': 'off', + 'no-alert': 'error', + 'no-array-constructor': 'error', + 'no-await-in-loop': 'error', + 'no-bitwise': 'off', + 'no-caller': 'error', + 'no-catch-shadow': 'off', + 'no-compare-neg-zero': 'error', + 'no-confusing-arrow': 'error', + 'no-continue': 'off', + 'no-div-regex': 'error', + 'no-duplicate-imports': 'error', + 'no-else-return': 'off', + 'no-empty-function': 'off', + 'no-eq-null': 'off', + 'no-eval': 'error', + 'no-extend-native': 'error', + 'no-extra-bind': 'error', + 'no-extra-label': 'error', + 'no-extra-parens': 'off', + 'no-floating-decimal': 'error', + 'no-implicit-globals': 'error', + 'no-implied-eval': 'error', + 'no-inline-comments': 'off', + 'no-inner-declarations': ['error', 'functions'], + 'no-invalid-this': 'off', + 'no-iterator': 'error', + 'no-label-var': 'error', + 'no-labels': 'error', + 'no-lone-blocks': 'error', + 'no-lonely-if': 'error', + 'no-loop-func': 'error', + 'no-magic-numbers': 'off', + 'no-mixed-operators': 'error', + 'no-mixed-requires': 'error', + 'no-multi-assign': 'off', + 'no-multi-spaces': 'error', + 'no-multi-str': 'error', + 'no-multiple-empty-lines': 'error', + 'no-native-reassign': 'error', + 'no-negated-condition': 'off', + 'no-negated-in-lhs': 'error', + 'no-nested-ternary': 'error', + 'no-new': 'error', + 'no-new-func': 'error', + 'no-new-object': 'error', + 'no-new-require': 'error', + 'no-new-wrappers': 'error', + 'no-octal-escape': 'error', + 'no-param-reassign': 'off', + 'no-path-concat': 'error', + 'no-plusplus': [ + 'error', + { + allowForLoopAfterthoughts: true, + }, + ], + 'no-process-env': 'off', + 'no-process-exit': 'error', + 'no-proto': 'error', + 'no-prototype-builtins': 'off', + 'no-restricted-globals': 'error', + 'no-restricted-imports': 'error', + 'no-restricted-modules': 'error', + 'no-restricted-properties': 'error', + 'no-restricted-syntax': 'error', + 'no-return-assign': 'error', + 'no-return-await': 'error', + 'no-script-url': 'error', + 'no-self-compare': 'error', + 'no-sequences': 'error', + 'no-shadow': 'off', + 'no-shadow-restricted-names': 'error', + 'no-spaced-func': 'error', + 'no-sync': 'error', + 'no-tabs': 'error', + 'no-template-curly-in-string': 'error', + 'no-ternary': 'off', + 'no-throw-literal': 'error', + 'no-trailing-spaces': 'error', + 'no-undef-init': 'error', + 'no-undefined': 'off', + 'no-underscore-dangle': 'off', + 'no-unmodified-loop-condition': 'error', + 'no-unneeded-ternary': 'error', + 'no-unused-expressions': 'error', + 'no-unused-vars': [ + 'error', + { + args: 'none', + }, + ], + 'no-use-before-define': 'off', + 'no-useless-call': 'error', + 'no-useless-computed-key': 'error', + 'no-useless-concat': 'error', + 'no-useless-constructor': 'error', + 'no-useless-escape': 'off', + 'no-useless-rename': 'error', + 'no-useless-return': 'error', + 'no-var': 'off', + 'no-void': 'error', + 'no-warning-comments': 'error', + 'no-whitespace-before-property': 'error', + 'no-with': 'error', + 'nonblock-statement-body-position': 'error', + 'object-curly-newline': 'off', + 'object-curly-spacing': ['error', 'never'], + 'object-property-newline': 'off', + 'object-shorthand': 'off', + 'one-var': 'off', + 'one-var-declaration-per-line': 'error', + 'operator-assignment': ['error', 'always'], + 'operator-linebreak': 'off', + 'padded-blocks': 'off', + 'prefer-arrow-callback': 'off', + 'prefer-const': 'error', + 'prefer-destructuring': [ + 'error', + { + array: false, + object: false, + }, + ], + 'prefer-numeric-literals': 'error', + 'prefer-promise-reject-errors': 'error', + 'prefer-reflect': 'off', + 'prefer-rest-params': 'off', + 'prefer-spread': 'off', + 'prefer-template': 'off', + 'quote-props': 'off', + quotes: [ + 'error', + 'single', + { + avoidEscape: true, + }, + ], + radix: 'error', + 'require-await': 'error', + 'require-jsdoc': 'off', + 'rest-spread-spacing': 'error', + semi: 'off', + 'semi-spacing': [ + 'error', + { + after: true, + before: false, + }, + ], + 'sort-imports': 'error', + 'sort-keys': 'off', + 'sort-vars': 'error', + 'space-before-blocks': 'error', + 'space-before-function-paren': 'off', + 'space-in-parens': ['error', 'never'], + 'space-infix-ops': 'error', + 'space-unary-ops': 'error', + 'spaced-comment': ['error', 'always'], + strict: 'off', + 'symbol-description': 'error', + 'template-curly-spacing': 'error', + 'template-tag-spacing': 'error', + 'unicode-bom': ['error', 'never'], + 'valid-jsdoc': 'off', + 'vars-on-top': 'off', + 'wrap-iife': 'error', + 'wrap-regex': 'off', + 'yield-star-spacing': 'error', + yoda: ['error', 'never'], + }, + }, + {...eslintPluginPrettierRecommended, files: ['./src/**/*.ts']}, +]; diff --git a/lib/Error.js b/lib/Error.js index 61154f3..9d7d7a1 100644 --- a/lib/Error.js +++ b/lib/Error.js @@ -9,7 +9,7 @@ module.exports = _Error; */ function _Error(raw) { this.populate.apply(this, arguments); - this.stack = (new Error(this.message)).stack; + this.stack = new Error(this.message).stack; } function buildMessage(raw) { @@ -37,7 +37,7 @@ function errorCount(errors) { function message(errors) { if (Array.isArray(errors)) { - return errors[0] && (` ${errors[0].title || errors[0].detail}`); + return errors[0] && ` ${errors[0].title || errors[0].detail}`; } else { return ` ${errors}`; } @@ -63,7 +63,7 @@ function idString(raw) { _Error.prototype = Object.create(Error.prototype); _Error.prototype.type = 'GenericError'; -_Error.prototype.populate = function(type, message) { +_Error.prototype.populate = function (type, message) { this.type = type; this.message = message; }; @@ -74,9 +74,9 @@ _Error.extend = utils.protoExtend; * Create subclass of internal Error klass * (Specifically for errors returned from Telnyx's REST API) */ -var TelnyxError = _Error.TelnyxError = _Error.extend({ +var TelnyxError = (_Error.TelnyxError = _Error.extend({ type: 'TelnyxError', - populate: function(raw) { + populate: function (raw) { var message; if (raw.message) { message = raw.message; @@ -85,7 +85,7 @@ var TelnyxError = _Error.TelnyxError = _Error.extend({ } // Move from prototype def (so it appears in stringified obj) this.type = this.type; - this.stack = (new Error(message)).stack; + this.stack = new Error(message).stack; this.message = message; this.raw = raw; this.headers = raw.headers; @@ -93,51 +93,73 @@ var TelnyxError = _Error.TelnyxError = _Error.extend({ this.statusCode = raw.statusCode; this.responseBody = raw.responseBody; }, -}); +})); /** - * Helper factory which takes raw stripe errors and outputs wrapping instances + * Helper factory which takes raw telnyx errors and outputs wrapping instances */ -TelnyxError.generate = function(rawTelnyxError) { +TelnyxError.generate = function (rawTelnyxError) { switch (rawTelnyxError.statusCode) { - case 400: - return new _Error.TelnyxInvalidRequestError(rawTelnyxError); - case 401: - return new _Error.TelnyxAuthenticationError(rawTelnyxError); - case 403: - return new _Error.TelnyxPermissionError(rawTelnyxError); - case 404: - return new _Error.TelnyxResourceNotFoundError(rawTelnyxError); - case 405: - return new _Error.TelnyxMethodNotSupportedError(rawTelnyxError); - case 408: - return new _Error.TelnyxTimeoutError(rawTelnyxError); - case 415: - return new _Error.TelnyxUnsupportedMediaTypeError(rawTelnyxError); - case 422: - return new _Error.TelnyxInvalidParametersError(rawTelnyxError); - case 429: - return new _Error.TelnyxRateLimitError(rawTelnyxError); - case 500: - return new _Error.TelnyxAPIError(rawTelnyxError); - case 503: - return new _Error.TelnyxServiceUnavailableError(rawTelnyxError); + case 400: + return new _Error.TelnyxInvalidRequestError(rawTelnyxError); + case 401: + return new _Error.TelnyxAuthenticationError(rawTelnyxError); + case 403: + return new _Error.TelnyxPermissionError(rawTelnyxError); + case 404: + return new _Error.TelnyxResourceNotFoundError(rawTelnyxError); + case 405: + return new _Error.TelnyxMethodNotSupportedError(rawTelnyxError); + case 408: + return new _Error.TelnyxTimeoutError(rawTelnyxError); + case 415: + return new _Error.TelnyxUnsupportedMediaTypeError(rawTelnyxError); + case 422: + return new _Error.TelnyxInvalidParametersError(rawTelnyxError); + case 429: + return new _Error.TelnyxRateLimitError(rawTelnyxError); + case 500: + return new _Error.TelnyxAPIError(rawTelnyxError); + case 503: + return new _Error.TelnyxServiceUnavailableError(rawTelnyxError); } return new _Error('Generic', 'Unknown Error'); }; // Specific Telnyx Error types: -_Error.TelnyxInvalidRequestError = TelnyxError.extend({type: 'TelnyxInvalidRequestError'}); // 400 -_Error.TelnyxAuthenticationError = TelnyxError.extend({type: 'TelnyxAuthenticationError'}); // 401 -_Error.TelnyxPermissionError = TelnyxError.extend({type: 'TelnyxPermissionError'}); // 403 -_Error.TelnyxResourceNotFoundError = TelnyxError.extend({type: 'TelnyxResourceNotFoundError'}); // 404 -_Error.TelnyxMethodNotSupportedError = TelnyxError.extend({type: 'TelnyxMethodNotSupportedError'}); // 405 +_Error.TelnyxInvalidRequestError = TelnyxError.extend({ + type: 'TelnyxInvalidRequestError', +}); // 400 +_Error.TelnyxAuthenticationError = TelnyxError.extend({ + type: 'TelnyxAuthenticationError', +}); // 401 +_Error.TelnyxPermissionError = TelnyxError.extend({ + type: 'TelnyxPermissionError', +}); // 403 +_Error.TelnyxResourceNotFoundError = TelnyxError.extend({ + type: 'TelnyxResourceNotFoundError', +}); // 404 +_Error.TelnyxMethodNotSupportedError = TelnyxError.extend({ + type: 'TelnyxMethodNotSupportedError', +}); // 405 _Error.TelnyxTimeoutError = TelnyxError.extend({type: 'TelnyxTimeoutError'}); // 408 -_Error.TelnyxUnsupportedMediaTypeError = TelnyxError.extend({type: 'TelnyxUnsupportedMediaTypeError'}); // 415 -_Error.TelnyxInvalidParametersError = TelnyxError.extend({type: 'TelnyxInvalidParametersError'}); // 422 -_Error.TelnyxRateLimitError = TelnyxError.extend({type: 'TelnyxRateLimitError'}); // 429 +_Error.TelnyxUnsupportedMediaTypeError = TelnyxError.extend({ + type: 'TelnyxUnsupportedMediaTypeError', +}); // 415 +_Error.TelnyxInvalidParametersError = TelnyxError.extend({ + type: 'TelnyxInvalidParametersError', +}); // 422 +_Error.TelnyxRateLimitError = TelnyxError.extend({ + type: 'TelnyxRateLimitError', +}); // 429 _Error.TelnyxAPIError = TelnyxError.extend({type: 'TelnyxAPIError'}); // 500 -_Error.TelnyxServiceUnavailableError = TelnyxError.extend({type: 'TelnyxServiceUnavailableError'}); // 503 +_Error.TelnyxServiceUnavailableError = TelnyxError.extend({ + type: 'TelnyxServiceUnavailableError', +}); // 503 -_Error.TelnyxConnectionError = TelnyxError.extend({type: 'TelnyxConnectionError'}); -_Error.TelnyxSignatureVerificationError = TelnyxError.extend({type: 'TelnyxSignatureVerificationError'}); +_Error.TelnyxConnectionError = TelnyxError.extend({ + type: 'TelnyxConnectionError', +}); +_Error.TelnyxSignatureVerificationError = TelnyxError.extend({ + type: 'TelnyxSignatureVerificationError', +}); diff --git a/npm-shrinkwrap.json b/package-lock.json similarity index 88% rename from npm-shrinkwrap.json rename to package-lock.json index de620af..48d0aa0 100644 --- a/npm-shrinkwrap.json +++ b/package-lock.json @@ -9,12 +9,8 @@ "version": "1.27.0", "license": "MIT", "dependencies": { - "lodash.isplainobject": "^4.0.6", - "qs": "^6.11.2", - "safe-buffer": "^5.2.1", - "telnyx": "^1.26.2", - "tweetnacl": "^1.0.3", - "uuid": "^9.0.1" + "@types/node": "^20.0.0", + "@types/qs": "^6.9.15" }, "devDependencies": { "chai": "~4.4.1", @@ -22,13 +18,23 @@ "coveralls": "^3.1.1", "debug": "^4.3.4", "eslint": "^8.57.0", + "eslint-config-prettier": "^9.1.0", "eslint-plugin-chai-friendly": "^0.7.4", + "eslint-plugin-prettier": "^5.2.1", + "lodash.isplainobject": "^4.0.6", "mocha": "^10.3.0", "nock": "^13.5.4", - "nyc": "^15.1.0" + "nyc": "^15.1.0", + "prettier": "^3.0.0", + "qs": "^6.11.2", + "safe-buffer": "^5.2.1", + "telnyx": "^1.26.2", + "tweetnacl": "^1.0.3", + "typescript": "^5.5.4", + "uuid": "^9.0.1" }, "engines": { - "node": "^6 || >=8" + "node": "^18 || >=20" } }, "node_modules/@ampproject/remapping": { @@ -58,30 +64,30 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.24.7.tgz", - "integrity": "sha512-qJzAIcv03PyaWqxRgO4mSU3lihncDT296vnyuE2O8uA4w3UHWI4S3hgeZd1L8W1Bft40w9JxJ2b412iDUFFRhw==", + "version": "7.25.4", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.25.4.tgz", + "integrity": "sha512-+LGRog6RAsCJrrrg/IO6LGmpphNe5DiK30dGjCoxxeGv49B10/3XYGxPsAwrDlMFcFEvdAUavDT8r9k/hSyQqQ==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/core": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.7.tgz", - "integrity": "sha512-nykK+LEK86ahTkX/3TgauT0ikKoNCfKHEaZYTUVupJdTLzGNvrblu4u6fa7DhZONAltdf8e662t/abY8idrd/g==", + "version": "7.25.2", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.25.2.tgz", + "integrity": "sha512-BBt3opiCOxUr9euZ5/ro/Xv8/V7yJ5bjYMqG/C1YAo8MIKAnumZalCN+msbci3Pigy4lIQfPUpfMM27HMGaYEA==", "dev": true, "dependencies": { "@ampproject/remapping": "^2.2.0", "@babel/code-frame": "^7.24.7", - "@babel/generator": "^7.24.7", - "@babel/helper-compilation-targets": "^7.24.7", - "@babel/helper-module-transforms": "^7.24.7", - "@babel/helpers": "^7.24.7", - "@babel/parser": "^7.24.7", - "@babel/template": "^7.24.7", - "@babel/traverse": "^7.24.7", - "@babel/types": "^7.24.7", + "@babel/generator": "^7.25.0", + "@babel/helper-compilation-targets": "^7.25.2", + "@babel/helper-module-transforms": "^7.25.2", + "@babel/helpers": "^7.25.0", + "@babel/parser": "^7.25.0", + "@babel/template": "^7.25.0", + "@babel/traverse": "^7.25.2", + "@babel/types": "^7.25.2", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -103,12 +109,12 @@ "dev": true }, "node_modules/@babel/generator": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.7.tgz", - "integrity": "sha512-oipXieGC3i45Y1A41t4tAqpnEZWgB/lC6Ehh6+rOviR5XWpTtMmLN+fGjz9vOiNRt0p6RtO6DtD0pdU3vpqdSA==", + "version": "7.25.6", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.25.6.tgz", + "integrity": "sha512-VPC82gr1seXOpkjAAKoLhP50vx4vGNlF4msF64dSFq1P8RfB+QAuJWGHPXXPc8QyfVWwwB/TNNU4+ayZmHNbZw==", "dev": true, "dependencies": { - "@babel/types": "^7.24.7", + "@babel/types": "^7.25.6", "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25", "jsesc": "^2.5.1" @@ -118,14 +124,14 @@ } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.24.7.tgz", - "integrity": "sha512-ctSdRHBi20qWOfy27RUb4Fhp07KSJ3sXcuSvTrXrc4aG8NSYDo1ici3Vhg9bg69y5bj0Mr1lh0aeEgTvc12rMg==", + "version": "7.25.2", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.25.2.tgz", + "integrity": "sha512-U2U5LsSaZ7TAt3cfaymQ8WHh0pxvdHoEk6HVpaexxixjyEquMh0L0YNJNM6CTGKMXV1iksi0iZkGw4AcFkPaaw==", "dev": true, "dependencies": { - "@babel/compat-data": "^7.24.7", - "@babel/helper-validator-option": "^7.24.7", - "browserslist": "^4.22.2", + "@babel/compat-data": "^7.25.2", + "@babel/helper-validator-option": "^7.24.8", + "browserslist": "^4.23.1", "lru-cache": "^5.1.1", "semver": "^6.3.1" }, @@ -133,43 +139,6 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/helper-environment-visitor": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.24.7.tgz", - "integrity": "sha512-DoiN84+4Gnd0ncbBOM9AZENV4a5ZiL39HYMyZJGZ/AZEykHYdJw0wW3kdcsh9/Kn+BRXHLkkklZ51ecPKmI1CQ==", - "dev": true, - "dependencies": { - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-function-name": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.24.7.tgz", - "integrity": "sha512-FyoJTsj/PEUWu1/TYRiXTIHc8lbw+TDYkZuoE43opPS5TrI7MyONBE1oNvfguEXAD9yhQRrVBnXdXzSLQl9XnA==", - "dev": true, - "dependencies": { - "@babel/template": "^7.24.7", - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-hoist-variables": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.24.7.tgz", - "integrity": "sha512-MJJwhkoGy5c4ehfoRyrJ/owKeMl19U54h27YYftT0o2teQ3FJ3nQUf/I3LlJsX4l3qlw7WRXUmiyajvHXoTubQ==", - "dev": true, - "dependencies": { - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/helper-module-imports": { "version": "7.24.7", "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.24.7.tgz", @@ -184,16 +153,15 @@ } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.24.7.tgz", - "integrity": "sha512-1fuJEwIrp+97rM4RWdO+qrRsZlAeL1lQJoPqtCYWv0NL115XM93hIH4CSRln2w52SqvmY5hqdtauB6QFCDiZNQ==", + "version": "7.25.2", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.25.2.tgz", + "integrity": "sha512-BjyRAbix6j/wv83ftcVJmBt72QtHI56C7JXZoG2xATiLpmoC7dpd8WnkikExHDVPpi/3qCmO6WY1EaXOluiecQ==", "dev": true, "dependencies": { - "@babel/helper-environment-visitor": "^7.24.7", "@babel/helper-module-imports": "^7.24.7", "@babel/helper-simple-access": "^7.24.7", - "@babel/helper-split-export-declaration": "^7.24.7", - "@babel/helper-validator-identifier": "^7.24.7" + "@babel/helper-validator-identifier": "^7.24.7", + "@babel/traverse": "^7.25.2" }, "engines": { "node": ">=6.9.0" @@ -215,22 +183,10 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/helper-split-export-declaration": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.7.tgz", - "integrity": "sha512-oy5V7pD+UvfkEATUKvIjvIAH/xCzfsFVw7ygW2SI6NClZzquT+mwdTfgfdbUiceh6iQO0CHtCPsyze/MZ2YbAA==", - "dev": true, - "dependencies": { - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/helper-string-parser": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.7.tgz", - "integrity": "sha512-7MbVt6xrwFQbunH2DNQsAP5sTGxfqQtErvBIvIMi6EQnbgUOuVYanvREcmFrOPhoXBrTtjhhP+lW+o5UfK+tDg==", + "version": "7.24.8", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.8.tgz", + "integrity": "sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ==", "dev": true, "engines": { "node": ">=6.9.0" @@ -246,22 +202,22 @@ } }, "node_modules/@babel/helper-validator-option": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.24.7.tgz", - "integrity": "sha512-yy1/KvjhV/ZCL+SM7hBrvnZJ3ZuT9OuZgIJAGpPEToANvc3iM6iDvBnRjtElWibHU6n8/LPR/EjX9EtIEYO3pw==", + "version": "7.24.8", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.24.8.tgz", + "integrity": "sha512-xb8t9tD1MHLungh/AIoWYN+gVHaB9kwlu8gffXGSt3FFEIT7RjS+xWbc2vUD1UTZdIpKj/ab3rdqJ7ufngyi2Q==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helpers": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.7.tgz", - "integrity": "sha512-NlmJJtvcw72yRJRcnCmGvSi+3jDEg8qFu3z0AFoymmzLx5ERVWyzd9kVXr7Th9/8yIJi2Zc6av4Tqz3wFs8QWg==", + "version": "7.25.6", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.25.6.tgz", + "integrity": "sha512-Xg0tn4HcfTijTwfDwYlvVCl43V6h4KyVVX2aEm4qdO/PC6L2YvzLHFdmxhoeSA3eslcE6+ZVXHgWwopXYLNq4Q==", "dev": true, "dependencies": { - "@babel/template": "^7.24.7", - "@babel/types": "^7.24.7" + "@babel/template": "^7.25.0", + "@babel/types": "^7.25.6" }, "engines": { "node": ">=6.9.0" @@ -354,10 +310,13 @@ } }, "node_modules/@babel/parser": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.7.tgz", - "integrity": "sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw==", + "version": "7.25.6", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.25.6.tgz", + "integrity": "sha512-trGdfBdbD0l1ZPmcJ83eNxB9rbEax4ALFTF7fN386TMYbeCQbyme5cOEXQhbGXKebwGaB/J52w1mrklMcbgy6Q==", "dev": true, + "dependencies": { + "@babel/types": "^7.25.6" + }, "bin": { "parser": "bin/babel-parser.js" }, @@ -366,33 +325,30 @@ } }, "node_modules/@babel/template": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.7.tgz", - "integrity": "sha512-jYqfPrU9JTF0PmPy1tLYHW4Mp4KlgxJD9l2nP9fD6yT/ICi554DmrWBAEYpIelzjHf1msDP3PxJIRt/nFNfBig==", + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.25.0.tgz", + "integrity": "sha512-aOOgh1/5XzKvg1jvVz7AVrx2piJ2XBi227DHmbY6y+bM9H2FlN+IfecYu4Xl0cNiiVejlsCri89LUsbj8vJD9Q==", "dev": true, "dependencies": { "@babel/code-frame": "^7.24.7", - "@babel/parser": "^7.24.7", - "@babel/types": "^7.24.7" + "@babel/parser": "^7.25.0", + "@babel/types": "^7.25.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.7.tgz", - "integrity": "sha512-yb65Ed5S/QAcewNPh0nZczy9JdYXkkAbIsEo+P7BE7yO3txAY30Y/oPa3QkQ5It3xVG2kpKMg9MsdxZaO31uKA==", + "version": "7.25.6", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.25.6.tgz", + "integrity": "sha512-9Vrcx5ZW6UwK5tvqsj0nGpp/XzqthkT0dqIc9g1AdtygFToNtTF67XzYS//dm+SAK9cp3B9R4ZO/46p63SCjlQ==", "dev": true, "dependencies": { "@babel/code-frame": "^7.24.7", - "@babel/generator": "^7.24.7", - "@babel/helper-environment-visitor": "^7.24.7", - "@babel/helper-function-name": "^7.24.7", - "@babel/helper-hoist-variables": "^7.24.7", - "@babel/helper-split-export-declaration": "^7.24.7", - "@babel/parser": "^7.24.7", - "@babel/types": "^7.24.7", + "@babel/generator": "^7.25.6", + "@babel/parser": "^7.25.6", + "@babel/template": "^7.25.0", + "@babel/types": "^7.25.6", "debug": "^4.3.1", "globals": "^11.1.0" }, @@ -410,12 +366,12 @@ } }, "node_modules/@babel/types": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", - "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", + "version": "7.25.6", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.25.6.tgz", + "integrity": "sha512-/l42B1qxpG6RdfYf343Uw1vmDjeNhneUXtzhojE7pDgfpEypmRhI6j1kr17XCVv4Cgl9HdAiQY2x0GwKm7rWCw==", "dev": true, "dependencies": { - "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-string-parser": "^7.24.8", "@babel/helper-validator-identifier": "^7.24.7", "to-fast-properties": "^2.0.0" }, @@ -439,9 +395,9 @@ } }, "node_modules/@eslint-community/regexpp": { - "version": "4.10.1", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.1.tgz", - "integrity": "sha512-Zm2NGpWELsQAD1xsJzGQpYfvICSsFkEpU0jxBjfdC6uNEWXcHnfs9hScFWtXVDVl+rBQJGrl4g1vcKIejpH9dA==", + "version": "4.11.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.11.0.tgz", + "integrity": "sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A==", "dev": true, "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" @@ -651,9 +607,9 @@ } }, "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", "dev": true }, "node_modules/@jridgewell/trace-mapping": { @@ -701,6 +657,31 @@ "node": ">= 8" } }, + "node_modules/@pkgr/core": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.1.1.tgz", + "integrity": "sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==", + "dev": true, + "engines": { + "node": "^12.20.0 || ^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts" + } + }, + "node_modules/@types/node": { + "version": "20.16.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.16.2.tgz", + "integrity": "sha512-91s/n4qUPV/wg8eE9KHYW1kouTfDk2FPGjXbBMfRWP/2vg1rCXNQL1OCabwGs0XSdukuK+MwCDXE30QpSeMUhQ==", + "dependencies": { + "undici-types": "~6.19.2" + } + }, + "node_modules/@types/qs": { + "version": "6.9.15", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.15.tgz", + "integrity": "sha512-uXHQKES6DQKKCLh441Xv/dwxOq1TVS3JPUMlEqoEglvlhR6Mxnlew/Xq/LRVHpLyk7iK3zODe1qYHIMltO7XGg==" + }, "node_modules/@ungap/structured-clone": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", @@ -708,9 +689,9 @@ "dev": true }, "node_modules/acorn": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.0.tgz", - "integrity": "sha512-RTvkC4w+KNXrM39/lWCUaG0IbRkWdCv7W/IOW9oU6SawyxulvkQy5HQPVTKxEjczcUvapcrw3cFx/60VN/NRNw==", + "version": "8.12.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", + "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -758,9 +739,9 @@ } }, "node_modules/ansi-colors": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", "dev": true, "engines": { "node": ">=6" @@ -873,9 +854,9 @@ } }, "node_modules/aws4": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.13.0.tgz", - "integrity": "sha512-3AungXC4I8kKsS9PuS4JH2nc+0bVY/mjgrephHTIi8fpEeGsTHBUJeosp0Wc1myYMElmD0B3Oc4XL/HVJ4PV2g==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.13.2.tgz", + "integrity": "sha512-lHe62zvbTB5eEABUVi/AwVh0ZKY9rMMDhmm+eeyuuUQbQ3+J+fONVQOZyj+DdrvD4BY33uYniyRJ4UJIaSKAfw==", "dev": true }, "node_modules/balanced-match": { @@ -940,9 +921,9 @@ "dev": true }, "node_modules/browserslist": { - "version": "4.23.1", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.1.tgz", - "integrity": "sha512-TUfofFo/KsK/bWZ9TWQ5O26tsWW4Uhmt8IYklbnUa70udB6P2wA7w7o4PY4muaEPBQaAX+CEnmmIA41NVHtPVw==", + "version": "4.23.3", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.3.tgz", + "integrity": "sha512-btwCFJVjI4YWDNfau8RhZ+B1Q/VLoUITrm3RlP6y1tYGWIOa+InuYiRGXUBXo8nA1qKmHMyLB/iVQg5TT4eFoA==", "dev": true, "funding": [ { @@ -959,10 +940,10 @@ } ], "dependencies": { - "caniuse-lite": "^1.0.30001629", - "electron-to-chromium": "^1.4.796", - "node-releases": "^2.0.14", - "update-browserslist-db": "^1.0.16" + "caniuse-lite": "^1.0.30001646", + "electron-to-chromium": "^1.5.4", + "node-releases": "^2.0.18", + "update-browserslist-db": "^1.1.0" }, "bin": { "browserslist": "cli.js" @@ -990,6 +971,7 @@ "version": "1.0.7", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", + "dev": true, "dependencies": { "es-define-property": "^1.0.0", "es-errors": "^1.3.0", @@ -1023,9 +1005,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001638", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001638.tgz", - "integrity": "sha512-5SuJUJ7cZnhPpeLHaH0c/HPAnAHZvS6ElWyHK9GSIbVOQABLzowiI2pjmpvZ1WEbkyz46iFd4UXlOHR5SqgfMQ==", + "version": "1.0.30001653", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001653.tgz", + "integrity": "sha512-XGWQVB8wFQ2+9NZwZ10GxTYC5hk0Fa+q8cSkr0tgvMhYhMHP/QC+WTgrePMDBWiWc/pV+1ik82Al20XOK25Gcw==", "dev": true, "funding": [ { @@ -1262,9 +1244,9 @@ } }, "node_modules/debug": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", - "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz", + "integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==", "dev": true, "dependencies": { "ms": "2.1.2" @@ -1324,6 +1306,7 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dev": true, "dependencies": { "es-define-property": "^1.0.0", "es-errors": "^1.3.0", @@ -1346,9 +1329,9 @@ } }, "node_modules/diff": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", - "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", + "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", "dev": true, "engines": { "node": ">=0.3.1" @@ -1377,9 +1360,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.812", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.812.tgz", - "integrity": "sha512-7L8fC2Ey/b6SePDFKR2zHAy4mbdp1/38Yk5TsARO66W3hC5KEaeKMMHoxwtuH+jcu2AYLSn9QX04i95t6Fl1Hg==", + "version": "1.5.13", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.13.tgz", + "integrity": "sha512-lbBcvtIJ4J6sS4tb5TLp1b4LyfCdMkwStzXPyAgVgTRAsep4bvrAGaBOP7ZJtQMNJpSQ9SqG4brWOroNaQtm7Q==", "dev": true }, "node_modules/emoji-regex": { @@ -1392,6 +1375,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "dev": true, "dependencies": { "get-intrinsic": "^1.2.4" }, @@ -1403,6 +1387,7 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "dev": true, "engines": { "node": ">= 0.4" } @@ -1414,9 +1399,9 @@ "dev": true }, "node_modules/escalade": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", - "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", "dev": true, "engines": { "node": ">=6" @@ -1489,6 +1474,18 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/eslint-config-prettier": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz", + "integrity": "sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==", + "dev": true, + "bin": { + "eslint-config-prettier": "bin/cli.js" + }, + "peerDependencies": { + "eslint": ">=7.0.0" + } + }, "node_modules/eslint-plugin-chai-friendly": { "version": "0.7.4", "resolved": "https://registry.npmjs.org/eslint-plugin-chai-friendly/-/eslint-plugin-chai-friendly-0.7.4.tgz", @@ -1501,6 +1498,36 @@ "eslint": ">=3.0.0" } }, + "node_modules/eslint-plugin-prettier": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.2.1.tgz", + "integrity": "sha512-gH3iR3g4JfF+yYPaJYkN7jEl9QbweL/YfkoRlNnuIEHEz1vHVlCmWOS+eGGiRuzHQXdJFCOTxRgvju9b8VUmrw==", + "dev": true, + "dependencies": { + "prettier-linter-helpers": "^1.0.0", + "synckit": "^0.9.1" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint-plugin-prettier" + }, + "peerDependencies": { + "@types/eslint": ">=8.0.0", + "eslint": ">=8.0.0", + "eslint-config-prettier": "*", + "prettier": ">=3.0.0" + }, + "peerDependenciesMeta": { + "@types/eslint": { + "optional": true + }, + "eslint-config-prettier": { + "optional": true + } + } + }, "node_modules/eslint-scope": { "version": "7.2.2", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", @@ -1578,9 +1605,9 @@ } }, "node_modules/esquery": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", - "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", + "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", "dev": true, "dependencies": { "estraverse": "^5.1.0" @@ -1640,6 +1667,12 @@ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", "dev": true }, + "node_modules/fast-diff": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz", + "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==", + "dev": true + }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", @@ -1827,6 +1860,7 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -1862,6 +1896,7 @@ "version": "1.2.4", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", + "dev": true, "dependencies": { "es-errors": "^1.3.0", "function-bind": "^1.1.2", @@ -1966,6 +2001,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dev": true, "dependencies": { "get-intrinsic": "^1.1.3" }, @@ -2021,6 +2057,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "dev": true, "dependencies": { "es-define-property": "^1.0.0" }, @@ -2032,6 +2069,7 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", + "dev": true, "engines": { "node": ">= 0.4" }, @@ -2043,6 +2081,7 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true, "engines": { "node": ">= 0.4" }, @@ -2079,6 +2118,7 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dev": true, "dependencies": { "function-bind": "^1.1.2" }, @@ -2117,9 +2157,9 @@ } }, "node_modules/ignore": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", - "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", "dev": true, "engines": { "node": ">= 4" @@ -2388,9 +2428,9 @@ } }, "node_modules/istanbul-lib-report/node_modules/semver": { - "version": "7.6.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", - "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "dev": true, "bin": { "semver": "bin/semver.js" @@ -2575,7 +2615,8 @@ "node_modules/lodash.isplainobject": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", - "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==" + "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==", + "dev": true }, "node_modules/lodash.merge": { "version": "4.6.2", @@ -2684,31 +2725,31 @@ } }, "node_modules/mocha": { - "version": "10.5.2", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.5.2.tgz", - "integrity": "sha512-9btlN3JKCefPf+vKd/kcKz2SXxi12z6JswkGfaAF0saQvnsqLJk504ZmbxhSoENge08E9dsymozKgFMTl5PQsA==", + "version": "10.7.3", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.7.3.tgz", + "integrity": "sha512-uQWxAu44wwiACGqjbPYmjo7Lg8sFrS3dQe7PP2FQI+woptP4vZXSMcfMyFL/e1yFEeEpV4RtyTpZROOKmxis+A==", "dev": true, "dependencies": { - "ansi-colors": "4.1.1", - "browser-stdout": "1.3.1", + "ansi-colors": "^4.1.3", + "browser-stdout": "^1.3.1", "chokidar": "^3.5.3", - "debug": "4.3.4", - "diff": "5.0.0", - "escape-string-regexp": "4.0.0", - "find-up": "5.0.0", - "glob": "8.1.0", - "he": "1.2.0", - "js-yaml": "4.1.0", - "log-symbols": "4.1.0", - "minimatch": "5.0.1", - "ms": "2.1.3", - "serialize-javascript": "6.0.0", - "strip-json-comments": "3.1.1", - "supports-color": "8.1.1", - "workerpool": "6.2.1", - "yargs": "16.2.0", - "yargs-parser": "20.2.4", - "yargs-unparser": "2.0.0" + "debug": "^4.3.5", + "diff": "^5.2.0", + "escape-string-regexp": "^4.0.0", + "find-up": "^5.0.0", + "glob": "^8.1.0", + "he": "^1.2.0", + "js-yaml": "^4.1.0", + "log-symbols": "^4.1.0", + "minimatch": "^5.1.6", + "ms": "^2.1.3", + "serialize-javascript": "^6.0.2", + "strip-json-comments": "^3.1.1", + "supports-color": "^8.1.1", + "workerpool": "^6.5.1", + "yargs": "^16.2.0", + "yargs-parser": "^20.2.9", + "yargs-unparser": "^2.0.0" }, "bin": { "_mocha": "bin/_mocha", @@ -2733,29 +2774,6 @@ "balanced-match": "^1.0.0" } }, - "node_modules/mocha/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/mocha/node_modules/debug/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, "node_modules/mocha/node_modules/js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", @@ -2769,9 +2787,9 @@ } }, "node_modules/mocha/node_modules/minimatch": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", - "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", "dev": true, "dependencies": { "brace-expansion": "^2.0.1" @@ -2814,9 +2832,9 @@ "dev": true }, "node_modules/nock": { - "version": "13.5.4", - "resolved": "https://registry.npmjs.org/nock/-/nock-13.5.4.tgz", - "integrity": "sha512-yAyTfdeNJGGBFxWdzSKCBYxs5FxLbCg5X5Q4ets974hcQzG1+qCxvIyOo4j2Ry6MUlhWVMX4OoYDefAIIwupjw==", + "version": "13.5.5", + "resolved": "https://registry.npmjs.org/nock/-/nock-13.5.5.tgz", + "integrity": "sha512-XKYnqUrCwXC8DGG1xX4YH5yNIrlh9c065uaMZZHUoeUUINTOyt+x/G+ezYk0Ft6ExSREVIs+qBJDK503viTfFA==", "dev": true, "dependencies": { "debug": "^4.1.0", @@ -2840,9 +2858,9 @@ } }, "node_modules/node-releases": { - "version": "2.0.14", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", - "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz", + "integrity": "sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==", "dev": true }, "node_modules/normalize-path": { @@ -3056,6 +3074,7 @@ "version": "1.13.2", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz", "integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==", + "dev": true, "engines": { "node": ">= 0.4" }, @@ -3300,6 +3319,33 @@ "node": ">= 0.8.0" } }, + "node_modules/prettier": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz", + "integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==", + "dev": true, + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/prettier-linter-helpers": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", + "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", + "dev": true, + "dependencies": { + "fast-diff": "^1.1.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/process-on-spawn": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/process-on-spawn/-/process-on-spawn-1.0.0.tgz", @@ -3337,9 +3383,10 @@ } }, "node_modules/qs": { - "version": "6.12.1", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.12.1.tgz", - "integrity": "sha512-zWmv4RSuB9r2mYQw3zxQuHWeU+42aKi1wWig/j4ele4ygELZ7PEO6MM7rim9oAQH2A5MWfsAVf/jPvTPgCbvUQ==", + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", + "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", + "dev": true, "dependencies": { "side-channel": "^1.0.6" }, @@ -3552,6 +3599,7 @@ "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, "funding": [ { "type": "github", @@ -3583,9 +3631,9 @@ } }, "node_modules/serialize-javascript": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", - "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", + "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", "dev": true, "dependencies": { "randombytes": "^2.1.0" @@ -3601,6 +3649,7 @@ "version": "1.2.2", "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "dev": true, "dependencies": { "define-data-property": "^1.1.4", "es-errors": "^1.3.0", @@ -3638,6 +3687,7 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", + "dev": true, "dependencies": { "call-bind": "^1.0.7", "es-errors": "^1.3.0", @@ -3779,14 +3829,32 @@ "node": ">=8" } }, + "node_modules/synckit": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.9.1.tgz", + "integrity": "sha512-7gr8p9TQP6RAHusBOSLs46F4564ZrjV8xFmw5zCmgmhGUcw2hxsShhJ6CEiHQMgPDwAQ1fWHPM0ypc4RMAig4A==", + "dev": true, + "dependencies": { + "@pkgr/core": "^0.1.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts" + } + }, "node_modules/telnyx": { - "version": "1.26.2", - "resolved": "https://registry.npmjs.org/telnyx/-/telnyx-1.26.2.tgz", - "integrity": "sha512-c/IU4dmtxEhflD+A3cYlbetEfy6832JCr2pZ4+6A2gEAVhfFeWbWt/IAV7KJxAyAdOJJ46IMFFmaHVufMHMyEw==", + "version": "1.27.0", + "resolved": "https://registry.npmjs.org/telnyx/-/telnyx-1.27.0.tgz", + "integrity": "sha512-cVbP3jEW4TbmNL5U0UbZc3OkLg+6dHRnMYByYfJnrGw5ZRn0XKb17Hx3fLMWmGgRFow7eqVP4hlCogbIB6T3+w==", + "dev": true, "dependencies": { "lodash.isplainobject": "^4.0.6", "qs": "^6.11.2", "safe-buffer": "^5.2.1", + "telnyx": "^1.26.2", "tweetnacl": "^1.0.3", "uuid": "^9.0.1" }, @@ -3869,6 +3937,12 @@ "node": ">=0.8" } }, + "node_modules/tslib": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.7.0.tgz", + "integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==", + "dev": true + }, "node_modules/tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", @@ -3884,7 +3958,8 @@ "node_modules/tweetnacl": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz", - "integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==" + "integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==", + "dev": true }, "node_modules/type-check": { "version": "0.4.0", @@ -3899,9 +3974,9 @@ } }, "node_modules/type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.1.0.tgz", + "integrity": "sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==", "dev": true, "engines": { "node": ">=4" @@ -3928,10 +4003,28 @@ "is-typedarray": "^1.0.0" } }, + "node_modules/typescript": { + "version": "5.5.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz", + "integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/undici-types": { + "version": "6.19.8", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", + "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==" + }, "node_modules/update-browserslist-db": { - "version": "1.0.16", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.16.tgz", - "integrity": "sha512-KVbTxlBYlckhF5wgfyZXTWnMn7MMZjMu9XG8bPlliUOP9ThaF4QnhP8qrjrH7DRzHfSk0oQv1wToW+iA5GajEQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.0.tgz", + "integrity": "sha512-EdRAaAyk2cUE1wOf2DkEhzxqOQvFOoRJFNS6NeyJ01Gp2beMRpBAINjM2iDXE3KCuKhwnvHIQCJm6ThL2Z+HzQ==", "dev": true, "funding": [ { @@ -3971,6 +4064,7 @@ "version": "9.0.1", "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "dev": true, "funding": [ "https://github.com/sponsors/broofa", "https://github.com/sponsors/ctavan" @@ -4024,9 +4118,9 @@ } }, "node_modules/workerpool": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", - "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.5.1.tgz", + "integrity": "sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA==", "dev": true }, "node_modules/wrap-ansi": { @@ -4098,9 +4192,9 @@ } }, "node_modules/yargs-parser": { - "version": "20.2.4", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", - "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", "dev": true, "engines": { "node": ">=10" diff --git a/package.json b/package.json index 3354f84..ed61447 100644 --- a/package.json +++ b/package.json @@ -23,39 +23,49 @@ "type": "git", "url": "git://github.com/team-telnyx/telnyx-node.git" }, - "bugs:": "https://github.com/team-telnyx/telnyx-node/issues", + "bugs": "https://github.com/team-telnyx/telnyx-node/issues", "engines": { - "node": "^6 || >=8" + "node": "^18 || >=20" }, - "main": "lib/telnyx.js", + "main": "dist/telnyx.js", + "type": "module", + "types": "types/index.d.ts", "devDependencies": { "chai": "~4.4.1", "chai-as-promised": "~7.1.1", "coveralls": "^3.1.1", "debug": "^4.3.4", "eslint": "^8.57.0", + "eslint-config-prettier": "^9.1.0", "eslint-plugin-chai-friendly": "^0.7.4", + "eslint-plugin-prettier": "^5.2.1", + "lodash.isplainobject": "^4.0.6", "mocha": "^10.3.0", "nock": "^13.5.4", - "nyc": "^15.1.0" - }, - "dependencies": { - "lodash.isplainobject": "^4.0.6", + "nyc": "^15.1.0", + "prettier": "^3.0.0", "qs": "^6.11.2", "safe-buffer": "^5.2.1", "telnyx": "^1.26.2", "tweetnacl": "^1.0.3", + "typescript": "^5.5.4", "uuid": "^9.0.1" }, + "dependencies": { + "@types/node": "^20.0.0", + "@types/qs": "^6.9.15" + }, "license": "MIT", "scripts": { - "clean": "rm -rf ./.nyc_output ./node_modules/.cache ./coverage", + "build": "tsc", + "clean": "rm -rf ./.nyc_output ./node_modules/.cache ./coverage ./dist", + "prepack": "npm install && npm run build", "mocha": "nyc mocha", "test": "npm run lint && npm run mocha", - "lint": "eslint . --fix", + "lint": "eslint .", + "fix": "npm run lint --fix", "report": "nyc -r text -r lcov report", - "coveralls": "cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js", - "release": "telnyx-npm-release" + "coveralls": "cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js" }, "nyc": { "exclude": [ diff --git a/src/Types.d.ts b/src/Types.d.ts new file mode 100644 index 0000000..40c9318 --- /dev/null +++ b/src/Types.d.ts @@ -0,0 +1,46 @@ +import {EventEmitter} from 'events'; + +export type BufferedFile = { + name: string; + type: string; + file: {data: Uint8Array}; +}; + +/** + * Interface encapsulating various utility functions whose + * implementations depend on the platform / JS runtime. + */ +export interface PlatformFunctions { + /** + * Checks if the request data is a stream. If so, read the entire stream + * to a buffer and return the buffer. + */ + tryBufferData( + data: MultipartRequestData, + ): Promise; +} + +export type StreamingFile = { + name: string; + type: string; + file: {data: EventEmitter}; +}; + +export type TelnyxObject = { + _platformFunctions: PlatformFunctions; +}; + +export type RequestHeaders = Record; + +export type TypedData = { + name: string; + data: string | Uint8Array; + type: string; +}; + +export type RequestData = Record; + +export type MultipartRequestData = RequestData | StreamingFile | BufferedFile; +export type TelnyxResourceObject = { + _telnyx: TelnyxObject; +}; diff --git a/src/multipart.ts b/src/multipart.ts new file mode 100644 index 0000000..b76272a --- /dev/null +++ b/src/multipart.ts @@ -0,0 +1,101 @@ +'use strict'; + +import { + MultipartRequestData, + RequestData, + RequestHeaders, + TelnyxResourceObject, + TypedData, +} from './Types.js'; +import {flattenAndStringify, stringifyRequestData} from './utils.js'; + +type MultipartCallbackReturn = unknown; +type MultipartCallback = ( + error: Error | null, + data: Uint8Array | string | null, +) => MultipartCallbackReturn; + +// Method for formatting HTTP body for the multipart/form-data specification +// Mostly taken from Fermata.js +// https://github.com/natevw/fermata/blob/5d9732a33d776ce925013a265935facd1626cc88/fermata.js#L315-L343 +function multipartDataGenerator( + method: string, + data: MultipartRequestData, + headers: RequestHeaders, +): Uint8Array { + const segno = ( + Math.round(Math.random() * 1e16) + Math.round(Math.random() * 1e16) + ).toString(); + headers['Content-Type'] = `multipart/form-data; boundary=${segno}`; + const textEncoder = new TextEncoder(); + + let buffer = new Uint8Array(0); + const endBuffer = textEncoder.encode('\r\n'); + + function push(l: string | Uint8Array): void { + const prevBuffer = buffer; + const newBuffer = + l instanceof Uint8Array ? l : new Uint8Array(textEncoder.encode(l)); + buffer = new Uint8Array(prevBuffer.length + newBuffer.length + 2); + + buffer.set(prevBuffer); + buffer.set(newBuffer, prevBuffer.length); + buffer.set(endBuffer, buffer.length - 2); + } + + function q(s: string): string { + return `"${s.replace(/"|"/g, '%22').replace(/\r\n|\r|\n/g, ' ')}"`; + } + + const flattenedData = flattenAndStringify(data); + + for (const k in flattenedData) { + if (!Object.prototype.hasOwnProperty.call(flattenedData, k)) { + continue; + } + + const v = flattenedData[k]; + push('--' + segno); + if (Object.prototype.hasOwnProperty.call(v, 'data')) { + const typedEntry: TypedData = v as unknown as TypedData; + push( + 'Content-Disposition: form-data; name=' + + q(k) + + '; filename=' + + q(typedEntry.name || 'blob'), + ); + push('Content-Type: ' + (typedEntry.type || 'application/octet-stream')); + push(''); + push(typedEntry.data); + } else { + push('Content-Disposition: form-data; name=' + q(k)); + push(''); + push(v); + } + } + push('--' + segno + '--'); + + return buffer; +} + +export function multipartRequestDataProcessor( + this: TelnyxResourceObject, + method: string, + data: RequestData, + headers: RequestHeaders, + callback: MultipartCallback, +): MultipartCallbackReturn { + data = data || {}; + + if (method !== 'POST') { + return callback(null, stringifyRequestData(data)); + } + + this._telnyx._platformFunctions + .tryBufferData(data) + .then((bufferedData: MultipartRequestData) => { + const buffer = multipartDataGenerator(method, bufferedData, headers); + return callback(null, buffer); + }) + .catch((err: Error) => callback(err, null)); +} diff --git a/src/utils.ts b/src/utils.ts new file mode 100644 index 0000000..8c07adf --- /dev/null +++ b/src/utils.ts @@ -0,0 +1,54 @@ +import * as qs from 'qs'; +import {MultipartRequestData, RequestData} from './Types.js'; + +export function isObject(obj: unknown): boolean { + const type = typeof obj; + return (type === 'function' || type === 'object') && !!obj; +} + +export function stringifyRequestData(data: RequestData | string): string { + return ( + qs + .stringify(data, { + serializeDate: (d: Date) => Math.floor(d.getTime() / 1000).toString(), + }) + // Don't use strict form encoding by changing the square bracket control + // characters back to their literals. This is fine by the server, and + // makes these parameter strings easier to read. + .replace(/%5B/g, '[') + .replace(/%5D/g, ']') + ); +} + +// For use in multipart requests +export function flattenAndStringify( + data: MultipartRequestData, +): Record { + const result: Record = {}; + + const step = (obj: MultipartRequestData, prevKey: string | null): void => { + Object.entries(obj).forEach(([key, value]) => { + const newKey = prevKey ? `${prevKey}[${key}]` : key; + + if (isObject(value)) { + if ( + !(value instanceof Uint8Array) && + !Object.prototype.hasOwnProperty.call(value, 'data') + ) { + // Non-buffer non-file Objects are recursively flattened + return step(value, newKey); + } else { + // Buffers and file objects are stored without modification + result[newKey] = value; + } + } else { + // Primitives are converted to strings + result[newKey] = String(value); + } + }); + }; + + step(data, null); + + return result; +} diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..d5fbf53 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,17 @@ +{ + "include": ["src/**/*", "test/**/*.ts"], + "compilerOptions": { + "outDir": "./dist", + "lib": ["ES2023"], + "module": "node16", + "target": "ES2022", + "checkJs": false, + "alwaysStrict": true, + "noImplicitAny": true, + "noImplicitThis": true, + "strict": true, + "strictFunctionTypes": true, + "types": [ "node" ], + "esModuleInterop": false, + }, +} diff --git a/yarn.lock b/yarn.lock deleted file mode 100644 index 590043f..0000000 --- a/yarn.lock +++ /dev/null @@ -1,2407 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@ampproject/remapping@^2.2.0": - version "2.3.0" - resolved "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz" - integrity sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw== - dependencies: - "@jridgewell/gen-mapping" "^0.3.5" - "@jridgewell/trace-mapping" "^0.3.24" - -"@babel/code-frame@^7.24.7": - version "7.24.7" - resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz" - integrity sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA== - dependencies: - "@babel/highlight" "^7.24.7" - picocolors "^1.0.0" - -"@babel/compat-data@^7.24.7": - version "7.24.7" - resolved "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.24.7.tgz" - integrity sha512-qJzAIcv03PyaWqxRgO4mSU3lihncDT296vnyuE2O8uA4w3UHWI4S3hgeZd1L8W1Bft40w9JxJ2b412iDUFFRhw== - -"@babel/core@^7.0.0", "@babel/core@^7.7.5": - version "7.24.7" - resolved "https://registry.npmjs.org/@babel/core/-/core-7.24.7.tgz" - integrity sha512-nykK+LEK86ahTkX/3TgauT0ikKoNCfKHEaZYTUVupJdTLzGNvrblu4u6fa7DhZONAltdf8e662t/abY8idrd/g== - dependencies: - "@ampproject/remapping" "^2.2.0" - "@babel/code-frame" "^7.24.7" - "@babel/generator" "^7.24.7" - "@babel/helper-compilation-targets" "^7.24.7" - "@babel/helper-module-transforms" "^7.24.7" - "@babel/helpers" "^7.24.7" - "@babel/parser" "^7.24.7" - "@babel/template" "^7.24.7" - "@babel/traverse" "^7.24.7" - "@babel/types" "^7.24.7" - convert-source-map "^2.0.0" - debug "^4.1.0" - gensync "^1.0.0-beta.2" - json5 "^2.2.3" - semver "^6.3.1" - -"@babel/generator@^7.24.7": - version "7.24.7" - resolved "https://registry.npmjs.org/@babel/generator/-/generator-7.24.7.tgz" - integrity sha512-oipXieGC3i45Y1A41t4tAqpnEZWgB/lC6Ehh6+rOviR5XWpTtMmLN+fGjz9vOiNRt0p6RtO6DtD0pdU3vpqdSA== - dependencies: - "@babel/types" "^7.24.7" - "@jridgewell/gen-mapping" "^0.3.5" - "@jridgewell/trace-mapping" "^0.3.25" - jsesc "^2.5.1" - -"@babel/helper-compilation-targets@^7.24.7": - version "7.24.7" - resolved "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.24.7.tgz" - integrity sha512-ctSdRHBi20qWOfy27RUb4Fhp07KSJ3sXcuSvTrXrc4aG8NSYDo1ici3Vhg9bg69y5bj0Mr1lh0aeEgTvc12rMg== - dependencies: - "@babel/compat-data" "^7.24.7" - "@babel/helper-validator-option" "^7.24.7" - browserslist "^4.22.2" - lru-cache "^5.1.1" - semver "^6.3.1" - -"@babel/helper-environment-visitor@^7.24.7": - version "7.24.7" - resolved "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.24.7.tgz" - integrity sha512-DoiN84+4Gnd0ncbBOM9AZENV4a5ZiL39HYMyZJGZ/AZEykHYdJw0wW3kdcsh9/Kn+BRXHLkkklZ51ecPKmI1CQ== - dependencies: - "@babel/types" "^7.24.7" - -"@babel/helper-function-name@^7.24.7": - version "7.24.7" - resolved "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.24.7.tgz" - integrity sha512-FyoJTsj/PEUWu1/TYRiXTIHc8lbw+TDYkZuoE43opPS5TrI7MyONBE1oNvfguEXAD9yhQRrVBnXdXzSLQl9XnA== - dependencies: - "@babel/template" "^7.24.7" - "@babel/types" "^7.24.7" - -"@babel/helper-hoist-variables@^7.24.7": - version "7.24.7" - resolved "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.24.7.tgz" - integrity sha512-MJJwhkoGy5c4ehfoRyrJ/owKeMl19U54h27YYftT0o2teQ3FJ3nQUf/I3LlJsX4l3qlw7WRXUmiyajvHXoTubQ== - dependencies: - "@babel/types" "^7.24.7" - -"@babel/helper-module-imports@^7.24.7": - version "7.24.7" - resolved "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.24.7.tgz" - integrity sha512-8AyH3C+74cgCVVXow/myrynrAGv+nTVg5vKu2nZph9x7RcRwzmh0VFallJuFTZ9mx6u4eSdXZfcOzSqTUm0HCA== - dependencies: - "@babel/traverse" "^7.24.7" - "@babel/types" "^7.24.7" - -"@babel/helper-module-transforms@^7.24.7": - version "7.24.7" - resolved "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.24.7.tgz" - integrity sha512-1fuJEwIrp+97rM4RWdO+qrRsZlAeL1lQJoPqtCYWv0NL115XM93hIH4CSRln2w52SqvmY5hqdtauB6QFCDiZNQ== - dependencies: - "@babel/helper-environment-visitor" "^7.24.7" - "@babel/helper-module-imports" "^7.24.7" - "@babel/helper-simple-access" "^7.24.7" - "@babel/helper-split-export-declaration" "^7.24.7" - "@babel/helper-validator-identifier" "^7.24.7" - -"@babel/helper-simple-access@^7.24.7": - version "7.24.7" - resolved "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.24.7.tgz" - integrity sha512-zBAIvbCMh5Ts+b86r/CjU+4XGYIs+R1j951gxI3KmmxBMhCg4oQMsv6ZXQ64XOm/cvzfU1FmoCyt6+owc5QMYg== - dependencies: - "@babel/traverse" "^7.24.7" - "@babel/types" "^7.24.7" - -"@babel/helper-split-export-declaration@^7.24.7": - version "7.24.7" - resolved "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.7.tgz" - integrity sha512-oy5V7pD+UvfkEATUKvIjvIAH/xCzfsFVw7ygW2SI6NClZzquT+mwdTfgfdbUiceh6iQO0CHtCPsyze/MZ2YbAA== - dependencies: - "@babel/types" "^7.24.7" - -"@babel/helper-string-parser@^7.24.7": - version "7.24.7" - resolved "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.7.tgz" - integrity sha512-7MbVt6xrwFQbunH2DNQsAP5sTGxfqQtErvBIvIMi6EQnbgUOuVYanvREcmFrOPhoXBrTtjhhP+lW+o5UfK+tDg== - -"@babel/helper-validator-identifier@^7.24.7": - version "7.24.7" - resolved "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz" - integrity sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w== - -"@babel/helper-validator-option@^7.24.7": - version "7.24.7" - resolved "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.24.7.tgz" - integrity sha512-yy1/KvjhV/ZCL+SM7hBrvnZJ3ZuT9OuZgIJAGpPEToANvc3iM6iDvBnRjtElWibHU6n8/LPR/EjX9EtIEYO3pw== - -"@babel/helpers@^7.24.7": - version "7.24.7" - resolved "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.7.tgz" - integrity sha512-NlmJJtvcw72yRJRcnCmGvSi+3jDEg8qFu3z0AFoymmzLx5ERVWyzd9kVXr7Th9/8yIJi2Zc6av4Tqz3wFs8QWg== - dependencies: - "@babel/template" "^7.24.7" - "@babel/types" "^7.24.7" - -"@babel/highlight@^7.24.7": - version "7.24.7" - resolved "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.7.tgz" - integrity sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw== - dependencies: - "@babel/helper-validator-identifier" "^7.24.7" - chalk "^2.4.2" - js-tokens "^4.0.0" - picocolors "^1.0.0" - -"@babel/parser@^7.24.7": - version "7.24.7" - resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.24.7.tgz" - integrity sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw== - -"@babel/template@^7.24.7": - version "7.24.7" - resolved "https://registry.npmjs.org/@babel/template/-/template-7.24.7.tgz" - integrity sha512-jYqfPrU9JTF0PmPy1tLYHW4Mp4KlgxJD9l2nP9fD6yT/ICi554DmrWBAEYpIelzjHf1msDP3PxJIRt/nFNfBig== - dependencies: - "@babel/code-frame" "^7.24.7" - "@babel/parser" "^7.24.7" - "@babel/types" "^7.24.7" - -"@babel/traverse@^7.24.7": - version "7.24.7" - resolved "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.7.tgz" - integrity sha512-yb65Ed5S/QAcewNPh0nZczy9JdYXkkAbIsEo+P7BE7yO3txAY30Y/oPa3QkQ5It3xVG2kpKMg9MsdxZaO31uKA== - dependencies: - "@babel/code-frame" "^7.24.7" - "@babel/generator" "^7.24.7" - "@babel/helper-environment-visitor" "^7.24.7" - "@babel/helper-function-name" "^7.24.7" - "@babel/helper-hoist-variables" "^7.24.7" - "@babel/helper-split-export-declaration" "^7.24.7" - "@babel/parser" "^7.24.7" - "@babel/types" "^7.24.7" - debug "^4.3.1" - globals "^11.1.0" - -"@babel/types@^7.24.7": - version "7.24.7" - resolved "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz" - integrity sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q== - dependencies: - "@babel/helper-string-parser" "^7.24.7" - "@babel/helper-validator-identifier" "^7.24.7" - to-fast-properties "^2.0.0" - -"@eslint-community/eslint-utils@^4.2.0": - version "4.4.0" - resolved "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz" - integrity sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA== - dependencies: - eslint-visitor-keys "^3.3.0" - -"@eslint-community/regexpp@^4.6.1": - version "4.10.1" - resolved "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.1.tgz" - integrity sha512-Zm2NGpWELsQAD1xsJzGQpYfvICSsFkEpU0jxBjfdC6uNEWXcHnfs9hScFWtXVDVl+rBQJGrl4g1vcKIejpH9dA== - -"@eslint/eslintrc@^2.1.4": - version "2.1.4" - resolved "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz" - integrity sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ== - dependencies: - ajv "^6.12.4" - debug "^4.3.2" - espree "^9.6.0" - globals "^13.19.0" - ignore "^5.2.0" - import-fresh "^3.2.1" - js-yaml "^4.1.0" - minimatch "^3.1.2" - strip-json-comments "^3.1.1" - -"@eslint/js@8.57.0": - version "8.57.0" - resolved "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz" - integrity sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g== - -"@humanwhocodes/config-array@^0.11.14": - version "0.11.14" - resolved "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz" - integrity sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg== - dependencies: - "@humanwhocodes/object-schema" "^2.0.2" - debug "^4.3.1" - minimatch "^3.0.5" - -"@humanwhocodes/module-importer@^1.0.1": - version "1.0.1" - resolved "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz" - integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== - -"@humanwhocodes/object-schema@^2.0.2": - version "2.0.3" - resolved "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz" - integrity sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA== - -"@istanbuljs/load-nyc-config@^1.0.0": - version "1.1.0" - resolved "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz" - integrity sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ== - dependencies: - camelcase "^5.3.1" - find-up "^4.1.0" - get-package-type "^0.1.0" - js-yaml "^3.13.1" - resolve-from "^5.0.0" - -"@istanbuljs/schema@^0.1.2": - version "0.1.3" - resolved "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz" - integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA== - -"@jridgewell/gen-mapping@^0.3.5": - version "0.3.5" - resolved "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz" - integrity sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg== - dependencies: - "@jridgewell/set-array" "^1.2.1" - "@jridgewell/sourcemap-codec" "^1.4.10" - "@jridgewell/trace-mapping" "^0.3.24" - -"@jridgewell/resolve-uri@^3.1.0": - version "3.1.2" - resolved "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz" - integrity sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw== - -"@jridgewell/set-array@^1.2.1": - version "1.2.1" - resolved "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz" - integrity sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A== - -"@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.14": - version "1.4.15" - resolved "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz" - integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== - -"@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25": - version "0.3.25" - resolved "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz" - integrity sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ== - dependencies: - "@jridgewell/resolve-uri" "^3.1.0" - "@jridgewell/sourcemap-codec" "^1.4.14" - -"@nodelib/fs.scandir@2.1.5": - version "2.1.5" - resolved "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz" - integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== - dependencies: - "@nodelib/fs.stat" "2.0.5" - run-parallel "^1.1.9" - -"@nodelib/fs.stat@2.0.5": - version "2.0.5" - resolved "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz" - integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== - -"@nodelib/fs.walk@^1.2.8": - version "1.2.8" - resolved "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz" - integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== - dependencies: - "@nodelib/fs.scandir" "2.1.5" - fastq "^1.6.0" - -"@ungap/structured-clone@^1.2.0": - version "1.2.0" - resolved "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz" - integrity sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ== - -acorn-jsx@^5.3.2: - version "5.3.2" - resolved "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz" - integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== - -"acorn@^6.0.0 || ^7.0.0 || ^8.0.0", acorn@^8.9.0: - version "8.12.0" - resolved "https://registry.npmjs.org/acorn/-/acorn-8.12.0.tgz" - integrity sha512-RTvkC4w+KNXrM39/lWCUaG0IbRkWdCv7W/IOW9oU6SawyxulvkQy5HQPVTKxEjczcUvapcrw3cFx/60VN/NRNw== - -aggregate-error@^3.0.0: - version "3.1.0" - resolved "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz" - integrity sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA== - dependencies: - clean-stack "^2.0.0" - indent-string "^4.0.0" - -ajv@^6.12.3, ajv@^6.12.4: - version "6.12.6" - resolved "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz" - integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== - dependencies: - fast-deep-equal "^3.1.1" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.4.1" - uri-js "^4.2.2" - -ansi-colors@4.1.1: - version "4.1.1" - resolved "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz" - integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== - -ansi-regex@^5.0.1: - version "5.0.1" - resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz" - integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== - -ansi-styles@^3.2.1: - version "3.2.1" - resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz" - integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== - dependencies: - color-convert "^1.9.0" - -ansi-styles@^4.0.0, ansi-styles@^4.1.0: - version "4.3.0" - resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz" - integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== - dependencies: - color-convert "^2.0.1" - -anymatch@~3.1.2: - version "3.1.3" - resolved "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz" - integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== - dependencies: - normalize-path "^3.0.0" - picomatch "^2.0.4" - -append-transform@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/append-transform/-/append-transform-2.0.0.tgz" - integrity sha512-7yeyCEurROLQJFv5Xj4lEGTy0borxepjFv1g22oAdqFu//SrAlDl1O1Nxx15SH1RoliUml6p8dwJW9jvZughhg== - dependencies: - default-require-extensions "^3.0.0" - -archy@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz" - integrity sha512-Xg+9RwCg/0p32teKdGMPTPnVXKD0w3DfHnFTficozsAgsvq2XenPJq/MYpzzQ/v8zrOyJn6Ds39VA4JIDwFfqw== - -argparse@^1.0.7: - version "1.0.10" - resolved "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz" - integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== - dependencies: - sprintf-js "~1.0.2" - -argparse@^2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz" - integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== - -asn1@~0.2.3: - version "0.2.6" - resolved "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz" - integrity sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ== - dependencies: - safer-buffer "~2.1.0" - -assert-plus@^1.0.0, assert-plus@1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz" - integrity sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw== - -assertion-error@^1.1.0: - version "1.1.0" - resolved "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz" - integrity sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw== - -asynckit@^0.4.0: - version "0.4.0" - resolved "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz" - integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== - -aws-sign2@~0.7.0: - version "0.7.0" - resolved "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz" - integrity sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA== - -aws4@^1.8.0: - version "1.13.0" - resolved "https://registry.npmjs.org/aws4/-/aws4-1.13.0.tgz" - integrity sha512-3AungXC4I8kKsS9PuS4JH2nc+0bVY/mjgrephHTIi8fpEeGsTHBUJeosp0Wc1myYMElmD0B3Oc4XL/HVJ4PV2g== - -balanced-match@^1.0.0: - version "1.0.2" - resolved "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz" - integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== - -bcrypt-pbkdf@^1.0.0: - version "1.0.2" - resolved "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz" - integrity sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w== - dependencies: - tweetnacl "^0.14.3" - -binary-extensions@^2.0.0: - version "2.3.0" - resolved "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz" - integrity sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw== - -brace-expansion@^1.1.7: - version "1.1.11" - resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz" - integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== - dependencies: - balanced-match "^1.0.0" - concat-map "0.0.1" - -brace-expansion@^2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz" - integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== - dependencies: - balanced-match "^1.0.0" - -braces@~3.0.2: - version "3.0.3" - resolved "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz" - integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA== - dependencies: - fill-range "^7.1.1" - -browser-stdout@1.3.1: - version "1.3.1" - resolved "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz" - integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== - -browserslist@^4.22.2, "browserslist@>= 4.21.0": - version "4.23.1" - resolved "https://registry.npmjs.org/browserslist/-/browserslist-4.23.1.tgz" - integrity sha512-TUfofFo/KsK/bWZ9TWQ5O26tsWW4Uhmt8IYklbnUa70udB6P2wA7w7o4PY4muaEPBQaAX+CEnmmIA41NVHtPVw== - dependencies: - caniuse-lite "^1.0.30001629" - electron-to-chromium "^1.4.796" - node-releases "^2.0.14" - update-browserslist-db "^1.0.16" - -caching-transform@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/caching-transform/-/caching-transform-4.0.0.tgz" - integrity sha512-kpqOvwXnjjN44D89K5ccQC+RUrsy7jB/XLlRrx0D7/2HNcTPqzsb6XgYoErwko6QsV184CA2YgS1fxDiiDZMWA== - dependencies: - hasha "^5.0.0" - make-dir "^3.0.0" - package-hash "^4.0.0" - write-file-atomic "^3.0.0" - -call-bind@^1.0.7: - version "1.0.7" - resolved "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz" - integrity sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w== - dependencies: - es-define-property "^1.0.0" - es-errors "^1.3.0" - function-bind "^1.1.2" - get-intrinsic "^1.2.4" - set-function-length "^1.2.1" - -callsites@^3.0.0: - version "3.1.0" - resolved "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz" - integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== - -camelcase@^5.0.0, camelcase@^5.3.1: - version "5.3.1" - resolved "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz" - integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== - -camelcase@^6.0.0: - version "6.3.0" - resolved "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz" - integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== - -caniuse-lite@^1.0.30001629: - version "1.0.30001638" - resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001638.tgz" - integrity sha512-5SuJUJ7cZnhPpeLHaH0c/HPAnAHZvS6ElWyHK9GSIbVOQABLzowiI2pjmpvZ1WEbkyz46iFd4UXlOHR5SqgfMQ== - -caseless@~0.12.0: - version "0.12.0" - resolved "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz" - integrity sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw== - -chai-as-promised@~7.1.1: - version "7.1.2" - resolved "https://registry.npmjs.org/chai-as-promised/-/chai-as-promised-7.1.2.tgz" - integrity sha512-aBDHZxRzYnUYuIAIPBH2s511DjlKPzXNlXSGFC8CwmroWQLfrW0LtE1nK3MAwwNhJPa9raEjNCmRoFpG0Hurdw== - dependencies: - check-error "^1.0.2" - -"chai@>= 2.1.2 < 6", chai@~4.4.1: - version "4.4.1" - resolved "https://registry.npmjs.org/chai/-/chai-4.4.1.tgz" - integrity sha512-13sOfMv2+DWduEU+/xbun3LScLoqN17nBeTLUsmDfKdoiC1fr0n9PU4guu4AhRcOVFk/sW8LyZWHuhWtQZiF+g== - dependencies: - assertion-error "^1.1.0" - check-error "^1.0.3" - deep-eql "^4.1.3" - get-func-name "^2.0.2" - loupe "^2.3.6" - pathval "^1.1.1" - type-detect "^4.0.8" - -chalk@^2.4.2: - version "2.4.2" - resolved "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz" - integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - -chalk@^4.0.0, chalk@^4.1.0: - version "4.1.2" - resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz" - integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - -check-error@^1.0.2, check-error@^1.0.3: - version "1.0.3" - resolved "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz" - integrity sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg== - dependencies: - get-func-name "^2.0.2" - -chokidar@^3.5.3: - version "3.6.0" - resolved "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz" - integrity sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw== - dependencies: - anymatch "~3.1.2" - braces "~3.0.2" - glob-parent "~5.1.2" - is-binary-path "~2.1.0" - is-glob "~4.0.1" - normalize-path "~3.0.0" - readdirp "~3.6.0" - optionalDependencies: - fsevents "~2.3.2" - -clean-stack@^2.0.0: - version "2.2.0" - resolved "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz" - integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== - -cliui@^6.0.0: - version "6.0.0" - resolved "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz" - integrity sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ== - dependencies: - string-width "^4.2.0" - strip-ansi "^6.0.0" - wrap-ansi "^6.2.0" - -cliui@^7.0.2: - version "7.0.4" - resolved "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz" - integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== - dependencies: - string-width "^4.2.0" - strip-ansi "^6.0.0" - wrap-ansi "^7.0.0" - -color-convert@^1.9.0: - version "1.9.3" - resolved "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz" - integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== - dependencies: - color-name "1.1.3" - -color-convert@^2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz" - integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== - dependencies: - color-name "~1.1.4" - -color-name@~1.1.4: - version "1.1.4" - resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz" - integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== - -color-name@1.1.3: - version "1.1.3" - resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz" - integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== - -combined-stream@^1.0.6, combined-stream@~1.0.6: - version "1.0.8" - resolved "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz" - integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== - dependencies: - delayed-stream "~1.0.0" - -commondir@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz" - integrity sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg== - -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" - integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== - -convert-source-map@^1.7.0: - version "1.9.0" - resolved "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz" - integrity sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A== - -convert-source-map@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz" - integrity sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg== - -core-util-is@1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" - integrity sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ== - -coveralls@^3.1.1: - version "3.1.1" - resolved "https://registry.npmjs.org/coveralls/-/coveralls-3.1.1.tgz" - integrity sha512-+dxnG2NHncSD1NrqbSM3dn/lE57O6Qf/koe9+I7c+wzkqRmEvcp0kgJdxKInzYzkICKkFMZsX3Vct3++tsF9ww== - dependencies: - js-yaml "^3.13.1" - lcov-parse "^1.0.0" - log-driver "^1.2.7" - minimist "^1.2.5" - request "^2.88.2" - -cross-spawn@^7.0.0, cross-spawn@^7.0.2, cross-spawn@^7.0.3: - version "7.0.3" - resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz" - integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== - dependencies: - path-key "^3.1.0" - shebang-command "^2.0.0" - which "^2.0.1" - -dashdash@^1.12.0: - version "1.14.1" - resolved "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz" - integrity sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g== - dependencies: - assert-plus "^1.0.0" - -debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4: - version "4.3.5" - resolved "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz" - integrity sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg== - dependencies: - ms "2.1.2" - -debug@4.3.4: - version "4.3.4" - resolved "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz" - integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== - dependencies: - ms "2.1.2" - -decamelize@^1.2.0: - version "1.2.0" - resolved "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz" - integrity sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA== - -decamelize@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz" - integrity sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ== - -deep-eql@^4.1.3: - version "4.1.4" - resolved "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.4.tgz" - integrity sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg== - dependencies: - type-detect "^4.0.0" - -deep-is@^0.1.3: - version "0.1.4" - resolved "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz" - integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== - -default-require-extensions@^3.0.0: - version "3.0.1" - resolved "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-3.0.1.tgz" - integrity sha512-eXTJmRbm2TIt9MgWTsOH1wEuhew6XGZcMeGKCtLedIg/NCsg1iBePXkceTdK4Fii7pzmN9tGsZhKzZ4h7O/fxw== - dependencies: - strip-bom "^4.0.0" - -define-data-property@^1.1.4: - version "1.1.4" - resolved "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz" - integrity sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A== - dependencies: - es-define-property "^1.0.0" - es-errors "^1.3.0" - gopd "^1.0.1" - -delayed-stream@~1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz" - integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== - -diff@5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz" - integrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w== - -doctrine@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz" - integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== - dependencies: - esutils "^2.0.2" - -ecc-jsbn@~0.1.1: - version "0.1.2" - resolved "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz" - integrity sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw== - dependencies: - jsbn "~0.1.0" - safer-buffer "^2.1.0" - -electron-to-chromium@^1.4.796: - version "1.4.812" - resolved "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.812.tgz" - integrity sha512-7L8fC2Ey/b6SePDFKR2zHAy4mbdp1/38Yk5TsARO66W3hC5KEaeKMMHoxwtuH+jcu2AYLSn9QX04i95t6Fl1Hg== - -emoji-regex@^8.0.0: - version "8.0.0" - resolved "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz" - integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== - -es-define-property@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz" - integrity sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ== - dependencies: - get-intrinsic "^1.2.4" - -es-errors@^1.3.0: - version "1.3.0" - resolved "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz" - integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== - -es6-error@^4.0.1: - version "4.1.1" - resolved "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz" - integrity sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg== - -escalade@^3.1.1, escalade@^3.1.2: - version "3.1.2" - resolved "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz" - integrity sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA== - -escape-string-regexp@^1.0.5: - version "1.0.5" - resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz" - integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== - -escape-string-regexp@^4.0.0, escape-string-regexp@4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz" - integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== - -eslint-plugin-chai-friendly@^0.7.4: - version "0.7.4" - resolved "https://registry.npmjs.org/eslint-plugin-chai-friendly/-/eslint-plugin-chai-friendly-0.7.4.tgz" - integrity sha512-PGPjJ8diYgX1mjLxGJqRop2rrGwZRKImoEOwUOgoIhg0p80MkTaqvmFLe5TF7/iagZHggasvIfQlUyHIhK/PYg== - -eslint-scope@^7.2.2: - version "7.2.2" - resolved "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz" - integrity sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg== - dependencies: - esrecurse "^4.3.0" - estraverse "^5.2.0" - -eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4.3: - version "3.4.3" - resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz" - integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== - -"eslint@^6.0.0 || ^7.0.0 || >=8.0.0", eslint@^8.57.0, eslint@>=3.0.0: - version "8.57.0" - resolved "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz" - integrity sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ== - dependencies: - "@eslint-community/eslint-utils" "^4.2.0" - "@eslint-community/regexpp" "^4.6.1" - "@eslint/eslintrc" "^2.1.4" - "@eslint/js" "8.57.0" - "@humanwhocodes/config-array" "^0.11.14" - "@humanwhocodes/module-importer" "^1.0.1" - "@nodelib/fs.walk" "^1.2.8" - "@ungap/structured-clone" "^1.2.0" - ajv "^6.12.4" - chalk "^4.0.0" - cross-spawn "^7.0.2" - debug "^4.3.2" - doctrine "^3.0.0" - escape-string-regexp "^4.0.0" - eslint-scope "^7.2.2" - eslint-visitor-keys "^3.4.3" - espree "^9.6.1" - esquery "^1.4.2" - esutils "^2.0.2" - fast-deep-equal "^3.1.3" - file-entry-cache "^6.0.1" - find-up "^5.0.0" - glob-parent "^6.0.2" - globals "^13.19.0" - graphemer "^1.4.0" - ignore "^5.2.0" - imurmurhash "^0.1.4" - is-glob "^4.0.0" - is-path-inside "^3.0.3" - js-yaml "^4.1.0" - json-stable-stringify-without-jsonify "^1.0.1" - levn "^0.4.1" - lodash.merge "^4.6.2" - minimatch "^3.1.2" - natural-compare "^1.4.0" - optionator "^0.9.3" - strip-ansi "^6.0.1" - text-table "^0.2.0" - -espree@^9.6.0, espree@^9.6.1: - version "9.6.1" - resolved "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz" - integrity sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ== - dependencies: - acorn "^8.9.0" - acorn-jsx "^5.3.2" - eslint-visitor-keys "^3.4.1" - -esprima@^4.0.0: - version "4.0.1" - resolved "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz" - integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== - -esquery@^1.4.2: - version "1.5.0" - resolved "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz" - integrity sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg== - dependencies: - estraverse "^5.1.0" - -esrecurse@^4.3.0: - version "4.3.0" - resolved "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz" - integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== - dependencies: - estraverse "^5.2.0" - -estraverse@^5.1.0, estraverse@^5.2.0: - version "5.3.0" - resolved "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz" - integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== - -esutils@^2.0.2: - version "2.0.3" - resolved "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz" - integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== - -extend@~3.0.2: - version "3.0.2" - resolved "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz" - integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== - -extsprintf@^1.2.0, extsprintf@1.3.0: - version "1.3.0" - resolved "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz" - integrity sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g== - -fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: - version "3.1.3" - resolved "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz" - integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== - -fast-json-stable-stringify@^2.0.0: - version "2.1.0" - resolved "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz" - integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== - -fast-levenshtein@^2.0.6: - version "2.0.6" - resolved "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz" - integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== - -fastq@^1.6.0: - version "1.17.1" - resolved "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz" - integrity sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w== - dependencies: - reusify "^1.0.4" - -file-entry-cache@^6.0.1: - version "6.0.1" - resolved "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz" - integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg== - dependencies: - flat-cache "^3.0.4" - -fill-range@^7.1.1: - version "7.1.1" - resolved "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz" - integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg== - dependencies: - to-regex-range "^5.0.1" - -find-cache-dir@^3.2.0: - version "3.3.2" - resolved "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz" - integrity sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig== - dependencies: - commondir "^1.0.1" - make-dir "^3.0.2" - pkg-dir "^4.1.0" - -find-up@^4.0.0: - version "4.1.0" - resolved "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz" - integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== - dependencies: - locate-path "^5.0.0" - path-exists "^4.0.0" - -find-up@^4.1.0: - version "4.1.0" - resolved "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz" - integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== - dependencies: - locate-path "^5.0.0" - path-exists "^4.0.0" - -find-up@^5.0.0, find-up@5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz" - integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== - dependencies: - locate-path "^6.0.0" - path-exists "^4.0.0" - -flat-cache@^3.0.4: - version "3.2.0" - resolved "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz" - integrity sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw== - dependencies: - flatted "^3.2.9" - keyv "^4.5.3" - rimraf "^3.0.2" - -flat@^5.0.2: - version "5.0.2" - resolved "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz" - integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== - -flatted@^3.2.9: - version "3.3.1" - resolved "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz" - integrity sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw== - -foreground-child@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/foreground-child/-/foreground-child-2.0.0.tgz" - integrity sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA== - dependencies: - cross-spawn "^7.0.0" - signal-exit "^3.0.2" - -forever-agent@~0.6.1: - version "0.6.1" - resolved "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz" - integrity sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw== - -form-data@~2.3.2: - version "2.3.3" - resolved "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz" - integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.6" - mime-types "^2.1.12" - -fromentries@^1.2.0: - version "1.3.2" - resolved "https://registry.npmjs.org/fromentries/-/fromentries-1.3.2.tgz" - integrity sha512-cHEpEQHUg0f8XdtZCc2ZAhrHzKzT0MrFUTcvx+hfxYu7rGMDc5SKoXFh+n4YigxsHXRzc6OrCshdR1bWH6HHyg== - -fs.realpath@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" - integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== - -fsevents@~2.3.2: - version "2.3.3" - resolved "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz" - integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== - -function-bind@^1.1.2: - version "1.1.2" - resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz" - integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== - -gensync@^1.0.0-beta.2: - version "1.0.0-beta.2" - resolved "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz" - integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== - -get-caller-file@^2.0.1, get-caller-file@^2.0.5: - version "2.0.5" - resolved "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz" - integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== - -get-func-name@^2.0.1, get-func-name@^2.0.2: - version "2.0.2" - resolved "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz" - integrity sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ== - -get-intrinsic@^1.1.3, get-intrinsic@^1.2.4: - version "1.2.4" - resolved "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz" - integrity sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ== - dependencies: - es-errors "^1.3.0" - function-bind "^1.1.2" - has-proto "^1.0.1" - has-symbols "^1.0.3" - hasown "^2.0.0" - -get-package-type@^0.1.0: - version "0.1.0" - resolved "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz" - integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q== - -getpass@^0.1.1: - version "0.1.7" - resolved "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz" - integrity sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng== - dependencies: - assert-plus "^1.0.0" - -glob-parent@^6.0.2: - version "6.0.2" - resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz" - integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== - dependencies: - is-glob "^4.0.3" - -glob-parent@~5.1.2: - version "5.1.2" - resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz" - integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== - dependencies: - is-glob "^4.0.1" - -glob@^7.1.3: - version "7.2.3" - resolved "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz" - integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.1.1" - once "^1.3.0" - path-is-absolute "^1.0.0" - -glob@^7.1.4: - version "7.2.3" - resolved "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz" - integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.1.1" - once "^1.3.0" - path-is-absolute "^1.0.0" - -glob@^7.1.6: - version "7.2.3" - resolved "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz" - integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.1.1" - once "^1.3.0" - path-is-absolute "^1.0.0" - -glob@8.1.0: - version "8.1.0" - resolved "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz" - integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^5.0.1" - once "^1.3.0" - -globals@^11.1.0: - version "11.12.0" - resolved "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz" - integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== - -globals@^13.19.0: - version "13.24.0" - resolved "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz" - integrity sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ== - dependencies: - type-fest "^0.20.2" - -gopd@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz" - integrity sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA== - dependencies: - get-intrinsic "^1.1.3" - -graceful-fs@^4.1.15: - version "4.2.11" - resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz" - integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== - -graphemer@^1.4.0: - version "1.4.0" - resolved "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz" - integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag== - -har-schema@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz" - integrity sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q== - -har-validator@~5.1.3: - version "5.1.5" - resolved "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz" - integrity sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w== - dependencies: - ajv "^6.12.3" - har-schema "^2.0.0" - -has-flag@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz" - integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw== - -has-flag@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz" - integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== - -has-property-descriptors@^1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz" - integrity sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg== - dependencies: - es-define-property "^1.0.0" - -has-proto@^1.0.1: - version "1.0.3" - resolved "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz" - integrity sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q== - -has-symbols@^1.0.3: - version "1.0.3" - resolved "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz" - integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== - -hasha@^5.0.0: - version "5.2.2" - resolved "https://registry.npmjs.org/hasha/-/hasha-5.2.2.tgz" - integrity sha512-Hrp5vIK/xr5SkeN2onO32H0MgNZ0f17HRNH39WfL0SYUNOTZ5Lz1TJ8Pajo/87dYGEFlLMm7mIc/k/s6Bvz9HQ== - dependencies: - is-stream "^2.0.0" - type-fest "^0.8.0" - -hasown@^2.0.0: - version "2.0.2" - resolved "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz" - integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ== - dependencies: - function-bind "^1.1.2" - -he@1.2.0: - version "1.2.0" - resolved "https://registry.npmjs.org/he/-/he-1.2.0.tgz" - integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== - -html-escaper@^2.0.0: - version "2.0.2" - resolved "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz" - integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== - -http-signature@~1.2.0: - version "1.2.0" - resolved "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz" - integrity sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ== - dependencies: - assert-plus "^1.0.0" - jsprim "^1.2.2" - sshpk "^1.7.0" - -ignore@^5.2.0: - version "5.3.1" - resolved "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz" - integrity sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw== - -import-fresh@^3.2.1: - version "3.3.0" - resolved "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz" - integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== - dependencies: - parent-module "^1.0.0" - resolve-from "^4.0.0" - -imurmurhash@^0.1.4: - version "0.1.4" - resolved "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz" - integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== - -indent-string@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz" - integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg== - -inflight@^1.0.4: - version "1.0.6" - resolved "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz" - integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== - dependencies: - once "^1.3.0" - wrappy "1" - -inherits@2: - version "2.0.4" - resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz" - integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== - -is-binary-path@~2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz" - integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== - dependencies: - binary-extensions "^2.0.0" - -is-extglob@^2.1.1: - version "2.1.1" - resolved "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz" - integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== - -is-fullwidth-code-point@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz" - integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== - -is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1: - version "4.0.3" - resolved "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz" - integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== - dependencies: - is-extglob "^2.1.1" - -is-number@^7.0.0: - version "7.0.0" - resolved "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz" - integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== - -is-path-inside@^3.0.3: - version "3.0.3" - resolved "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz" - integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== - -is-plain-obj@^2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz" - integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== - -is-stream@^2.0.0: - version "2.0.1" - resolved "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz" - integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== - -is-typedarray@^1.0.0, is-typedarray@~1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz" - integrity sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA== - -is-unicode-supported@^0.1.0: - version "0.1.0" - resolved "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz" - integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== - -is-windows@^1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz" - integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== - -isexe@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz" - integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== - -isstream@~0.1.2: - version "0.1.2" - resolved "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz" - integrity sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g== - -istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.2.0: - version "3.2.2" - resolved "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz" - integrity sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg== - -istanbul-lib-hook@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-3.0.0.tgz" - integrity sha512-Pt/uge1Q9s+5VAZ+pCo16TYMWPBIl+oaNIjgLQxcX0itS6ueeaA+pEfThZpH8WxhFgCiEb8sAJY6MdUKgiIWaQ== - dependencies: - append-transform "^2.0.0" - -istanbul-lib-instrument@^4.0.0: - version "4.0.3" - resolved "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.3.tgz" - integrity sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ== - dependencies: - "@babel/core" "^7.7.5" - "@istanbuljs/schema" "^0.1.2" - istanbul-lib-coverage "^3.0.0" - semver "^6.3.0" - -istanbul-lib-processinfo@^2.0.2: - version "2.0.3" - resolved "https://registry.npmjs.org/istanbul-lib-processinfo/-/istanbul-lib-processinfo-2.0.3.tgz" - integrity sha512-NkwHbo3E00oybX6NGJi6ar0B29vxyvNwoC7eJ4G4Yq28UfY758Hgn/heV8VRFhevPED4LXfFz0DQ8z/0kw9zMg== - dependencies: - archy "^1.0.0" - cross-spawn "^7.0.3" - istanbul-lib-coverage "^3.2.0" - p-map "^3.0.0" - rimraf "^3.0.0" - uuid "^8.3.2" - -istanbul-lib-report@^3.0.0: - version "3.0.1" - resolved "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz" - integrity sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw== - dependencies: - istanbul-lib-coverage "^3.0.0" - make-dir "^4.0.0" - supports-color "^7.1.0" - -istanbul-lib-source-maps@^4.0.0: - version "4.0.1" - resolved "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz" - integrity sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw== - dependencies: - debug "^4.1.1" - istanbul-lib-coverage "^3.0.0" - source-map "^0.6.1" - -istanbul-reports@^3.0.2: - version "3.1.7" - resolved "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz" - integrity sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g== - dependencies: - html-escaper "^2.0.0" - istanbul-lib-report "^3.0.0" - -js-tokens@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz" - integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== - -js-yaml@^3.13.1: - version "3.14.1" - resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz" - integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== - dependencies: - argparse "^1.0.7" - esprima "^4.0.0" - -js-yaml@^4.1.0: - version "4.1.0" - resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz" - integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== - dependencies: - argparse "^2.0.1" - -js-yaml@4.1.0: - version "4.1.0" - resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz" - integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== - dependencies: - argparse "^2.0.1" - -jsbn@~0.1.0: - version "0.1.1" - resolved "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz" - integrity sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg== - -jsesc@^2.5.1: - version "2.5.2" - resolved "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz" - integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== - -json-buffer@3.0.1: - version "3.0.1" - resolved "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz" - integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== - -json-schema-traverse@^0.4.1: - version "0.4.1" - resolved "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz" - integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== - -json-schema@0.4.0: - version "0.4.0" - resolved "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz" - integrity sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA== - -json-stable-stringify-without-jsonify@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz" - integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== - -json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1: - version "5.0.1" - resolved "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz" - integrity sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA== - -json5@^2.2.3: - version "2.2.3" - resolved "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz" - integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== - -jsprim@^1.2.2: - version "1.4.2" - resolved "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz" - integrity sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw== - dependencies: - assert-plus "1.0.0" - extsprintf "1.3.0" - json-schema "0.4.0" - verror "1.10.0" - -keyv@^4.5.3: - version "4.5.4" - resolved "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz" - integrity sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw== - dependencies: - json-buffer "3.0.1" - -lcov-parse@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/lcov-parse/-/lcov-parse-1.0.0.tgz" - integrity sha512-aprLII/vPzuQvYZnDRU78Fns9I2Ag3gi4Ipga/hxnVMCZC8DnR2nI7XBqrPoywGfxqIx/DgarGvDJZAD3YBTgQ== - -levn@^0.4.1: - version "0.4.1" - resolved "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz" - integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== - dependencies: - prelude-ls "^1.2.1" - type-check "~0.4.0" - -locate-path@^5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz" - integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== - dependencies: - p-locate "^4.1.0" - -locate-path@^6.0.0: - version "6.0.0" - resolved "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz" - integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== - dependencies: - p-locate "^5.0.0" - -lodash.flattendeep@^4.4.0: - version "4.4.0" - resolved "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz" - integrity sha512-uHaJFihxmJcEX3kT4I23ABqKKalJ/zDrDg0lsFtc1h+3uw49SIJ5beyhx5ExVRti3AvKoOJngIj7xz3oylPdWQ== - -lodash.isplainobject@^4.0.6: - version "4.0.6" - resolved "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz" - integrity sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA== - -lodash.merge@^4.6.2: - version "4.6.2" - resolved "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz" - integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== - -log-driver@^1.2.7: - version "1.2.7" - resolved "https://registry.npmjs.org/log-driver/-/log-driver-1.2.7.tgz" - integrity sha512-U7KCmLdqsGHBLeWqYlFA0V0Sl6P08EE1ZrmA9cxjUE0WVqT9qnyVDPz1kzpFEP0jdJuFnasWIfSd7fsaNXkpbg== - -log-symbols@4.1.0: - version "4.1.0" - resolved "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz" - integrity sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg== - dependencies: - chalk "^4.1.0" - is-unicode-supported "^0.1.0" - -loupe@^2.3.6: - version "2.3.7" - resolved "https://registry.npmjs.org/loupe/-/loupe-2.3.7.tgz" - integrity sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA== - dependencies: - get-func-name "^2.0.1" - -lru-cache@^5.1.1: - version "5.1.1" - resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz" - integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== - dependencies: - yallist "^3.0.2" - -make-dir@^3.0.0, make-dir@^3.0.2: - version "3.1.0" - resolved "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz" - integrity sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw== - dependencies: - semver "^6.0.0" - -make-dir@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz" - integrity sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw== - dependencies: - semver "^7.5.3" - -mime-db@1.52.0: - version "1.52.0" - resolved "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz" - integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== - -mime-types@^2.1.12, mime-types@~2.1.19: - version "2.1.35" - resolved "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz" - integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== - dependencies: - mime-db "1.52.0" - -minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: - version "3.1.2" - resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz" - integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== - dependencies: - brace-expansion "^1.1.7" - -minimatch@^5.0.1: - version "5.1.6" - resolved "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz" - integrity sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g== - dependencies: - brace-expansion "^2.0.1" - -minimatch@5.0.1: - version "5.0.1" - resolved "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz" - integrity sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g== - dependencies: - brace-expansion "^2.0.1" - -minimist@^1.2.5: - version "1.2.8" - resolved "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz" - integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== - -mocha@^10.3.0: - version "10.5.2" - resolved "https://registry.npmjs.org/mocha/-/mocha-10.5.2.tgz" - integrity sha512-9btlN3JKCefPf+vKd/kcKz2SXxi12z6JswkGfaAF0saQvnsqLJk504ZmbxhSoENge08E9dsymozKgFMTl5PQsA== - dependencies: - ansi-colors "4.1.1" - browser-stdout "1.3.1" - chokidar "^3.5.3" - debug "4.3.4" - diff "5.0.0" - escape-string-regexp "4.0.0" - find-up "5.0.0" - glob "8.1.0" - he "1.2.0" - js-yaml "4.1.0" - log-symbols "4.1.0" - minimatch "5.0.1" - ms "2.1.3" - serialize-javascript "6.0.0" - strip-json-comments "3.1.1" - supports-color "8.1.1" - workerpool "6.2.1" - yargs "16.2.0" - yargs-parser "20.2.4" - yargs-unparser "2.0.0" - -ms@2.1.2: - version "2.1.2" - resolved "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz" - integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== - -ms@2.1.3: - version "2.1.3" - resolved "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz" - integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== - -natural-compare@^1.4.0: - version "1.4.0" - resolved "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz" - integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== - -nock@^13.5.4: - version "13.5.4" - resolved "https://registry.npmjs.org/nock/-/nock-13.5.4.tgz" - integrity sha512-yAyTfdeNJGGBFxWdzSKCBYxs5FxLbCg5X5Q4ets974hcQzG1+qCxvIyOo4j2Ry6MUlhWVMX4OoYDefAIIwupjw== - dependencies: - debug "^4.1.0" - json-stringify-safe "^5.0.1" - propagate "^2.0.0" - -node-preload@^0.2.1: - version "0.2.1" - resolved "https://registry.npmjs.org/node-preload/-/node-preload-0.2.1.tgz" - integrity sha512-RM5oyBy45cLEoHqCeh+MNuFAxO0vTFBLskvQbOKnEE7YTTSN4tbN8QWDIPQ6L+WvKsB/qLEGpYe2ZZ9d4W9OIQ== - dependencies: - process-on-spawn "^1.0.0" - -node-releases@^2.0.14: - version "2.0.14" - resolved "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz" - integrity sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw== - -normalize-path@^3.0.0, normalize-path@~3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz" - integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== - -nyc@^15.1.0: - version "15.1.0" - resolved "https://registry.npmjs.org/nyc/-/nyc-15.1.0.tgz" - integrity sha512-jMW04n9SxKdKi1ZMGhvUTHBN0EICCRkHemEoE5jm6mTYcqcdas0ATzgUgejlQUHMvpnOZqGB5Xxsv9KxJW1j8A== - dependencies: - "@istanbuljs/load-nyc-config" "^1.0.0" - "@istanbuljs/schema" "^0.1.2" - caching-transform "^4.0.0" - convert-source-map "^1.7.0" - decamelize "^1.2.0" - find-cache-dir "^3.2.0" - find-up "^4.1.0" - foreground-child "^2.0.0" - get-package-type "^0.1.0" - glob "^7.1.6" - istanbul-lib-coverage "^3.0.0" - istanbul-lib-hook "^3.0.0" - istanbul-lib-instrument "^4.0.0" - istanbul-lib-processinfo "^2.0.2" - istanbul-lib-report "^3.0.0" - istanbul-lib-source-maps "^4.0.0" - istanbul-reports "^3.0.2" - make-dir "^3.0.0" - node-preload "^0.2.1" - p-map "^3.0.0" - process-on-spawn "^1.0.0" - resolve-from "^5.0.0" - rimraf "^3.0.0" - signal-exit "^3.0.2" - spawn-wrap "^2.0.0" - test-exclude "^6.0.0" - yargs "^15.0.2" - -oauth-sign@~0.9.0: - version "0.9.0" - resolved "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz" - integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== - -object-inspect@^1.13.1: - version "1.13.2" - resolved "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz" - integrity sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g== - -once@^1.3.0: - version "1.4.0" - resolved "https://registry.npmjs.org/once/-/once-1.4.0.tgz" - integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== - dependencies: - wrappy "1" - -optionator@^0.9.3: - version "0.9.4" - resolved "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz" - integrity sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g== - dependencies: - deep-is "^0.1.3" - fast-levenshtein "^2.0.6" - levn "^0.4.1" - prelude-ls "^1.2.1" - type-check "^0.4.0" - word-wrap "^1.2.5" - -p-limit@^2.2.0: - version "2.3.0" - resolved "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz" - integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== - dependencies: - p-try "^2.0.0" - -p-limit@^3.0.2: - version "3.1.0" - resolved "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz" - integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== - dependencies: - yocto-queue "^0.1.0" - -p-locate@^4.1.0: - version "4.1.0" - resolved "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz" - integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== - dependencies: - p-limit "^2.2.0" - -p-locate@^5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz" - integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== - dependencies: - p-limit "^3.0.2" - -p-map@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz" - integrity sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ== - dependencies: - aggregate-error "^3.0.0" - -p-try@^2.0.0: - version "2.2.0" - resolved "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz" - integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== - -package-hash@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/package-hash/-/package-hash-4.0.0.tgz" - integrity sha512-whdkPIooSu/bASggZ96BWVvZTRMOFxnyUG5PnTSGKoJE2gd5mbVNmR2Nj20QFzxYYgAXpoqC+AiXzl+UMRh7zQ== - dependencies: - graceful-fs "^4.1.15" - hasha "^5.0.0" - lodash.flattendeep "^4.4.0" - release-zalgo "^1.0.0" - -parent-module@^1.0.0: - version "1.0.1" - resolved "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz" - integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== - dependencies: - callsites "^3.0.0" - -path-exists@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz" - integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== - -path-is-absolute@^1.0.0: - version "1.0.1" - resolved "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" - integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== - -path-key@^3.1.0: - version "3.1.1" - resolved "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz" - integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== - -pathval@^1.1.1: - version "1.1.1" - resolved "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz" - integrity sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ== - -performance-now@^2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz" - integrity sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow== - -picocolors@^1.0.0, picocolors@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz" - integrity sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew== - -picomatch@^2.0.4, picomatch@^2.2.1: - version "2.3.1" - resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz" - integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== - -pkg-dir@^4.1.0: - version "4.2.0" - resolved "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz" - integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== - dependencies: - find-up "^4.0.0" - -prelude-ls@^1.2.1: - version "1.2.1" - resolved "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz" - integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== - -process-on-spawn@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/process-on-spawn/-/process-on-spawn-1.0.0.tgz" - integrity sha512-1WsPDsUSMmZH5LeMLegqkPDrsGgsWwk1Exipy2hvB0o/F0ASzbpIctSCcZIK1ykJvtTJULEH+20WOFjMvGnCTg== - dependencies: - fromentries "^1.2.0" - -propagate@^2.0.0: - version "2.0.1" - resolved "https://registry.npmjs.org/propagate/-/propagate-2.0.1.tgz" - integrity sha512-vGrhOavPSTz4QVNuBNdcNXePNdNMaO1xj9yBeH1ScQPjk/rhg9sSlCXPhMkFuaNNW/syTvYqsnbIJxMBfRbbag== - -psl@^1.1.28: - version "1.9.0" - resolved "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz" - integrity sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag== - -punycode@^2.1.0, punycode@^2.1.1: - version "2.3.1" - resolved "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz" - integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== - -qs@^6.11.2: - version "6.12.1" - resolved "https://registry.npmjs.org/qs/-/qs-6.12.1.tgz" - integrity sha512-zWmv4RSuB9r2mYQw3zxQuHWeU+42aKi1wWig/j4ele4ygELZ7PEO6MM7rim9oAQH2A5MWfsAVf/jPvTPgCbvUQ== - dependencies: - side-channel "^1.0.6" - -qs@~6.5.2: - version "6.5.3" - resolved "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz" - integrity sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA== - -queue-microtask@^1.2.2: - version "1.2.3" - resolved "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz" - integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== - -randombytes@^2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz" - integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== - dependencies: - safe-buffer "^5.1.0" - -readdirp@~3.6.0: - version "3.6.0" - resolved "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz" - integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== - dependencies: - picomatch "^2.2.1" - -release-zalgo@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/release-zalgo/-/release-zalgo-1.0.0.tgz" - integrity sha512-gUAyHVHPPC5wdqX/LG4LWtRYtgjxyX78oanFNTMMyFEfOqdC54s3eE82imuWKbOeqYht2CrNf64Qb8vgmmtZGA== - dependencies: - es6-error "^4.0.1" - -request@^2.88.2: - version "2.88.2" - resolved "https://registry.npmjs.org/request/-/request-2.88.2.tgz" - integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw== - dependencies: - aws-sign2 "~0.7.0" - aws4 "^1.8.0" - caseless "~0.12.0" - combined-stream "~1.0.6" - extend "~3.0.2" - forever-agent "~0.6.1" - form-data "~2.3.2" - har-validator "~5.1.3" - http-signature "~1.2.0" - is-typedarray "~1.0.0" - isstream "~0.1.2" - json-stringify-safe "~5.0.1" - mime-types "~2.1.19" - oauth-sign "~0.9.0" - performance-now "^2.1.0" - qs "~6.5.2" - safe-buffer "^5.1.2" - tough-cookie "~2.5.0" - tunnel-agent "^0.6.0" - uuid "^3.3.2" - -require-directory@^2.1.1: - version "2.1.1" - resolved "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz" - integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== - -require-main-filename@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz" - integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== - -resolve-from@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz" - integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== - -resolve-from@^5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz" - integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== - -reusify@^1.0.4: - version "1.0.4" - resolved "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz" - integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== - -rimraf@^3.0.0, rimraf@^3.0.2: - version "3.0.2" - resolved "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz" - integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== - dependencies: - glob "^7.1.3" - -run-parallel@^1.1.9: - version "1.2.0" - resolved "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz" - integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== - dependencies: - queue-microtask "^1.2.2" - -safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.2, safe-buffer@^5.2.1: - version "5.2.1" - resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz" - integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== - -safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: - version "2.1.2" - resolved "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz" - integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== - -semver@^6.0.0, semver@^6.3.0, semver@^6.3.1: - version "6.3.1" - resolved "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz" - integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== - -semver@^7.5.3: - version "7.6.2" - resolved "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz" - integrity sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w== - -serialize-javascript@6.0.0: - version "6.0.0" - resolved "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz" - integrity sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag== - dependencies: - randombytes "^2.1.0" - -set-blocking@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz" - integrity sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw== - -set-function-length@^1.2.1: - version "1.2.2" - resolved "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz" - integrity sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg== - dependencies: - define-data-property "^1.1.4" - es-errors "^1.3.0" - function-bind "^1.1.2" - get-intrinsic "^1.2.4" - gopd "^1.0.1" - has-property-descriptors "^1.0.2" - -shebang-command@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz" - integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== - dependencies: - shebang-regex "^3.0.0" - -shebang-regex@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz" - integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== - -side-channel@^1.0.6: - version "1.0.6" - resolved "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz" - integrity sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA== - dependencies: - call-bind "^1.0.7" - es-errors "^1.3.0" - get-intrinsic "^1.2.4" - object-inspect "^1.13.1" - -signal-exit@^3.0.2: - version "3.0.7" - resolved "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz" - integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== - -source-map@^0.6.1: - version "0.6.1" - resolved "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz" - integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== - -spawn-wrap@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-2.0.0.tgz" - integrity sha512-EeajNjfN9zMnULLwhZZQU3GWBoFNkbngTUPfaawT4RkMiviTxcX0qfhVbGey39mfctfDHkWtuecgQ8NJcyQWHg== - dependencies: - foreground-child "^2.0.0" - is-windows "^1.0.2" - make-dir "^3.0.0" - rimraf "^3.0.0" - signal-exit "^3.0.2" - which "^2.0.1" - -sprintf-js@~1.0.2: - version "1.0.3" - resolved "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz" - integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== - -sshpk@^1.7.0: - version "1.18.0" - resolved "https://registry.npmjs.org/sshpk/-/sshpk-1.18.0.tgz" - integrity sha512-2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ== - dependencies: - asn1 "~0.2.3" - assert-plus "^1.0.0" - bcrypt-pbkdf "^1.0.0" - dashdash "^1.12.0" - ecc-jsbn "~0.1.1" - getpass "^0.1.1" - jsbn "~0.1.0" - safer-buffer "^2.0.2" - tweetnacl "~0.14.0" - -string-width@^4.1.0, string-width@^4.2.0: - version "4.2.3" - resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz" - integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== - dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.1" - -strip-ansi@^6.0.0, strip-ansi@^6.0.1: - version "6.0.1" - resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz" - integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== - dependencies: - ansi-regex "^5.0.1" - -strip-bom@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz" - integrity sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w== - -strip-json-comments@^3.1.1, strip-json-comments@3.1.1: - version "3.1.1" - resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz" - integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== - -supports-color@^5.3.0: - version "5.5.0" - resolved "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz" - integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== - dependencies: - has-flag "^3.0.0" - -supports-color@^7.1.0: - version "7.2.0" - resolved "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz" - integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== - dependencies: - has-flag "^4.0.0" - -supports-color@8.1.1: - version "8.1.1" - resolved "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz" - integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== - dependencies: - has-flag "^4.0.0" - -telnyx@^1.26.2: - version "1.26.2" - resolved "https://registry.npmjs.org/telnyx/-/telnyx-1.26.2.tgz" - integrity sha512-c/IU4dmtxEhflD+A3cYlbetEfy6832JCr2pZ4+6A2gEAVhfFeWbWt/IAV7KJxAyAdOJJ46IMFFmaHVufMHMyEw== - dependencies: - lodash.isplainobject "^4.0.6" - qs "^6.11.2" - safe-buffer "^5.2.1" - tweetnacl "^1.0.3" - uuid "^9.0.1" - -test-exclude@^6.0.0: - version "6.0.0" - resolved "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz" - integrity sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w== - dependencies: - "@istanbuljs/schema" "^0.1.2" - glob "^7.1.4" - minimatch "^3.0.4" - -text-table@^0.2.0: - version "0.2.0" - resolved "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz" - integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== - -to-fast-properties@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz" - integrity sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog== - -to-regex-range@^5.0.1: - version "5.0.1" - resolved "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz" - integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== - dependencies: - is-number "^7.0.0" - -tough-cookie@~2.5.0: - version "2.5.0" - resolved "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz" - integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== - dependencies: - psl "^1.1.28" - punycode "^2.1.1" - -tunnel-agent@^0.6.0: - version "0.6.0" - resolved "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz" - integrity sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w== - dependencies: - safe-buffer "^5.0.1" - -tweetnacl@^0.14.3: - version "0.14.5" - resolved "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz" - integrity sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA== - -tweetnacl@^1.0.3: - version "1.0.3" - resolved "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz" - integrity sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw== - -tweetnacl@~0.14.0: - version "0.14.5" - resolved "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz" - integrity sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA== - -type-check@^0.4.0, type-check@~0.4.0: - version "0.4.0" - resolved "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz" - integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== - dependencies: - prelude-ls "^1.2.1" - -type-detect@^4.0.0, type-detect@^4.0.8: - version "4.0.8" - resolved "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz" - integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== - -type-fest@^0.20.2: - version "0.20.2" - resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz" - integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== - -type-fest@^0.8.0: - version "0.8.1" - resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz" - integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== - -typedarray-to-buffer@^3.1.5: - version "3.1.5" - resolved "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz" - integrity sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q== - dependencies: - is-typedarray "^1.0.0" - -update-browserslist-db@^1.0.16: - version "1.0.16" - resolved "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.16.tgz" - integrity sha512-KVbTxlBYlckhF5wgfyZXTWnMn7MMZjMu9XG8bPlliUOP9ThaF4QnhP8qrjrH7DRzHfSk0oQv1wToW+iA5GajEQ== - dependencies: - escalade "^3.1.2" - picocolors "^1.0.1" - -uri-js@^4.2.2: - version "4.4.1" - resolved "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz" - integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== - dependencies: - punycode "^2.1.0" - -uuid@^3.3.2: - version "3.4.0" - resolved "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz" - integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== - -uuid@^8.3.2: - version "8.3.2" - resolved "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz" - integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== - -uuid@^9.0.1: - version "9.0.1" - resolved "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz" - integrity sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA== - -verror@1.10.0: - version "1.10.0" - resolved "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz" - integrity sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw== - dependencies: - assert-plus "^1.0.0" - core-util-is "1.0.2" - extsprintf "^1.2.0" - -which-module@^2.0.0: - version "2.0.1" - resolved "https://registry.npmjs.org/which-module/-/which-module-2.0.1.tgz" - integrity sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ== - -which@^2.0.1: - version "2.0.2" - resolved "https://registry.npmjs.org/which/-/which-2.0.2.tgz" - integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== - dependencies: - isexe "^2.0.0" - -word-wrap@^1.2.5: - version "1.2.5" - resolved "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz" - integrity sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA== - -workerpool@6.2.1: - version "6.2.1" - resolved "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz" - integrity sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw== - -wrap-ansi@^6.2.0: - version "6.2.0" - resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz" - integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - -wrap-ansi@^7.0.0: - version "7.0.0" - resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz" - integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - -wrappy@1: - version "1.0.2" - resolved "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" - integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== - -write-file-atomic@^3.0.0: - version "3.0.3" - resolved "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz" - integrity sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q== - dependencies: - imurmurhash "^0.1.4" - is-typedarray "^1.0.0" - signal-exit "^3.0.2" - typedarray-to-buffer "^3.1.5" - -y18n@^4.0.0: - version "4.0.3" - resolved "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz" - integrity sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ== - -y18n@^5.0.5: - version "5.0.8" - resolved "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz" - integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== - -yallist@^3.0.2: - version "3.1.1" - resolved "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz" - integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== - -yargs-parser@^18.1.2: - version "18.1.3" - resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz" - integrity sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ== - dependencies: - camelcase "^5.0.0" - decamelize "^1.2.0" - -yargs-parser@^20.2.2, yargs-parser@20.2.4: - version "20.2.4" - resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz" - integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== - -yargs-unparser@2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz" - integrity sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA== - dependencies: - camelcase "^6.0.0" - decamelize "^4.0.0" - flat "^5.0.2" - is-plain-obj "^2.1.0" - -yargs@^15.0.2: - version "15.4.1" - resolved "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz" - integrity sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A== - dependencies: - cliui "^6.0.0" - decamelize "^1.2.0" - find-up "^4.1.0" - get-caller-file "^2.0.1" - require-directory "^2.1.1" - require-main-filename "^2.0.0" - set-blocking "^2.0.0" - string-width "^4.2.0" - which-module "^2.0.0" - y18n "^4.0.0" - yargs-parser "^18.1.2" - -yargs@16.2.0: - version "16.2.0" - resolved "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz" - integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== - dependencies: - cliui "^7.0.2" - escalade "^3.1.1" - get-caller-file "^2.0.5" - require-directory "^2.1.1" - string-width "^4.2.0" - y18n "^5.0.5" - yargs-parser "^20.2.2" - -yocto-queue@^0.1.0: - version "0.1.0" - resolved "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz" - integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== From 30c979248123d3e66fe487a871e48920393cf1b9 Mon Sep 17 00:00:00 2001 From: Lucas Rosa Date: Mon, 16 Sep 2024 23:46:09 -0300 Subject: [PATCH 02/59] DOTCOM-3583: convert base files to typescript (#179) * update deps and add typescript default config * convert Telnyx main to typescript * bump version to v2 alpha * update changelog * convert Error and Telnyx method to typescript * update utils * convert autoPagination, makeRequest, TelnyxMethod and Webhooks * convert TelnyxResource * remove extra lint file * add types folder * update code comments on framework naming * specify error types * update eslint rules * add types generated from openapi specs * add TelnyxIncomingHttpHeaders type * add BalanceResource type defs --- .eslintignore | 1 + CHANGELOG.md | 20 +- VERSION | 2 +- eslint.config.cjs | 254 - eslint.config.js | 29 + package-lock.json | 379 +- package.json | 18 +- src/Error.ts | 190 + src/TelnyxMethod.basic.ts | 29 + src/TelnyxMethod.ts | 87 + src/TelnyxResource.ts | 552 + src/Types.d.ts | 187 +- src/Webhooks.ts | 107 + src/autoPagination.ts | 329 + src/makeRequest.ts | 163 + src/multipart.ts | 10 +- src/resources/Balance.ts | 6 + src/telnyx.node.ts | 5 + src/telnyx.ts | 347 + src/utils.ts | 293 +- tsconfig.json | 4 +- types/BalanceResource.d.ts | 19 + types/Errors.d.ts | 125 + types/TelnyxAPI.d.ts | 65420 +++++++++++++++++++++++++++++++++++ types/Webhooks.d.ts | 26 + types/index.d.ts | 36 + types/lib.d.ts | 44 + 27 files changed, 68393 insertions(+), 289 deletions(-) delete mode 100644 eslint.config.cjs create mode 100644 eslint.config.js create mode 100644 src/Error.ts create mode 100644 src/TelnyxMethod.basic.ts create mode 100644 src/TelnyxMethod.ts create mode 100644 src/TelnyxResource.ts create mode 100644 src/Webhooks.ts create mode 100644 src/autoPagination.ts create mode 100644 src/makeRequest.ts create mode 100644 src/resources/Balance.ts create mode 100644 src/telnyx.node.ts create mode 100644 src/telnyx.ts create mode 100644 types/BalanceResource.d.ts create mode 100644 types/Errors.d.ts create mode 100644 types/TelnyxAPI.d.ts create mode 100644 types/Webhooks.d.ts create mode 100644 types/index.d.ts create mode 100644 types/lib.d.ts diff --git a/.eslintignore b/.eslintignore index 25ff267..9d7d525 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,4 +1,5 @@ *.node*.js +dist node_modules tsconfig.json lib/Error.js \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 0471a3b..a6ac3cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,23 +1,41 @@ # CHANGELOG -## +## v2 + +### v2.0.0-alpha.0 + +- Add Typescript default config, linter and dependencies +- Bump default Node version to `20` +- Update README on [Development](./README.md#development) instructions +- Remove `yarn` in favor of `npm` 10 +- Convert SDK files to typescript +- Use ES Modules syntax +- Update package `main` entrypoint to be compiled version of [src telnyx.ts](./src/telnyx.ts) +- Make `setApiKey` TelnyxObject prototype method private + +## v1 ### v1.26.2 + - Fix Brand and Campaign redirects - Update security ### v1.26.1 + - Fix porting comments ### v1.26.0 + - Endpoint additions - Package upgrades - Preparation for typescript migration/support ### v1.25.5 + - Security Updates + API Additions ### v1.23.0 (2021-10-19) + - **Addresses** added `validate` - **AuthenticationProvider** added `list`, `create`, `retrieve`, `update`, `del` - **DynamicEmergency** (for `endpoints` and `addresses`) added `list`, `retrieve`, `create`, `del` diff --git a/VERSION b/VERSION index 5db08bf..6cf46a6 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.27.0 +2.0.0-alpha.0 diff --git a/eslint.config.cjs b/eslint.config.cjs deleted file mode 100644 index f70929d..0000000 --- a/eslint.config.cjs +++ /dev/null @@ -1,254 +0,0 @@ -const eslintPluginPrettierRecommended = require('eslint-plugin-prettier/recommended'); - -module.exports = [ - { - files: ['./src/**/*.ts'], - rules: { - 'accessor-pairs': 'error', - 'array-bracket-spacing': ['error', 'never'], - 'array-callback-return': 'off', - 'arrow-body-style': 'error', - 'arrow-parens': 'error', - 'arrow-spacing': 'error', - 'block-scoped-var': 'off', - 'block-spacing': 'off', - 'brace-style': [ - 'error', - '1tbs', - { - allowSingleLine: true, - }, - ], - camelcase: [ - 'error', - { - properties: 'never', - }, - ], - 'capitalized-comments': 'off', - 'class-methods-use-this': 'error', - 'comma-dangle': 'off', - 'comma-spacing': 'off', - 'comma-style': ['error', 'last'], - complexity: 'error', - 'computed-property-spacing': ['error', 'never'], - 'consistent-return': 'off', - 'consistent-this': 'off', - curly: 'error', - 'default-case': 'off', - 'dot-location': ['error', 'property'], - 'dot-notation': 'error', - 'eol-last': 'error', - eqeqeq: 'off', - 'func-call-spacing': 'error', - 'func-name-matching': 'error', - 'func-names': 'off', - 'func-style': ['error', 'declaration'], - 'generator-star-spacing': 'error', - 'global-require': 'off', - 'guard-for-in': 'off', - 'handle-callback-err': 'off', - 'id-blacklist': 'error', - 'id-length': 'off', - 'id-match': 'error', - indent: ['error', 2], - 'init-declarations': 'off', - 'jsx-quotes': 'error', - 'key-spacing': 'error', - 'keyword-spacing': [ - 'error', - { - after: true, - before: true, - }, - ], - 'line-comment-position': 'off', - 'linebreak-style': ['error', 'unix'], - 'lines-around-comment': 'error', - 'lines-around-directive': 'error', - 'max-depth': 'error', - 'max-len': 'off', - 'max-lines': 'off', - 'max-nested-callbacks': 'error', - 'max-params': 'off', - 'max-statements': 'off', - 'max-statements-per-line': 'off', - 'multiline-ternary': 'off', - 'new-cap': 'error', - 'new-parens': 'error', - 'newline-after-var': 'off', - 'newline-before-return': 'off', - 'newline-per-chained-call': 'off', - 'no-alert': 'error', - 'no-array-constructor': 'error', - 'no-await-in-loop': 'error', - 'no-bitwise': 'off', - 'no-caller': 'error', - 'no-catch-shadow': 'off', - 'no-compare-neg-zero': 'error', - 'no-confusing-arrow': 'error', - 'no-continue': 'off', - 'no-div-regex': 'error', - 'no-duplicate-imports': 'error', - 'no-else-return': 'off', - 'no-empty-function': 'off', - 'no-eq-null': 'off', - 'no-eval': 'error', - 'no-extend-native': 'error', - 'no-extra-bind': 'error', - 'no-extra-label': 'error', - 'no-extra-parens': 'off', - 'no-floating-decimal': 'error', - 'no-implicit-globals': 'error', - 'no-implied-eval': 'error', - 'no-inline-comments': 'off', - 'no-inner-declarations': ['error', 'functions'], - 'no-invalid-this': 'off', - 'no-iterator': 'error', - 'no-label-var': 'error', - 'no-labels': 'error', - 'no-lone-blocks': 'error', - 'no-lonely-if': 'error', - 'no-loop-func': 'error', - 'no-magic-numbers': 'off', - 'no-mixed-operators': 'error', - 'no-mixed-requires': 'error', - 'no-multi-assign': 'off', - 'no-multi-spaces': 'error', - 'no-multi-str': 'error', - 'no-multiple-empty-lines': 'error', - 'no-native-reassign': 'error', - 'no-negated-condition': 'off', - 'no-negated-in-lhs': 'error', - 'no-nested-ternary': 'error', - 'no-new': 'error', - 'no-new-func': 'error', - 'no-new-object': 'error', - 'no-new-require': 'error', - 'no-new-wrappers': 'error', - 'no-octal-escape': 'error', - 'no-param-reassign': 'off', - 'no-path-concat': 'error', - 'no-plusplus': [ - 'error', - { - allowForLoopAfterthoughts: true, - }, - ], - 'no-process-env': 'off', - 'no-process-exit': 'error', - 'no-proto': 'error', - 'no-prototype-builtins': 'off', - 'no-restricted-globals': 'error', - 'no-restricted-imports': 'error', - 'no-restricted-modules': 'error', - 'no-restricted-properties': 'error', - 'no-restricted-syntax': 'error', - 'no-return-assign': 'error', - 'no-return-await': 'error', - 'no-script-url': 'error', - 'no-self-compare': 'error', - 'no-sequences': 'error', - 'no-shadow': 'off', - 'no-shadow-restricted-names': 'error', - 'no-spaced-func': 'error', - 'no-sync': 'error', - 'no-tabs': 'error', - 'no-template-curly-in-string': 'error', - 'no-ternary': 'off', - 'no-throw-literal': 'error', - 'no-trailing-spaces': 'error', - 'no-undef-init': 'error', - 'no-undefined': 'off', - 'no-underscore-dangle': 'off', - 'no-unmodified-loop-condition': 'error', - 'no-unneeded-ternary': 'error', - 'no-unused-expressions': 'error', - 'no-unused-vars': [ - 'error', - { - args: 'none', - }, - ], - 'no-use-before-define': 'off', - 'no-useless-call': 'error', - 'no-useless-computed-key': 'error', - 'no-useless-concat': 'error', - 'no-useless-constructor': 'error', - 'no-useless-escape': 'off', - 'no-useless-rename': 'error', - 'no-useless-return': 'error', - 'no-var': 'off', - 'no-void': 'error', - 'no-warning-comments': 'error', - 'no-whitespace-before-property': 'error', - 'no-with': 'error', - 'nonblock-statement-body-position': 'error', - 'object-curly-newline': 'off', - 'object-curly-spacing': ['error', 'never'], - 'object-property-newline': 'off', - 'object-shorthand': 'off', - 'one-var': 'off', - 'one-var-declaration-per-line': 'error', - 'operator-assignment': ['error', 'always'], - 'operator-linebreak': 'off', - 'padded-blocks': 'off', - 'prefer-arrow-callback': 'off', - 'prefer-const': 'error', - 'prefer-destructuring': [ - 'error', - { - array: false, - object: false, - }, - ], - 'prefer-numeric-literals': 'error', - 'prefer-promise-reject-errors': 'error', - 'prefer-reflect': 'off', - 'prefer-rest-params': 'off', - 'prefer-spread': 'off', - 'prefer-template': 'off', - 'quote-props': 'off', - quotes: [ - 'error', - 'single', - { - avoidEscape: true, - }, - ], - radix: 'error', - 'require-await': 'error', - 'require-jsdoc': 'off', - 'rest-spread-spacing': 'error', - semi: 'off', - 'semi-spacing': [ - 'error', - { - after: true, - before: false, - }, - ], - 'sort-imports': 'error', - 'sort-keys': 'off', - 'sort-vars': 'error', - 'space-before-blocks': 'error', - 'space-before-function-paren': 'off', - 'space-in-parens': ['error', 'never'], - 'space-infix-ops': 'error', - 'space-unary-ops': 'error', - 'spaced-comment': ['error', 'always'], - strict: 'off', - 'symbol-description': 'error', - 'template-curly-spacing': 'error', - 'template-tag-spacing': 'error', - 'unicode-bom': ['error', 'never'], - 'valid-jsdoc': 'off', - 'vars-on-top': 'off', - 'wrap-iife': 'error', - 'wrap-regex': 'off', - 'yield-star-spacing': 'error', - yoda: ['error', 'never'], - }, - }, - {...eslintPluginPrettierRecommended, files: ['./src/**/*.ts']}, -]; diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 0000000..ef9e0ec --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,29 @@ +// @ts-check + +import eslint from '@eslint/js'; +import tseslint from 'typescript-eslint'; + +export default tseslint.config({ + files: ['src/**/*.ts', 'types/**/*.ts'], + extends: [eslint.configs.recommended, ...tseslint.configs.recommended], + rules: { + '@typescript-eslint/no-unused-vars': [ + 'error', + { + args: 'all', + argsIgnorePattern: '^_', + caughtErrors: 'all', + caughtErrorsIgnorePattern: '^_', + destructuredArrayIgnorePattern: '^_', + varsIgnorePattern: '^_', + ignoreRestSiblings: true, + }, + ], + '@typescript-eslint/no-empty-object-type': [ + 'error', + { + allowInterfaces: 'always', + }, + ], + }, +}); diff --git a/package-lock.json b/package-lock.json index 48d0aa0..1f4b109 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,18 +1,20 @@ { "name": "telnyx", - "version": "1.27.0", + "version": "2.0.0-alpha.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "telnyx", - "version": "1.27.0", + "version": "2.0.0-alpha.0", "license": "MIT", "dependencies": { - "@types/node": "^20.0.0", - "@types/qs": "^6.9.15" + "@types/node": "^20.0.0" }, "devDependencies": { + "@eslint/js": "^9.10.0", + "@types/eslint__js": "^8.42.3", + "@types/qs": "^6.9.15", "chai": "~4.4.1", "chai-as-promised": "~7.1.1", "coveralls": "^3.1.1", @@ -21,7 +23,6 @@ "eslint-config-prettier": "^9.1.0", "eslint-plugin-chai-friendly": "^0.7.4", "eslint-plugin-prettier": "^5.2.1", - "lodash.isplainobject": "^4.0.6", "mocha": "^10.3.0", "nock": "^13.5.4", "nyc": "^15.1.0", @@ -30,7 +31,8 @@ "safe-buffer": "^5.2.1", "telnyx": "^1.26.2", "tweetnacl": "^1.0.3", - "typescript": "^5.5.4", + "typescript": "^5.6.2", + "typescript-eslint": "^8.5.0", "uuid": "^9.0.1" }, "engines": { @@ -445,12 +447,13 @@ } }, "node_modules/@eslint/js": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", - "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", + "version": "9.10.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.10.0.tgz", + "integrity": "sha512-fuXtbiP5GWIn8Fz+LWoOMVf/Jxm+aajZYkhi6CuEm4SxymFM+eUWzbO9qXT+L0iCkL5+KGYMCSGxo686H19S1g==", "dev": true, + "license": "MIT", "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, "node_modules/@humanwhocodes/config-array": { @@ -669,6 +672,38 @@ "url": "https://opencollective.com/unts" } }, + "node_modules/@types/eslint": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-9.6.1.tgz", + "integrity": "sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag==", + "dev": true, + "dependencies": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, + "node_modules/@types/eslint__js": { + "version": "8.42.3", + "resolved": "https://registry.npmjs.org/@types/eslint__js/-/eslint__js-8.42.3.tgz", + "integrity": "sha512-alfG737uhmPdnvkrLdZLcEKJ/B8s9Y4hrZ+YAdzUeoArBlSUERA2E87ROfOaS4jd/C45fzOoZzidLc1IPwLqOw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/eslint": "*" + } + }, + "node_modules/@types/estree": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", + "dev": true + }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true + }, "node_modules/@types/node": { "version": "20.16.2", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.16.2.tgz", @@ -680,7 +715,226 @@ "node_modules/@types/qs": { "version": "6.9.15", "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.15.tgz", - "integrity": "sha512-uXHQKES6DQKKCLh441Xv/dwxOq1TVS3JPUMlEqoEglvlhR6Mxnlew/Xq/LRVHpLyk7iK3zODe1qYHIMltO7XGg==" + "integrity": "sha512-uXHQKES6DQKKCLh441Xv/dwxOq1TVS3JPUMlEqoEglvlhR6Mxnlew/Xq/LRVHpLyk7iK3zODe1qYHIMltO7XGg==", + "dev": true + }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.5.0.tgz", + "integrity": "sha512-lHS5hvz33iUFQKuPFGheAB84LwcJ60G8vKnEhnfcK1l8kGVLro2SFYW6K0/tj8FUhRJ0VHyg1oAfg50QGbPPHw==", + "dev": true, + "dependencies": { + "@eslint-community/regexpp": "^4.10.0", + "@typescript-eslint/scope-manager": "8.5.0", + "@typescript-eslint/type-utils": "8.5.0", + "@typescript-eslint/utils": "8.5.0", + "@typescript-eslint/visitor-keys": "8.5.0", + "graphemer": "^1.4.0", + "ignore": "^5.3.1", + "natural-compare": "^1.4.0", + "ts-api-utils": "^1.3.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^8.0.0 || ^8.0.0-alpha.0", + "eslint": "^8.57.0 || ^9.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.5.0.tgz", + "integrity": "sha512-gF77eNv0Xz2UJg/NbpWJ0kqAm35UMsvZf1GHj8D9MRFTj/V3tAciIWXfmPLsAAF/vUlpWPvUDyH1jjsr0cMVWw==", + "dev": true, + "dependencies": { + "@typescript-eslint/scope-manager": "8.5.0", + "@typescript-eslint/types": "8.5.0", + "@typescript-eslint/typescript-estree": "8.5.0", + "@typescript-eslint/visitor-keys": "8.5.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.5.0.tgz", + "integrity": "sha512-06JOQ9Qgj33yvBEx6tpC8ecP9o860rsR22hWMEd12WcTRrfaFgHr2RB/CA/B+7BMhHkXT4chg2MyboGdFGawYg==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "8.5.0", + "@typescript-eslint/visitor-keys": "8.5.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.5.0.tgz", + "integrity": "sha512-N1K8Ix+lUM+cIDhL2uekVn/ZD7TZW+9/rwz8DclQpcQ9rk4sIL5CAlBC0CugWKREmDjBzI/kQqU4wkg46jWLYA==", + "dev": true, + "dependencies": { + "@typescript-eslint/typescript-estree": "8.5.0", + "@typescript-eslint/utils": "8.5.0", + "debug": "^4.3.4", + "ts-api-utils": "^1.3.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/types": { + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.5.0.tgz", + "integrity": "sha512-qjkormnQS5wF9pjSi6q60bKUHH44j2APxfh9TQRXK8wbYVeDYYdYJGIROL87LGZZ2gz3Rbmjc736qyL8deVtdw==", + "dev": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.5.0.tgz", + "integrity": "sha512-vEG2Sf9P8BPQ+d0pxdfndw3xIXaoSjliG0/Ejk7UggByZPKXmJmw3GW5jV2gHNQNawBUyfahoSiCFVov0Ruf7Q==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "8.5.0", + "@typescript-eslint/visitor-keys": "8.5.0", + "debug": "^4.3.4", + "fast-glob": "^3.3.2", + "is-glob": "^4.0.3", + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^1.3.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.5.0.tgz", + "integrity": "sha512-6yyGYVL0e+VzGYp60wvkBHiqDWOpT63pdMV2CVG4LVDd5uR6q1qQN/7LafBZtAtNIn/mqXjsSeS5ggv/P0iECw==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "@typescript-eslint/scope-manager": "8.5.0", + "@typescript-eslint/types": "8.5.0", + "@typescript-eslint/typescript-estree": "8.5.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.5.0.tgz", + "integrity": "sha512-yTPqMnbAZJNy2Xq2XU8AdtOW9tJIr+UQb64aXB9f3B1498Zx9JorVgFJcZpEc9UBuCCrdzKID2RGAMkYcDtZOw==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "8.5.0", + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } }, "node_modules/@ungap/structured-clone": { "version": "1.2.0", @@ -1424,6 +1678,7 @@ "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", "dev": true, + "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", @@ -1556,6 +1811,15 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/eslint/node_modules/@eslint/js": { + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", + "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, "node_modules/eslint/node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", @@ -1673,6 +1937,34 @@ "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==", "dev": true }, + "node_modules/fast-glob": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", @@ -2682,6 +2974,28 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dev": true, + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, "node_modules/mime-db": { "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", @@ -3937,6 +4251,18 @@ "node": ">=0.8" } }, + "node_modules/ts-api-utils": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz", + "integrity": "sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==", + "dev": true, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "typescript": ">=4.2.0" + } + }, "node_modules/tslib": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.7.0.tgz", @@ -4004,10 +4330,11 @@ } }, "node_modules/typescript": { - "version": "5.5.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz", - "integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==", + "version": "5.6.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.2.tgz", + "integrity": "sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==", "dev": true, + "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -4016,6 +4343,30 @@ "node": ">=14.17" } }, + "node_modules/typescript-eslint": { + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.5.0.tgz", + "integrity": "sha512-uD+XxEoSIvqtm4KE97etm32Tn5MfaZWgWfMMREStLxR6JzvHkc2Tkj7zhTEK5XmtpTmKHNnG8Sot6qDfhHtR1Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/eslint-plugin": "8.5.0", + "@typescript-eslint/parser": "8.5.0", + "@typescript-eslint/utils": "8.5.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, "node_modules/undici-types": { "version": "6.19.8", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", diff --git a/package.json b/package.json index ed61447..012ab74 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "telnyx", - "version": "1.27.0", + "version": "2.0.0-alpha.0", "description": "Telnyx API Node SDK", "keywords": [ "telnyx", @@ -27,10 +27,13 @@ "engines": { "node": "^18 || >=20" }, - "main": "dist/telnyx.js", + "main": "dist/telnyx.node.js", "type": "module", "types": "types/index.d.ts", "devDependencies": { + "@eslint/js": "^9.10.0", + "@types/eslint__js": "^8.42.3", + "@types/qs": "^6.9.15", "chai": "~4.4.1", "chai-as-promised": "~7.1.1", "coveralls": "^3.1.1", @@ -39,7 +42,6 @@ "eslint-config-prettier": "^9.1.0", "eslint-plugin-chai-friendly": "^0.7.4", "eslint-plugin-prettier": "^5.2.1", - "lodash.isplainobject": "^4.0.6", "mocha": "^10.3.0", "nock": "^13.5.4", "nyc": "^15.1.0", @@ -48,12 +50,12 @@ "safe-buffer": "^5.2.1", "telnyx": "^1.26.2", "tweetnacl": "^1.0.3", - "typescript": "^5.5.4", + "typescript": "^5.6.2", + "typescript-eslint": "^8.5.0", "uuid": "^9.0.1" }, "dependencies": { - "@types/node": "^20.0.0", - "@types/qs": "^6.9.15" + "@types/node": "^20.0.0" }, "license": "MIT", "scripts": { @@ -62,7 +64,7 @@ "prepack": "npm install && npm run build", "mocha": "nyc mocha", "test": "npm run lint && npm run mocha", - "lint": "eslint .", + "lint": "rm -rf ./dist && eslint .", "fix": "npm run lint --fix", "report": "nyc -r text -r lcov report", "coveralls": "cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js" @@ -71,7 +73,7 @@ "exclude": [ "testUtils/**/*", "test/**/*", - "lib/TelnyxMethod.basic.js" + "src/TelnyxMethod.basic.js" ] } } diff --git a/src/Error.ts b/src/Error.ts new file mode 100644 index 0000000..c8ea4df --- /dev/null +++ b/src/Error.ts @@ -0,0 +1,190 @@ +export interface TelnyxRawError { + message?: string; + type?: string; + headers?: {[header: string]: string | string[] | undefined}; + statusCode?: number; + requestId?: string; + responseBody?: unknown; + code?: string; + detail?: string | Error | unknown; + errors?: Array<{ + code: string; + detail: string; + title: string; + }>; +} + +export const generate = (rawTelnyxError: TelnyxRawError): TelnyxError => { + switch (rawTelnyxError.statusCode) { + case 400: + return new TelnyxInvalidRequestError(rawTelnyxError); + case 401: + return new TelnyxAuthenticationError(rawTelnyxError); + case 403: + return new TelnyxPermissionError(rawTelnyxError); + case 404: + return new TelnyxResourceNotFoundError(rawTelnyxError); + case 405: + return new TelnyxMethodNotSupportedError(rawTelnyxError); + case 408: + return new TelnyxTimeoutError(rawTelnyxError); + case 415: + return new TelnyxUnsupportedMediaTypeError(rawTelnyxError); + case 422: + return new TelnyxInvalidParametersError(rawTelnyxError); + case 429: + return new TelnyxRateLimitError(rawTelnyxError); + case 500: + return new TelnyxAPIError(rawTelnyxError); + case 503: + return new TelnyxServiceUnavailableError(rawTelnyxError); + } + return new TelnyxError({type: 'Generic', message: 'Unknown Error'}); +}; + +/** + * TelnyxError is the base error from which all other more specific Telnyx errors derive. + * Specifically for errors returned from Telnyx's REST API. + */ +export class TelnyxError extends Error { + readonly message: string; + readonly type: string; + readonly raw: unknown; + readonly headers?: TelnyxRawError['headers']; + readonly requestId?: string; + readonly detail?: string | Error | unknown; + + readonly code?: string; + readonly statusCode?: number; + readonly responseBody?: TelnyxRawError['responseBody']; + + constructor(raw: TelnyxRawError = {}, type: string | null = null) { + super(raw.message); + this.type = type || this.constructor.name; + + this.raw = raw; + this.code = raw.code; + this.detail = raw.detail; + this.headers = raw.headers; + this.requestId = raw.requestId; + this.statusCode = raw.statusCode; + this.responseBody = raw.responseBody; + // @ts-expect-error message needs to be required here + this.message = raw.message; + } + + /** + * Helper factory which takes raw Telnyx errors and outputs wrapping instances + */ + static generate = generate; +} + +/** + * InvalidRequestError is raised when a request is initiated with invalid + * parameters. + */ +export class TelnyxInvalidRequestError extends TelnyxError { + constructor(raw: TelnyxRawError = {}) { + super(raw, 'TelnyxInvalidRequestError'); + } +} + +/** + * APIError is a generic error that may be raised in cases where none of the + * other named errors cover the problem. It could also be raised in the case + * that a new error has been introduced in the API, but this version of the + * Node.JS SDK doesn't know how to handle it. + */ +export class TelnyxAPIError extends TelnyxError { + constructor(raw: TelnyxRawError = {}) { + super(raw, 'TelnyxAPIError'); + } +} + +/** + * AuthenticationError is raised when invalid credentials are used to connect + * to Telnyx's servers. + */ +export class TelnyxAuthenticationError extends TelnyxError { + constructor(raw: TelnyxRawError = {}) { + super(raw, 'TelnyxAuthenticationError'); + } +} + +/** + * PermissionError is raised in cases where access was attempted on a resource + * that wasn't allowed. + */ +export class TelnyxPermissionError extends TelnyxError { + constructor(raw: TelnyxRawError = {}) { + super(raw, 'TelnyxPermissionError'); + } +} + +export class TelnyxResourceNotFoundError extends TelnyxError { + constructor(raw: TelnyxRawError = {}) { + super(raw, 'TelnyxResourceNotFoundError'); + } +} + +export class TelnyxMethodNotSupportedError extends TelnyxError { + constructor(raw: TelnyxRawError = {}) { + super(raw, 'TelnyxMethodNotSupportedError'); + } +} + +export class TelnyxTimeoutError extends TelnyxError { + constructor(raw: TelnyxRawError = {}) { + super(raw, 'TelnyxTimeoutError'); + } +} + +export class TelnyxUnsupportedMediaTypeError extends TelnyxError { + constructor(raw: TelnyxRawError = {}) { + super(raw, 'TelnyxUnsupportedMediaTypeError'); + } +} + +export class TelnyxInvalidParametersError extends TelnyxError { + constructor(raw: TelnyxRawError = {}) { + super(raw, 'TelnyxInvalidParametersError'); + } +} + +/** + * RateLimitError is raised in cases where an account is putting too much load + * on Telnyx's API servers (usually by performing too many requests). Please + * back off on request rate. + */ +export class TelnyxRateLimitError extends TelnyxError { + constructor(raw: TelnyxRawError = {}) { + super(raw, 'TelnyxRateLimitError'); + } +} + +export class TelnyxServiceUnavailableError extends TelnyxError { + constructor(raw: TelnyxRawError = {}) { + super(raw, 'TelnyxServiceUnavailableError'); + } +} + +/** + * TelnyxConnectionError is raised in the event that the SDK can't connect to + * Telnyx's servers. That can be for a variety of different reasons from a + * downed network to a bad TLS certificate. + */ +export class TelnyxConnectionError extends TelnyxError { + constructor(raw: TelnyxRawError = {}) { + super(raw, 'TelnyxConnectionError'); + } +} + +/** + * SignatureVerificationError is raised when the signature verification for a + * webhook fails + */ +export class TelnyxSignatureVerificationError extends TelnyxError { + constructor(raw: TelnyxRawError = {}) { + super(raw, 'TelnyxSignatureVerificationError'); + } +} diff --git a/src/TelnyxMethod.basic.ts b/src/TelnyxMethod.basic.ts new file mode 100644 index 0000000..89c216e --- /dev/null +++ b/src/TelnyxMethod.basic.ts @@ -0,0 +1,29 @@ +import telnyxMethod from './TelnyxMethod.js'; + +export const create = telnyxMethod({ + method: 'POST', +}); + +export const list = telnyxMethod({ + method: 'GET', + methodType: 'list', +}); + +export const retrieve = telnyxMethod({ + method: 'GET', + path: '/{id}', + urlParams: ['id'], +}); + +export const update = telnyxMethod({ + method: 'PATCH', + path: '{id}', + urlParams: ['id'], +}); + +// Avoid 'delete' keyword in JS +export const del = telnyxMethod({ + method: 'DELETE', + path: '{id}', + urlParams: ['id'], +}); diff --git a/src/TelnyxMethod.ts b/src/TelnyxMethod.ts new file mode 100644 index 0000000..ad734e4 --- /dev/null +++ b/src/TelnyxMethod.ts @@ -0,0 +1,87 @@ +import {MethodSpec, TelnyxResourceObject} from './Types.js'; +import * as utils from './utils.js'; +import makeRequest from './makeRequest.js'; +import {makeAutoPaginationMethods} from './autoPagination.js'; + +/** + * Create an API method from the declared spec. + * + * @param [spec.method='GET'] Request Method (POST, GET, DELETE, PUT, PATCH) + * @param [spec.path=''] Path to be appended to the API BASE_PATH, joined with + * the instance's path (e.g. 'messaging_profiles' or 'available_phone_numbers') + * @param [spec.urlParams=[]] Array of required arguments in the order that they + * must be passed by the consumer of the API. Subsequent optional arguments are + * optionally passed through a hash (Object) as the penultimate argument + * (preceding the also-optional callback argument + * @param [spec.paramsNames=[]] Array of required arguments in the order that they + * are to be used instead of being passed by the consumer of the API. Useful for nested resources + * in a manner that consumer doesn't need to provide path arguments + * @param [spec.paramsValues=[]] Array of substitute require arguments in `paramsNames` values + * @param [spec.encode] Function for mutating input parameters to a method. + * Usefully for applying transforms to data on a per-method basis. + * @param [spec.host] Hostname for the request. + * @param [spec.transformResponseData] mutates response data to decorate with any util functions or info. + */ +function telnyxMethod( + spec: MethodSpec, +): (...args: unknown[]) => Promise { + return function ( + this: TelnyxResourceObject, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + ...args: any[] // needs to be any since callback is extracted from these args and there's no easy way to type all args + ): Promise { + if (spec.paramsValues) { + populateUrlParamsWithResource(this, args, spec); + } + + const callback = typeof args[args.length - 1] == 'function' && args.pop(); + + const requestPromise = utils.callbackifyPromiseWithTimeout( + makeRequest(this, args, spec, {}), + callback, + ); + + if (spec.methodType === 'list') { + const autoPaginationMethods = makeAutoPaginationMethods( + this, + args, + spec, + requestPromise, + ); + Object.assign(requestPromise, autoPaginationMethods); + } + + return requestPromise; + }; +} + +/** + * Populate nested method URL params with resource object attributes that match the param name. + * This allows you to do things like setting the `call_control_id` attribute from an existing call object on a new instance of `telnyx.calls`. + */ +function populateUrlParamsWithResource( + self: TelnyxResourceObject, + args: unknown[], + spec: MethodSpec, +) { + // if url params is not in resource response data. + if (spec.paramsValues && !spec.paramsValues[0]) { + const paramsValues = (spec.paramsNames || []).reduce(function ( + result, + name, + ) { + // @ts-expect-error TODO: cast name to index of self + if (self[name]) { + // @ts-expect-error TODO: cast name to index of self + result.push(self[name]); + } + return result; + }, []); + + args.unshift(paramsValues); + } else { + args.unshift(spec.paramsValues); + } +} + +export default telnyxMethod; diff --git a/src/TelnyxResource.ts b/src/TelnyxResource.ts new file mode 100644 index 0000000..b517ce1 --- /dev/null +++ b/src/TelnyxResource.ts @@ -0,0 +1,552 @@ +import * as http from 'http'; +import * as https from 'https'; +import * as path from 'path'; +import {Buffer} from 'safe-buffer'; + +import * as utils from './utils.js'; +import * as TelnyxError from './Error.js'; +import TelnyxMethod from './TelnyxMethod.js'; +import * as basicMethods from './TelnyxMethod.basic.js'; +import { + MethodSpec, + ReqHandler, + ReqTimeoutHandler, + RequestCallback, + RequestData, + RequestDataProcessor, + RequestHeaders, + RequestOptions, + ResponsePayload, + TelnyxIncomingHttpHeaders, + TelnyxObject, + TelnyxResourceObject, +} from './Types.js'; + +const hasOwn = {}.hasOwnProperty; + +// Provide extension mechanism for Telnyx Resource Sub-Classes +TelnyxResource.extend = utils.protoExtend; +// Expose method-creator & prepared (basic) methods +TelnyxResource.method = TelnyxMethod; +TelnyxResource.BASIC_METHODS = basicMethods; + +TelnyxResource.MAX_BUFFERED_REQUEST_METRICS = 100; + +/** + * Encapsulates request logic for a Telnyx Resource + */ +function TelnyxResource( + this: TelnyxResourceObject, + telnyx: TelnyxObject, + urlData?: RequestData, +): void { + this._telnyx = telnyx; + this._urlData = urlData || {}; + + this.basePath = utils.makeURLInterpolator( + // @ts-expect-error changing type of basePath + this.basePath || telnyx.getApiField('basePath'), + ); + // @ts-expect-error changing type of path + this.resourcePath = this.path; + // @ts-expect-error changing type of path + this.path = utils.makeURLInterpolator(this.path); + + if (this.includeBasic) { + this.includeBasic.forEach((methodName) => { + // @ts-expect-error TODO: cast `methodName` to `BASIC_METHODS` values + this[methodName] = TelnyxResource.BASIC_METHODS[methodName]; + }, this); + } + + if (this.nestedResources) { + for (const resource in this.nestedResources) { + // @ts-expect-error TODO: cast `resource` to `nestedResources` values + this[utils.pascalToCamelCase(resource)] = new this.nestedResources[ + resource + ](telnyx); + } + } + + if (this.instanceMethods) { + Object.assign(this, this.instanceMethods); + } + + this.initialize.apply(this, [telnyx, urlData]); +} + +TelnyxResource.prototype = { + _telnyx: null as TelnyxObject | null, + _urlData: null as RequestData | null, + // @ts-expect-error the type of path changes in ctor + path: '' as UrlInterpolator, + resourcePath: '', + + // Properties are set in the constructor above + // Methods that don't use the API's default '/v1' path can override it with this setting. + basePath: null!, + includeBasic: null!, + nestedResources: null!, + instanceMethods: null!, + + initialize: function () {}, + + // Function to override the default data processor. This allows full control + // over how a TelnyxResource's request data will get converted into an HTTP + // body. This is useful for non-standard HTTP requests. The function should + // take method name, data, and headers as arguments. + requestDataProcessor: null as RequestDataProcessor | null, + + // Function to add a validation checks before sending the request, errors should + // be thrown, and they will be passed to the callback/promise. + validateRequest: null, + + createFullPath( + commandPath: string | ((urlData: Record) => string), + urlData: Record, + ): string { + return path + .join( + this.basePath(urlData), + this.path(urlData), + typeof commandPath == 'function' ? commandPath(urlData) : commandPath, + ) + .replace(/\\/g, '/'); // ugly workaround for Windows + }, + + // Creates a relative resource path with symbols left in (unlike + // createFullPath which takes some data to replace them with). For example it + // might produce: /invoices/{id} + createResourcePathWithSymbols(pathWithSymbols: string | null): string { + return ( + '/' + + path.join(this.resourcePath, pathWithSymbols || '').replace(/\\/g, '/') + ); // ugly workaround for Windows + }, + + createUrlData: function () { + const urlData: RequestData = {}; + // Merge in baseData + for (const i in this._urlData) { + if (hasOwn.call(this._urlData, i)) { + urlData[i] = this._urlData[i]; + } + } + return urlData; + }, + + _timeoutHandler: function ( + timeout: number, + req: ReqTimeoutHandler, + callback: RequestCallback, + ) { + return () => { + const timeoutErr = new Error('ETIMEDOUT'); + + req._isAborted = true; + req.abort(); + + callback.call( + this, + new TelnyxError.TelnyxConnectionError({ + message: + 'Request aborted due to timeout being reached (' + timeout + 'ms)', + detail: timeoutErr, + }), + null, + ); + }; + }, + + _responseHandler(req: ReqHandler, callback: RequestCallback) { + // eslint-disable-next-line @typescript-eslint/no-this-alias + const self = this; + return function (res: ResponsePayload) { + let response = ''; + + res.setEncoding('utf8'); + res.on('data', function (chunk: string) { + response += chunk; + }); + res.on('end', function () { + const headers: TelnyxIncomingHttpHeaders = res.headers || {}; + // NOTE: Telnyx responds with lowercase header names/keys. + + // For convenience, make Request-Id easily accessible on + // lastResponse. + res.requestId = headers['request-id'] || headers['x-request-id'] || ''; + + const requestDurationMs = Date.now() - req._requestStart; + + const responseEvent = utils.removeEmpty({ + method: req._requestEvent.method, + path: req._requestEvent.path, + status: res.statusCode, + request_id: res.requestId, + elapsed: requestDurationMs, + }); + + self._telnyx._emitter.emit('response', responseEvent); + + try { + const responseBody = utils.tryParseJSON(response); + + if (responseBody.errors) { + const error = {} as TelnyxError.TelnyxRawError; + + error.errors = + responseBody.errors as TelnyxError.TelnyxRawError['errors']; + + error.headers = headers; + error.statusCode = res.statusCode; + error.requestId = res.requestId as string; + + const err = self._buildError(error, res.statusCode); + + return callback.call(self, err, null); + } + } catch (e) { + return callback.call( + self, + new TelnyxError.TelnyxAPIError({ + message: 'Invalid JSON received from the Telnyx API', + responseBody: response, + detail: e, + requestId: res.requestId as string, + }), + null, + ); + } + + // Expose res object + Object.defineProperty(response, 'lastResponse', { + enumerable: false, + writable: false, + value: res, + }); + // parsed json and found no errors so this is a valid response payload + callback.call(self, null, response as unknown as ResponsePayload); + }); + }; + }, + + _buildError: function ( + error: TelnyxError.TelnyxRawError, + statusCode: number | undefined, + ) { + let err; + switch (statusCode) { + case 400: + err = new TelnyxError.TelnyxInvalidRequestError(error); + break; + case 401: + err = new TelnyxError.TelnyxAuthenticationError(error); + break; + case 403: + err = new TelnyxError.TelnyxPermissionError(error); + break; + case 404: + err = new TelnyxError.TelnyxResourceNotFoundError(error); + break; + case 405: + err = new TelnyxError.TelnyxMethodNotSupportedError(error); + break; + case 408: + err = new TelnyxError.TelnyxTimeoutError(error); + break; + case 415: + err = new TelnyxError.TelnyxUnsupportedMediaTypeError(error); + break; + case 422: + err = new TelnyxError.TelnyxInvalidParametersError(error); + break; + case 429: + err = new TelnyxError.TelnyxRateLimitError(error); + break; + case 500: + err = new TelnyxError.TelnyxAPIError(error); + break; + case 503: + err = new TelnyxError.TelnyxServiceUnavailableError(error); + break; + default: + err = new TelnyxError.TelnyxAPIError(error); + } + + return err; + }, + + _generateConnectionErrorMessage(requestRetries: number): string { + return ( + 'An error occurred with our connection to Telnyx.' + + (requestRetries > 0 + ? ' Request was retried ' + requestRetries + ' times.' + : '') + ); + }, + + _errorHandler: function ( + req: ReqTimeoutHandler, + requestRetries: number, + callback: RequestCallback, + ) { + return (error: Error) => { + if (req._isAborted) { + // already handled + return; + } + callback.call( + this, + new TelnyxError.TelnyxConnectionError({ + message: this._generateConnectionErrorMessage(requestRetries), + responseBody: error, + }), + null, + ); + }; + }, + + _shouldRetry: function (res: ResponsePayload, numRetries: number) { + // Do not retry if we are out of retries. + if (numRetries >= this._telnyx.getMaxNetworkRetries()) { + return false; + } + + // Retry on connection error. + if (!res) { + return true; + } + + // Retry on conflict and availability errors. + if (res.statusCode === 409 || res.statusCode === 503) { + return true; + } + + // Retry on 5xx's, except POST's as that may not be safe. + if ( + res.statusCode && + res.statusCode >= 500 && + res.req._requestEvent?.method !== 'POST' + ) { + return true; + } + + return false; + }, + + _getSleepTimeInMS: function (numRetries) { + const initialNetworkRetryDelay = this._telnyx.getInitialNetworkRetryDelay(); + const maxNetworkRetryDelay = this._telnyx.getMaxNetworkRetryDelay(); + + // Apply exponential backoff with initialNetworkRetryDelay on the + // number of numRetries so far as inputs. Do not allow the number to exceed + // maxNetworkRetryDelay. + let sleepSeconds = Math.min( + initialNetworkRetryDelay * Math.pow(numRetries - 1, 2), + maxNetworkRetryDelay, + ); + + // Apply some jitter by randomizing the value in the range of + // (sleepSeconds / 2) to (sleepSeconds). + sleepSeconds *= 0.5 * (1 + Math.random()); + + // But never sleep less than the base sleep seconds. + sleepSeconds = Math.max(initialNetworkRetryDelay, sleepSeconds); + + return sleepSeconds * 1000; + }, + + _defaultHeaders: function ( + auth: RequestOptions['auth'], + requestData: string, + ): RequestHeaders { + let userAgentString = + 'Telnyx/v2 NodeBindings/' + this._telnyx.getConstant('PACKAGE_VERSION'); + + if (this._telnyx._appInfo) { + userAgentString += ' ' + this._telnyx.getAppInfoAsString(); + } + + const headers = { + // Use specified auth token or use default from this telnyx instance: + Authorization: auth + ? 'Bearer ' + auth + : this._telnyx.getApiField('auth')!, + Accept: '*/*', + 'Content-Type': 'application/json', + 'Content-Length': Buffer.byteLength(requestData), + 'User-Agent': userAgentString, + }; + + return headers; + }, + + _request: function ( + method: MethodSpec['method'], + _host: MethodSpec['host'] | null, + path: MethodSpec['path'], + data: RequestData, + auth: RequestOptions['auth'], + options: {headers?: RequestOptions['headers']}, + callback: (err: unknown, response?: ResponsePayload | null) => void, + ): void { + // eslint-disable-next-line @typescript-eslint/no-this-alias + const self = this; + let requestData: string; + + function makeRequestWithData( + error: Error | null, + data: Uint8Array | string | null, + ) { + let headers: RequestHeaders = {}; + + if (error) { + return callback(error); + } + + if (method == 'GET') { + if (data != '' && data != null) { + path = path + '?' + data; + requestData = ''; + } else { + requestData = ''; + } + } else if (utils.isJsonString(data?.toString() || '')) { + requestData = data as string; + } else if (data != '' && data != null) { + path = path + '?' + encodeURI(data.toString()); + requestData = ''; + } else { + requestData = ''; + } + + headers = self._defaultHeaders(auth, requestData); + self._telnyx.getClientUserAgent(function (cua) { + headers['X-Telnyx-Client-User-Agent'] = cua; + + if (options.headers) { + Object.assign(headers, options.headers); + } + + makeRequest(headers); + }); + } + + if (self.requestDataProcessor) { + self.requestDataProcessor( + method, + data, + options.headers, + makeRequestWithData, + ); + } else if (method == 'GET') { + makeRequestWithData(null, data ? utils.stringifyRequestData(data) : ''); + } else { + let parameters; + if (data) { + if (data.filter && Object.keys(data.filter).length) { + parameters = utils.stringifyRequestData(data); + } else { + parameters = JSON.stringify(data); + if (parameters === '{}') { + parameters = ''; + } + } + } else { + parameters = ''; + } + makeRequestWithData(null, parameters); + } + + function retryRequest( + requestFn: (headers: RequestHeaders, numRetries?: number) => void, + headers: RequestHeaders, + requestRetries: number, + ) { + requestRetries += 1; + + return setTimeout( + requestFn, + self._getSleepTimeInMS(requestRetries), + headers, + requestRetries, + ); + } + + function makeRequest(headers: RequestHeaders, numRetries?: number): void { + const timeout = self._telnyx.getApiField('timeout'); + const isInsecureConnection = + self._telnyx.getApiField('protocol') == 'http'; + const agent = isInsecureConnection + ? self._telnyx.getApiField('http_agent') + : self._telnyx.getApiField('https_agent'); + + if (headers['Content-Length'] === 0) { + delete headers['Content-Length']; + delete headers['Content-Type']; + } + + const req: ReqTimeoutHandler = ( + isInsecureConnection ? http : https + ).request({ + host: self._telnyx.getApiField('host') || '127.0.0.1', + port: self._telnyx.getApiField('port'), + path: path, + method: method, + agent: agent, + headers: headers, + ciphers: 'DEFAULT:!aNULL:!eNULL:!LOW:!EXPORT:!SSLv2:!MD5', + }); + + const requestEvent = utils.removeEmpty({ + method: method, + path: path, + }); + + const requestRetries = numRetries || 0; + + req._requestEvent = requestEvent; + + req._requestStart = Date.now(); + + self._telnyx._emitter.emit('request', requestEvent); + + req.setTimeout(timeout, self._timeoutHandler(timeout, req, callback)); + + req.on('response', function (res: ResponsePayload) { + if (self._shouldRetry(res, requestRetries)) { + return retryRequest(makeRequest, headers, requestRetries); + } else { + return self._responseHandler(req, callback)(res); + } + }); + + req.on('error', function (error) { + if (self._shouldRetry(null, requestRetries)) { + return retryRequest(makeRequest, headers, requestRetries); + } else { + return self._errorHandler(req, requestRetries, callback)(error); + } + }); + + req.on('socket', function (socket) { + if (socket.connecting) { + socket.on( + isInsecureConnection ? 'connect' : 'secureConnect', + function () { + // Send payload; we're safe: + req.write(requestData); + req.end(); + }, + ); + } else { + // we're already connected + req.write(requestData); + req.end(); + } + }); + } + }, +} as TelnyxResourceObject; + +export default TelnyxResource; diff --git a/src/Types.d.ts b/src/Types.d.ts index 40c9318..125a5ca 100644 --- a/src/Types.d.ts +++ b/src/Types.d.ts @@ -1,11 +1,27 @@ import {EventEmitter} from 'events'; +import { + ClientRequest, + Agent as HttpAgent, + IncomingHttpHeaders, + IncomingMessage, +} from 'http'; +import {Agent as HttpsAgent} from 'https'; +import {TelnyxRawError} from './Error.ts'; +export type AppInfo = {name: string; version: string; url: string} & Record< + string, + unknown +>; export type BufferedFile = { name: string; type: string; file: {data: Uint8Array}; }; +export type TelnyxIncomingHttpHeaders = IncomingHttpHeaders & { + 'request-id'?: string | undefined; + 'x-request-id'?: string | undefined; +}; /** * Interface encapsulating various utility functions whose * implementations depend on the platform / JS runtime. @@ -27,7 +43,61 @@ export type StreamingFile = { }; export type TelnyxObject = { + _api: { + auth: string | null; + host: string; + port: string | number; + protocol: string; + basePath: string; + timeout: number; + maxNetworkRetries: number; + http_agent: HttpAgent; + https_agent: HttpsAgent; + dev: boolean; + }; + _emitter: EventEmitter; _platformFunctions: PlatformFunctions; + _prevRequestMetrics: Array<{ + request_id: string; + }>; + _prepResources: () => void; + _instantiateResource: ( + resource: string, + self: TelnyxObject, + ) => Record; + _createConstructor: ( + resource: string, + self: TelnyxObject, + ) => (args: Record) => Record; + _setApiKey: (apiKey: string) => void; + _setAppInfo: (appInfo: AppInfo) => void; + getClientUserAgentSeeded: ( + seed: Record, + callback: (userAgent: string) => void, + ) => void; + getClientUserAgent: (callback: (clientUserAgent: string) => void) => void; + getAppInfoAsString: () => string; + getInitialNetworkRetryDelay: () => number; + getMaxNetworkRetryDelay: () => number; + getMaxNetworkRetries: () => number; + getConstant: (name: string) => T; + _setApiField: ( + name: K, + value: TelnyxObject['_api'][K], + ) => void; + getApiField: ( + key: K, + ) => TelnyxObject['_api'][K]; + setPort: (port: string) => void; + setProtocol: (protocol: string) => void; + _appInfo: AppInfo; + _clientId?: string; + on: unknown; + off: unknown; + once: unknown; + VERSION: string; + errors: unknown; + webhooks: unknown; }; export type RequestHeaders = Record; @@ -38,9 +108,124 @@ export type TypedData = { type: string; }; -export type RequestData = Record; +export type RequestArgs = Array; +type RequestCallback = ( + this: TelnyxResourceObject | void, + error: Error | null, + response?: ResponsePayload | null, +) => RequestCallbackReturn; +type RequestCallbackReturn = unknown; +export type RequestData = Record; +export type RequestOptions = { + auth: string | null; + headers: RequestHeaders; +}; +export type ResponsePayload = IncomingMessage & { + [key: string]: unknown; + requestId: string; +} & {req: ReqTimeoutHandler}; +export type ResponseHeaderValue = string | string[]; +export type ResponseHeaders = Record; +type PromiseCache = { + currentPromise: Promise | undefined | null; +}; + +export type MethodSpec = { + method: string; + methodType?: string; + urlParams?: Array; + path?: string; + fullPath?: string; + encode?: (data: RequestData) => RequestData; + validator?: (data: RequestData, options: {headers: RequestHeaders}) => void; + headers?: Record; + streaming?: boolean; + host?: string; + transformResponseData?: ( + response: ResponsePayload, + telnyxObject: TelnyxObject, + ) => unknown; + usage?: Array; + paramsNames?: Array; + paramsValues?: Array; +}; export type MultipartRequestData = RequestData | StreamingFile | BufferedFile; export type TelnyxResourceObject = { _telnyx: TelnyxObject; + _urlData: RequestData; + _request: ( + requestMethod: MethodSpec['method'], + host: MethodSpec['host'] | null, + requestPath: MethodSpec['path'], + requestData: RequestData, + auth: RequestOptions['auth'], + options: {headers?: RequestOptions['headers']}, + callback: (err: unknown, response: ResponsePayload | null) => void, + ) => void; + _buildError: (error: TelnyxRawError, statusCode: number | undefined) => Error; + _generateConnectionErrorMessage: ( + requestRetries: number, + ) => string | undefined; + _shouldRetry: (res: ResponsePayload | null, numRetries: number) => boolean; + _getSleepTimeInMS: (numRetries: number) => number; + _defaultHeaders: ( + auth: RequestOptions['auth'], + requestData: string, + ) => RequestHeaders; + _timeoutHandler: ( + timeout: number, + req: ReqTimeoutHandler, + callback: RequestCallback, + ) => () => void; + _responseHandler: ( + req: ReqTimeoutHandler, + callback: RequestCallback, + ) => (res: ResponsePayload) => void; + _errorHandler: ( + req: ReqTimeoutHandler, + requestRetries: number, + callback: RequestCallback, + ) => (error: Error) => void; + includeBasic: Array; + nestedResources: { + [key: string]: new (...args: unknown[]) => TelnyxResourceObject; + }; + instanceMethods: { + [key: string]: (...args: unknown[]) => Promise; + }; + basePath: UrlInterpolator; + path: UrlInterpolator; + resourcePath: string; + createResourcePathWithSymbols: (path: string | null | undefined) => string; + createFullPath: ( + interpolator: string | UrlInterpolator, + urlData: RequestData, + ) => string; + createUrlData: () => RequestData; + initialize: (...args: Array) => void; + requestDataProcessor: RequestDataProcessor | null; }; + +export type ReqHandler = ClientRequest & { + _requestStart: number; + _requestEvent: Record; +}; + +export type ReqTimeoutHandler = ClientRequest & { + _isAborted?: boolean; + _requestStart?: number; + _requestEvent?: Record; +}; + +export type RequestDataProcessor = ( + method: string, + data: RequestData, + headers: RequestHeaders | undefined, + prepareAndMakeRequest: ( + error: Error | null, + data: Uint8Array | string | null, + ) => void, +) => void; + +export type UrlInterpolator = (params: Record) => string; diff --git a/src/Webhooks.ts b/src/Webhooks.ts new file mode 100644 index 0000000..22ed3d3 --- /dev/null +++ b/src/Webhooks.ts @@ -0,0 +1,107 @@ +import {Buffer} from 'safe-buffer'; +import nacl from 'tweetnacl'; +import * as TelnyxError from './Error.js'; + +type WebhookPayload = string; +type WebhookHeader = string; + +const Webhooks = { + DEFAULT_TOLERANCE: 300, // 5 minutes + + constructEvent: function ( + payload: WebhookPayload, + signatureHeader: WebhookHeader, + timestampHeader: WebhookHeader, + publicKey: string, + tolerance: number, + ) { + this.signature.verifySignature( + payload, + signatureHeader, + timestampHeader, + publicKey, + tolerance || Webhooks.DEFAULT_TOLERANCE, + ); + + const jsonPayload = JSON.parse(payload); + return jsonPayload; + }, + + signature: { + verifySignature: function ( + payload: string, + signatureHeader: WebhookHeader = '', + timestampHeader: WebhookHeader = '', + publicKey: string, + tolerance: number, + ) { + payload = Buffer.isBuffer(payload) ? payload.toString('utf8') : payload; + timestampHeader = Buffer.isBuffer(timestampHeader) + ? timestampHeader.toString('utf8') + : timestampHeader; + + const payloadBuffer = Buffer.from( + `${timestampHeader}|${payload}`, + 'utf8', + ); + + let verification; + + try { + // TODO: this cast is a workaround as the types are not compatible and this `method` is outdated + verification = nacl.sign.detached.verify( + payloadBuffer as unknown as Uint8Array, + Buffer.from(signatureHeader, 'base64') as unknown as Uint8Array, + Buffer.from(publicKey, 'base64') as unknown as Uint8Array, + ); + } catch (_e) { + throwSignatureVerificationError( + payload, + signatureHeader, + timestampHeader, + ); + } + + if (!verification) { + throwSignatureVerificationError( + payload, + signatureHeader, + timestampHeader, + ); + } + + const timestampAge = + Math.floor(Date.now() / 1000) - parseInt(timestampHeader, 10); + + if (tolerance > 0 && timestampAge > tolerance) { + throw new TelnyxError.TelnyxSignatureVerificationError({ + message: 'Timestamp outside the tolerance zone', + detail: { + signatureHeader: signatureHeader, + timestampHeader: timestampHeader, + payload: payload, + }, + }); + } + + return true; + }, + }, +}; + +function throwSignatureVerificationError( + payload: unknown, + signatureHeader: string, + timestampHeader: string, +) { + throw new TelnyxError.TelnyxSignatureVerificationError({ + message: 'Signature is invalid and does not match the payload', + detail: { + signatureHeader: signatureHeader, + timestampHeader: timestampHeader, + payload: payload, + }, + }); +} + +export default Webhooks; diff --git a/src/autoPagination.ts b/src/autoPagination.ts new file mode 100644 index 0000000..3cc3a47 --- /dev/null +++ b/src/autoPagination.ts @@ -0,0 +1,329 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ +import { + MethodSpec, + PromiseCache, + RequestArgs, + TelnyxResourceObject, +} from './Types.js'; +import makeRequest from './makeRequest.js'; +import * as utils from './utils.js'; + +type IterationResult = { + done: boolean; + value?: any; +}; + +type ListResult = { + data: Array; + meta: { + page_number: number; + page_size: number; + total_pages: number; + }; + // eslint-disable-next-line camelcase + has_more: boolean; +}; + +type IterationDoneCallback = () => void; +type IterationItemCallback = ( + item: any, + next: any, +) => void | boolean | Promise; + +type AutoPagingEach = ( + onItem: IterationItemCallback, + onDone?: IterationDoneCallback, +) => Promise; + +type AutoPagingToArrayOptions = { + limit?: number; +}; +type AutoPagingToArray = ( + opts: AutoPagingToArrayOptions, + onDone: IterationDoneCallback, +) => Promise | void>; + +type AutoPaginationMethods = { + autoPagingEach: AutoPagingEach; + autoPagingToArray: AutoPagingToArray; + next: () => Promise; + return: () => void; +}; + +export function makeAutoPaginationMethods( + self: TelnyxResourceObject, + requestArgs: RequestArgs, + spec: MethodSpec, + firstPagePromise: Promise, +) { + const promiseCache: PromiseCache = {currentPromise: null}; + let listPromise = firstPagePromise; + let i = 0; + + function iterate( + listResult: ListResult, + ): IterationResult | Promise { + if ( + !( + listResult && + listResult.data && + typeof listResult.data.length === 'number' + ) + ) { + throw Error( + 'Unexpected: Telnyx API response does not have a well-formed `data` array.', + ); + } + + if (i < listResult.data.length) { + const value = listResult.data[i]; + i += 1; + return {value: value, done: false}; + } else if (hasMore(listResult)) { + // Reset counter, request next page, and recurse. + i = 0; + const nextPageNumber = getNextPageNumber(listResult); + const pageSize = getPageSize(listResult); + listPromise = makeRequest(self, requestArgs, spec, { + page: {number: nextPageNumber, size: pageSize}, + }); + return listPromise.then(iterate); + } + return {value: undefined, done: true}; + } + + function hasMore(listResult: ListResult) { + return ( + listResult.data.length && + listResult.meta.page_number && + listResult.meta.total_pages && + listResult.meta.total_pages > listResult.meta.page_number + ); + } + + function getNextPageNumber(listResult: ListResult) { + return listResult.meta.page_number + 1; + } + + function getPageSize(listResult: ListResult) { + return listResult.meta.page_size; + } + + // function getNextPageToken(listResult) { + // return listResult.meta.next_page_token; + // } + + function asyncIteratorNext(): Promise { + return memoizedPromise( + promiseCache, + function (resolve, reject) { + return listPromise.then(iterate).then(resolve).catch(reject); + }, + ); + } + + const autoPagingEach = makeAutoPagingEach(asyncIteratorNext); + const autoPagingToArray = makeAutoPagingToArray(autoPagingEach); + + const autoPaginationMethods: AutoPaginationMethods = { + autoPagingEach, + autoPagingToArray, + + // Async iterator functions: + next: asyncIteratorNext, + return: function (): any { + // This is required for `break`. + return {}; + }, + [getAsyncIteratorSymbol()]: function () { + return autoPaginationMethods; + }, + }; + return autoPaginationMethods; +} + +/** + * ---------------- + * Private Helpers: + * ---------------- + */ + +function getAsyncIteratorSymbol(): symbol | string { + if (typeof Symbol !== 'undefined' && Symbol.asyncIterator) { + return Symbol.asyncIterator; + } + // Follow the convention from libraries like iterall: https://github.com/leebyron/iterall#asynciterator-1 + return '@@asyncIterator'; +} + +function getDoneCallback(args: Array): IterationDoneCallback | null { + if (args.length < 2) { + return null; + } + const onDone = args[1]; + if (typeof onDone !== 'function') { + throw Error( + 'The second argument to autoPagingEach, if present, must be a callback function; receieved ' + + typeof onDone, + ); + } + return onDone; +} + +/** + * We allow four forms of the `onItem` callback (the middle two being equivalent), + * + * 1. `.autoPagingEach((item) => { doSomething(item); return false; });` + * 2. `.autoPagingEach(async (item) => { await doSomething(item); return false; });` + * 3. `.autoPagingEach((item) => doSomething(item).then(() => false));` + * 4. `.autoPagingEach((item, next) => { doSomething(item); next(false); });` + * + * In addition to standard validation, this helper + * coalesces the former forms into the latter form. + */ +function getItemCallback(args: Array): IterationItemCallback | undefined { + if (args.length === 0) { + return undefined; + } + const onItem = args[0]; + if (typeof onItem !== 'function') { + throw Error( + 'The first argument to autoPagingEach, if present, must be a callback function; receieved ' + + typeof onItem, + ); + } + + // 4. `.autoPagingEach((item, next) => { doSomething(item); next(false); });` + if (onItem.length === 2) { + return onItem; + } + + if (onItem.length > 2) { + throw Error( + 'The `onItem` callback function passed to autoPagingEach must accept at most two arguments; got ' + + onItem, + ); + } + + // This magically handles all three of these usecases (the latter two being functionally identical): + // 1. `.autoPagingEach((item) => { doSomething(item); return false; });` + // 2. `.autoPagingEach(async (item) => { await doSomething(item); return false; });` + // 3. `.autoPagingEach((item) => doSomething(item).then(() => false));` + return function _onItem(item, next) { + const shouldContinue = onItem(item); + next(shouldContinue); + }; +} + +// function getLastId(listResult) { +// const lastIdx = listResult.data.length - 1; +// const lastItem = listResult.data[lastIdx]; +// const lastId = lastItem && lastItem.id; +// if (!lastId) { +// throw Error('Unexpected: No `id` found on the last item while auto-paging a list.'); +// } +// return lastId; +// } + +/** + * If a user calls `.next()` multiple times in parallel, + * return the same result until something has resolved + * to prevent page-turning race conditions. + */ +function memoizedPromise( + promiseCache: PromiseCache, + cb: (resolve: (value: T) => void, reject: (reason?: any) => void) => void, +): Promise { + if (promiseCache.currentPromise) { + return promiseCache.currentPromise; + } + promiseCache.currentPromise = new Promise(cb).then(function (ret) { + promiseCache.currentPromise = undefined; + return ret; + }); + return promiseCache.currentPromise; +} + +function makeAutoPagingEach( + asyncIteratorNext: () => Promise, +): AutoPagingEach { + return function autoPagingEach(...args): Promise { + const onItem = getItemCallback(args); + const onDone = getDoneCallback(args); + if (args.length > 2) { + throw Error(`autoPagingEach takes up to two arguments; received ${args}`); + } + + const autoPagePromise = wrapAsyncIteratorWithCallback( + asyncIteratorNext, + // @ts-expect-error we might need a null check + onItem, + ); + return utils.callbackifyPromiseWithTimeout(autoPagePromise, onDone); + } as AutoPagingEach; +} + +function makeAutoPagingToArray( + autoPagingEach: AutoPagingEach, +): AutoPagingToArray { + return function autoPagingToArray( + opts, + onDone: IterationDoneCallback, + ): Promise | void> { + const limit = opts && opts.limit; + if (!limit) { + throw Error( + 'You must pass a `limit` option to autoPagingToArray, e.g., `autoPagingToArray({limit: 1000});`.', + ); + } + if (limit > 10000) { + throw Error( + 'You cannot specify a limit of more than 10,000 items to fetch in `autoPagingToArray`; use `autoPagingEach` to iterate through longer lists.', + ); + } + const promise = new Promise>((resolve, reject) => { + const items: Array = []; + autoPagingEach((item) => { + items.push(item); + if (items.length >= limit) { + return false; + } + }) + .then(() => { + resolve(items); + }) + .catch(reject); + }); + return utils.callbackifyPromiseWithTimeout(promise, onDone); + }; +} + +function wrapAsyncIteratorWithCallback( + asyncIteratorNext: () => Promise, + onItem: IterationItemCallback, +): Promise { + return new Promise((resolve, reject) => { + function handleIteration(iterResult: IterationResult): Promise | void { + if (iterResult.done) { + resolve(); + return; + } + + const item = iterResult.value; + return new Promise((next) => { + // Bit confusing, perhaps; we pass a `resolve` fn + // to the user, so they can decide when and if to continue. + // They can return false, or a promise which resolves to false, to break. + onItem(item, next); + }).then((shouldContinue) => { + if (shouldContinue === false) { + return handleIteration({done: true}); + } else { + return asyncIteratorNext().then(handleIteration); + } + }); + } + + asyncIteratorNext().then(handleIteration).catch(reject); + }); +} diff --git a/src/makeRequest.ts b/src/makeRequest.ts new file mode 100644 index 0000000..d0f3d93 --- /dev/null +++ b/src/makeRequest.ts @@ -0,0 +1,163 @@ +import { + MethodSpec, + RequestArgs, + RequestData, + ResponsePayload, + TelnyxResourceObject, +} from './Types.js'; +import * as utils from './utils.js'; +const OPTIONAL_REGEX = /^optional!/; + +function _getRequestOpts( + self: TelnyxResourceObject, + requestArgs: RequestArgs, + spec: MethodSpec, + overrideData: RequestData, +) { + // Extract spec values with defaults. + const commandPath = + typeof spec.path == 'function' + ? spec.path + : utils.makeURLInterpolator(spec.path || ''); + const requestMethod = (spec.method || 'GET').toUpperCase(); + const urlParams = spec.urlParams || []; + const encode = + spec.encode || + function (data) { + return data; + }; + const host = spec.host; + + // Don't mutate args externally. + const args = [].slice.call(requestArgs); + + // Generate and validate url params. + const urlData = self.createUrlData(); + for (let i = 0, l = urlParams.length; i < l; ++i) { + let path; + + // Note that we shift the args array after every iteration so this just + // grabs the "next" argument for use as a URL parameter. + const arg = args[0]; + + let param = urlParams[i] || ''; + + const isOptional = OPTIONAL_REGEX.test(param); + param = param.replace(OPTIONAL_REGEX, ''); + + if (param == 'id' && typeof arg !== 'string') { + path = self.createResourcePathWithSymbols(spec.path); + throw new Error( + 'Telnyx: "id" must be a string, but got: ' + + typeof arg + + ' (on API request to `' + + requestMethod + + ' ' + + path + + '`)', + ); + } + + if (!arg) { + if (isOptional) { + urlData[param] = ''; + continue; + } + + path = self.createResourcePathWithSymbols(spec.path); + throw new Error( + 'Telnyx: Argument "' + + urlParams[i] + + '" required, but got: ' + + arg + + ' (on API request to `' + + requestMethod + + ' ' + + path + + '`)', + ); + } + + urlData[param] = args.shift(); + } + + // Pull request data and options (headers, auth) from args. + const dataFromArgs = utils.getDataFromArgs(args); + const data = encode(Object.assign({}, dataFromArgs, overrideData)); + const options = utils.getOptionsFromArgs(args); + + // Validate that there are no more args. + if (args.length) { + const path = self.createResourcePathWithSymbols(spec.path); + throw new Error( + 'Telnyx: Unknown arguments (' + + args + + '). Did you mean to pass an options ' + + 'object? (on API request to ' + + requestMethod + + ' `' + + path + + '`)', + ); + } + + const requestPath = self.createFullPath(commandPath, urlData); + const headers = Object.assign(options.headers, spec.headers); + + if (spec.validator) { + spec.validator(data, {headers: headers}); + } + + return { + requestMethod: requestMethod, + requestPath: requestPath, + data: data, + auth: options.auth, + headers: headers, + host: host, + }; +} + +function makeRequest( + self: TelnyxResourceObject, + requestArgs: RequestArgs, + spec: MethodSpec, + overrideData: RequestData, +) { + return new Promise(function (resolve, reject) { + let opts; + try { + opts = _getRequestOpts(self, requestArgs, spec, overrideData); + } catch (err) { + reject(err); + return; + } + + function requestCallback( + err: unknown, + response: ResponsePayload | null, + ): void { + if (err) { + reject(err); + } else { + resolve( + spec.transformResponseData && response?.data + ? spec.transformResponseData(response, self._telnyx) + : response, + ); + } + } + + self._request( + opts.requestMethod, + opts.host, + opts.requestPath, + opts.data, + opts.auth, + {headers: opts.headers}, + requestCallback, + ); + }); +} + +export default makeRequest; diff --git a/src/multipart.ts b/src/multipart.ts index b76272a..f57826a 100644 --- a/src/multipart.ts +++ b/src/multipart.ts @@ -1,5 +1,3 @@ -'use strict'; - import { MultipartRequestData, RequestData, @@ -19,9 +17,9 @@ type MultipartCallback = ( // Mostly taken from Fermata.js // https://github.com/natevw/fermata/blob/5d9732a33d776ce925013a265935facd1626cc88/fermata.js#L315-L343 function multipartDataGenerator( - method: string, + _method: string, data: MultipartRequestData, - headers: RequestHeaders, + headers: RequestHeaders | undefined = {}, ): Uint8Array { const segno = ( Math.round(Math.random() * 1e16) + Math.round(Math.random() * 1e16) @@ -70,7 +68,7 @@ function multipartDataGenerator( } else { push('Content-Disposition: form-data; name=' + q(k)); push(''); - push(v); + push(v || ''); } } push('--' + segno + '--'); @@ -82,7 +80,7 @@ export function multipartRequestDataProcessor( this: TelnyxResourceObject, method: string, data: RequestData, - headers: RequestHeaders, + headers: RequestHeaders | undefined, callback: MultipartCallback, ): MultipartCallbackReturn { data = data || {}; diff --git a/src/resources/Balance.ts b/src/resources/Balance.ts new file mode 100644 index 0000000..8a70158 --- /dev/null +++ b/src/resources/Balance.ts @@ -0,0 +1,6 @@ +import TelnyxResource from '../TelnyxResource.js'; +export const Balance = TelnyxResource.extend({ + path: 'balance', + + retrieve: TelnyxResource.method({method: 'GET'}), +}); diff --git a/src/telnyx.node.ts b/src/telnyx.node.ts new file mode 100644 index 0000000..c834676 --- /dev/null +++ b/src/telnyx.node.ts @@ -0,0 +1,5 @@ +import {createTelnyx} from './telnyx.js'; + +export const Telnyx = createTelnyx(); + +export default Telnyx; diff --git a/src/telnyx.ts b/src/telnyx.ts new file mode 100644 index 0000000..7e54e82 --- /dev/null +++ b/src/telnyx.ts @@ -0,0 +1,347 @@ +import * as http from 'http'; +import * as https from 'https'; +import {EventEmitter} from 'events'; +import {exec} from 'child_process'; +import {version} from '../package.json'; +import {AppInfo, TelnyxObject} from './Types.js'; +import * as utils from './utils.js'; +// TODO: convert other resources to ts +import {Balance} from './resources/Balance.js'; +import TelnyxResource from './TelnyxResource.js'; +import * as _Error from './Error.js'; +import Webhooks from './Webhooks.js'; + +export function createTelnyx() { + Telnyx.DEFAULT_HOST = process.env.TELNYX_API_BASE || 'api.telnyx.com'; + Telnyx.DEFAULT_PORT = '443'; + Telnyx.DEFAULT_BASE_PATH = '/v2/'; + + // Use node's default timeout: + Telnyx.DEFAULT_TIMEOUT = http.createServer().timeout; + + Telnyx.PACKAGE_VERSION = version; + + Telnyx.USER_AGENT = { + bindings_version: Telnyx.PACKAGE_VERSION, + lang: 'node', + lang_version: process.version, + platform: process.platform, + publisher: 'telnyx', + uname: null, + }; + + Telnyx.USER_AGENT_SERIALIZED = process.env.USER_AGENT_SERIALIZED || null; + + Telnyx.MAX_NETWORK_RETRY_DELAY_SEC = 2; + Telnyx.INITIAL_NETWORK_RETRY_DELAY_SEC = 0.5; + + const APP_INFO_PROPERTIES = ['name', 'version', 'url', 'partner_id']; + + const resources = { + Balance, + }; + + Telnyx.TelnyxResource = TelnyxResource; + Telnyx.resources = resources; + + function Telnyx(this: TelnyxObject, key: string, version?: string): void { + if (!(this instanceof Telnyx)) { + // needed for this constructor to be used without `new` + // eslint-disable-next-line @typescript-eslint/no-explicit-any + return new (Telnyx as any)(key, version); + } + + Object.defineProperty(this, '_emitter', { + value: new EventEmitter(), + enumerable: false, + configurable: false, + writable: false, + }); + + this.on = this._emitter.on.bind(this._emitter); + this.off = this._emitter.removeListener.bind(this._emitter); + + this._api = { + auth: null, + host: Telnyx.DEFAULT_HOST, + port: Telnyx.DEFAULT_PORT, + protocol: 'https', + basePath: Telnyx.DEFAULT_BASE_PATH, + timeout: Telnyx.DEFAULT_TIMEOUT, + http_agent: new http.Agent({keepAlive: true}), + https_agent: new https.Agent({keepAlive: true}), + dev: false, + maxNetworkRetries: 0, + }; + + this._setApiKey(key); + this._prepResources(); + + this.errors = _Error; + this.webhooks = Webhooks; + + this._prevRequestMetrics = []; + } + + Telnyx.errors = _Error; + Telnyx.webhooks = Webhooks; + + Telnyx.prototype = { + // Properties are set in the constructor above + _appInfo: undefined!, + on: null!, + off: null!, + once: null!, + VERSION: null!, + TelnyxResource: null!, + webhooks: null!, + errors: null!, + _api: null!, + _prevRequestMetrics: null!, + _emitter: null!, + _requestSender: null!, + _platformFunctions: null!, + + setHost: function (host: string, port: string, protocol: string) { + this._setApiField('host', host); + if (port) { + this.setPort(port); + } + if (protocol) { + this.setProtocol(protocol); + } + }, + + setProtocol: function (protocol: string) { + this._setApiField('protocol', protocol.toLowerCase()); + }, + + setPort: function (port: string) { + this._setApiField('port', port); + }, + + /** + * @private + */ + _setApiKey(key: string): void { + if (key) { + this._setApiField('auth', 'Bearer ' + key); + } + }, + + setTimeout: function (timeout: number | null | undefined) { + this._setApiField( + 'timeout', + timeout == null ? Telnyx.DEFAULT_TIMEOUT : timeout, + ); + }, + + /** + * @private + * This may be removed in the future. + */ + _setAppInfo: function (info: AppInfo): void { + if (info && typeof info !== 'object') { + throw new Error('AppInfo must be an object.'); + } + + if (info && !info.name) { + throw new Error('AppInfo.name is required'); + } + + info = info || {}; + + const appInfo = APP_INFO_PROPERTIES.reduce>( + function (accum, prop) { + if (typeof info[prop] == 'string') { + accum = accum || {}; + + accum[prop] = info[prop]; + } + + return accum; + }, // @ts-expect-error force default of appInfo to be undefined with default param + undefined, + ); + + // Kill the cached UA string because it may no longer be valid + Telnyx.USER_AGENT_SERIALIZED = null; + + this._appInfo = appInfo as unknown as AppInfo; + }, + + setHttpAgent: function (agent: https.Agent | http.Agent) { + if (agent instanceof https.Agent) { + this._setApiField('https_agent', agent); + } else { + this._setApiField('http_agent', agent); + } + }, + + _setApiField: function ( + key: K, + value: TelnyxObject['_api'][K], + ) { + this._api[key] = value; + }, + + getApiField: function ( + key: K, + ): TelnyxObject['_api'][K] { + return this._api[key]; + }, + + setClientId: function (clientId: string): void { + this._clientId = clientId; + }, + + getClientId: function (): string | undefined { + return this._clientId; + }, + + getConstant: function (c: string): unknown { + switch (c) { + case 'DEFAULT_HOST': + return Telnyx.DEFAULT_HOST; + case 'DEFAULT_PORT': + return Telnyx.DEFAULT_PORT; + case 'DEFAULT_BASE_PATH': + return Telnyx.DEFAULT_BASE_PATH; + case 'DEFAULT_TIMEOUT': + return Telnyx.DEFAULT_TIMEOUT; + case 'MAX_NETWORK_RETRY_DELAY_SEC': + return Telnyx.MAX_NETWORK_RETRY_DELAY_SEC; + case 'INITIAL_NETWORK_RETRY_DELAY_SEC': + return Telnyx.INITIAL_NETWORK_RETRY_DELAY_SEC; + } + return (Telnyx as unknown as Record)[c]; + }, + + getMaxNetworkRetries: function (): number { + return this.getApiField('maxNetworkRetries'); + }, + + setMaxNetworkRetries: function (maxNetworkRetries: number) { + if ( + (maxNetworkRetries && typeof maxNetworkRetries !== 'number') || + arguments.length < 1 + ) { + throw new Error('maxNetworkRetries must be a number.'); + } + + this._setApiField('maxNetworkRetries', maxNetworkRetries); + }, + + getMaxNetworkRetryDelay: function () { + return this.getConstant('MAX_NETWORK_RETRY_DELAY_SEC'); + }, + + getInitialNetworkRetryDelay: function () { + return this.getConstant('INITIAL_NETWORK_RETRY_DELAY_SEC'); + }, + + /** + * @private + * It may be deprecated and removed in the future. + * + * Gets a JSON version of a User-Agent and uses a cached version for a slight + * speed advantage. + */ + getClientUserAgent: function (cb: (userAgent: string) => void) { + if (Telnyx.USER_AGENT_SERIALIZED) { + return cb(Telnyx.USER_AGENT_SERIALIZED); + } + this.getClientUserAgentSeeded(Telnyx.USER_AGENT, function (cua: string) { + Telnyx.USER_AGENT_SERIALIZED = cua; + cb(Telnyx.USER_AGENT_SERIALIZED); + }); + }, + + /** + * @private + * + * It may be deprecated and removed in the future. + * + * Gets a JSON version of a User-Agent by encoding a seeded object and + * fetching a uname from the system. + */ + getClientUserAgentSeeded: function ( + seed: Record, + cb: (userAgent: string) => void, + ) { + exec('uname -a', (_err, uname) => { + const userAgent: Record & { + application?: TelnyxObject['_appInfo']; + } = {}; + for (const field in seed) { + userAgent[field] = encodeURIComponent(seed[field] ?? 'null'); + } + + // URI-encode in case there are unusual characters in the system's uname. + userAgent.uname = encodeURIComponent(uname) || 'UNKNOWN'; + + if (this._appInfo) { + userAgent.application = this._appInfo; + } + + cb(JSON.stringify(userAgent)); + }); + }, + + getAppInfoAsString: function () { + if (!this._appInfo) { + return ''; + } + + let formatted = this._appInfo.name; + + if (this._appInfo.version) { + formatted += '/' + this._appInfo.version; + } + + if (this._appInfo.url) { + formatted += ' (' + this._appInfo.url + ')'; + } + + return formatted; + }, + + _buildDefaultAgent: function (protocol: string) { + if (protocol === 'http') { + return new http.Agent({keepAlive: true}); + } + + return new https.Agent({keepAlive: true}); + }, + + _prepResources: function () { + for (const name in resources) { + this._instantiateResource(name, this); + + // @ts-expect-error - TODO: infer this from resources object + this[utils.toSingular(name)] = this._createConstructor(name, this); + } + }, + + _instantiateResource: function (name: string, self) { + const camelCaseName = utils.pascalToCamelCase(name); + + // @ts-expect-error - TODO: infer this from resources object + self[camelCaseName] = new resources[name](self); + + // @ts-expect-error - TODO: infer this from resources object + return self[camelCaseName]; + }, + + _createConstructor: function (resourceName, self) { + return function (args) { + return Object.assign( + self._instantiateResource(resourceName, self), + args || {}, + ); + }; + }, + } as TelnyxObject; // needed to populate `this` properly + + return Telnyx; +} diff --git a/src/utils.ts b/src/utils.ts index 8c07adf..5e0a91c 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -1,11 +1,211 @@ import * as qs from 'qs'; -import {MultipartRequestData, RequestData} from './Types.js'; +import { + MethodSpec, + MultipartRequestData, + RequestArgs, + RequestData, + RequestOptions, + TelnyxResourceObject, + UrlInterpolator, +} from './Types.js'; +import TelnyxResource from './TelnyxResource.js'; + +const OPTIONS_KEYS = ['api_key']; + +export function isAuthKey(key: string) { + return ( + typeof key == 'string' && /^KEY[A-Z0-9]{32}_[a-zA-Z0-9]{22}$/.test(key) + ); +} + +export function isJsonString(str: string) { + try { + if (!str || str.includes('filter[tag]=')) { + return false; + } + JSON.parse(str); + } catch (_e) { + return false; + } + return true; +} export function isObject(obj: unknown): boolean { const type = typeof obj; return (type === 'function' || type === 'object') && !!obj; } +// const utils = { +export function isOptionsHash(o: unknown): boolean | unknown { + return ( + o && + typeof o === 'object' && + OPTIONS_KEYS.some((prop) => Object.prototype.hasOwnProperty.call(o, prop)) + ); +} + +/** + * Remove empty values from an object + */ +export function removeEmpty( + obj: Record, +): Record { + if (typeof obj !== 'object') { + throw new Error('Argument must be an object'); + } + + Object.keys(obj).forEach(function (key) { + if (obj[key] === null || obj[key] === undefined) { + delete obj[key]; + } + }); + + return obj; +} + +export function callbackifyPromiseWithTimeout( + promise: Promise, + callback: ((error: unknown, result: T | null) => void) | null, +): Promise { + if (callback) { + // Ensure callback is called outside of promise stack. + return promise.then( + (res) => { + setTimeout(() => { + callback(null, res); + }, 0); + }, + (err) => { + setTimeout(() => { + callback(err, null); + }, 0); + }, + ); + } + + return promise; +} + +/** + * Create multiple nested methods, in camelCase and snakeCase, using spec and method names + * + * @param [telnyxMethod] TelnyxResource Method telnyxMethod creator + * @param [names=[]] Array of method names + * @param [spec] telnyxMethod spec creator by method name + */ +export function createNestedMethods( + telnyxMethod: typeof TelnyxResource.method, + names: Array, + spec: (methodName: string) => MethodSpec, +) { + const methods: {[name: string]: (...args: unknown[]) => Promise} = + {}; + + names.forEach(function (name) { + // @ts-expect-error TODO: type name key by method names + methods[name] = methods[utils.snakeToCamelCase(name)] = telnyxMethod( + spec(name), + ); + }); + + return methods; +} + +/** + * Return the data argument from a list of arguments + * + * @param {object[]} args + * @returns {object} + */ +export function getDataFromArgs(args: RequestArgs): RequestData { + if (!Array.isArray(args) || !args[0] || typeof args[0] !== 'object') { + return {}; + } + + if (!isOptionsHash(args[0])) { + return args.shift() as RequestData; + } + + const argKeys = Object.keys(args[0]); + + const optionKeysInArgs = argKeys.filter((key) => OPTIONS_KEYS.includes(key)); + + // In some cases options may be the provided as the first argument. + // Here we're detecting a case where there are two distinct arguments + // (the first being args and the second options) and with known + // option keys in the first so that we can warn the user about it. + if ( + optionKeysInArgs.length > 0 && + optionKeysInArgs.length !== argKeys.length + ) { + emitWarning( + `Options found in arguments (${optionKeysInArgs.join( + ', ', + )}). Did you mean to pass an options object?`, + ); + } + + return {}; +} + +/** + * Return the options hash from a list of arguments + */ +export function getOptionsFromArgs(args: RequestArgs): RequestOptions { + const opts: RequestOptions = { + auth: null, + headers: {}, + }; + if (args.length > 0) { + const arg = args[args.length - 1]; + if (isAuthKey(arg as string)) { + opts.auth = args.pop() as string; + } else if (isOptionsHash(arg)) { + const params = {...(args.pop() as Record)}; + + const extraKeys = Object.keys(params).filter(function (key) { + return OPTIONS_KEYS.indexOf(key) == -1; + }); + + if (extraKeys.length) { + emitWarning( + 'Invalid options found (' + extraKeys.join(', ') + '); ignoring.', + ); + } + + if (params.api_key) { + opts.auth = params.apiKey as string; + } + } + } + return opts; +} + +export function emitWarning(warning: string): void { + if (typeof process.emitWarning !== 'function') { + return console.warn( + `Telnyx: ${warning}`, + ); /* eslint-disable-line no-console */ + } + + return process.emitWarning(warning, 'Telnyx'); +} + +export function toSingular(name: string): string { + if (name.endsWith('s')) { + return name.slice(0, -1); + } + + return name; +} + +/** + * Allow for special capitalization cases (such as OAuth) + */ +export function pascalToCamelCase(name: string): string { + return name[0]?.toLowerCase() + name.substring(1); +} + export function stringifyRequestData(data: RequestData | string): string { return ( qs @@ -36,10 +236,10 @@ export function flattenAndStringify( !Object.prototype.hasOwnProperty.call(value, 'data') ) { // Non-buffer non-file Objects are recursively flattened - return step(value, newKey); + return step(value as MultipartRequestData, newKey); } else { // Buffers and file objects are stored without modification - result[newKey] = value; + result[newKey] = value as string; } } else { // Primitives are converted to strings @@ -52,3 +252,90 @@ export function flattenAndStringify( return result; } + +/** + * Outputs a new function with interpolated object property values. + * Use like so: + * const fn = makeURLInterpolator('some/url/{param1}/{param2}'); + * fn({ param1: 123, param2: 456 }); // => 'some/url/123/456' + */ +export const makeURLInterpolator = ((): ((s: string) => UrlInterpolator) => { + const rc = { + '\n': '\\n', + '"': '\\"', + '\u2028': '\\u2028', + '\u2029': '\\u2029', + } as Record; + return (str: string): UrlInterpolator => { + const cleanString = str.replace( + /["\n\r\u2028\u2029]/g, + ($0) => rc[$0] || '', + ); + return (outputs: Record): string => { + return cleanString.replace(/\{([\s\S]+?)\}/g, (_$0, $1) => + // @ts-expect-error TODO: cast outputs to string + encodeURIComponent(outputs[$1] || ''), + ); + }; + }; +})(); + +/** + * Provide simple "Class" extension mechanism. + * + */ +export function protoExtend( + // eslint-disable-next-line @typescript-eslint/no-explicit-any + this: any, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + sub: any, +): { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + new (...args: any[]): TelnyxResourceObject; +} { + // eslint-disable-next-line @typescript-eslint/no-this-alias + const Super = this; + const Constructor = Object.prototype.hasOwnProperty.call(sub, 'constructor') + ? sub.constructor + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + function (this: TelnyxResourceObject, ...args: any[]): void { + Super.apply(this, args); + }; + + // This initialization logic is somewhat sensitive to be compatible with + // divergent JS implementations like the one found in Qt. See here for more + // context: + // + // https://github.com/team-telnyx/telnyx-node/pull/179 + Object.assign(Constructor, Super); + Constructor.prototype = Object.create(Super.prototype); + Object.assign(Constructor.prototype, sub); + + return Constructor; +} + +/** + * tryParseJSON used to only parse JSON response, + * if it is not a JSON response sends the value inside a data object to keep the standard. + * + * @param [jsonString] Response object + */ +export function tryParseJSON(jsonString: string): {[key: string]: unknown} { + try { + if (jsonString === '') { + const defaultValue = { + data: jsonString, + }; + + return defaultValue; + } + + return JSON.parse(jsonString); + } catch (_e) { + const defaultValue = { + data: jsonString, + }; + + return defaultValue; + } +} diff --git a/tsconfig.json b/tsconfig.json index d5fbf53..194a57a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,6 +1,6 @@ { - "include": ["src/**/*", "test/**/*.ts"], "compilerOptions": { + "rootDir": "./src", "outDir": "./dist", "lib": ["ES2023"], "module": "node16", @@ -13,5 +13,7 @@ "strictFunctionTypes": true, "types": [ "node" ], "esModuleInterop": false, + "resolveJsonModule": true, + "noUncheckedIndexedAccess": true }, } diff --git a/types/BalanceResource.d.ts b/types/BalanceResource.d.ts new file mode 100644 index 0000000..065c431 --- /dev/null +++ b/types/BalanceResource.d.ts @@ -0,0 +1,19 @@ +import {paths} from './TelnyxAPI.js'; + +declare module 'telnyx' { + namespace Telnyx { + type BalanceRetrieveParams = + paths['/balance']['get']['parameters']['query']; + + type Balance = + paths['/balance']['get']['responses']['200']['content']['application/json']['data']; + + class BalanceResource { + /** Get user balance details */ + retrieve( + params?: BalanceRetrieveParams, + options?: RequestOptions, + ): Promise>; + } + } +} diff --git a/types/Errors.d.ts b/types/Errors.d.ts new file mode 100644 index 0000000..cd99cdb --- /dev/null +++ b/types/Errors.d.ts @@ -0,0 +1,125 @@ +declare module 'telnyx' { + namespace Telnyx { + type TelnyxRawError = { + message?: string; + type?: string; + headers?: {[header: string]: string | string[] | undefined}; + statusCode?: number; + requestId?: string; + responseBody?: unknown; + code?: string; + detail?: string | Error | unknown; + errors?: Array<{ + code: string; + detail: string; + title: string; + }>; + }; + namespace errors { + /** + * TelnyxError is the base error from which all other more specific Telnyx errors derive. + * Specifically for errors returned from Telnyx's REST API. + */ + class TelnyxError extends Error { + readonly message: string; + readonly type: + | 'TelnyxInvalidRequestError' + | 'TelnyxAPIError' + | 'TelnyxAuthenticationError' + | 'TelnyxPermissionError' + | 'TelnyxResourceNotFoundError' + | 'TelnyxMethodNotSupportedError' + | 'TelnyxTimeoutError' + | 'TelnyxUnsupportedMediaTypeError' + | 'TelnyxInvalidParametersError' + | 'TelnyxRateLimitError' + | 'TelnyxServiceUnavailableError' + | 'TelnyxConnectionError' + | 'TelnyxSignatureVerificationError'; + readonly raw: unknown; + readonly headers?: TelnyxRawError['headers']; + readonly requestId?: string; + readonly detail?: string | Error; + readonly code?: string; + readonly statusCode?: number; + readonly responseBody?: TelnyxRawError['responseBody']; + constructor(raw?: TelnyxRawError, type?: string | null); + /** + * Helper factory which takes raw Telnyx errors and outputs wrapping instances + */ + static generate: (rawTelnyxError: TelnyxRawError) => TelnyxError; + } + /** + * InvalidRequestError is raised when a request is initiated with invalid + * parameters. + */ + class TelnyxInvalidRequestError extends TelnyxError { + constructor(raw?: TelnyxRawError); + } + /** + * APIError is a generic error that may be raised in cases where none of the + * other named errors cover the problem. It could also be raised in the case + * that a new error has been introduced in the API, but this version of the + * Node.JS SDK doesn't know how to handle it. + */ + class TelnyxAPIError extends TelnyxError { + constructor(raw?: TelnyxRawError); + } + /** + * AuthenticationError is raised when invalid credentials are used to connect + * to Telnyx's servers. + */ + class TelnyxAuthenticationError extends TelnyxError { + constructor(raw?: TelnyxRawError); + } + /** + * PermissionError is raised in cases where access was attempted on a resource + * that wasn't allowed. + */ + class TelnyxPermissionError extends TelnyxError { + constructor(raw?: TelnyxRawError); + } + class TelnyxResourceNotFoundError extends TelnyxError { + constructor(raw?: TelnyxRawError); + } + class TelnyxMethodNotSupportedError extends TelnyxError { + constructor(raw?: TelnyxRawError); + } + class TelnyxTimeoutError extends TelnyxError { + constructor(raw?: TelnyxRawError); + } + class TelnyxUnsupportedMediaTypeError extends TelnyxError { + constructor(raw?: TelnyxRawError); + } + class TelnyxInvalidParametersError extends TelnyxError { + constructor(raw?: TelnyxRawError); + } + /** + * RateLimitError is raised in cases where an account is putting too much load + * on Telnyx's API servers (usually by performing too many requests). Please + * back off on request rate. + */ + class TelnyxRateLimitError extends TelnyxError { + constructor(raw?: TelnyxRawError); + } + class TelnyxServiceUnavailableError extends TelnyxError { + constructor(raw?: TelnyxRawError); + } + /** + * TelnyxConnectionError is raised in the event that the SDK can't connect to + * Telnyx's servers. That can be for a variety of different reasons from a + * downed network to a bad TLS certificate. + */ + class TelnyxConnectionError extends TelnyxError { + constructor(raw?: TelnyxRawError); + } + /** + * SignatureVerificationError is raised when the signature verification for a + * webhook fails + */ + class TelnyxSignatureVerificationError extends TelnyxError { + constructor(raw?: TelnyxRawError); + } + } + } +} diff --git a/types/TelnyxAPI.d.ts b/types/TelnyxAPI.d.ts new file mode 100644 index 0000000..311d6e8 --- /dev/null +++ b/types/TelnyxAPI.d.ts @@ -0,0 +1,65420 @@ +/** + * This file was auto-generated by openapi-typescript. + * Do not make direct changes to the file. + */ + +export interface paths { + '/': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * ListBuckets + * @description List all Buckets. + */ + get: operations['ListBuckets']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/access_ip_address': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** List all Access IP Addresses */ + get: operations['ListAccessIpAddresses']; + put?: never; + /** Create new Access IP Address */ + post: operations['CreateAccessIpAddress']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/access_ip_address/{access_ip_address_id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Retrieve an access IP address */ + get: operations['GetAccessIpAddress']; + put?: never; + post?: never; + /** Delete access IP address */ + delete: operations['DeleteAccessIpAddress']; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/access_ip_ranges': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** List all Access IP Ranges */ + get: operations['ListAccessIpRanges']; + put?: never; + /** Create new Access IP Range */ + post: operations['CreateAccessIPRange']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/access_ip_ranges/{access_ip_range_id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post?: never; + /** Delete access IP ranges */ + delete: { + parameters: { + query?: never; + header?: never; + path: { + access_ip_range_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['AccessIPRangeResponseSchema']; + }; + }; + }; + }; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/actions/bulk/telephony_credentials': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Creates several credentials + * @description Creates several credentials in bulk. + */ + post: operations['CreateBulkTelephonyCredentials']; + /** + * Delete several credentials + * @description Delete several credentials in bulk. + */ + delete: operations['DeleteTelephonyCredentials']; + options?: never; + head?: never; + /** + * Update several credentials + * @description Update several credentials in bulk. + */ + patch: operations['UpdateBulkTelephonyCredential']; + trace?: never; + }; + '/actions/network_preferences/sim_cards': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + /** + * Bulk Network Preferences for SIM cards + * @description This API allows dispatching the same operation described for the PUT sim_cards/:id/network_preferences API for multiple SIM cards at once.

+ * Although, a SIM card network preference may fail individually under any validation triggered as a consequence of its state. For example, a SIM can't have an in-progress OTA update for applying a Network Preference, so they'll fail when requested in this API. In that scenario, the specific error will be present in the response along with the successful definitions in the "errors" response node. + * + */ + put: operations['BulkSimCardNetworkPreferences']; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/actions/purchase/esims': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Purchase eSIMs + * @description Purchases and registers the specified amount of eSIMs to the current user's account.

+ * If sim_card_group_id is provided, the eSIMs will be associated with that group. Otherwise, the default group for the current user will be used.

+ * + */ + post: operations['PurchaseESim']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/actions/register/sim_cards': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Register SIM cards + * @description Register the SIM cards associated with the provided registration codes to the current user's account.

+ * If sim_card_group_id is provided, the SIM cards will be associated with that group. Otherwise, the default group for the current user will be used.

+ * + */ + post: operations['RegisterSimCards']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/actions/{action}/telephony_credentials': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Perform activate or deactivate action on all credentials filtered by the provided tag. + * @description Perform activate or deactivate action on all credentials filtered by the provided tag. Activate action will change the status to active, making it possible to connect calls with the credential. Deactivate action will change the status to inactive, making it impossible to connect calls with the credential. + */ + post: operations['BulkCredentialAction']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/addresses': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List all addresses + * @description Returns a list of your addresses. + */ + get: operations['FindAddresses']; + put?: never; + /** + * Creates an address + * @description Creates an address. + */ + post: operations['CreateAddress']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/addresses/actions/validate': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Validate an address + * @description Validates an address for emergency services. + */ + post: operations['ValidateAddress']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/addresses/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Retrieve an address + * @description Retrieves the details of an existing address. + */ + get: operations['GetAddress']; + put?: never; + post?: never; + /** + * Deletes an address + * @description Deletes an existing address. + */ + delete: operations['DeleteAddress']; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/addresses/{id}/actions/accept_suggestions': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Accepts this address suggestion as a new emergency address for Operator Connect and finishes the uploads of the numbers associated with it to Microsoft. */ + post: operations['acceptAddressSuggestions']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/ai/assistants': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List assistants + * @description Retrieve a list of all AI Assistants configured by the user. + */ + get: operations['get_assistants_public_assistants_get']; + put?: never; + /** + * Create an assistant + * @description Create a new AI Assistant. + */ + post: operations['create_new_assistant_public_assistants_post']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/ai/assistants/{assistant_id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get an assistant + * @description Retrieve an AI Assistant configuration by `assistant_id`. + */ + get: operations['get_assistant_public_assistants__assistant_id__get']; + put?: never; + /** + * Update an assistant + * @description Update an AI Assistant's attributes. + */ + post: operations['update_assistant_public_assistants__assistant_id__post']; + /** + * Delete an assistant + * @description Delete an AI Assistant by `assistant_id`. + */ + delete: operations['delete_assistant_public_assistants__assistant_id__delete']; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/ai/audio/transcriptions': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Transcribe speech to text (BETA) + * @description Transcribe speech to text. This endpoint is consistent with the [OpenAI Transcription API](https://platform.openai.com/docs/api-reference/audio/createTranscription) and may be used with the OpenAI JS or Python SDK. + */ + post: operations['audio_public_audio_transcriptions_post']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/ai/chat/completions': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Create a chat completion + * @description Chat with a language model. This endpoint is consistent with the [OpenAI Chat Completions API](https://platform.openai.com/docs/api-reference/chat) and may be used with the OpenAI JS or Python SDK. + */ + post: operations['chat_public_chat_completions_post']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/ai/embeddings': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get Tasks by Status + * @description Retrieve tasks for the user that are either `queued`, `processing`, `failed`, `success` or `partial_success` based on the query string. Defaults to `queued` and `processing`. + */ + get: operations['GetTasksByStatus']; + put?: never; + /** + * Embed documents + * @description Perform embedding on a Telnyx Storage Bucket using the a embedding model. + * The current supported file types are: + * - PDF + * - HTML + * - txt/unstructured text files + * - json + * - csv + * - audio / video (mp3, mp4, mpeg, mpga, m4a, wav, or webm ) - Max of 100mb file size. + * + * Any files not matching the above types will be attempted to be embedded as unstructured text. + * + * This process can be slow, so it runs in the background and the user can check + * the status of the task using the endpoint `/ai/embeddings/{task_id}`. + * + * **Important Note**: When you update documents in a Telnyx Storage bucket, their associated embeddings are automatically kept up to date. If you add or update a file, it is automatically embedded. If you delete a file, the embeddings are deleted for that particular file. + * + * You can also specify a custom `loader` param. Currently the only supported loader value is + * `intercom` which loads Intercom article jsons as specified by [the Intercom article API](https://developers.intercom.com/docs/references/rest-api/api.intercom.io/Articles/article/) + * This loader will split each article into paragraphs and save additional parameters relevant to Intercom docs, such as + * `article_url` and `heading`. These values will be returned by the `/v2/ai/embeddings/similarity-search` endpoint in the `loader_metadata` field. + */ + post: operations['PostEmbedding']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/ai/embeddings/buckets': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List embedded buckets + * @description Get all embedding buckets for a user. + */ + get: operations['GetEmbeddingBuckets']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/ai/embeddings/buckets/{bucket_name}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get file-level embedding statuses for a bucket + * @description Get all embedded files for a given user bucket, including their processing status. + */ + get: operations['GetBucketName']; + put?: never; + post?: never; + /** + * Disable AI for an Embedded Bucket + * @description Deletes an entire bucket's embeddings and disables the bucket for AI-use, returning it to normal storage pricing. + */ + delete: operations['embedding_bucket_files_public_embedding_buckets__bucket_name__delete']; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/ai/embeddings/similarity-search': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Search for documents + * @description Perform a similarity search on a Telnyx Storage Bucket, returning the most similar `num_docs` document chunks to the query. + * + * Currently the only available distance metric is cosine similarity which will return a `distance` between 0 and 1. + * The lower the distance, the more similar the returned document chunks are to the query. + * A `certainty` will also be returned, which is a value between 0 and 1 where the higher the certainty, the more similar the document. + * You can read more about Weaviate distance metrics here: [Weaviate Docs](https://weaviate.io/developers/weaviate/config-refs/distances) + * + * If a bucket was embedded using a custom loader, such as `intercom`, the additional metadata will be returned in the + * `loader_metadata` field. + */ + post: operations['PostEmbeddingSimilaritySearch']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/ai/embeddings/{task_id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get an embedding task's status + * @description Check the status of a current embedding task. Will be one of the following: + * - `queued` - Task is waiting to be picked up by a worker + * - `processing` - The embedding task is running + * - `success` - Task completed successfully and the bucket is embedded + * - `failure` - Task failed and no files were embedded successfully + * - `partial_success` - Some files were embedded successfully, but at least one failed + */ + get: operations['GetEmbeddingTask']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/ai/models': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get available models + * @description This endpoint returns a list of Open Source and OpenAI models that are available for use.

**Note**: Model `id`'s will be in the form `{source}/{model_name}`. For example `openai/gpt-4` or `mistralai/Mistral-7B-Instruct-v0.1` consistent with HuggingFace naming conventions. + */ + get: operations['get_models_public_models_get']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/ai/summarize': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Summarize file content + * @description Generate a summary of a file's contents. + * + * Supports the following text formats: + * - PDF, HTML, txt, json, csv + * + * Supports the following media formats (billed for both the transcription and summary): + * - flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm + * - Up to 100 MB + */ + post: operations['PostSummary']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/audit_events': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List Audit Logs + * @description List all audit log entries. Audit logs are a best-effort, eventually consistent record of significant account related changes. + */ + get: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListAuditLogsResponse']; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/authentication_providers': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List all SSO authentication providers + * @description Returns a list of your SSO authentication providers. + */ + get: operations['FindAuthenticationProviders']; + put?: never; + /** + * Creates an authentication provider + * @description Creates an authentication provider. + */ + post: operations['CreateAuthenticationProvider']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/authentication_providers/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Retrieve an authentication provider + * @description Retrieves the details of an existing authentication provider. + */ + get: operations['GetAuthenticationProvider']; + put?: never; + post?: never; + /** + * Deletes an authentication provider + * @description Deletes an existing authentication provider. + */ + delete: operations['DeleteAuthenticationProvider']; + options?: never; + head?: never; + /** + * Update a authentication provider + * @description Updates settings of an existing authentication provider. + */ + patch: operations['UpdateAuthenticationProvider']; + trace?: never; + }; + '/available_phone_number_blocks': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** List available phone number blocks */ + get: operations['ListAvailablePhoneNumberBlocks']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/available_phone_numbers': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** List available phone numbers */ + get: operations['ListAvailablePhoneNumbers']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/balance': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get user balance details */ + get: operations['GetUserBalance']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/billing_groups': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** List all billing groups */ + get: operations['ListBillingGroups']; + put?: never; + /** Create a billing group */ + post: operations['CreateBillingGroup']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/billing_groups/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get a billing group */ + get: operations['GetBillingGroup']; + put?: never; + post?: never; + /** Delete a billing group */ + delete: operations['DeleteBillingGroup']; + options?: never; + head?: never; + /** Update a billing group */ + patch: operations['UpdateBillingGroup']; + trace?: never; + }; + '/brand': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List Brands + * @description This endpoint is used to list all brands associated with your organization. + */ + get: operations['GetBrands']; + put?: never; + /** + * Create Brand + * @description This endpoint is used to create a new brand. A brand is an entity created by The Campaign Registry (TCR) that represents an organization or a company. It is this entity that TCR created campaigns will be associated with. Each brand creation will entail an upfront, non-refundable $4 expense. + */ + post: operations['CreateBrandPost']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/brand/feedback/{brandId}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get Brand Feedback By Id + * @description Get feedback about a brand by ID. This endpoint can be used after creating or revetting + * a brand. + * + * Possible values for `.category[].id`: + * + * * `TAX_ID` - Data mismatch related to tax id and its associated properties. + * * `STOCK_SYMBOL` - Non public entity registered as a public for profit entity or + * the stock information mismatch. + * * `GOVERNMENT_ENTITY` - Non government entity registered as a government entity. + * Must be a U.S. government entity. + * * `NONPROFIT` - Not a recognized non-profit entity. No IRS tax-exempt status + * found. + * * `OTHERS` - Details of the data misrepresentation if any. + */ + get: operations['GetBrandFeedbackById']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/brand/{brandId}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get Brand + * @description Retrieve a brand by `brandId`. + */ + get: operations['GetBrand']; + /** + * Update Brand + * @description Update a brand's attributes by `brandId`. + */ + put: operations['UpdateBrand']; + post?: never; + /** + * Delete Brand + * @description Delete Brand. This endpoint is used to delete a brand. Note the brand cannot be deleted if it contains one or more active campaigns, the campaigns need to be inactive and at least 3 months old due to billing purposes. + */ + delete: operations['DeleteBrand']; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/brand/{brandId}/2faEmail': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Resend brand 2FA email */ + post: operations['ResendBrand2faEmail']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/brand/{brandId}/externalVetting': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List External Vettings + * @description Get list of valid external vetting record for a given brand + */ + get: operations['ListExternalVettings']; + /** + * Import External Vetting Record + * @description This operation can be used to import an external vetting record from a TCR-approved + * vetting provider. If the vetting provider confirms validity of the record, it will be + * saved with the brand and will be considered for future campaign qualification. + */ + put: operations['PutExternalVettingRecord']; + /** + * Order Brand External Vetting + * @description Order new external vetting for a brand + */ + post: operations['PostOrderExternalVetting']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/brand/{brandId}/revet': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + /** + * Revet Brand + * @description This operation allows you to revet the brand. However, revetting is allowed once after the successful brand registration and thereafter limited to once every 3 months. + */ + put: operations['RevetBrand']; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/bulk_sim_card_actions': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List bulk SIM card actions + * @description This API lists a paginated collection of bulk SIM card actions. A bulk SIM card action contains details about a collection of individual SIM card actions. + */ + get: operations['ListBulkSimCardActions']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/bulk_sim_card_actions/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get bulk SIM card action details + * @description This API fetches information about a bulk SIM card action. A bulk SIM card action contains details about a collection of individual SIM card actions. + */ + get: operations['GetBulkSimCardAction']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/call_control_applications': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List call control applications + * @description Return a list of call control applications. + */ + get: operations['ListCallControlApplications']; + put?: never; + /** + * Create a call control application + * @description Create a call control application. + */ + post: operations['CreateCallControlApplication']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/call_control_applications/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Retrieve a call control application + * @description Retrieves the details of an existing call control application. + */ + get: operations['RetrieveCallControlApplication']; + put?: never; + post?: never; + /** + * Delete a call control application + * @description Deletes a call control application. + */ + delete: operations['DeleteCallControlApplication']; + options?: never; + head?: never; + /** + * Update a call control application + * @description Updates settings of an existing call control application. + */ + patch: operations['UpdateCallControlApplication']; + trace?: never; + }; + '/call_events': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List call events + * @description Filters call events by given filter parameters. Events are ordered by `event_timestamp`. If filter for `call_leg_id` or `call_session_id` is not present, it only filters events from the last 24 hours. + * + * **Note**: Only one `filter[event_timestamp]` can be passed. + * + */ + get: operations['ListCallEvents']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/calls': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Dial + * @description Dial a number or SIP URI from a given connection. A successful response will include a `call_leg_id` which can be used to correlate the command with subsequent webhooks. + * + * **Expected Webhooks:** + * + * - `call.initiated` + * - `call.answered` or `call.hangup` + * - `call.machine.detection.ended` if `answering_machine_detection` was requested + * - `call.machine.greeting.ended` if `answering_machine_detection` was requested to detect the end of machine greeting + * - `call.machine.premium.detection.ended` if `answering_machine_detection=premium` was requested + * - `call.machine.premium.greeting.ended` if `answering_machine_detection=premium` was requested and a beep was detected + * - `streaming.started`, `streaming.stopped` or `streaming.failed` if `stream_url` was set + * + */ + post: operations['DialCall']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/calls/{call_control_id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Retrieve a call status + * @description Returns the status of a call (data is available 10 minutes after call ended). + */ + get: operations['RetrieveCallStatus']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/calls/{call_control_id}/actions/answer': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Answer call + * @description Answer an incoming call. You must issue this command before executing subsequent commands on an incoming call. + * + * **Expected Webhooks:** + * + * - `call.answered` + * - `streaming.started`, `streaming.stopped` or `streaming.failed` if `stream_url` was set + * + */ + post: operations['AnswerCall']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/calls/{call_control_id}/actions/bridge': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Bridge calls + * @description Bridge two call control calls. + * + * **Expected Webhooks:** + * + * - `call.bridged` for Leg A + * - `call.bridged` for Leg B + * + */ + post: operations['BridgeCall']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/calls/{call_control_id}/actions/client_state_update': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + /** + * Update client state + * @description Updates client state + */ + put: operations['UpdateClientState']; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/calls/{call_control_id}/actions/enqueue': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Enqueue call + * @description Put the call in a queue. + */ + post: operations['EnqueueCall']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/calls/{call_control_id}/actions/fork_start': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Forking start + * @description Call forking allows you to stream the media from a call to a specific target in realtime. + * This stream can be used to enable realtime audio analysis to support a + * variety of use cases, including fraud detection, or the creation of AI-generated audio responses. + * Requests must specify either the `target` attribute or the `rx` and `tx` attributes. + * + * **Expected Webhooks:** + * + * - `call.fork.started` + * - `call.fork.stopped` + * + * **Simple Telnyx RTP Encapsulation Protocol (STREP)** + * + * *Note: This header/encapsulation is not used when the `rx` and `tx` + * parameters have been specified; it only applies when media is forked + * using the `target` attribute.* + * + * If the destination for forked media is specified using the "target" + * attribute, the RTP will be encapsulated in an extra Telnyx protocol, + * which adds a 24 byte header to the RTP payload in each packet. The STREP + * header includes the Call Control `call_leg_id` for stream + * identification, along with bits that represent the direction (inbound or + * outbound) of the media. This 24-byte header sits between the UDP header + * and the RTP header. + * + * The STREP header makes it possible to fork RTP for multiple calls (or + * two RTP streams for the same call) to the same IP:port, where the + * streams can be demultiplexed by your application using the information + * in the header. Of course, it's still possible to ignore this header + * completely, for example, if sending forked media for different calls to + * different ports or IP addresses. In this case, simply strip 24 bytes + * (or use the second byte to find the header length) from the received UDP + * payload to get the RTP (RTP header and payload). + * + * ``` + * STREP Specification + * + * 0 1 2 3 + * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * |1 1|Version|L|D| HeaderLen | reserved (2 bytes) | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | reserved (4 bytes, for UDP ports or anything else) | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | The call_leg_id | + * | from Call Control | + * | (128 bits / 16 bytes) | + * | (this is binary data) | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * + * 11 + * Static bits 11, always set to 11 to easily distinguish forked media + * from RTP (10) and T.38 media (usually 00) and SIP (which begins + * with a capital letter, so begins with bits 01). This is a magic number. + * + * Version + * Four bits to indicate the version number of the protocol, starting at 0001. + * + * L + * One bit to represent the leg of the call (A or B). + * 0 represents the A (first) leg of the call. + * 1 represents the B (second) leg of the call. + * + * D + * One bit to represent the direction of this RTP stream. + * 0 represents media received by Telnyx. + * 1 represents media transmitted by Telnyx. + * + * HeaderLen (1 byte) + * The length of the header in bytes. + * Note that this value does not include the length of the payload. The total + * size of the RTP can be calculated by subtracting the HeaderLen from the UDP + * length (minus 8 for the UDP header). + * In version 1, this value will always be 24. + * + * Reserved (6 bytes) + * Reserved for future use and to make sure that the header is a multiple of 32 bits + * + * Call Leg ID + * A 128-bit identifier for the call leg. + * This is the call_leg_id from Call Control. + * ``` + * + */ + post: operations['StartCallFork']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/calls/{call_control_id}/actions/fork_stop': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Forking stop + * @description Stop forking a call. + * + * **Expected Webhooks:** + * + * - `call.fork.stopped` + * + */ + post: operations['StopCallFork']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/calls/{call_control_id}/actions/gather': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Gather + * @description Gather DTMF signals to build interactive menus. + * + * You can pass a list of valid digits. The `Answer` command must be issued before the `gather` command. + * + * **Expected Webhooks:** + * + * - `call.dtmf.received` (you may receive many of these webhooks) + * - `call.gather.ended` + * + */ + post: operations['GatherCall']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/calls/{call_control_id}/actions/gather_stop': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Gather stop + * @description Stop current gather. + * + * **Expected Webhooks:** + * + * - `call.gather.ended` + * + */ + post: operations['StopCallGather']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/calls/{call_control_id}/actions/gather_using_ai': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Gather using AI (BETA) + * @description **BETA** Gather parameters defined in the request payload using a voice assistant. + * + * You can pass parameters described as a JSON Schema object and the voice assistant will attempt to gather these informations. At the moment only English is supported. + * + * **Expected Webhooks:** + * + * - `call.ai_gather.ended` + * + */ + post: operations['callGatherUsingAI']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/calls/{call_control_id}/actions/gather_using_audio': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Gather using audio + * @description Play an audio file on the call until the required DTMF signals are gathered to build interactive menus. + * + * You can pass a list of valid digits along with an 'invalid_audio_url', which will be played back at the beginning of each prompt. Playback will be interrupted when a DTMF signal is received. The `Answer command must be issued before the `gather_using_audio` command. + * + * **Expected Webhooks:** + * + * - `call.playback.started` + * - `call.playback.ended` + * - `call.dtmf.received` (you may receive many of these webhooks) + * - `call.gather.ended` + * + */ + post: operations['GatherUsingAudio']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/calls/{call_control_id}/actions/gather_using_speak': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Gather using speak + * @description Convert text to speech and play it on the call until the required DTMF signals are gathered to build interactive menus. + * + * You can pass a list of valid digits along with an 'invalid_payload', which will be played back at the beginning of each prompt. Speech will be interrupted when a DTMF signal is received. The `Answer` command must be issued before the `gather_using_speak` command. + * + * **Expected Webhooks:** + * + * - `call.dtmf.received` (you may receive many of these webhooks) + * - `call.gather.ended` + * + */ + post: operations['GatherUsingSpeak']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/calls/{call_control_id}/actions/hangup': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Hangup call + * @description Hang up the call. + * + * **Expected Webhooks:** + * + * - `call.hangup` + * - `call.recording.saved` + * + */ + post: operations['HangupCall']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/calls/{call_control_id}/actions/leave_queue': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Remove call from a queue + * @description Removes the call from a queue. + */ + post: operations['LeaveQueue']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/calls/{call_control_id}/actions/playback_start': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Play audio URL + * @description Play an audio file on the call. If multiple play audio commands are issued consecutively, + * the audio files will be placed in a queue awaiting playback. + * + * *Notes:* + * + * - When `overlay` is enabled, `target_legs` is limited to `self`. + * - A customer cannot Play Audio with `overlay=true` unless there is a Play Audio with `overlay=false` actively playing. + * + * **Expected Webhooks:** + * + * - `call.playback.started` + * - `call.playback.ended` + * + */ + post: operations['StartCallPlayback']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/calls/{call_control_id}/actions/playback_stop': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Stop audio playback + * @description Stop audio being played on the call. + * + * **Expected Webhooks:** + * + * - `call.playback.ended` or `call.speak.ended` + * + */ + post: operations['StopCallPlayback']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/calls/{call_control_id}/actions/record_pause': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Record pause + * @description Pause recording the call. Recording can be resumed via Resume recording command. + * + * **Expected Webhooks:** + * + * There are no webhooks associated with this command. + * + */ + post: operations['PauseCallRecording']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/calls/{call_control_id}/actions/record_resume': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Record resume + * @description Resume recording the call. + * + * **Expected Webhooks:** + * + * There are no webhooks associated with this command. + * + */ + post: operations['ResumeCallRecording']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/calls/{call_control_id}/actions/record_start': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Recording start + * @description Start recording the call. Recording will stop on call hang-up, or can be initiated via the Stop Recording command. + * + * **Expected Webhooks:** + * + * - `call.recording.saved` + * + */ + post: operations['StartCallRecord']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/calls/{call_control_id}/actions/record_stop': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Recording stop + * @description Stop recording the call. + * + * **Expected Webhooks:** + * + * - `call.recording.saved` + * + */ + post: operations['StopCallRecording']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/calls/{call_control_id}/actions/refer': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * SIP Refer a call + * @description Initiate a SIP Refer on a Call Control call. You can initiate a SIP Refer at any point in the duration of a call. + * + * **Expected Webhooks:** + * + * - `call.refer.started` + * - `call.refer.completed` + * - `call.refer.failed` + * + */ + post: operations['ReferCall']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/calls/{call_control_id}/actions/reject': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Reject a call + * @description Reject an incoming call. + * + * **Expected Webhooks:** + * + * - `call.hangup` + * + */ + post: operations['RejectCall']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/calls/{call_control_id}/actions/send_dtmf': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Send DTMF + * @description Sends DTMF tones from this leg. DTMF tones will be heard by the other end of the call. + * + * **Expected Webhooks:** + * + * There are no webhooks associated with this command. + * + */ + post: operations['SendDTMF']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/calls/{call_control_id}/actions/send_sip_info': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Send SIP info + * @description Sends SIP info from this leg. + * + * **Expected Webhooks:** + * + * There are no webhooks associated with this command. + * + */ + post: operations['SendSIPInfo']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/calls/{call_control_id}/actions/speak': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Speak text + * @description Convert text to speech and play it back on the call. If multiple speak text commands are issued consecutively, the audio files will be placed in a queue awaiting playback. + * + * **Expected Webhooks:** + * + * - `call.speak.started` + * - `call.speak.ended` + * + */ + post: operations['SpeakCall']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/calls/{call_control_id}/actions/streaming_start': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Streaming start + * @description Start streaming the media from a call to a specific WebSocket address or Dialogflow connection in near-realtime. Audio will be delivered as base64-encoded RTP payload (raw audio), wrapped in JSON payloads. + * + * **Example: Starting a stream to a Websocket address** + * + * The `stream_url` param is mandatory. + * + * ``` + * curl -X POST \ + * --header "Content-Type: application/json" \ + * --header "Accept: application/json" \ + * --header "Authorization: Bearer YOUR_API_KEY" \ + * --data '{ + * "stream_url": "wss://www.example.com/websocket",\ + * "client_state":"aGF2ZSBhIG5pY2UgZGF5ID1d",\ + * "command_id":"891510ac-f3e4-11e8-af5b-de00688a4901" \ + * }' \ + * https://api.telnyx.com/v2/calls/{call_control_id}/actions/streaming_start + * ``` + * + * **Example: Starting a stream to a Dialogflow connection** + * + * Enable the Dialogflow integration by sending `"enable_dialogflow": true` in the request. You need to have a Dialogflow connection associated with your Call Control application first, [click here for instructions](https://developers.telnyx.com/docs/voice/programmable-voice/dialogflow-es). + * ``` + * curl -X POST \ + * --header "Content-Type: application/json" \ + * --header "Accept: application/json" \ + * --header "Authorization: Bearer YOUR_API_KEY" \ + * --data '{ + * "client_state":"aGF2ZSBhIG5pY2UgZGF5ID1d", \ + * "command_id":"891510ac-f3e4-11e8-af5b-de00688a4901", \ + * "enable_dialogflow": true \ + * }' \ + * https://api.telnyx.com/v2/calls/{call_control_id}/actions/streaming_start + * ``` + * + * **Expected Webhooks:** + * + * - `streaming.started` + * - `streaming.stopped` + * - `streaming.failed` + * + * **WebSocket events** + * + * When the WebSocket connection is established, the following event is being sent over it: + * ``` + * { + * "event": "connected", + * "version": "1.0.0" + * } + * ``` + * And when the call is started, an event which contains information about the encoding and `stream_id` that identifies a particular stream: + * ``` + * { + * "event": "start", + * "sequence_number": "1", + * "start": { + * "user_id": "3e6f995f-85f7-4705-9741-53b116d28237", + * "call_control_id": "v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg", + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + * "media_format": { + * "encoding": "audio/x-mulaw", + * "sample_rate": 8000, + * "channels": 1 + * } + * }, + * "stream_id": "32de0dea-53cb-4b21-89a4-9e1819c043bc" + * } + * ``` + * The start event is followed by the following media events that contain base64-encoded RTP payload (raw audio, no RTP headers) (: + * ``` + * { + * "event": "media", + * "sequence_number": "4", + * "media": { + * "track": "inbound/outbound", + * "chunk": "2", + * "timestamp": "5", + * "payload": "no+JhoaJjpzSHxAKBgYJD...IsSbjomGhoqQn1Ic" + * }, + * "stream_id": "32de0dea-53cb-4b21-89a4-9e1819c043bc" + * } + * ``` + * Please note that the order of events is not guaranteed and the chunk number can be used to reorder the events. + * + * When the call ends, the stop event over WebSockets connection is sent: + * ``` + * { + * "event": "stop", + * "sequence_number": "5", + * "stop": { + * "user_id": "3e6f995f-85f7-4705-9741-53b116d28237", + * "call_control_id": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ" + * }, + * "stream_id": "32de0dea-53cb-4b21-89a4-9e1819c043bc" + * } + * ``` + * + * **Bidirectional Media Streaming** + * + * Media can be sent back to the call through the websocket as well. This is done in a way very similar to the [playback_start](https://developers.telnyx.com/api/call-control/start-call-playback) + * command, when using a base64 encoded mp3 file in the payload. Simply send a packet to the websocket connection as follows: + * + * ``` + * { + * "event": "media", + * "media": { + * "payload" : + * } + * } + * ``` + * + * The payload, which is a base64-encoded mp3 file, will be played on the call. + * + * Some limitations to be aware of: + * + * - Media payloads can only be submitted once per second. + * - Media _must_ be base64 encoded mp3 + * + * **Stream Errors** + * + * Any errors in the media packet, including when a rate limit is reached, will result in an error frame being + * sent to your websocket server. The error frame will appear as follows: + * + * ``` + * { + * "stream_id": "32de0dea-53cb-4b21-89a4-9e1819c043bc", + * "event": "error", + * "sequence_number": "6", + * "error": { + * "title": "rate_limit_reached", + * "code": "100005", + * "detail": "Too many requests" + * } + * } + * ``` + * + * Possible errors are as follows: + * + * - Error 100002: `"unknown_error"` + * - Error 100003: `"malformed_frame"` + * - Error 100004: `"invalid_media"` + * - Error 100005: `"rate_limit_reached"` + * + */ + post: operations['StartCallStreaming']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/calls/{call_control_id}/actions/streaming_stop': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Streaming stop + * @description Stop streaming a call to a WebSocket. + * + * **Expected Webhooks:** + * + * - `streaming.stopped` + * + */ + post: operations['StopCallStreaming']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/calls/{call_control_id}/actions/suppression_start': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Noise Suppression Start (BETA) */ + post: operations['noiseSuppressionStart']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/calls/{call_control_id}/actions/suppression_stop': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Noise Suppression Stop (BETA) */ + post: operations['noiseSuppressionStop']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/calls/{call_control_id}/actions/transcription_start': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Transcription start + * @description Start real-time transcription. Transcription will stop on call hang-up, or can be initiated via the Transcription stop command. + * + * **Expected Webhooks:** + * + * - `call.transcription` + * + */ + post: operations['StartCallTranscription']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/calls/{call_control_id}/actions/transcription_stop': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Transcription stop + * @description Stop real-time transcription. + */ + post: operations['StopCallTranscription']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/calls/{call_control_id}/actions/transfer': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Transfer call + * @description Transfer a call to a new destination. If the transfer is unsuccessful, a `call.hangup` webhook for the other call (Leg B) will be sent indicating that the transfer could not be completed. The original call will remain active and may be issued additional commands, potentially transfering the call to an alternate destination. + * + * **Expected Webhooks:** + * + * - `call.initiated` + * - `call.bridged` to Leg B + * - `call.answered` or `call.hangup` + * - `call.machine.detection.ended` if `answering_machine_detection` was requested + * - `call.machine.greeting.ended` if `answering_machine_detection` was requested to detect the end of machine greeting + * - `call.machine.premium.detection.ended` if `answering_machine_detection=premium` was requested + * - `call.machine.premium.greeting.ended` if `answering_machine_detection=premium` was requested and a beep was detected + * + */ + post: operations['TransferCall']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/campaign': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List Campaigns + * @description Retrieve a list of campaigns associated with a supplied `brandId`. + */ + get: operations['GetCampaigns']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/campaign/acceptSharing/{campaignId}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Accept Shared Campaign + * @description Manually accept a campaign shared with Telnyx + */ + post: operations['AcceptCampaign']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/campaign/usecase/cost': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get Campaign Cost */ + get: operations['GetCampaignCost']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/campaign/{campaignId}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get My Campaign + * @description Retrieve campaign details by `campaignId`. + */ + get: operations['GetCampaign']; + /** + * Update My Campaign + * @description Update a campaign's properties by `campaignId`. **Please note:** only sample messages are editable. + */ + put: operations['UpdateCampaign']; + post?: never; + /** + * Deactivate My Campaign + * @description Terminate a campaign. Note that once deactivated, a campaign cannot be restored. + */ + delete: operations['DeactivateCampaign']; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/campaign/{campaignId}/mnoMetadata': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get Campaign Mno Metadata + * @description Get the campaign metadata for each MNO it was submitted to. + */ + get: operations['GetCampaignMnoMetadata']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/campaign/{campaignId}/operationStatus': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get My Campaign Operation Status + * @description Retrieve campaign's operation status at MNO level. + */ + get: operations['GetCampaignOperationStatus']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/campaign/{campaignId}/osr/attributes': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get My Osr Campaign Attributes */ + get: operations['GetCampaignOsrAttributes']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/campaign/{campaignId}/sharing': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get Sharing Status */ + get: operations['GetCampaignSharingStatus']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/campaignBuilder': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Submit Campaign + * @description Before creating a campaign, use the [Qualify By Usecase endpoint](https://developers.telnyx.com/api/messaging/10dlc/get-usecase-qualification) to ensure that the brand you want to assign a new campaign to is qualified for the desired use case of that campaign. **Please note:** After campaign creation, you'll only be able to edit the campaign's sample messages. Creating a campaign will entail an upfront, non-refundable three month's cost that will depend on the campaign's use case ([see 10DLC Costs section for details](https://developers.telnyx.com/docs/messaging/10dlc/concepts#10dlc-costs)). + */ + post: operations['PostCampaign']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/campaignBuilder/brand/{brandId}/usecase/{usecase}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Qualify By Usecase + * @description This endpoint allows you to see whether or not the supplied brand is suitable for your desired campaign use case. + */ + get: operations['GetUsecaseQualification']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/channel_zones': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get list of channel zones + * @description List of channel zones with their countries + */ + get: operations['GetChannelZones']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/channel_zones/{channel_zone_id}': { + parameters: { + query?: never; + header?: never; + path: { + /** @description Channel zone identifier */ + channel_zone_id: components['parameters']['GcbChannelZoneId']; + }; + cookie?: never; + }; + /** + * Get a specific channel zone + * @description Get a specific channel zone + */ + get: operations['GetChannelZone']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + /** + * Patch a channel zone + * @description Change the amount of reserved channels at a given channel zone + */ + patch: operations['PatchChannelZone']; + trace?: never; + }; + '/channel_zones/{channel_zone_id}/channel_zone_phone_numbers': { + parameters: { + query?: never; + header?: never; + path: { + /** @description Channel zone identifier */ + channel_zone_id: components['parameters']['GcbChannelZoneId']; + }; + cookie?: never; + }; + /** + * Get the list of phone numbers assigned to a channel zone + * @description Retrieve the assigned phone numbers in a channel zone. Phone numbers assigned to a channel zone can receive concurrent calls up to the quantity reserved in that channel zone. Additional concurrent calls are rejected with a busy signal. + */ + get: operations['GetPhoneNumbers']; + put?: never; + /** + * Assign a phone number to a channel zone + * @description You should own the phone number being assigned to the channel zone. Remember that you should reserve channels in this channel zone, otherwise you won't be able to receive incoming calls. + */ + post: operations['AssignPhoneNumber']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/channel_zones/{channel_zone_id}/channel_zone_phone_numbers/{phone_number}': { + parameters: { + query?: never; + header?: never; + path: { + /** @description Channel zone identifier */ + channel_zone_id: components['parameters']['GcbChannelZoneId']; + /** @description The phone number to be looked up */ + phone_number: components['parameters']['GcbPhoneNumber']; + }; + cookie?: never; + }; + get?: never; + put?: never; + post?: never; + /** Unassign a phone number from a channel zone */ + delete: operations['UnassignPhoneNumber']; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/comments': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Retrieve all comments */ + get: operations['ListComments']; + put?: never; + /** Create a comment */ + post: operations['CreateComment']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/comments/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Retrieve a comment */ + get: operations['RetrieveComment']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/comments/{id}/read': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + /** Mark a comment as read */ + patch: operations['MarkCommentRead']; + trace?: never; + }; + '/conferences': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List conferences + * @description Lists conferences. Conferences are created on demand, and will expire after all participants have left the conference or after 4 hours regardless of the number of active participants. Conferences are listed in descending order by `expires_at`. + */ + get: operations['ListConferences']; + put?: never; + /** + * Create conference + * @description Create a conference from an existing call leg using a `call_control_id` and a conference name. Upon creating the conference, the call will be automatically bridged to the conference. Conferences will expire after all participants have left the conference or after 4 hours regardless of the number of active participants. + * + * **Expected Webhooks:** + * + * - `conference.created` + * - `conference.participant.joined` + * - `conference.participant.left` + * - `conference.ended` + * - `conference.recording.saved` + * - `conference.floor.changed` + * + */ + post: operations['CreateConference']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/conferences/{conference_id}/participants': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List conference participants + * @description Lists conference participants + */ + get: operations['ListConferenceParticipants']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/conferences/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Retrieve a conference + * @description Retrieve an existing conference + */ + get: operations['RetrieveConference']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/conferences/{id}/actions/hold': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Hold conference participants + * @description Hold a list of participants in a conference call + */ + post: operations['HoldConferenceParticipants']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/conferences/{id}/actions/join': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Join a conference + * @description Join an existing call leg to a conference. Issue the Join Conference command with the conference ID in the path and the `call_control_id` of the leg you wish to join to the conference as an attribute. The conference can have up to a certain amount of active participants, as set by the `max_participants` parameter in conference creation request. + * + * **Expected Webhooks:** + * + * - `conference.participant.joined` + * - `conference.participant.left` + * + */ + post: operations['JoinConference']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/conferences/{id}/actions/leave': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Leave a conference + * @description Removes a call leg from a conference and moves it back to parked state. **Expected Webhooks:** + * + * - `conference.participant.left` + * + */ + post: operations['LeaveConference']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/conferences/{id}/actions/mute': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Mute conference participants + * @description Mute a list of participants in a conference call + */ + post: operations['MuteConferenceParticipants']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/conferences/{id}/actions/play': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Play audio to conference participants + * @description Play audio to all or some participants on a conference call. + */ + post: operations['PlayConferenceAudio']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/conferences/{id}/actions/record_pause': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Conference recording pause + * @description Pause conference recording. + */ + post: operations['PauseConferenceRecording']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/conferences/{id}/actions/record_resume': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Conference recording resume + * @description Resume conference recording. + */ + post: operations['ResumeConferenceRecording']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/conferences/{id}/actions/record_start': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Conference recording start + * @description Start recording the conference. Recording will stop on conference end, or via the Stop Recording command. + * + * **Expected Webhooks:** + * + * - `conference.recording.saved` + */ + post: operations['StartConferenceRecording']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/conferences/{id}/actions/record_stop': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Conference recording stop + * @description Stop recording the conference. + * + * **Expected Webhooks:** + * + * - `conference.recording.saved` + * + */ + post: operations['StopConferenceRecording']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/conferences/{id}/actions/speak': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Speak text to conference participants + * @description Convert text to speech and play it to all or some participants. + */ + post: operations['SpeakTextToConference']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/conferences/{id}/actions/stop': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Stop audio being played on the conference + * @description Stop audio being played to all or some participants on a conference call. + */ + post: operations['StopConferenceAudio']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/conferences/{id}/actions/unhold': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Unhold conference participants + * @description Unhold a list of participants in a conference call + */ + post: operations['UnholdConferenceParticipants']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/conferences/{id}/actions/unmute': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Unmute conference participants + * @description Unmute a list of participants in a conference call + */ + post: operations['UnmuteConferenceParticipants']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/conferences/{id}/actions/update': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Update conference participant + * @description Update conference participant supervisor_role + */ + post: operations['UpdateConference']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/connections': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List connections + * @description Returns a list of your connections irrespective of type. + */ + get: operations['ListConnections']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/connections/{connection_id}/active_calls': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List all active calls for given connection + * @description Lists all active calls for given connection. Acceptable connections are either SIP connections with webhook_url or xml_request_url, call control or texml. Returned results are cursor paginated. + * + */ + get: operations['ListConnectionActiveCalls']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/connections/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Retrieve a connection + * @description Retrieves the high-level details of an existing connection. To retrieve specific authentication information, use the endpoint for the specific connection type. + */ + get: operations['RetrieveConnection']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/country_coverage': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get country coverage + * @description Get country coverage + */ + get: operations['retreiveCountryCoverage']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/country_coverage/countries/{country_code}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get coverage for a specific country + * @description Get coverage for a specific country + */ + get: operations['retreiveSpecificCountryCoverage']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/credential_connections': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List credential connections + * @description Returns a list of your credential connections. + */ + get: operations['ListCredentialConnections']; + put?: never; + /** + * Create a credential connection + * @description Creates a credential connection. + */ + post: operations['CreateCredentialConnection']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/credential_connections/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Retrieve a credential connection + * @description Retrieves the details of an existing credential connection. + */ + get: operations['RetrieveCredentialConnection']; + put?: never; + post?: never; + /** + * Delete a credential connection + * @description Deletes an existing credential connection. + */ + delete: operations['DeleteCredentialConnection']; + options?: never; + head?: never; + /** + * Update a credential connection + * @description Updates settings of an existing credential connection. + */ + patch: operations['UpdateCredentialConnection']; + trace?: never; + }; + '/credential_connections/{id}/actions/check_registration_status': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Update a credential connection registration status + * @description Updates the registration_status for a credential connection, this endpoint also updates the `registration_status` and `registration_status_updated_at` fields in the credential connection + */ + post: operations['CheckRegistrationStatus']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/custom_storage_credentials/{connection_id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Retrieve a stored credential + * @description Returns the information about custom storage credentials. + */ + get: operations['GetCustomStorageCredentials']; + /** + * Update a stored credential + * @description Updates a stored custom credentials configuration. + */ + put: operations['UpdateCustomStorageCredentials']; + /** + * Create a custom storage credential + * @description Creates a custom storage credentials configuration. + */ + post: operations['CreateCustomStorageCredentials']; + /** + * Delete a stored credential + * @description Deletes a stored custom credentials configuration. + */ + delete: operations['DeleteCustomStorageCredentials']; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/customer_service_records': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List customer service records + * @description List customer service records. + */ + get: operations['ListCustomerServiceRecords']; + put?: never; + /** + * Create a customer service record + * @description Create a new customer service record for the provided phone number. + */ + post: operations['CreateCustomerServiceRecord']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/customer_service_records/phone_number_coverages': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Verify CSR phone number coverage + * @description Verify the coverage for a list of phone numbers. + */ + post: operations['VerifyPhoneNumberCoverage']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/customer_service_records/{customer_service_record_id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get a customer service record + * @description Get a specific customer service record. + */ + get: operations['GetCustomerServiceRecord']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/detail_records': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Search detail records + * @description Search for any detail record across the Telnyx Platform + */ + get: operations['SearchDetailRecords']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/dialogflow_connections/{connection_id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Retrieve stored Dialogflow Connection + * @description Return details of the Dialogflow connection associated with the given CallControl connection. + */ + get: operations['GetDialogflowConnection']; + /** + * Update stored Dialogflow Connection + * @description Updates a stored Dialogflow Connection. + */ + put: operations['UpdateDialogflowConnection']; + /** + * Create a Dialogflow Connection + * @description Save Dialogflow Credentiails to Telnyx, so it can be used with other Telnyx services. + */ + post: operations['CreateDialogflowConnection']; + /** + * Delete stored Dialogflow Connection + * @description Deletes a stored Dialogflow Connection. + */ + delete: operations['DeleteDialogflowConnection']; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/document_links': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List all document links + * @description List all documents links ordered by created_at descending. + */ + get: operations['ListDocumentLinks']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/documents': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List all documents + * @description List all documents ordered by created_at descending. + */ + get: operations['ListDocuments']; + put?: never; + /** + * Upload a document + * @description Upload a document.

Uploaded files must be linked to a service within 30 minutes or they will be automatically deleted. + */ + post: operations['CreateDocument']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/documents/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Retrieve a document + * @description Retrieve a document. + */ + get: operations['RetrieveDocument']; + put?: never; + post?: never; + /** + * Delete a document + * @description Delete a document.

A document can only be deleted if it's not linked to a service. If it is linked to a service, it must be unlinked prior to deleting. + */ + delete: operations['DeleteDocument']; + options?: never; + head?: never; + /** + * Update a document + * @description Update a document. + */ + patch: operations['UpdateDocument']; + trace?: never; + }; + '/documents/{id}/download': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Download a document + * @description Download a document. + */ + get: operations['DownloadDocument']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/dynamic_emergency_addresses': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List dynamic emergency addresses + * @description Returns the dynamic emergency addresses according to filters + */ + get: operations['ListDynamicEmergencyAddresses']; + put?: never; + /** + * Create a dynamic emergency address. + * @description Creates a dynamic emergency address. + */ + post: operations['CreateDynamicEmergencyAddress']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/dynamic_emergency_addresses/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get a dynamic emergency address + * @description Returns the dynamic emergency address based on the ID provided + */ + get: operations['GetDynamicEmergencyAddress']; + put?: never; + post?: never; + /** + * Delete a dynamic emergency address + * @description Deletes the dynamic emergency address based on the ID provided + */ + delete: operations['DeleteDynamicEmergencyAddress']; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/dynamic_emergency_endpoints': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List dynamic emergency endpoints + * @description Returns the dynamic emergency endpoints according to filters + */ + get: operations['ListDynamicEmergencyEndpoints']; + put?: never; + /** + * Create a dynamic emergency endpoint. + * @description Creates a dynamic emergency endpoints. + */ + post: operations['CreateDynamicEmergencyEndpoint']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/dynamic_emergency_endpoints/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get a dynamic emergency endpoint + * @description Returns the dynamic emergency endpoint based on the ID provided + */ + get: operations['GetDynamicEmergencyEndpoint']; + put?: never; + post?: never; + /** + * Delete a dynamic emergency endpoint + * @description Deletes the dynamic emergency endpoint based on the ID provided + */ + delete: operations['DeleteDynamicEmergencyEndpoint']; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/enum/{endpoint}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get Enum */ + get: operations['GetEnumEndpoint']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/external_connections': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List all External Connections + * @description This endpoint returns a list of your External Connections inside the 'data' attribute of the response. External Connections are used by Telnyx customers to seamless configure SIP trunking integrations with Telnyx Partners, through External Voice Integrations in Mission Control Portal. + */ + get: operations['ListExternalConnections']; + put?: never; + /** + * Creates an External Connection + * @description Creates a new External Connection based on the parameters sent in the request. The external_sip_connection and outbound voice profile id are required. Once created, you can assign phone numbers to your application using the `/phone_numbers` endpoint. + */ + post: operations['CreateExternalConnection']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/external_connections/log_messages': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List all log messages + * @description Retrieve a list of log messages for all external connections associated with your account. + */ + get: operations['ListExternalConnectionLogMessages']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/external_connections/log_messages/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Retrieve a log message + * @description Retrieve a log message for an external connection associated with your account. + */ + get: operations['GetExternalConnectionLogMessage']; + put?: never; + post?: never; + /** + * Dismiss a log message + * @description Dismiss a log message for an external connection associated with your account. + */ + delete: operations['DeleteExternalConnectionLogMessage']; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/external_connections/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Retrieve an External Connection + * @description Return the details of an existing External Connection inside the 'data' attribute of the response. + */ + get: operations['GetExternalConnection']; + put?: never; + post?: never; + /** + * Deletes an External Connection + * @description Permanently deletes an External Connection. Deletion may be prevented if the application is in use by phone numbers, is active, or if it is an Operator Connect connection. To remove an Operator Connect integration please contact Telnyx support. + */ + delete: operations['DeleteExternalConnection']; + options?: never; + head?: never; + /** + * Update an External Connection + * @description Updates settings of an existing External Connection based on the parameters of the request. + */ + patch: operations['UpdateExternalConnection']; + trace?: never; + }; + '/external_connections/{id}/civic_addresses': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List all civic addresses and locations + * @description Returns the civic addresses and locations from Microsoft Teams. + */ + get: operations['ListCivicAddresses']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/external_connections/{id}/civic_addresses/{address_id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Retrieve a Civic Address + * @description Return the details of an existing Civic Address with its Locations inside the 'data' attribute of the response. + */ + get: operations['GetExternalConnectionCivicAddress']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/external_connections/{id}/phone_numbers': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List all phone numbers + * @description Returns a list of all active phone numbers associated with the given external connection. + */ + get: operations['ListExternalConnectionPhoneNumbers']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/external_connections/{id}/phone_numbers/{phone_number_id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Retrieve a phone number + * @description Return the details of a phone number associated with the given external connection. + */ + get: operations['GetExternalConnectionPhoneNumber']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + /** + * Update a phone number + * @description Asynchronously update settings of the phone number associated with the given external connection. + */ + patch: operations['UpdateExternalConnectionPhoneNumber']; + trace?: never; + }; + '/external_connections/{id}/releases': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List all Releases + * @description Returns a list of your Releases for the given external connection. These are automatically created when you change the `connection_id` of a phone number that is currently on Microsoft Teams. + */ + get: operations['ListExternalConnectionReleases']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/external_connections/{id}/releases/{release_id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Retrieve a Release request + * @description Return the details of a Release request and its phone numbers. + */ + get: operations['GetExternalConnectionRelease']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/external_connections/{id}/uploads': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List all Upload requests + * @description Returns a list of your Upload requests for the given external connection. + */ + get: operations['ListExternalConnectionUploads']; + put?: never; + /** + * Creates an Upload request + * @description Creates a new Upload request to Microsoft teams with the included phone numbers. Only one of civic_address_id or location_id must be provided, not both. The maximum allowed phone numbers for the numbers_ids array is 1000. + */ + post: operations['CreateExternalConnectionUpload']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/external_connections/{id}/uploads/refresh': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Refresh the status of all Upload requests + * @description Forces a recheck of the status of all pending Upload requests for the given external connection in the background. + */ + post: operations['RefreshExternalConnectionUploads']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/external_connections/{id}/uploads/status': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get the count of pending upload requests + * @description Returns the count of all pending upload requests for the given external connection. + */ + get: operations['GetExternalConnectionUploadsStatus']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/external_connections/{id}/uploads/{ticket_id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Retrieve an Upload request + * @description Return the details of an Upload request and its phone numbers. + */ + get: operations['GetExternalConnectionUpload']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/external_connections/{id}/uploads/{ticket_id}/retry': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Retry an Upload request + * @description If there were any errors during the upload process, this endpoint will retry the upload request. In some cases this will reattempt the existing upload request, in other cases it may create a new upload request. Please check the ticket_id in the response to determine if a new upload request was created. + */ + post: operations['RetryUpload']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/fax_applications': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List all Fax Applications + * @description This endpoint returns a list of your Fax Applications inside the 'data' attribute of the response. You can adjust which applications are listed by using filters. Fax Applications are used to configure how you send and receive faxes using the Programmable Fax API with Telnyx. + */ + get: operations['ListFaxApplications']; + put?: never; + /** + * Creates a Fax Application + * @description Creates a new Fax Application based on the parameters sent in the request. The application name and webhook URL are required. Once created, you can assign phone numbers to your application using the `/phone_numbers` endpoint. + */ + post: operations['CreateFaxApplication']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/fax_applications/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Retrieve a Fax Application + * @description Return the details of an existing Fax Application inside the 'data' attribute of the response. + */ + get: operations['GetFaxApplication']; + put?: never; + post?: never; + /** + * Deletes a Fax Application + * @description Permanently deletes a Fax Application. Deletion may be prevented if the application is in use by phone numbers. + */ + delete: operations['DeleteFaxApplication']; + options?: never; + head?: never; + /** + * Update a Fax Application + * @description Updates settings of an existing Fax Application based on the parameters of the request. + */ + patch: operations['UpdateFaxApplication']; + trace?: never; + }; + '/faxes': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** View a list of faxes */ + get: operations['ListFaxes']; + put?: never; + /** + * Send a fax + * @description Send a fax. Files have size limits and page count limit validations. If a file is bigger than 50MB or has more than 350 pages it will fail with `file_size_limit_exceeded` and `page_count_limit_exceeded` respectively. + * + * **Expected Webhooks:** + * + * - `fax.queued` + * - `fax.media.processed` + * - `fax.sending.started` + * - `fax.delivered` + * - `fax.failed` + * + */ + post: operations['SendFax']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/faxes/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** View a fax */ + get: operations['ViewFax']; + put?: never; + post?: never; + /** Delete a fax */ + delete: operations['DeleteFax']; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/faxes/{id}/actions/cancel': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Cancel a fax + * @description Cancel the outbound fax that is in one of the following states: `queued`, `media.processed`, `originated` or `sending` + */ + post: operations['CancelFax']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/faxes/{id}/actions/refresh': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Refresh a fax + * @description Refreshes the inbound fax's media_url when it has expired + */ + post: operations['RefreshFax']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/fqdn_connections': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List FQDN connections + * @description Returns a list of your FQDN connections. + */ + get: operations['ListFqdnConnections']; + put?: never; + /** + * Create an FQDN connection + * @description Creates a FQDN connection. + */ + post: operations['CreateFqdnConnection']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/fqdn_connections/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Retrieve an FQDN connection + * @description Retrieves the details of an existing FQDN connection. + */ + get: operations['RetrieveFqdnConnection']; + put?: never; + post?: never; + /** + * Delete an FQDN connection + * @description Deletes an FQDN connection. + */ + delete: operations['DeleteFqdnConnection']; + options?: never; + head?: never; + /** + * Update an FQDN connection + * @description Updates settings of an existing FQDN connection. + */ + patch: operations['UpdateFqdnConnection']; + trace?: never; + }; + '/fqdns': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List FQDNs + * @description Get all FQDNs belonging to the user that match the given filters. + */ + get: operations['ListFqdns']; + put?: never; + /** + * Create an FQDN + * @description Create a new FQDN object. + */ + post: operations['CreateFqdn']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/fqdns/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Retrieve an FQDN + * @description Return the details regarding a specific FQDN. + */ + get: operations['RetrieveFqdn']; + put?: never; + post?: never; + /** + * Delete an FQDN + * @description Delete an FQDN. + */ + delete: operations['DeleteFqdn']; + options?: never; + head?: never; + /** + * Update an FQDN + * @description Update the details of a specific FQDN. + */ + patch: operations['UpdateFqdn']; + trace?: never; + }; + '/global_ip_allowed_ports': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List all Global IP Allowed Ports + * @description List all Global IP Allowed Ports + */ + get: operations['ListGlobalIpAllowedPorts']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/global_ip_assignment_health': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: operations['GetGlobalIpAssignmentHealth']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/global_ip_assignments': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List all Global IP assignments + * @description List all Global IP assignments. + */ + get: operations['ListGlobalIpAssignments']; + put?: never; + /** + * Create a Global IP assignment + * @description Create a Global IP assignment. + */ + post: operations['CreateGlobalIpAssignment']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/global_ip_assignments/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Retrieve a Global IP + * @description Retrieve a Global IP assignment. + */ + get: operations['GetGlobalIpAssignment']; + put?: never; + post?: never; + /** + * Delete a Global IP assignment + * @description Delete a Global IP assignment. + */ + delete: operations['DeleteGlobalIpAssignment']; + options?: never; + head?: never; + /** + * Update a Global IP assignment + * @description Update a Global IP assignment. + */ + patch: operations['UpdateGlobalIpAssignment']; + trace?: never; + }; + '/global_ip_assignments_usage': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: operations['GetGlobalIpAssignmentUsage']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/global_ip_health_check_types': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List all Global IP Health check types + * @description List all Global IP Health check types. + */ + get: operations['ListGlobalIpHealthCheckTypes']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/global_ip_health_checks': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List all Global IP health checks + * @description List all Global IP health checks. + */ + get: operations['ListGlobalIpHealthChecks']; + put?: never; + /** + * Create a Global IP health check + * @description Create a Global IP health check. + */ + post: operations['CreateGlobalIpHealthCheck']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/global_ip_health_checks/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Retrieve a Global IP health check + * @description Retrieve a Global IP health check. + */ + get: operations['GetGlobalIpHealthCheck']; + put?: never; + post?: never; + /** + * Delete a Global IP health check + * @description Delete a Global IP health check. + */ + delete: operations['DeleteGlobalIpHealthCheck']; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/global_ip_latency': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: operations['GetGlobalIpLatency']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/global_ip_protocols': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List all Global IP Protocols + * @description List all Global IP Protocols + */ + get: operations['ListGlobalIpProtocols']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/global_ip_usage': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: operations['GetGlobalIpUsage']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/global_ips': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List all Global IPs + * @description List all Global IPs. + */ + get: operations['ListGlobalIps']; + put?: never; + /** + * Create a Global IP + * @description Create a Global IP. + */ + post: operations['CreateGlobalIp']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/global_ips/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Retrieve a Global IP + * @description Retrieve a Global IP. + */ + get: operations['GetGlobalIp']; + put?: never; + post?: never; + /** + * Delete a Global IP + * @description Delete a Global IP. + */ + delete: operations['DeleteGlobalIp']; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/inventory_coverage': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Create an inventory coverage request + * @description Creates an inventory coverage request. If locality, npa or national_destination_code is used in groupBy, and no region or locality filters are used, the whole paginated set is returned. + */ + get: operations['CreateInventoryCoverage']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/ip_connections': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List Ip connections + * @description Returns a list of your IP connections. + */ + get: operations['ListIpConnections']; + put?: never; + /** + * Create an Ip connection + * @description Creates an IP connection. + */ + post: operations['CreateIpConnection']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/ip_connections/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Retrieve an Ip connection + * @description Retrieves the details of an existing ip connection. + */ + get: operations['RetrieveIpConnection']; + put?: never; + post?: never; + /** + * Delete an Ip connection + * @description Deletes an existing IP connection. + */ + delete: operations['DeleteIpConnection']; + options?: never; + head?: never; + /** + * Update an Ip connection + * @description Updates settings of an existing IP connection. + */ + patch: operations['UpdateIpConnection']; + trace?: never; + }; + '/ips': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List Ips + * @description Get all IPs belonging to the user that match the given filters. + */ + get: operations['ListIps']; + put?: never; + /** + * Create an Ip + * @description Create a new IP object. + */ + post: operations['CreateIp']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/ips/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Retrieve an Ip + * @description Return the details regarding a specific IP. + */ + get: operations['RetrieveIp']; + put?: never; + post?: never; + /** + * Delete an Ip + * @description Delete an IP. + */ + delete: operations['DeleteIp']; + options?: never; + head?: never; + /** + * Update an Ip + * @description Update the details of a specific IP. + */ + patch: operations['UpdateIp']; + trace?: never; + }; + '/ledger_billing_group_reports': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Create a ledger billing group report */ + post: operations['CreateBillingGroupReport']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/ledger_billing_group_reports/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get a ledger billing group report */ + get: operations['GetBillingGroupReport']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/managed_accounts': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Lists accounts managed by the current user. + * @description Lists the accounts managed by the current user. Users need to be explictly approved by Telnyx in order to become manager accounts. + */ + get: operations['ListManagedAccounts']; + put?: never; + /** + * Create a new managed account. + * @description Create a new managed account owned by the authenticated user. You need to be explictly approved by Telnyx in order to become a manager account. + */ + post: operations['CreateManagedAccount']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/managed_accounts/allocatable_global_outbound_channels': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Display information about allocatable global outbound channels for the current user. + * @description Display information about allocatable global outbound channels for the current user. Only usable by account managers. + */ + get: operations['ListAllocatableGlobalOutboundChannels']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/managed_accounts/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Retrieve a managed account + * @description Retrieves the details of a single managed account. + */ + get: operations['RetrieveManagedAccount']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + /** + * Update a managed account + * @description Update a single managed account. + */ + patch: operations['UpdateManagedAccount']; + trace?: never; + }; + '/managed_accounts/{id}/actions/disable': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Disables a managed account + * @description Disables a managed account, forbidding it to use Telnyx services, including sending or receiving phone calls and SMS messages. Ongoing phone calls will not be affected. The managed account and its sub-users will no longer be able to log in via the mission control portal. + */ + post: operations['DisableManagedAccount']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/managed_accounts/{id}/actions/enable': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Enables a managed account + * @description Enables a managed account and its sub-users to use Telnyx services. + */ + post: operations['EnableManagedAccount']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/managed_accounts/{id}/update_global_channel_limit': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + /** + * Update the amount of allocatable global outbound channels allocated to a specific managed account. + * @description Update the amount of allocatable global outbound channels allocated to a specific managed account. + */ + patch: operations['UpdateManagedAccountGlobalChannelLimit']; + trace?: never; + }; + '/media': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List uploaded media + * @description Returns a list of stored media files. + */ + get: operations['ListMediaStorage']; + put?: never; + /** + * Upload media + * @description Upload media file to Telnyx so it can be used with other Telnyx services + */ + post: operations['CreateMediaStorage']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/media/{media_name}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Retrieve stored media + * @description Returns the information about a stored media file. + */ + get: operations['GetMediaStorage']; + /** + * Update stored media + * @description Updates a stored media file. + */ + put: operations['UpdateMediaStorage']; + post?: never; + /** + * Deletes stored media + * @description Deletes a stored media file. + */ + delete: operations['DeleteMediaStorage']; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/media/{media_name}/download': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Download stored media + * @description Downloads a stored media file. + */ + get: operations['DownloadMedia']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/messages': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Send a message + * @description Send a message with a Phone Number, Alphanumeric Sender ID, Short Code or Number Pool. + * + * This endpoint allows you to send a message with any messaging resource. + * Current messaging resources include: long-code, short-code, number-pool, and + * alphanumeric-sender-id. + * + */ + post: operations['SendMessage']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/messages/group_mms': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Send a group MMS message */ + post: operations['CreateGroupMmsMessage']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/messages/long_code': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Send a long code message */ + post: operations['CreateLongCodeMessage']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/messages/number_pool': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Send a message using number pool */ + post: operations['CreateNumberPoolMessage']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/messages/short_code': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Send a short code message */ + post: operations['CreateShortCodeMessage']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/messages/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Retrieve a message + * @description Note: This API endpoint can only retrieve messages that are no older than 10 days since their creation. If you require messages older than this, please generate an [MDR report.](https://developers.telnyx.com/api/v1/mission-control/add-mdr-request) + */ + get: operations['GetMessage']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/messaging_hosted_number_orders': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** List messaging hosted number orders */ + get: operations['ListMessagingHostedNumberOrders']; + put?: never; + /** Create a messaging hosted number order */ + post: operations['CreateMessagingHostedNumberOrder']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/messaging_hosted_number_orders/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Retrieve a messaging hosted number order */ + get: operations['GetMessagingHostedNumberOrder']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/messaging_hosted_number_orders/{id}/actions/file_upload': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Upload file required for a messaging hosted number order */ + post: operations['UploadMessagingHostedNumberOrderFile']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/messaging_hosted_numbers/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post?: never; + /** Delete a messaging hosted number */ + delete: operations['DeleteMessagingHostedNumber']; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/messaging_numbers_bulk_updates': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Update the messaging profile of multiple phone numbers */ + post: operations['BulkUpdateMessagingSettingsOnPhoneNumbers']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/messaging_numbers_bulk_updates/{order_id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Retrieve bulk update status */ + get: operations['GetBulkUpdateMessagingSettingsOnPhoneNumbersStatus']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/messaging_profile_metrics': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** List messaging profile metrics */ + get: operations['ListProfileMetrics']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/messaging_profiles': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** List messaging profiles */ + get: operations['ListMessagingProfiles']; + put?: never; + /** Create a messaging profile */ + post: operations['CreateMessagingProfile']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/messaging_profiles/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Retrieve a messaging profile */ + get: operations['RetrieveMessagingProfile']; + put?: never; + post?: never; + /** Delete a messaging profile */ + delete: operations['DeleteMessagingProfile']; + options?: never; + head?: never; + /** Update a messaging profile */ + patch: operations['UpdateMessagingProfile']; + trace?: never; + }; + '/messaging_profiles/{id}/metrics': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Retrieve messaging profile metrics */ + get: operations['GetMessagingProfileMetrics']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/messaging_profiles/{id}/phone_numbers': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** List phone numbers associated with a messaging profile */ + get: operations['ListProfilePhoneNumbers']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/messaging_profiles/{id}/short_codes': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** List short codes associated with a messaging profile */ + get: operations['ListProfileShortCodes']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/messaging_profiles/{profile_id}/autoresp_configs': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** List Auto-Response Settings */ + get: operations['GetAutorespConfigs']; + put?: never; + /** Create Auto-Reponse Setting */ + post: operations['CreateAutorespConfig']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/messaging_profiles/{profile_id}/autoresp_configs/{autoresp_cfg_id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get Auto-Response Setting */ + get: operations['GetAutorespConfig']; + /** Update Auto-Response Setting */ + put: operations['UpdateAutoRespConfig']; + post?: never; + /** Delete Auto-Response Setting */ + delete: operations['DeleteAutorespConfig']; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/messaging_tollfree/verification/requests': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List Verification Requests + * @description Get a list of previously-submitted tollfree verification requests + */ + get: operations['ListVerificationRequests']; + put?: never; + /** + * Submit Verification Request + * @description Submit a new tollfree verification request + */ + post: operations['SubmitVerificationRequest']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/messaging_tollfree/verification/requests/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get Verification Request + * @description Get a single verification request by its ID. + */ + get: operations['GetVerificationRequest']; + put?: never; + post?: never; + /** + * Delete Verification Request + * @description Delete a verification request + * + * A request may only be deleted when when the request is in the "rejected" state. + * + * * `HTTP 200`: request successfully deleted + * * `HTTP 400`: request exists but can't be deleted (i.e. not rejected) + * * `HTTP 404`: request unknown or already deleted + */ + delete: operations['DeleteVerificationRequest']; + options?: never; + head?: never; + /** + * Update Verification Request + * @description Update an existing tollfree verification request. This is particularly useful when there are pending customer actions to be taken. + */ + patch: operations['UpdateVerificationRequest']; + trace?: never; + }; + '/messaging_url_domains': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** List messaging URL domains */ + get: operations['ListMessagingUrlDomains']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/mobile_network_operators': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List mobile network operators + * @description Telnyx has a set of GSM mobile operators partners that are available through our mobile network roaming. This resource is entirely managed by Telnyx and may change over time. That means that this resource won't allow any write operations for it. Still, it's available so it can be used as a support resource that can be related to other resources or become a configuration option. + */ + get: operations['GetMobileNetworkOperators']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/mobile_push_credentials': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List mobile push credentials + * @description List mobile push credentials + */ + get: operations['ListPushCredentials']; + put?: never; + /** + * Creates a new mobile push credential + * @description Creates a new mobile push credential + */ + post: operations['CreatePushCredential']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/mobile_push_credentials/{push_credential_id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Retrieves a mobile push credential + * @description Retrieves mobile push credential based on the given `push_credential_id` + */ + get: operations['GetPushCredentialById']; + put?: never; + post?: never; + /** + * Deletes a mobile push credential + * @description Deletes a mobile push credential based on the given `push_credential_id` + */ + delete: operations['DeletePushCredentialById']; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/network_coverage': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List network coverage locations + * @description List all locations and the interfaces that region supports + */ + get: operations['ListNetworkCoverage']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/networks': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List all Networks + * @description List all Networks. + */ + get: operations['ListNetworks']; + put?: never; + /** + * Create a Network + * @description Create a new Network. + */ + post: operations['CreateNetwork']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/networks/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Retrieve a Network + * @description Retrieve a Network. + */ + get: operations['GetNetwork']; + put?: never; + post?: never; + /** + * Delete a Network + * @description Delete a Network. + */ + delete: operations['DeleteNetwork']; + options?: never; + head?: never; + /** + * Update a Network + * @description Update a Network. + */ + patch: operations['UpdateNetwork']; + trace?: never; + }; + '/networks/{id}/default_gateway': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get Default Gateway status. + * @description Get Default Gateway status. + */ + get: operations['GetDefaultGateway']; + put?: never; + /** + * Create Default Gateway. + * @description Create Default Gateway. + */ + post: operations['CreateDefaultGateway']; + /** + * Delete Default Gateway. + * @description Delete Default Gateway. + */ + delete: operations['DeleteDefaultGateway']; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/networks/{id}/network_interfaces': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List all Interfaces for a Network. + * @description List all Interfaces for a Network. + */ + get: operations['ListNetworkInterfaces']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/notification_channels': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List notification channels + * @description List notification channels. + */ + get: operations['ListNotificationChannels']; + put?: never; + /** + * Create a notification channel + * @description Create a notification channel. + */ + post: operations['CreateNotificationChannels']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/notification_channels/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get a notification channel + * @description Get a notification channel. + */ + get: operations['GetNotificationChannel']; + put?: never; + post?: never; + /** + * Delete a notification channel + * @description Delete a notification channel. + */ + delete: operations['DeleteNotificationChannel']; + options?: never; + head?: never; + /** + * Update a notification channel + * @description Update a notification channel. + */ + patch: operations['UpdateNotificationChannel']; + trace?: never; + }; + '/notification_event_conditions': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List all Notifications Events Conditions + * @description Returns a list of your notifications events conditions. + */ + get: operations['FindNotificationsEventsConditions']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/notification_events': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List all Notifications Events + * @description Returns a list of your notifications events. + */ + get: operations['FindNotificationsEvents']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/notification_profiles': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List all Notifications Profiles + * @description Returns a list of your notifications profiles. + */ + get: operations['FindNotificationsProfiles']; + put?: never; + /** + * Create a notification profile + * @description Create a notification profile. + */ + post: operations['CreateNotificationProfile']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/notification_profiles/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get a notification profile + * @description Get a notification profile. + */ + get: operations['GetNotificationProfile']; + put?: never; + post?: never; + /** + * Delete a notification profile + * @description Delete a notification profile. + */ + delete: operations['DeleteNotificationProfile']; + options?: never; + head?: never; + /** + * Update a notification profile + * @description Update a notification profile. + */ + patch: operations['UpdateNotificationProfile']; + trace?: never; + }; + '/notification_settings': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List notification settings + * @description List notification settings. + */ + get: operations['ListNotificationSettings']; + put?: never; + /** + * Add a Notification Setting + * @description Add a notification setting. + */ + post: operations['CreateNotificationSetting']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/notification_settings/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get a notification setting + * @description Get a notification setting. + */ + get: operations['GetNotificationSetting']; + put?: never; + post?: never; + /** + * Delete a notification setting + * @description Delete a notification setting. + */ + delete: operations['DeleteNotificationSetting']; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/number_block_orders': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List number block orders + * @description Get a paginated list of number block orders. + */ + get: operations['ListNumberBlockOrders']; + put?: never; + /** + * Create a number block order + * @description Creates a phone number block order. + */ + post: operations['CreateNumberBlockOrder']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/number_block_orders/{number_block_order_id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Retrieve a number block order + * @description Get an existing phone number block order. + */ + get: operations['RetrieveNumberBlockOrder']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/number_lookup/{phone_number}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Lookup phone number data + * @description Returns information about the provided phone number. + */ + get: operations['LookupNumber']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/number_order_documents': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List number order documents + * @description Gets a paginated list of number order documents. + */ + get: operations['ListNumberOrderDocuments']; + put?: never; + /** + * Create a number order document + * @description Upload a phone number order document. + */ + post: operations['CreateNumberOrderDocument']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/number_order_documents/{number_order_document_id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Retrieve a number order document + * @description Gets a single number order document. + */ + get: operations['RetrieveNumberOrderDocument']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + /** + * Update a number order document + * @description Updates a number order document. + */ + patch: operations['UpdateNumberOrderDocument']; + trace?: never; + }; + '/number_order_phone_numbers': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Retrieve a list of phone numbers associated to orders + * @description Get a list of phone numbers associated to orders. + */ + get: operations['RetrieveOrderPhoneNumbers']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/number_order_phone_numbers/{number_order_phone_number_id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Retrieve a single phone number within a number order. + * @description Get an existing phone number in number order. + */ + get: operations['GetNumberOrderPhoneNumber']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + /** + * Update requirements for a single phone number within a number order. + * @description Updates requirements for a single phone number within a number order. + */ + patch: operations['UpdateNumberOrderPhoneNumber']; + trace?: never; + }; + '/number_orders': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List number orders + * @description Get a paginated list of number orders. + */ + get: operations['ListNumberOrders']; + put?: never; + /** + * Create a number order + * @description Creates a phone number order. + */ + post: operations['CreateNumberOrder']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/number_orders/{number_order_id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Retrieve a number order + * @description Get an existing phone number order. + */ + get: operations['RetrieveNumberOrder']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + /** + * Update a number order + * @description Updates a phone number order. + */ + patch: operations['UpdateNumberOrder']; + trace?: never; + }; + '/number_reservations': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List number reservations + * @description Gets a paginated list of phone number reservations. + */ + get: operations['ListNumberReservations']; + put?: never; + /** + * Create a number reservation + * @description Creates a Phone Number Reservation for multiple numbers. + */ + post: operations['CreateNumberReservation']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/number_reservations/{number_reservation_id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Retrieve a number reservation + * @description Gets a single phone number reservation. + */ + get: operations['RetrieveNumberReservation']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/number_reservations/{number_reservation_id}/actions/extend': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Extend a number reservation + * @description Extends reservation expiry time on all phone numbers. + */ + post: operations['ExtendNumberReservationExpiryTime']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/numbers_features': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Retrieve the features for a list of numbers + * @description Retrieve the features for a list of numbers + */ + post: operations['PostNumbersFeatures']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/ota_updates': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** List OTA updates */ + get: operations['ListOtaUpdates']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/ota_updates/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get OTA update + * @description This API returns the details of an Over the Air (OTA) update. + */ + get: operations['GetOtaUpdate']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/outbound_voice_profiles': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get all outbound voice profiles + * @description Get all outbound voice profiles belonging to the user that match the given filters. + */ + get: operations['ListOutboundVoiceProfiles']; + put?: never; + /** + * Create an outbound voice profile + * @description Create an outbound voice profile. + */ + post: operations['CreateVoiceProfile']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/outbound_voice_profiles/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Retrieve an outbound voice profile + * @description Retrieves the details of an existing outbound voice profile. + */ + get: operations['GetOutboundVoiceProfile']; + put?: never; + post?: never; + /** + * Delete an outbound voice profile + * @description Deletes an existing outbound voice profile. + */ + delete: operations['DeleteOutboundVoiceProfile']; + options?: never; + head?: never; + /** + * Updates an existing outbound voice profile. + * @description Updates an existing outbound voice profile. + */ + patch: operations['UpdateOutboundVoiceProfile']; + trace?: never; + }; + '/partnerCampaign/sharedByMe': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get Partner Campaigns Shared By User + * @description Get all partner campaigns you have shared to Telnyx in a paginated fashion + * + * This endpoint is currently limited to only returning shared campaigns that Telnyx + * has accepted. In other words, shared but pending campaigns are currently omitted + * from the response from this endpoint. + */ + get: operations['GetPartnerCampaignsSharedByUser']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/partnerCampaign/{campaignId}/sharing': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get Sharing Status */ + get: operations['GetPartnerCampaignSharingStatus']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/payment/auto_recharge_prefs': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List auto recharge preferences + * @description Returns the payment auto recharge preferences. + */ + get: operations['GetAutoRechargePrefs']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + /** + * Update auto recharge preferences + * @description Update payment auto recharge preferences. + */ + patch: operations['UpdateAutoRechargePrefs']; + trace?: never; + }; + '/phoneNumberAssignmentByProfile': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Assign Messaging Profile To Campaign + * @description This endpoint allows you to link all phone numbers associated with a Messaging Profile to a campaign. **Please note:** if you want to assign phone numbers to a campaign that you did not create with Telnyx 10DLC services, this endpoint allows that provided that you've shared the campaign with Telnyx. In this case, only provide the parameter, `tcrCampaignId`, and not `campaignId`. In all other cases (where the campaign you're assigning was created with Telnyx 10DLC services), only provide `campaignId`, not `tcrCampaignId`. + */ + post: operations['PostAssignMessagingProfileToCampaign']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/phoneNumberAssignmentByProfile/{taskId}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get Assignment Task Status + * @description Check the status of the task associated with assigning all phone numbers on a messaging profile to a campaign by `taskId`. + */ + get: operations['GetAssignmentTaskStatus']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/phoneNumberAssignmentByProfile/{taskId}/phoneNumbers': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get Phone Number Status + * @description Check the status of the individual phone number/campaign assignments associated with the supplied `taskId`. + */ + get: operations['GetPhoneNumberStatus']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/phoneNumberCampaign': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Retrieve All Phone Number Campaigns + * @description Retrieve all of your organization's phone number/campaign assignments. + */ + get: operations['GetAllPhoneNumberCampaignsCamelCase']; + put?: never; + /** + * Create New Phone Number Campaign + * @description Assign an individual phone number to campaign. + */ + post: operations['CreatePhoneNumberCampaignCamelCase']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/phoneNumberCampaign/{phoneNumber}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get Single Phone Number Campaign + * @description Retrieve an individual phone number/campaign assignment by `phoneNumber`. + */ + get: operations['GetPhoneNumberCampaign']; + /** + * Create New Phone Number Campaign + * @description This endpoint allows you to assign a different campaign to a supplied `phoneNumber`. + */ + put: operations['CreatePhoneNumberCampaignCamelCasePut']; + post?: never; + /** + * Delete Phone Number Campaign + * @description This endpoint allows you to remove a campaign assignment from the supplied `phoneNumber`. + */ + delete: operations['DeletePhoneNumberCampaignCamelCase']; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/phone_number_blocks/jobs': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Lists the phone number blocks jobs */ + get: operations['ListPhoneNumberBlocksJobs']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/phone_number_blocks/jobs/delete_phone_number_block': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Deletes all numbers associated with a phone number block + * @description Creates a new background job to delete all the phone numbers associated with the given block. We will only consider the phone number block as deleted after all phone numbers associated with it are removed, so multiple executions of this job may be necessary in case some of the phone numbers present errors during the deletion process. + */ + post: operations['CreatePhoneNumberBlockDeletionJob']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/phone_number_blocks/jobs/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Retrieves a phone number blocks job */ + get: operations['GetPhoneNumberBlocksJob']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/phone_number_campaigns': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Retrieve All Phone Number Campaigns */ + get: operations['GetAllPhoneNumberCampaigns']; + put?: never; + /** Create New Phone Number Campaign */ + post: operations['CreatePhoneNumberCampaign']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/phone_number_campaigns/{phoneNumber}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get Single Phone Number Campaign + * @description Retrieve an individual phone number/campaign assignment by `phoneNumber`. + */ + get: operations['GetSinglePhoneNumberCampaign']; + /** Create New Phone Number Campaign */ + put: operations['PutPhoneNumberCampaign']; + post?: never; + /** + * Delete Phone Number Campaign + * @description This endpoint allows you to remove a campaign assignment from the supplied `phoneNumber`. + */ + delete: operations['DeletePhoneNumberCampaign']; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/phone_numbers': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** List phone numbers */ + get: operations['ListPhoneNumbers']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/phone_numbers/csv_downloads': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** List CSV downloads */ + get: operations['ListCsvDownloads']; + put?: never; + /** Create a CSV download */ + post: operations['CreateCsvDownload']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/phone_numbers/csv_downloads/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Retrieve a CSV download */ + get: operations['GetCsvDownload']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/phone_numbers/inbound_channels': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List your inbound channels + * @description Returns the inbound channels for your account. Inbound channels allows you to use Channel Billing for calls to your Telnyx phone numbers. Please check the Telnyx Support Articles section for full information and examples of how to utilize Channel Billing. + */ + get: operations['ListInboundChannels']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + /** + * Update inbound channels + * @description Update the inbound channels for the account + */ + patch: operations['UpdateOutboundChannels']; + trace?: never; + }; + '/phone_numbers/jobs': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Lists the phone numbers jobs */ + get: operations['ListPhoneNumbersJobs']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/phone_numbers/jobs/delete_phone_numbers': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Delete a batch of numbers + * @description Creates a new background job to delete a batch of numbers. At most one thousand numbers can be updated per API call. + */ + post: operations['CreateDeletePhoneNumbersJob']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/phone_numbers/jobs/update_emergency_settings': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Update the emergency settings from a batch of numbers + * @description Creates a background job to update the emergency settings of a collection of phone numbers. At most one thousand numbers can be updated per API call. + */ + post: operations['CreatePhoneNumbersJobUpdateEmergencySettings']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/phone_numbers/jobs/update_phone_numbers': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Update a batch of numbers + * @description Creates a new background job to update a batch of numbers. At most one thousand numbers can be updated per API call. At least one of the updateable fields must be submitted. + */ + post: operations['CreateUpdatePhoneNumbersJob']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/phone_numbers/jobs/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Retrieve a phone numbers job */ + get: operations['RetrievePhoneNumbersJob']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/phone_numbers/messaging': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** List phone numbers with messaging settings */ + get: operations['ListPhoneNumbersWithMessagingSettings']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/phone_numbers/slim': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Slim List phone numbers + * @description List phone numbers, This endpoint is a lighter version of the /phone_numbers endpoint having higher performance and rate limit. + */ + get: operations['SlimListPhoneNumbers']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/phone_numbers/voice': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** List phone numbers with voice settings */ + get: operations['ListPhoneNumbersWithVoiceSettings']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/phone_numbers/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Retrieve a phone number */ + get: operations['RetrievePhoneNumber']; + put?: never; + post?: never; + /** Delete a phone number */ + delete: operations['DeletePhoneNumber']; + options?: never; + head?: never; + /** Update a phone number */ + patch: operations['UpdatePhoneNumber']; + trace?: never; + }; + '/phone_numbers/{id}/actions/enable_emergency': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Enable emergency for a phone number */ + post: operations['EnablePhoneNumberEmergency']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/phone_numbers/{id}/messaging': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Retrieve a phone number with messaging settings */ + get: operations['GetPhoneNumberMessagingSettings']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + /** Update the messaging profile and/or messaging product of a phone number */ + patch: operations['UpdatePhoneNumberMessagingSettings']; + trace?: never; + }; + '/phone_numbers/{id}/voice': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Retrieve a phone number with voice settings */ + get: operations['GetPhoneNumberVoiceSettings']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + /** Update a phone number with voice settings */ + patch: operations['UpdatePhoneNumberVoiceSettings']; + trace?: never; + }; + '/phone_numbers/{phone_number_id}/voicemail': { + parameters: { + query?: never; + header?: never; + path: { + /** + * @description The ID of the phone number. + * @example 123455678900 + */ + phone_number_id: string; + }; + cookie?: never; + }; + /** + * Get voicemail + * @description Returns the voicemail settings for a phone number + */ + get: operations['GetVoicemail']; + put?: never; + /** + * Create voicemail + * @description Create voicemail settings for a phone number + */ + post: operations['CreateVoicemail']; + delete?: never; + options?: never; + head?: never; + /** + * Update voicemail + * @description Update voicemail settings for a phone number + */ + patch: operations['UpdateVoicemail']; + trace?: never; + }; + '/phone_numbers_regulatory_requirements': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Retrieve regulatory requirements for a list of phone numbers */ + get: operations['ListRegulatoryRequirementsPhoneNumbers']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/portability_checks': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Run a portability check + * @description Runs a portability check, returning the results immediately. + */ + post: operations['PostPortabilityCheck']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/porting/events': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List all porting events + * @description Returns a list of all porting events. + */ + get: operations['listPortingEvents']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/porting/events/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Show a porting event + * @description Show a specific porting event. + */ + get: operations['showPortingEvent']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/porting/events/{id}/republish': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Republish a porting event + * @description Republish a specific porting event. + */ + post: operations['republishPortingEvent']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/porting/loa_configuration/preview': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Preview the LOA configuration parameters + * @description Preview the LOA template that would be generated without need to create LOA configuration. + */ + post: operations['PreviewLoaConfigurationParams']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/porting/loa_configurations': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List LOA configurations + * @description List the LOA configurations. + */ + get: operations['ListLoaConfigurations']; + put?: never; + /** + * Create a LOA configuration + * @description Create a LOA configuration. + */ + post: operations['CreateLoaConfiguration']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/porting/loa_configurations/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Retrieve a LOA configuration + * @description Retrieve a specific LOA configuration. + */ + get: operations['GetLoaConfiguration']; + put?: never; + post?: never; + /** + * Delete a LOA configuration + * @description Delete a specific LOA configuration. + */ + delete: operations['DeleteLoaConfiguration']; + options?: never; + head?: never; + /** + * Update a LOA configuration + * @description Update a specific LOA configuration. + */ + patch: operations['UpdateLoaConfiguration']; + trace?: never; + }; + '/porting/loa_configurations/{id}/preview': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Preview a LOA configuration + * @description Preview a specific LOA configuration. + */ + get: operations['PreviewLoaConfiguration']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/porting/reports': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List porting related reports + * @description List the reports generated about porting operations. + */ + get: operations['ListPortingReports']; + put?: never; + /** + * Create a porting related report + * @description Generate reports about porting operations. + */ + post: operations['CreatePortingReport']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/porting/reports/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Retrieve a report + * @description Retrieve a specific report generated. + */ + get: operations['GetPortingReport']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/porting_orders': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List all porting orders + * @description Returns a list of your porting order. + */ + get: operations['ListPortingOrders']; + put?: never; + /** + * Create a porting order + * @description Creates a new porting order object. + */ + post: operations['CreatePortingOrder']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/porting_orders/exception_types': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List all exception types + * @description Returns a list of all possible exception types for a porting order. + */ + get: operations['ListExceptionTypes']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/porting_orders/phone_number_configurations': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List all phone number configurations + * @description Returns a list of phone number configurations paginated. + */ + get: operations['ListPhoneNumberConfigurations']; + put?: never; + /** + * Create a list of phone number configurations + * @description Creates a list of phone number configurations. + */ + post: operations['CreatePhoneNumberConfigurations']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/porting_orders/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Retrieve a porting order + * @description Retrieves the details of an existing porting order. + */ + get: operations['GetPortingOrder']; + put?: never; + post?: never; + /** + * Delete a porting order + * @description Deletes an existing porting order. This operation is restrict to porting orders in draft state. + */ + delete: operations['DeletePortingOrder']; + options?: never; + head?: never; + /** + * Edit a porting order + * @description Edits the details of an existing porting order. + * + * Any or all of a porting orders attributes may be included in the resource object included in a PATCH request. + * + * If a request does not include all of the attributes for a resource, the system will interpret the missing attributes as if they were included with their current values. To explicitly set something to null, it must be included in the request with a null value. + */ + patch: operations['UpdatePortingOrder']; + trace?: never; + }; + '/porting_orders/{id}/actions/activate': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Activate every number in a porting order asynchronously. + * @description Activate each number in a porting order asynchronously. This operation is limited to US FastPort orders only. + */ + post: operations['ActivatePortingOrder']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/porting_orders/{id}/actions/cancel': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Cancel a porting order + * @description Cancel a porting order + */ + post: operations['CancelPortingOrder']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/porting_orders/{id}/actions/confirm': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Submit a porting order. + * @description Confirm and submit your porting order. + */ + post: operations['ConfirmPortingOrder']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/porting_orders/{id}/actions/share': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Share a porting order + * @description Creates a sharing token for a porting order. The token can be used to share the porting order with non-Telnyx users. + */ + post: operations['SharePortingOrder']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/porting_orders/{id}/activation_jobs': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List all porting activation jobs + * @description Returns a list of your porting activation jobs. + */ + get: operations['ListPortingOrderActivationJobs']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/porting_orders/{id}/activation_jobs/{activationJobId}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Retrieve a porting activation job + * @description Returns a porting activation job. + */ + get: operations['GetPortingOrdersActivationJob']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + /** + * Update a porting activation job + * @description Updates the activation time of a porting activation job. + */ + patch: operations['UpdatePortingOrdersActivationJob']; + trace?: never; + }; + '/porting_orders/{id}/additional_documents': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List additional documents + * @description Returns a list of additional documents for a porting order. + */ + get: operations['ListAdditionalDocuments']; + put?: never; + /** + * Create a list of additional documents + * @description Creates a list of additional documents for a porting order. + */ + post: operations['CreateAdditionalDocuments']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/porting_orders/{id}/additional_documents/{additional_document_id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post?: never; + /** + * Delete an additional document + * @description Deletes an additional document for a porting order. + */ + delete: operations['DeleteAdditionalDocument']; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/porting_orders/{id}/allowed_foc_windows': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List allowed FOC dates + * @description Returns a list of allowed FOC dates for a porting order. + */ + get: operations['ListAllowedFocWindows']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/porting_orders/{id}/comments': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List all comments of a porting order + * @description Returns a list of all comments of a porting order. + */ + get: operations['ListPortingOrderComments']; + put?: never; + /** + * Create a comment for a porting order + * @description Creates a new comment for a porting order. + */ + post: operations['CreateComment']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/porting_orders/{id}/loa_template': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Download a porting order loa template + * @description Download a porting order loa template + */ + get: operations['GetPortingOrderLoaTemplate']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/porting_orders/{id}/requirements': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List porting order requirements + * @description Returns a list of all requirements based on country/number type for this porting order. + */ + get: operations['ListPortingOrderRequirements']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/porting_orders/{id}/sub_request': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Retrieve the associated V1 sub_request_id and port_request_id + * @description Retrieve the associated V1 sub_request_id and port_request_id + */ + get: operations['GetPortingOrderSubRequest']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/porting_orders/{id}/verification_codes': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List verification codes + * @description Returns a list of verification codes for a porting order. + */ + get: operations['ListVerificationCodes']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/porting_orders/{id}/verification_codes/send': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Send the verification codes + * @description Send the verification code for all porting phone numbers. + */ + post: operations['SendPortingVerificationCodes']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/porting_orders/{id}/verification_codes/verify': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Verify the verification code for a list of phone numbers + * @description Verifies the verification code for a list of phone numbers. + */ + post: operations['VerifyPortingVerificationCodes']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/porting_orders/{porting_order_id}/phone_number_blocks': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List all phone number blocks + * @description Returns a list of all phone number blocks of a porting order. + */ + get: operations['listPortingPhoneNumberBlocks']; + put?: never; + /** + * Create a phone number block + * @description Creates a new phone number block. + */ + post: operations['createPortingPhoneNumberBlock']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/porting_orders/{porting_order_id}/phone_number_blocks/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post?: never; + /** + * Delete a phone number block + * @description Deletes a phone number block. + */ + delete: operations['deletePortingPhoneNumberBlock']; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/porting_orders/{porting_order_id}/phone_number_extensions': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List all phone number extensions + * @description Returns a list of all phone number extensions of a porting order. + */ + get: operations['listPortingPhoneNumberExtensions']; + put?: never; + /** + * Create a phone number extension + * @description Creates a new phone number extension. + */ + post: operations['createPortingPhoneNumberExtension']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/porting_orders/{porting_order_id}/phone_number_extensions/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post?: never; + /** + * Delete a phone number extension + * @description Deletes a phone number extension. + */ + delete: operations['deletePortingPhoneNumberExtension']; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/porting_phone_numbers': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List all porting phone numbers + * @description Returns a list of your porting phone numbers. + */ + get: operations['ListPortingPhoneNumbers']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/portout/events': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List all port-out events + * @description Returns a list of all port-out events. + */ + get: operations['listPortoutEvents']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/portout/events/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Show a port-out event + * @description Show a specific port-out event. + */ + get: operations['showPortoutEvent']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/portout/events/{id}/republish': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Republish a port-out event + * @description Republish a specific port-out event. + */ + post: operations['republishPortoutEvent']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/portout/reports': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List port-out related reports + * @description List the reports generated about port-out operations. + */ + get: operations['ListPortoutReports']; + put?: never; + /** + * Create a port-out related report + * @description Generate reports about port-out operations. + */ + post: operations['CreatePortoutReport']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/portout/reports/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Retrieve a report + * @description Retrieve a specific report generated. + */ + get: operations['GetPortingReport']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/portouts': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List portout requests + * @description Returns the portout requests according to filters + */ + get: operations['ListPortoutRequest']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/portouts/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get a portout request + * @description Returns the portout request based on the ID provided + */ + get: operations['FindPortoutRequest']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/portouts/{id}/comments': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List all comments for a portout request + * @description Returns a list of comments for a portout request. + */ + get: operations['FindPortoutComments']; + put?: never; + /** + * Create a comment on a portout request + * @description Creates a comment on a portout request. + */ + post: operations['PostPortRequestComment']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/portouts/{id}/supporting_documents': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List supporting documents on a portout request + * @description List every supporting documents for a portout request. + */ + get: operations['GetPortRequestSupportingDocuments']; + put?: never; + /** + * Create a list of supporting documents on a portout request + * @description Creates a list of supporting documents on a portout request. + */ + post: operations['PostPortRequestSupportingDocuments']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/portouts/{id}/{status}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + /** + * Update Status + * @description Authorize or reject portout request + */ + patch: operations['UpdatePortoutStatus']; + trace?: never; + }; + '/private_wireless_gateways': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get all Private Wireless Gateways + * @description Get all Private Wireless Gateways belonging to the user. + */ + get: operations['GetPrivateWirelessGateways']; + put?: never; + /** + * Create a Private Wireless Gateway + * @description Asynchronously create a Private Wireless Gateway for SIM cards for a previously created network. + */ + post: operations['CreatePrivateWirelessGateway']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/private_wireless_gateways/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get a Private Wireless Gateway + * @description Retrieve information about a Private Wireless Gateway. + */ + get: operations['GetPrivateWirelessGateway']; + put?: never; + post?: never; + /** + * Delete a Private Wireless Gateway + * @description Deletes the Private Wireless Gateway. + */ + delete: operations['DeleteWirelessGateway']; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/public_internet_gateways': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List all Public Internet Gateways + * @description List all Public Internet Gateways. + */ + get: operations['ListPublicInternetGateways']; + put?: never; + /** + * Create a Public Internet Gateway + * @description Create a new Public Internet Gateway. + */ + post: operations['CreatePublicInternetGateway']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/public_internet_gateways/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Retrieve a Public Internet Gateway + * @description Retrieve a Public Internet Gateway. + */ + get: operations['GetPublicInternetGateway']; + put?: never; + post?: never; + /** + * Delete a Public Internet Gateway + * @description Delete a Public Internet Gateway. + */ + delete: operations['DeletePublicInternetGateway']; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/queues/{queue_name}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Retrieve a call queue + * @description Retrieve an existing call queue + */ + get: operations['RetrieveCallQueue']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/queues/{queue_name}/calls': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Retrieve calls from a queue + * @description Retrieve the list of calls in an existing queue + */ + get: operations['ListQueueCalls']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/queues/{queue_name}/calls/{call_control_id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Retrieve a call from a queue + * @description Retrieve an existing call from an existing queue + */ + get: operations['RetrieveCallFromQueue']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/recording_transcriptions': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List all recording transcriptions + * @description Returns a list of your recording transcriptions. + */ + get: operations['getRecordingTranscriptions']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/recording_transcriptions/{recording_transcription_id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Retrieve a recording transcription + * @description Retrieves the details of an existing recording transcription + */ + get: operations['getRecordingTranscription']; + put?: never; + post?: never; + /** + * Delete a recording transcription + * @description Permanently deletes a recording transcription. + */ + delete: operations['deleteRecordingTranscription']; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/recordings': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List all call recordings + * @description Returns a list of your call recordings. + */ + get: operations['GetRecordings']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/recordings/actions/delete': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post?: never; + /** + * Delete a list of call recordings + * @description Permanently deletes a list of call recordings. + */ + delete: operations['DeleteRecordings']; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/recordings/{recording_id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Retrieve a call recording + * @description Retrieves the details of an existing call recording. + */ + get: operations['GetRecording']; + put?: never; + post?: never; + /** + * Delete a call recording + * @description Permanently deletes a call recording. + */ + delete: operations['DeleteRecording']; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/regions': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List all Regions + * @description List all regions and the interfaces that region supports + */ + get: operations['ListRegions']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/regulatory_requirements': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Retrieve regulatory requirements */ + get: operations['ListRegulatoryRequirements']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/reports/cdr_usage_reports/sync': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Generate and fetch voice usage report synchronously. This endpoint will both generate and fetch the voice report over a specified time period. No polling is necessary but the response may take up to a couple of minutes. */ + get: operations['GetUsageReportSync']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/reports/mdr_usage_reports': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Fetch all messaging usage reports. Usage reports are aggregated messaging data for specified time period and breakdown */ + get: operations['GetUsageReports']; + put?: never; + /** @description Submit request for new new messaging usage report. This endpoint will pull and aggregate messaging data in specified time period. */ + post: operations['SubmitUsageReport']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/reports/mdr_usage_reports/sync': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Generate and fetch messaging usage report synchronously. This endpoint will both generate and fetch the messaging report over a specified time period. No polling is necessary but the response may take up to a couple of minutes. */ + get: operations['GetUsageReportSync']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/reports/mdr_usage_reports/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Fetch a single messaging usage report by id */ + get: operations['GetUsageReport']; + put?: never; + post?: never; + /** @description Delete messaging usage report by id */ + delete: operations['DeleteUsageReport']; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/reports/mdrs': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Fetch all Mdr records */ + get: operations['GetPaginatedMdrs']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/reports/wdrs': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Fetch all Wdr records */ + get: operations['GetPaginatedWdrs']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/requirement_groups': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** List requirement groups */ + get: operations['GetRequirementGroups']; + put?: never; + /** Create a new requirement group */ + post: operations['CreateRequirementGroup']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/requirement_groups/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get a single requirement group by ID */ + get: operations['GetRequirementGroup']; + put?: never; + post?: never; + /** Delete a requirement group by ID */ + delete: operations['DeleteRequirementGroup']; + options?: never; + head?: never; + /** Update requirement values in requirement group */ + patch: operations['UpdateRequirementGroup']; + trace?: never; + }; + '/requirement_types': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List all requirement types + * @description List all requirement types ordered by created_at descending + */ + get: operations['ListRequirementTypes']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/requirement_types/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Retrieve a requirement types + * @description Retrieve a requirement type by id + */ + get: operations['RetrieveRequirementType']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/requirements': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List all requirements + * @description List all requirements with filtering, sorting, and pagination + */ + get: operations['ListRequirements']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/requirements/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Retrieve a document requirement + * @description Retrieve a document requirement record + */ + get: operations['RetrieveDocumentRequirements']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/room_compositions': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** View a list of room compositions. */ + get: operations['ListRoomCompositions']; + put?: never; + /** + * Create a room composition. + * @description Asynchronously create a room composition. + */ + post: operations['CreateRoomComposition']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/room_compositions/{room_composition_id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** View a room composition. */ + get: operations['ViewRoomComposition']; + put?: never; + post?: never; + /** + * Delete a room composition. + * @description Synchronously delete a room composition. + */ + delete: operations['DeleteRoomComposition']; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/room_participants': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** View a list of room participants. */ + get: operations['ListRoomParticipants']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/room_participants/{room_participant_id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** View a room participant. */ + get: operations['ViewRoomParticipant']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/room_recordings': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** View a list of room recordings. */ + get: operations['ListRoomRecordings']; + put?: never; + post?: never; + /** Delete several room recordings in a bulk. */ + delete: operations['DeleteRoomRecordings']; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/room_recordings/{room_recording_id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** View a room recording. */ + get: operations['ViewRoomRecording']; + put?: never; + post?: never; + /** + * Delete a room recording. + * @description Synchronously delete a Room Recording. + */ + delete: operations['DeleteRoomRecording']; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/room_sessions': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** View a list of room sessions. */ + get: operations['ListRoomSessions']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/room_sessions/{room_session_id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** View a room session. */ + get: operations['ViewRoomSession']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/room_sessions/{room_session_id}/actions/end': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * End a room session. + * @description Note: this will also kick all participants currently present in the room + */ + post: operations['EndSession']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/room_sessions/{room_session_id}/actions/kick': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Kick participants from a room session. */ + post: operations['KickParticipantInSession']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/room_sessions/{room_session_id}/actions/mute': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Mute participants in room session. */ + post: operations['MuteParticipantInSession']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/room_sessions/{room_session_id}/actions/unmute': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Unmute participants in room session. */ + post: operations['UnmuteParticipantInSession']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/room_sessions/{room_session_id}/participants': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** View a list of room participants. */ + get: operations['ListRoomParticipants']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/rooms': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** View a list of rooms. */ + get: operations['ListRooms']; + put?: never; + /** + * Create a room. + * @description Synchronously create a Room. + */ + post: operations['CreateRoom']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/rooms/{room_id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** View a room. */ + get: operations['ViewRoom']; + put?: never; + post?: never; + /** + * Delete a room. + * @description Synchronously delete a Room. Participants from that room will be kicked out, they won't be able to join that room anymore, and you won't be charged anymore for that room. + */ + delete: operations['DeleteRoom']; + options?: never; + head?: never; + /** + * Update a room. + * @description Synchronously update a Room. + */ + patch: operations['UpdateRoom']; + trace?: never; + }; + '/rooms/{room_id}/actions/generate_join_client_token': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Create Client Token to join a room. + * @description Synchronously create an Client Token to join a Room. Client Token is necessary to join a Telnyx Room. Client Token will expire after `token_ttl_secs`, a Refresh Token is also provided to refresh a Client Token, the Refresh Token expires after `refresh_token_ttl_secs`. + */ + post: operations['CreateRoomClientToken']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/rooms/{room_id}/actions/refresh_client_token': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Refresh Client Token to join a room. + * @description Synchronously refresh an Client Token to join a Room. Client Token is necessary to join a Telnyx Room. Client Token will expire after `token_ttl_secs`. + */ + post: operations['RefreshRoomClientToken']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/rooms/{room_id}/sessions': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** View a list of room sessions. */ + get: operations['ListRoomSessions']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/short_codes': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** List short codes */ + get: operations['ListShortCodes']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/short_codes/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Retrieve a short code */ + get: operations['RetrieveShortCode']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + /** + * Update short code + * @description Update the settings for a specific short code. To unbind a short code from a profile, set the `messaging_profile_id` to `null` or an empty string. + */ + patch: operations['UpdateShortCode']; + trace?: never; + }; + '/sim_card_actions': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List SIM card actions + * @description This API lists a paginated collection of SIM card actions. It enables exploring a collection of existing asynchronous operations using specific filters. + */ + get: operations['ListSimCardActions']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/sim_card_actions/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get SIM card action details + * @description This API fetches detailed information about a SIM card action to follow-up on an existing asynchronous operation. + */ + get: operations['GetSimCardAction']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/sim_card_data_usage_notifications': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List SIM card data usage notifications + * @description Lists a paginated collection of SIM card data usage notifications. It enables exploring the collection using specific filters. + */ + get: operations['ListDataUsageNotifications']; + put?: never; + /** + * Create a new SIM card data usage notification + * @description Creates a new SIM card data usage notification. + */ + post: operations['PostSimCardDataUsageNotification']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/sim_card_data_usage_notifications/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get a single SIM card data usage notification + * @description Get a single SIM Card Data Usage Notification. + */ + get: operations['GetSimCardDataUsageNotification']; + put?: never; + post?: never; + /** + * Delete SIM card data usage notifications + * @description Delete the SIM Card Data Usage Notification. + */ + delete: operations['DeleteSimCardDataUsageNotifications']; + options?: never; + head?: never; + /** + * Updates information for a SIM Card Data Usage Notification + * @description Updates information for a SIM Card Data Usage Notification. + */ + patch: operations['PatchSimCardDataUsageNotification']; + trace?: never; + }; + '/sim_card_group_actions': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List SIM card group actions + * @description This API allows listing a paginated collection a SIM card group actions. It allows to explore a collection of existing asynchronous operation using specific filters. + */ + get: operations['GetSimCardGroupActions']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/sim_card_group_actions/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get SIM card group action details + * @description This API allows fetching detailed information about a SIM card group action resource to make follow-ups in an existing asynchronous operation. + */ + get: operations['GetSimCardGroupAction']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/sim_card_groups': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get all SIM card groups + * @description Get all SIM card groups belonging to the user that match the given filters. + */ + get: operations['GetAllSimCardGroups']; + put?: never; + /** + * Create a SIM card group + * @description Creates a new SIM card group object + */ + post: operations['CreateSimCardGroup']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/sim_card_groups/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get SIM card group + * @description Returns the details regarding a specific SIM card group + */ + get: operations['GetSimCardGroup']; + put?: never; + post?: never; + /** + * Delete a SIM card group + * @description Permanently deletes a SIM card group + */ + delete: operations['DeleteSimCardGroup']; + options?: never; + head?: never; + /** + * Update a SIM card group + * @description Updates a SIM card group + */ + patch: operations['UpdateSimCardGroup']; + trace?: never; + }; + '/sim_card_groups/{id}/actions/remove_private_wireless_gateway': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Request Private Wireless Gateway removal from SIM card group + * @description This action will asynchronously remove an existing Private Wireless Gateway definition from a SIM card group. Completing this operation defines that all SIM cards in the SIM card group will get their traffic handled by Telnyx's default mobile network configuration. + */ + post: operations['RemoveSimCardGroupPrivateWirelessGateway']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/sim_card_groups/{id}/actions/set_private_wireless_gateway': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Request Private Wireless Gateway assignment for SIM card group + * @description This action will asynchronously assign a provisioned Private Wireless Gateway to the SIM card group. Completing this operation defines that all SIM cards in the SIM card group will get their traffic controlled by the associated Private Wireless Gateway. This operation will also imply that new SIM cards assigned to a group will inherit its network definitions. If it's moved to a different group that doesn't have a Private Wireless Gateway, it'll use Telnyx's default mobile network configuration. + */ + post: operations['SetPrivateWirelessGatewayForSimCardGroup']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/sim_card_order_preview': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Preview SIM card orders + * @description Preview SIM card order purchases. + */ + post: operations['PreviewSimCardOrders']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/sim_card_orders': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get all SIM card orders + * @description Get all SIM card orders according to filters. + */ + get: operations['GetSimCardOrders']; + put?: never; + /** + * Create a SIM card order + * @description Creates a new order for SIM cards. + */ + post: operations['CreateSimCardOrder']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/sim_card_orders/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get a single SIM card order + * @description Get a single SIM card order by its ID. + */ + get: operations['GetSimCardOrder']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/sim_cards': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get all SIM cards + * @description Get all SIM cards belonging to the user that match the given filters. + */ + get: operations['GetSimCards']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/sim_cards/actions/bulk_set_network_preferences': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Request bulk setting of network preferences for SIM cards. + * @description This API triggers an asynchronous operation to set network preferences for each of the specified SIM cards.
+ * For each SIM Card a SIM Card Action will be generated. The status of the SIM Card Action can be followed through the [List SIM Card Action](https://developersdev.telnyx.com/docs/api/v2/wireless/SIM-Card-Actions#ListSIMCardActions) API. + * + */ + post: operations['SetNetworkPreferencesBulk']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/sim_cards/actions/bulk_set_public_ips': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Request bulk setting SIM card public IPs. + * @description This API triggers an asynchronous operation to set a public IP for each of the specified SIM cards.
+ * For each SIM Card a SIM Card Action will be generated. The status of the SIM Card Action can be followed through the [List SIM Card Action](https://developersdev.telnyx.com/docs/api/v2/wireless/SIM-Card-Actions#ListSIMCardActions) API. + * + */ + post: operations['SetPublicIPsBulk']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/sim_cards/actions/validate_registration_codes': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Validate SIM cards registration codes + * @description It validates whether SIM card registration codes are valid or not. + */ + post: operations['ValidateRegistrationCodes']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/sim_cards/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get SIM card + * @description Returns the details regarding a specific SIM card. + */ + get: operations['GetSimCard']; + put?: never; + post?: never; + /** + * Deletes a SIM card + * @description The SIM card will be decommissioned, removed from your account and you will stop being charged.
The SIM card won't be able to connect to the network after the deletion is completed, thus making it impossible to consume data.
+ * Transitioning to the disabled state may take a period of time. + * Until the transition is completed, the SIM card status will be disabling disabling.
In order to re-enable the SIM card, you will need to re-register it. + */ + delete: operations['DeleteSimCard']; + options?: never; + head?: never; + /** + * Update a SIM card + * @description Updates SIM card data + */ + patch: operations['UpdateSimCard']; + trace?: never; + }; + '/sim_cards/{id}/actions/delete_network_preferences': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Delete network preferences for a SIM card + * @description This API deletes network preferences for a SIM card.
+ * The API will trigger an asynchronous operation called a SIM Card Action. Creating network preferences may take a period of time. The status of the SIM Card Action can be followed through the [List SIM Card Action](https://developersdev.telnyx.com/docs/api/v2/wireless/SIM-Card-Actions#ListSIMCardActions) API. + * + */ + post: operations['DeleteNetworkPreferences']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/sim_cards/{id}/actions/disable': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Request a SIM card disable + * @description This API disables a SIM card, disconnecting it from the network and making it impossible to consume data.
+ * The API will trigger an asynchronous operation called a SIM Card Action. Transitioning to the disabled state may take a period of time. The status of the SIM Card Action can be followed through the [List SIM Card Action](https://developersdev.telnyx.com/docs/api/v2/wireless/SIM-Card-Actions#ListSIMCardActions) API. + * + */ + post: operations['DisableSimCard']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/sim_cards/{id}/actions/enable': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Request a SIM card enable + * @description This API enables a SIM card, connecting it to the network and making it possible to consume data.
+ * To enable a SIM card, it must be associated with a SIM card group.
+ * The API will trigger an asynchronous operation called a SIM Card Action. Transitioning to the enabled state may take a period of time. The status of the SIM Card Action can be followed through the [List SIM Card Action](https://developersdev.telnyx.com/docs/api/v2/wireless/SIM-Card-Actions#ListSIMCardActions) API. + * + */ + post: operations['EnableSimCard']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/sim_cards/{id}/actions/remove_public_ip': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Request removing a SIM card public IP + * @description This API removes an existing public IP from a SIM card.

+ * The API will trigger an asynchronous operation called a SIM Card Action. The status of the SIM Card Action can be followed through the [List SIM Card Action](https://developersdev.telnyx.com/docs/api/v2/wireless/SIM-Card-Actions#ListSIMCardActions) API. + */ + post: operations['RemoveSimCardPublicIp']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/sim_cards/{id}/actions/set_network_preferences': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Create or update network preferences for a SIM card + * @description This API sets network preferences for a SIM card.
+ * Every SIM card has default network preferences defined on Telnyx. These preferences will determine how a SIMCard will connect to the network by considering a list of preferable operators.

+ * The SIM card needs to be attached to the network so this can connect and SMS must be available, otherwise, the operation will fail. This preference will only be respected if the network is available, otherwise the strongest signal will be used.

+ * The API will trigger an asynchronous operation called a SIM Card Action. Creating network preferences may take a period of time. The status of the SIM Card Action can be followed through the [List SIM Card Action](https://developersdev.telnyx.com/docs/api/v2/wireless/SIM-Card-Actions#ListSIMCardActions) API. + * + */ + post: operations['SetNetworkPreference']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/sim_cards/{id}/actions/set_public_ip': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Request setting a SIM card public IP + * @description This API makes a SIM card reachable on the public internet by mapping a random public IP to the SIM card.

+ * The API will trigger an asynchronous operation called a SIM Card Action. The status of the SIM Card Action can be followed through the [List SIM Card Action](https://developersdev.telnyx.com/docs/api/v2/wireless/SIM-Card-Actions#ListSIMCardActions) API.

+ * Setting a Public IP to a SIM Card incurs a charge and will only succeed if the account has sufficient funds. + */ + post: operations['SetSimCardPublicIp']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/sim_cards/{id}/actions/set_standby': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Request setting a SIM card to standby + * @description The SIM card will be able to connect to the network once the process to set it to standby has been completed, thus making it possible to consume data.
+ * To set a SIM card to standby, it must be associated with SIM card group.
+ * The API will trigger an asynchronous operation called a SIM Card Action. Transitioning to the standby state may take a period of time. The status of the SIM Card Action can be followed through the [List SIM Card Action](https://developersdev.telnyx.com/docs/api/v2/wireless/SIM-Card-Actions#ListSIMCardActions) API. + * + */ + post: operations['SetSimCardStandby']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/sim_cards/{id}/activation_code': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get activation QR code for an eSIM + * @description It returns the contents for the activation QR code for an eSIM.

+ * This API is only available for eSIMs. If the given SIM is a physical SIM card, or has already been installed, an error will be returned. + * + */ + get: operations['GetSimCardActivationCode']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/sim_cards/{id}/device_details': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get SIM card device details + * @description It returns the device details where a SIM card is currently being used. + * + */ + get: operations['GetSimCardDeviceDetails']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/sim_cards/{id}/network_preferences': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get network preferences + * @description It returns the network preferences currently applied in the SIM card. + * + */ + get: operations['GetSimCardNetworkPreferences']; + /** + * Set network preferences + * @description This API allows setting or updating a SIM card network preference.

+ * Every SIM card has default network preferences defined on Telnyx. These preferences will determine how a SIMCard will connect to the network by considering a list of preferable operators.

+ * There can be multiple scenarios where an operator can be preferred over another, for example, when a specific mobile operator can provide better network latency or better pricing. + * + */ + put: operations['PutSimCardNetworkPreferences']; + post?: never; + /** + * Delete network preferences + * @description This API asynchronously removes the custom-defined network preferences settings. After this operation is done the Telnyx default settings, the same applied for an unaltered SIM card, will be in place. + * + */ + delete: operations['DeleteSIMCardNetworkPreferences']; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/sim_cards/{id}/public_ip': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get SIM card public IP definition + * @description It returns the public IP requested for a SIM card. + * + */ + get: operations['GetSimCardPublicIp']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/sim_cards/{id}/wireless_connectivity_logs': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List wireless connectivity logs + * @description This API allows listing a paginated collection of Wireless Connectivity Logs associated with a SIM Card, for troubleshooting purposes. + */ + get: operations['GetWirelessConnectivityLogs']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/storage/buckets/{bucketName}/ssl_certificate': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get Bucket SSL Certificate + * @description Returns the stored certificate detail of a bucket, if applicable. + */ + get: operations['GetStorageSSLCertificates']; + /** + * Add SSL Certificate + * @description Uploads an SSL certificate and its matching secret so that you can use Telnyx’s storage as your CDN. + */ + put: operations['AddStorageSSLCertificate']; + post?: never; + /** + * Remove SSL Certificate + * @description Deletes an SSL certificate and its matching secret. + */ + delete: operations['RemoveStorageSSLCertificate']; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/storage/buckets/{bucketName}/usage/api': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get API Usage + * @description Returns the detail on API usage on a bucket of a particular time period, group by method category. + */ + get: operations['GetStorageAPIUsage']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/storage/buckets/{bucketName}/usage/storage': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get Bucket Usage + * @description Returns the amount of storage space and number of files a bucket takes up. + */ + get: operations['GetBucketUsage']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/storage/buckets/{bucketName}/{objectName}/presigned_url': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Create Presigned Object URL + * @description Returns a timed and authenticated URL to get an object. This is the equivalent to AWS S3’s “presigned” URL. Please note that Telnyx performs authentication differently from AWS S3 and you MUST NOT use the presign method of AWS s3api CLI or sdk to generate the presigned URL. + * + * Refer to: https://developers.telnyx.com/docs/cloud-storage/presigned-urls + * + */ + post: operations['CreatePresignedObjectUrl']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/storage/migration_source_coverage': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** List Migration Source coverage */ + get: operations['ListMigrationSourceCoverage']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/storage/migration_sources': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** List all Migration Sources */ + get: operations['ListMigrationSources']; + put?: never; + /** + * Create a Migration Source + * @description Create a source from which data can be migrated from. + */ + post: operations['CreateMigrationSource']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/storage/migration_sources/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get a Migration Source */ + get: operations['GetMigrationSource']; + put?: never; + post?: never; + /** Delete a Migration Source */ + delete: operations['DeleteMigrationSource']; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/storage/migrations': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** List all Migrations */ + get: operations['ListMigrations']; + put?: never; + /** + * Create a Migration + * @description Initiate a migration of data from an external provider into Telnyx Cloud Storage. Currently, only S3 is supported. + */ + post: operations['CreateMigration']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/storage/migrations/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get a Migration */ + get: operations['GetMigration']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/storage/migrations/{id}/actions/stop': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Stop a Migration */ + post: operations['StopMigration']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/sub_number_orders': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List sub number orders + * @description Get a paginated list of sub number orders. + */ + get: operations['ListSubNumberOrders']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/sub_number_orders/{sub_number_order_id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Retrieve a sub number order + * @description Get an existing sub number order. + */ + get: operations['GetSubNumberOrder']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + /** + * Update a sub number order's requirements + * @description Updates a sub number order. + */ + patch: operations['UpdateSubNumberOrder']; + trace?: never; + }; + '/sub_number_orders/{sub_number_order_id}/cancel': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + /** + * Cancel a sub number order + * @description Allows you to cancel a sub number order in 'pending' status. + */ + patch: operations['CancelSubNumberOrder']; + trace?: never; + }; + '/telephony_credentials': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List all credentials + * @description List all On-demand Credentials. + */ + get: operations['FindTelephonyCredentials']; + put?: never; + /** + * Create a credential + * @description Create a credential. + */ + post: operations['CreateTelephonyCredential']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/telephony_credentials/tags': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List all tags + * @description Returns a list of tags used on Credentials + */ + get: operations['ListTags']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/telephony_credentials/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get a credential + * @description Get the details of an existing On-demand Credential. + */ + get: operations['GetTelephonyCredential']; + put?: never; + post?: never; + /** + * Delete a credential + * @description Delete an existing credential. + */ + delete: operations['DeleteTelephonyCredential']; + options?: never; + head?: never; + /** + * Update a credential + * @description Update an existing credential. + */ + patch: operations['UpdateTelephonyCredential']; + trace?: never; + }; + '/telephony_credentials/{id}/actions/{action}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Perform activate or deactivate action on provided Credential + * @description Perform activate or deactivate action on provided Credential. Activate action will change the status to active, making it possible to connect calls with the credential. Deactivate action will change the status to inactive, making it impossible to connect calls with the credential. + */ + post: operations['PerformCredentialAction']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/telephony_credentials/{id}/token': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Create an Access Token. + * @description Create an Access Token (JWT) for the credential. + */ + post: operations['CreateTelephonyCredentialToken']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/texml/Accounts/{account_sid}/Calls': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Fetch multiple call resources + * @description Returns multiple call resouces for an account. This endpoint is eventually consistent. + */ + get: operations['GetTexmlCalls']; + put?: never; + /** + * Initiate an outbound call + * @description Initiate an outbound TeXML call. Telnyx will request TeXML from the XML Request URL configured for the connection in the Mission Control Portal. + */ + post: operations['InitiateTexmlCall']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/texml/Accounts/{account_sid}/Calls/{call_sid}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Fetch a call + * @description Returns an individual call identified by its CallSid. This endpoint is eventually consistent. + */ + get: operations['GetTexmlCall']; + put?: never; + /** + * Update call + * @description Update TeXML call. Please note that the keys present in the payload MUST BE formatted in CamelCase as specified in the example. + */ + post: operations['UpdateTexmlCall']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/texml/Accounts/{account_sid}/Calls/{call_sid}/Recordings.json': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Fetch recordings for a call + * @description Returns recordings for a call identified by call_sid. + */ + get: operations['FetchTeXMLCallRecordings']; + put?: never; + /** + * Request recording for a call + * @description Starts recording with specified parameters for call idientified by call_sid. + */ + post: operations['StartTeXMLCallRecording']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/texml/Accounts/{account_sid}/Calls/{call_sid}/Recordings/{recording_sid}.json': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Update recording on a call + * @description Updates recording resource for particular call. + */ + post: operations['UpdateTeXMLCallRecording']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/texml/Accounts/{account_sid}/Calls/{call_sid}/Streams.json': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Start streaming media from a call. + * @description Starts streaming media from a call to a specific WebSocket address. + */ + post: operations['StartTeXMLCallStreaming']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/texml/Accounts/{account_sid}/Calls/{call_sid}/Streams/{streaming_sid}.json': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Update streaming on a call + * @description Updates streaming resource for particular call. + */ + post: operations['UpdateTeXMLCallStreaming']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/texml/Accounts/{account_sid}/Conferences': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List conference resources + * @description Lists conference resources. + */ + get: operations['GetTexmlConferences']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/texml/Accounts/{account_sid}/Conferences/{conference_sid}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Fetch a conference resource + * @description Returns a conference resource. + */ + get: operations['GetTexmlConference']; + put?: never; + /** + * Update a conference resource + * @description Updates a conference resource. + */ + post: operations['UpdateTexmlConference']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/texml/Accounts/{account_sid}/Conferences/{conference_sid}/Participants': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List conference participants + * @description Lists conference participants + */ + get: operations['GetTexmlConferenceParticipants']; + put?: never; + /** + * Dial a new conference participant + * @description Dials a new conference participant + */ + post: operations['DialTexmlConferenceParticipant']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/texml/Accounts/{account_sid}/Conferences/{conference_sid}/Participants/{call_sid}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get conference participant resource + * @description Gets conference participant resource + */ + get: operations['GetTexmlConferenceParticipant']; + put?: never; + /** + * Update a conference participant + * @description Updates a conference participant + */ + post: operations['UpdateTexmlConferenceParticipant']; + /** + * Delete a conference participant + * @description Deletes a conference participant + */ + delete: operations['DeleteTexmlConferenceParticipant']; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/texml/Accounts/{account_sid}/Conferences/{conference_sid}/Recordings': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List conference recordings + * @description Lists conference recordings + */ + get: operations['GetTexmlConferenceRecordings']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/texml/Accounts/{account_sid}/Conferences/{conference_sid}/Recordings.json': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Fetch recordings for a conference + * @description Returns recordings for a conference identified by conference_sid. + */ + get: operations['FetchTeXMLConferenceRecordings']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/texml/Accounts/{account_sid}/Recordings.json': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Fetch multiple recording resources + * @description Returns multiple recording resources for an account. + */ + get: operations['GetTeXMLCallRecordings']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/texml/Accounts/{account_sid}/Recordings/{recording_sid}.json': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Fetch recording resource + * @description Returns recording resource identified by recording id. + */ + get: operations['GetTeXMLCallRecording']; + put?: never; + post?: never; + /** + * Delete recording resource + * @description Deletes recording resource identified by recording id. + */ + delete: operations['DeleteTeXMLCallRecording']; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/texml/Accounts/{account_sid}/Transcriptions.json': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List recording transcriptions + * @description Returns multiple recording transcription resources for an account. + */ + get: operations['GetTeXMLRecordingTranscriptions']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/texml/Accounts/{account_sid}/Transcriptions/{recording_transcription_sid}.json': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Fetch a recording transcription resource + * @description Returns the recording transcription resource identified by its ID. + */ + get: operations['GetTeXMLRecordingTranscription']; + put?: never; + post?: never; + /** + * Delete a recording transcription + * @description Permanently deletes a recording transcription. + */ + delete: operations['DeleteTeXMLRecordingTranscription']; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/texml/calls/{application_id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Initiate an outbound call + * @description Initiate an outbound TeXML call. Telnyx will request TeXML from the XML Request URL configured for the connection in the Mission Control Portal. + */ + post: operations['InitiateTexmlCall']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/texml/calls/{call_sid}/update': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Update call + * @description Update TeXML call. Please note that the keys present in the payload MUST BE formatted in CamelCase as specified in the example. + */ + post: operations['UpdateTexmlCall']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/texml/secrets': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Create a TeXML secret + * @description Create a TeXML secret which can be later used as a Dynamic Parameter for TeXML when using Mustache Templates in your TeXML. In your TeXML you will be able to use your secret name, and this name will be replaced by the actual secret value when processing the TeXML on Telnyx side. The secrets are not visible in any logs. + */ + post: operations['CreateTexmlSecret']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/texml_applications': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List all TeXML Applications + * @description Returns a list of your TeXML Applications. + */ + get: operations['FindTexmlApplications']; + put?: never; + /** + * Creates a TeXML Application + * @description Creates a TeXML Application. + */ + post: operations['CreateTexmlApplication']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/texml_applications/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Retrieve a TeXML Application + * @description Retrieves the details of an existing TeXML Application. + */ + get: operations['GetTexmlApplication']; + put?: never; + post?: never; + /** + * Deletes a TeXML Application + * @description Deletes a TeXML Application. + */ + delete: operations['DeleteTexmlApplication']; + options?: never; + head?: never; + /** + * Update a TeXML Application + * @description Updates settings of an existing TeXML Application. + */ + patch: operations['UpdateTexmlApplication']; + trace?: never; + }; + '/usage_reports': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get Telnyx product usage data (BETA) + * @description Get Telnyx usage data by product, broken out by the specified dimensions + */ + get: operations['GetUsageReport']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/usage_reports/options': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get Usage Reports query options (BETA) + * @description Get the Usage Reports options for querying usage, including the products available and their respective metrics and dimensions + */ + get: operations['ListUsageReportsOptions']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/v2/external_connections/{id}/locations/{location_id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + /** Update a location's static emergency address */ + patch: operations['updateLocation']; + trace?: never; + }; + '/verifications/by_phone_number/{phone_number}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** List verifications by phone number */ + get: operations['ListVerifications']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/verifications/by_phone_number/{phone_number}/actions/verify': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Verify verification code by phone number */ + post: operations['VerifyVerificationCodeByPhoneNumber']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/verifications/call': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Trigger Call verification */ + post: operations['CreateVerificationCall']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/verifications/flashcall': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Trigger Flash call verification */ + post: operations['CreateFlashcallVerification']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/verifications/sms': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Trigger SMS verification */ + post: operations['CreateVerificationSms']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/verifications/{verification_id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Retrieve verification */ + get: operations['RetrieveVerification']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/verifications/{verification_id}/actions/verify': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Verify verification code by ID */ + post: operations['VerifyVerificationCodeById']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/verified_numbers': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List all Verified Numbers + * @description Gets a paginated list of Verified Numbers. + */ + get: operations['ListVerifiedNumbers']; + put?: never; + /** + * Request phone number verification + * @description Initiates phone number verification procedure. + */ + post: operations['CreateVerifiedNumber']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/verified_numbers/{phone_number}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Retrieve a verified number */ + get: operations['GetVerifiedNumber']; + put?: never; + post?: never; + /** Delete a verified number */ + delete: operations['DeleteVerifiedNumber']; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/verified_numbers/{phone_number}/actions/verify': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Submit verification code */ + post: operations['VerifyVerificationCode']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/verify_profiles': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List all Verify profiles + * @description Gets a paginated list of Verify profiles. + */ + get: operations['ListProfiles']; + put?: never; + /** + * Create a Verify profile + * @description Creates a new Verify profile to associate verifications with. + */ + post: operations['CreateVerifyProfile']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/verify_profiles/templates': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Retrieve Verify profile message templates + * @description List all Verify profile message templates. + */ + get: operations['ListProfileMessageTemplates']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/verify_profiles/{verify_profile_id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Retrieve Verify profile + * @description Gets a single Verify profile. + */ + get: operations['GetVerifyProfile']; + put?: never; + post?: never; + /** Delete Verify profile */ + delete: operations['DeleteProfile']; + options?: never; + head?: never; + /** Update Verify profile */ + patch: operations['UpdateVerifyProfile']; + trace?: never; + }; + '/virtual_cross_connects': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List all Virtual Cross Connects + * @description List all Virtual Cross Connects. + */ + get: operations['ListVirtualCrossConnects']; + put?: never; + /** + * Create a Virtual Cross Connect + * @description Create a new Virtual Cross Connect.

For AWS and GCE, you have the option of creating the primary connection first and the secondary connection later. You also have the option of disabling the primary and/or secondary connections at any time and later re-enabling them. With Azure, you do not have this option. Azure requires both the primary and secondary connections to be created at the same time and they can not be independantly disabled. + */ + post: operations['CreateVirtualCrossConnect']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/virtual_cross_connects/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Retrieve a Virtual Cross Connect + * @description Retrieve a Virtual Cross Connect. + */ + get: operations['GetVirtualCrossConnect']; + put?: never; + post?: never; + /** + * Delete a Virtual Cross Connect + * @description Delete a Virtual Cross Connect. + */ + delete: operations['DeleteVirtualCrossConnect']; + options?: never; + head?: never; + /** + * Update the Virtual Cross Connect + * @description Update the Virtual Cross Connect.

Cloud IPs can only be patched during the `created` state, as GCE will only inform you of your generated IP once the pending connection requested has been accepted. Once the Virtual Cross Connect has moved to `provisioning`, the IPs can no longer be patched.

Once the Virtual Cross Connect has moved to `provisioned` and you are ready to enable routing, you can toggle the routing announcements to `true`. + */ + patch: operations['UpdateVirtualCrossConnect']; + trace?: never; + }; + '/virtual_cross_connects_coverage': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List Virtual Cross Connect Cloud Coverage + * @description List Virtual Cross Connects Cloud Coverage.

This endpoint shows which cloud regions are available for the `location_code` your Virtual Cross Connect will be provisioned in. + */ + get: operations['ListVirtualCrossConnectCoverage']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/webhook_deliveries': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List webhook deliveries + * @description Lists webhook_deliveries for the authenticated user + */ + get: operations['GetWebhookDeliveries']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/webhook_deliveries/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Find webhook_delivery details by ID + * @description Provides webhook_delivery debug data, such as timestamps, delivery status and attempts. + */ + get: operations['GetWebhookDelivery']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/wireguard_interfaces': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List all WireGuard Interfaces + * @description List all WireGuard Interfaces. + */ + get: operations['ListWireguardInterfaces']; + put?: never; + /** + * Create a WireGuard Interface + * @description Create a new WireGuard Interface. Current limitation of 10 interfaces per user can be created. + */ + post: operations['CreateWireguardInterface']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/wireguard_interfaces/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Retrieve a WireGuard Interfaces + * @description Retrieve a WireGuard Interfaces. + */ + get: operations['GetWireguardInterface']; + put?: never; + post?: never; + /** + * Delete a WireGuard Interface + * @description Delete a WireGuard Interface. + */ + delete: operations['DeleteWireguardInterface']; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/wireguard_peers': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List all WireGuard Peers + * @description List all WireGuard peers. + */ + get: operations['ListWireguardPeers']; + put?: never; + /** + * Create a WireGuard Peer + * @description Create a new WireGuard Peer. Current limitation of 5 peers per interface can be created. + */ + post: operations['CreateWireguardPeer']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/wireguard_peers/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Retrieve the WireGuard Peer + * @description Retrieve the WireGuard peer. + */ + get: operations['GetWireguardPeer']; + put?: never; + post?: never; + /** + * Delete the WireGuard Peer + * @description Delete the WireGuard peer. + */ + delete: operations['DeleteWireguardPeer']; + options?: never; + head?: never; + /** + * Update the WireGuard Peer + * @description Update the WireGuard peer. + */ + patch: operations['UpdateWireguardPeer']; + trace?: never; + }; + '/wireguard_peers/{id}/config': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Retrieve Wireguard config template for Peer + * @description Retrieve Wireguard config template for Peer + */ + get: operations['GetWireguardPeerConfig']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/wireless/detail_records_reports': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get all Wireless Detail Records (WDRs) Reports + * @description Returns the WDR Reports that match the given parameters. + */ + get: operations['GetWdrReports']; + put?: never; + /** + * Create a Wireless Detail Records (WDRs) Report + * @description Asynchronously create a report containing Wireless Detail Records (WDRs) for the SIM cards that consumed wireless data in the given time period. + * + */ + post: operations['CreateWdrReport']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/wireless/detail_records_reports/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get a Wireless Detail Record (WDR) Report + * @description Returns one specific WDR report + */ + get: operations['GetWdrReport']; + put?: never; + post?: never; + /** + * Delete a Wireless Detail Record (WDR) Report + * @description Deletes one specific WDR report. + */ + delete: operations['DeleteWdrReport']; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/{bucketName}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * ListObjectsV2 + * @description List all objects contained in a given bucket. + */ + get: operations['ListObjects']; + /** + * CreateBucket + * @description Create a bucket. + */ + put: operations['CreateBucket']; + /** + * DeleteObjects + * @description Deletes one or multiple objects from a given bucket. + */ + post: operations['DeleteObjects']; + /** + * DeleteBucket + * @description Deletes a bucket. The bucket must be empty for it to be deleted. + */ + delete: operations['DeleteBucket']; + options?: never; + /** + * HeadBucket + * @description Determines if a bucket exists and you have permission to access it. + */ + head: operations['HeadBucket']; + patch?: never; + trace?: never; + }; + '/{bucketName}/{objectName}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * GetObject + * @description Retrieves an object from a given bucket. + */ + get: operations['GetObject']; + /** + * PutObject + * @description Add an object to a bucket. + */ + put: operations['PutObject']; + post?: never; + /** + * DeleteObject + * @description Delete an object from a given bucket. + */ + delete: operations['DeleteObject']; + options?: never; + /** + * HeadObject + * @description Retrieves metadata from an object without returning the object itself. + */ + head: operations['HeadObject']; + patch?: never; + trace?: never; + }; + '/{bucketName}/{objectName}/uploads/{uploadID}': { + parameters: { + query?: never; + header?: never; + path: { + bucketName: string; + objectName: string; + uploadID: string; + }; + cookie?: never; + }; + get?: never; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; +} +export type webhooks = Record; +export interface components { + schemas: { + /** AWS Voice Settings */ + AWSVoiceSettings: Record; + AcceptSuggestionsRequest: { + /** @description The ID of the address. */ + id?: string; + }; + /** AccessIPAddressListResponseSchema */ + AccessIPAddressListResponseSchema: { + /** Data */ + data: components['schemas']['AccessIPAddressResponseSchema'][]; + meta: components['schemas']['PaginationMeta']; + }; + /** AccessIPAddressPOST */ + AccessIPAddressPOST: { + /** Ip Address */ + ip_address: string; + /** Description */ + description?: string; + }; + /** AccessIPAddressResponseSchema */ + AccessIPAddressResponseSchema: { + /** Id */ + id: string; + /** Ip Address */ + ip_address: string; + /** Source */ + source: string; + status: components['schemas']['CloudflareSyncStatus']; + /** Description */ + description?: string; + /** User Id */ + user_id: string; + /** + * Created At + * Format: date-time + */ + created_at?: string; + /** + * Updated At + * Format: date-time + */ + updated_at?: string; + }; + /** AccessIPRangeListResponseSchema */ + AccessIPRangeListResponseSchema: { + /** Data */ + data: components['schemas']['AccessIPRangeResponseSchema'][]; + meta: components['schemas']['PaginationMeta']; + }; + /** AccessIPRangePOST */ + AccessIPRangePOST: { + /** Cidr Block */ + cidr_block: string; + /** Description */ + description?: string; + }; + /** AccessIPRangeResponseSchema */ + AccessIPRangeResponseSchema: { + /** Id */ + id: string; + /** Cidr Block */ + cidr_block: string; + status: components['schemas']['CloudflareSyncStatus']; + /** Description */ + description?: string; + /** User Id */ + user_id: string; + /** + * Created At + * Format: date-time + */ + created_at?: string; + /** + * Updated At + * Format: date-time + */ + updated_at?: string; + }; + /** @example 61bf923e-5e4d-4595-a110-56190ea18a1b */ + AccountSid: string; + ActionsParticipantsRequest: { + /** @description Either a list of participant id to perform the action on, or the keyword "all" to perform the action on all participant. */ + participants?: 'all' | string[]; + /** @description List of participant id to exclude from the action. */ + exclude?: string[]; + }; + /** + * Active Call + * @example { + * "call_control_id": "v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg", + * "call_leg_id": "2dc6fc34-f9e0-11ea-b68e-02420a0f7768", + * "call_session_id": "2dc1b3c8-f9e0-11ea-bc5a-02420a0f7768", + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + * "call_duration": 50, + * "record_type": "call" + * } + */ + ActiveCall: { + /** + * @example call + * @enum {string} + */ + record_type: 'call'; + /** + * @description ID that is unique to the call session and can be used to correlate webhook events. Call session is a group of related call legs that logically belong to the same phone call, e.g. an inbound and outbound leg of a transferred call + * @example 428c31b6-7af4-4bcb-b68e-5013ef9657c1 + */ + call_session_id: string; + /** + * @description ID that is unique to the call and can be used to correlate webhook events + * @example 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + */ + call_leg_id: string; + /** + * @description Unique identifier and token for controlling the call. + * @example v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg + */ + call_control_id: string; + /** + * @description State received from a command. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state: string; + /** + * @description Indicates the duration of the call in seconds + * @example 50 + */ + call_duration: number; + }; + /** Address */ + Address: { + /** + * Format: int64 + * @description Uniquely identifies the address. + * @example 1293384261075731499 + */ + id?: string; + /** + * @description Identifies the type of the resource. + * @example address + */ + record_type?: string; + customer_reference?: components['schemas']['customer_reference']; + first_name?: components['schemas']['first_name']; + last_name?: components['schemas']['last_name']; + business_name?: components['schemas']['business_name']; + phone_number?: components['schemas']['phone_number']; + street_address?: components['schemas']['street_address']; + extended_address?: components['schemas']['extended_address']; + locality?: components['schemas']['locality']; + administrative_area?: components['schemas']['administrative_area']; + neighborhood?: components['schemas']['neighborhood']; + borough?: components['schemas']['borough']; + postal_code?: components['schemas']['postal_code']; + country_code?: components['schemas']['country_code']; + address_book?: components['schemas']['address_book']; + validate_address?: components['schemas']['validate_address']; + /** + * @description ISO 8601 formatted date indicating when the resource was created. + * @example 2018-02-02T22:25:27.521Z + */ + created_at?: string; + /** + * @description ISO 8601 formatted date indicating when the resource was updated. + * @example 2018-02-02T22:25:27.521Z + */ + updated_at?: string; + }; + AddressCreate: { + customer_reference?: components['schemas']['customer_reference']; + first_name: components['schemas']['first_name']; + last_name: components['schemas']['last_name']; + business_name: components['schemas']['business_name']; + phone_number?: components['schemas']['phone_number']; + street_address: components['schemas']['street_address']; + extended_address?: components['schemas']['extended_address']; + locality: components['schemas']['locality']; + administrative_area?: components['schemas']['administrative_area']; + neighborhood?: components['schemas']['neighborhood']; + borough?: components['schemas']['borough']; + postal_code?: components['schemas']['postal_code']; + country_code: components['schemas']['country_code']; + address_book?: components['schemas']['address_book']; + validate_address?: components['schemas']['validate_address']; + }; + AddressSuggestionResponse: { + data?: { + /** @description Indicates if the address suggestions are accepted. */ + accepted?: boolean; + /** + * Format: uuid + * @description The UUID of the location. + */ + id?: string; + /** @enum {string} */ + record_type?: 'address_suggestion'; + }; + }; + /** + * AltBusinessIdType + * @description An enumeration. + * @enum {unknown} + */ + AltBusinessIdType: 'NONE' | 'DUNS' | 'GIIN' | 'LEI'; + AmdDetailRecord: { + /** + * @description Feature invocation id + * @example 3ca7bd3d-7d82-4e07-9df4-009123068320 + */ + id?: string; + /** + * Format: date-time + * @description Feature invocation time + * @example 2020-07-01T00:00:00Z + */ + invoked_at?: string; + /** + * @description Feature name + * @enum {string} + */ + feature?: 'PREMIUM'; + /** + * @description User-provided tags + * @example tag1,tag2 + */ + tags?: string; + /** + * @description Billing Group id + * @example 01977831-abdd-4894-84f3-244385621424 + */ + billing_group_id?: string; + /** + * @description Name of the Billing Group specified in billing_group_id + * @example Billing group name + */ + billing_group_name?: string; + /** + * @description Connection id + * @example 1684947189014463919 + */ + connection_id?: string; + /** + * @description Connection name + * @example Name of the connection with id specified in connection_id field + */ + connection_name?: string; + /** + * @description Telnyx UUID that identifies the related call leg + * @example 3ca7bd3d-7d82-4e07-9df4-009123068320 + */ + call_leg_id?: string; + /** + * @description Telnyx UUID that identifies the related call session + * @example 3ca7bd3d-7d82-4e07-9df4-009123068320 + */ + call_session_id?: string; + /** + * @description Indicates whether Telnyx billing charges might be applicable + * @example true + */ + is_telnyx_billable?: boolean; + /** + * @description Currency amount per billing unit used to calculate the Telnyx billing cost + * @example 0.002 + */ + rate?: string; + /** + * @description Billing unit used to calculate the Telnyx billing cost + * @example invocations + */ + rate_measured_in?: string; + /** + * @description Currency amount for Telnyx billing cost + * @example 0.004 + */ + cost?: string; + /** + * @description Telnyx account currency used to describe monetary values, including billing cost + * @example USD + */ + currency?: string; + /** + * @description discriminator enum property added by openapi-typescript + * @enum {string} + */ + record_type: 'AmdDetailRecord'; + }; + /** + * Anchorsite Override + * @description `Latency` directs Telnyx to route media through the site with the lowest round-trip time to the user's connection. Telnyx calculates this time using ICMP ping messages. This can be disabled by specifying a site to handle all media. + * @default Latency + * @example Amsterdam, Netherlands + * @enum {string} + */ + AnchorsiteOverride: + | 'Latency' + | 'Chicago, IL' + | 'Ashburn, VA' + | 'San Jose, CA' + | 'Sydney, Australia' + | 'Amsterdam, Netherlands' + | 'London, UK' + | 'Toronto, Canada' + | 'Vancouver, Canada' + | 'Frankfurt, Germany'; + /** + * Answer Request + * @example { + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + * "command_id": "891510ac-f3e4-11e8-af5b-de00688a4901", + * "webhook_url": "https://www.example.com/server-b/", + * "webhook_url_method": "POST", + * "send_silence_when_idle": true + * } + */ + AnswerRequest: { + /** + * Format: uuid + * @description Use this field to set the Billing Group ID for the call. Must be a valid and existing Billing Group ID. + * @example f5586561-8ff0-4291-a0ac-84fe544797bd + */ + billing_group_id?: string; + /** + * @description Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + /** + * @description Use this field to avoid duplicate commands. Telnyx will ignore any command with the same `command_id` for the same `call_control_id`. + * @example 891510ac-f3e4-11e8-af5b-de00688a4901 + */ + command_id?: string; + /** + * @description Custom headers to be added to the SIP INVITE response. + * @example [ + * { + * "name": "head_1", + * "value": "val_1" + * }, + * { + * "name": "head_2", + * "value": "val_2" + * } + * ] + */ + custom_headers?: components['schemas']['CustomSipHeader'][]; + /** + * @description The list of comma-separated codecs in a preferred order for the forked media to be received. + * @example G722,PCMU,PCMA,G729,OPUS,VP8,H264 + * @enum {string} + */ + preferred_codecs?: 'G722,PCMU,PCMA,G729,OPUS,VP8,H264'; + /** + * @description SIP headers to be added to the SIP INVITE response. Currently only User-to-User header is supported. + * @example [ + * { + * "name": "User-to-User", + * "value": "value" + * } + * ] + */ + sip_headers?: components['schemas']['SipHeader'][]; + sound_modifications?: components['schemas']['SoundModifications']; + /** + * @description The destination WebSocket address where the stream is going to be delivered. + * @example wss://www.example.com/websocket + */ + stream_url?: string; + /** + * @description Specifies which track should be streamed. + * @default inbound_track + * @example both_tracks + * @enum {string} + */ + stream_track: 'inbound_track' | 'outbound_track' | 'both_tracks'; + stream_bidirectional_mode?: components['schemas']['StreamBidirectionalMode']; + stream_bidirectional_codec?: components['schemas']['StreamBidirectionalCodec']; + /** + * @description Generate silence RTP packets when no transmission available. + * @default false + * @example true + */ + send_silence_when_idle: boolean; + /** + * @description Use this field to override the URL for which Telnyx will send subsequent webhooks to for this call. + * @example https://www.example.com/server-b/ + */ + webhook_url?: string; + /** + * @description HTTP request type used for `webhook_url`. + * @default POST + * @example GET + * @enum {string} + */ + webhook_url_method: 'POST' | 'GET'; + /** + * @description Enable transcription upon call answer. The default value is false. + * @default false + * @example true + */ + transcription: boolean; + transcription_config?: components['schemas']['TranscriptionStartRequest']; + }; + /** + * Application Name + * @description A user-assigned name to help manage the application. + * @example call-router + */ + ApplicationName: string; + /** AssignProfileToCampaignRequest */ + AssignProfileToCampaignRequest: { + /** + * Messagingprofileid + * @description The ID of the messaging profile that you want to link to the specified campaign. + * @example 4001767e-ce0f-4cae-9d5f-0d5e636e7809 + */ + messagingProfileId: string; + /** + * Tcrcampaignid + * @description The TCR ID of the shared campaign you want to link to the specified messaging profile (for campaigns not created using Telnyx 10DLC services only). If you supply this ID in the request, do not also include a campaignId. + * @example CWZTFH1 + */ + tcrCampaignId?: string; + /** + * Campaignid + * @description The ID of the campaign you want to link to the specified messaging profile. If you supply this ID in the request, do not also include a tcrCampaignId. + * @example 4b300178-131c-d902-d54e-72d90ba1620j + */ + campaignId?: string; + }; + /** AssignProfileToCampaignResponse */ + AssignProfileToCampaignResponse: { + /** + * Messagingprofileid + * @description The ID of the messaging profile that you want to link to the specified campaign. + * @example 4001767e-ce0f-4cae-9d5f-0d5e636e7809 + */ + messagingProfileId: string; + /** + * Tcrcampaignid + * @description The TCR ID of the shared campaign you want to link to the specified messaging profile (for campaigns not created using Telnyx 10DLC services only). If you supply this ID in the request, do not also include a campaignId. + * @example CWZTFH1 + */ + tcrCampaignId?: string; + /** + * Campaignid + * @description The ID of the campaign you want to link to the specified messaging profile. If you supply this ID in the request, do not also include a tcrCampaignId. + * @example 4b300178-131c-d902-d54e-72d90ba1620j + */ + campaignId?: string; + /** + * Taskid + * @description The ID of the task associated with assigning a messaging profile to a campaign. + * @example 667a80f8-b0a9-49d0-b9ab-a7a1bcc45086 + */ + taskId: string; + }; + /** + * AssignmentStatus + * @description An enumeration. + * @enum {string} + */ + AssignmentStatus: 'pending' | 'assigned' | 'failed'; + /** AssignmentTaskStatusResponse */ + AssignmentTaskStatusResponse: { + /** Taskid */ + taskId: string; + /** + * @description The status of the task associated with assigning a messaging profile to a campaign. + * @example pending + */ + status: string & components['schemas']['TaskStatus']; + /** + * Createdat + * Format: date-time + */ + createdAt?: string; + /** + * Updatedat + * Format: date-time + */ + updatedAt?: string; + }; + /** Assistant */ + Assistant: { + /** Id */ + id: string; + /** Name */ + name: string; + /** + * Created At + * Format: date-time + */ + created_at: string; + /** + * Description + * @default + */ + description: string; + /** Model */ + model: string; + /** Instructions */ + instructions: string; + /** + * Tools + * @default [ + * { + * "type": "retrieval", + * "retrieval": { + * "bucket_ids": [ + * "my_bucket_id_1" + * ] + * } + * } + * ] + */ + tools: ( + | components['schemas']['ChatCompletionToolParam'] + | components['schemas']['Retrieval'] + )[]; + }; + /** + * AssistantDeletedResponse + * @description Aligns with the OpenAI API: + * https://platform.openai.com/docs/api-reference/assistants/deleteAssistant + */ + AssistantDeletedResponse: { + /** Id */ + id: string; + /** Object */ + object: string; + /** Deleted */ + deleted: boolean; + }; + /** AssistantsListData */ + AssistantsListData: { + /** Data */ + data: components['schemas']['Assistant'][]; + }; + AudioTranscriptionRequest: { + /** + * Format: binary + * @description The audio file object to transcribe, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm. File uploads are limited to 100 MB. + */ + file: string; + /** + * @description ID of the model to use. Only `distil-whisper/distil-large-v2` is currently available. + * @example distil-whisper/distil-large-v2 + * @enum {string} + */ + model: 'distil-whisper/distil-large-v2'; + /** + * @description The format of the transcript output. Use `verbose_json` to take advantage of timestamps. + * @default json + * @example json + * @enum {string} + */ + response_format: 'json' | 'verbose_json'; + /** + * @description The timestamp granularities to populate for this transcription. `response_format` must be set verbose_json to use timestamp granularities. Currently `segment` is supported. + * @example json + * @enum {string} + */ + 'timestamp_granularities[]'?: 'segment'; + }; + AudioTranscriptionResponse: { + /** @description The transcribed text for the audio file. */ + text: string; + /** @description The duration of the audio file in seconds. This is only included if `response_format` is set to `verbose_json`. */ + duration?: number; + /** @description Segments of the transcribed text and their corresponding details. This is only included if `response_format` is set to `verbose_json`. */ + segments?: components['schemas']['AudioTranscriptionResponseSegments'][]; + }; + AudioTranscriptionResponseSegments: { + /** @description Unique identifier of the segment. */ + id: number; + /** @description Start time of the segment in seconds. */ + start: number; + /** @description End time of the segment in seconds. */ + end: number; + /** @description Text content of the segment. */ + text: string; + }; + AuditLogEntry: { + /** + * Format: uuid + * @description Unique identifier for the audit log entry + */ + id?: string; + /** + * Format: uuid + * @description Unique identifier for the user who made the change + */ + user_id?: string; + /** + * @description Identifies the type of the resource. + * @example audit_event + */ + record_type?: string; + /** @description Unique identifier for the resource that was changed */ + resource_id?: string; + /** + * Format: uuid + * @description Unique identifier for the organization that owns the resource + */ + organization_id?: string; + changes?: + | { + /** + * @description Identifies the name of the field that was changed + * @example inbound.timeout_1xx_secs + */ + field?: string; + /** @description Value of the field before the change was made. This field can be any JSON type. */ + from?: unknown; + /** @description Value of the field after the change was made. This field can be any JSON type. */ + to?: unknown; + }[] + | null; + /** + * @description Indicates what type of user made the change + * @enum {string} + */ + change_made_by?: + | 'account_owner' + | 'organization_member' + | 'account_manager' + | 'telnyx'; + /** @description Identifies the type of the resource that was changed */ + resource_type?: string; + /** @description Identifies the type of change that was made */ + change_type?: string; + /** + * Format: date-time + * @description ISO 8601 formatted date indicating when the change was made + * @example 2020-01-01T00:00:00Z + */ + created_at?: string; + }; + /** AuthenticationProvider */ + AuthenticationProvider: { + /** + * Format: uuid + * @description Uniquely identifies the authentication provider. + * @example 35146afd-df93-4963-b1e9-1a085e2ae874 + */ + id?: string; + /** + * @description Identifies the type of the resource. + * @example authentication_provider + */ + record_type?: string; + name?: components['schemas']['name']; + short_name?: components['schemas']['short_name']; + organization_id?: components['schemas']['organization_id']; + active?: components['schemas']['active']; + /** @description The settings associated with the authentication provider. */ + settings?: { + /** + * @description The Assertion Consumer Service URL for the service provider (Telnyx). + * @example https://api.telnyx.com/sso/saml/auth/myorg + */ + assertion_consumer_service_url?: string; + /** + * @description The Entity ID for the service provider (Telnyx). + * @example https://api.telnyx.com/sso/saml/metadata/myorg + */ + service_provider_entity_id?: string; + /** + * @description The Entity ID for the identity provider (IdP). + * @example https://myorg.myidp.com/saml/metadata + */ + idp_entity_id?: string; + /** + * @description The SSO target url for the identity provider (IdP). + * @example https://myorg.myidp.com/trust/saml2/http-post/sso + */ + idp_sso_target_url?: string; + /** + * @description The certificate fingerprint for the identity provider (IdP) + * @example 13:38:C7:BB:C9:FF:4A:70:38:3A:E3:D9:5C:CD:DB:2E:50:1E:80:A7 + */ + idp_cert_fingerprint?: string; + /** + * @description The algorithm used to generate the identity provider's (IdP) certificate fingerprint + * @default sha1 + * @example sha256 + * @enum {string} + */ + idp_cert_fingerprint_algorithm: 'sha1' | 'sha256' | 'sha384' | 'sha512'; + /** + * @description The name identifier format associated with the authentication provider. This must be the same for both the Identity Provider (IdP) and the service provider (Telnyx). + * @example urn:oasis:names:tc:SAML:1.1:nameid-format + */ + name_identifier_format?: string; + }; + /** + * @description ISO 8601 formatted date indicating when the resource was created. + * @example 2018-02-02T22:25:27.521Z + */ + created_at?: string; + /** + * @description ISO 8601 formatted date indicating when the resource was updated. + * @example 2018-02-02T22:25:27.521Z + */ + updated_at?: string; + }; + AuthenticationProviderCreate: { + name: components['schemas']['name']; + short_name: components['schemas']['short_name']; + active?: components['schemas']['active']; + settings: components['schemas']['settings']; + settings_url?: components['schemas']['settings_url']; + }; + AutoRechargePref: { + /** + * @description The unique identifier for the auto recharge preference. + * @example 1524126400473204723 + */ + id?: string; + /** + * @description The record type. + * @example auto_recharge_pref + */ + record_type?: string; + /** + * Format: decimal + * @description The threshold amount at which the account will be recharged. + * @example 104.00 + */ + threshold_amount?: string; + /** + * Format: decimal + * @description The amount to recharge the account, the actual recharge amount will be the amount necessary to reach the threshold amount plus the recharge amount. + * @example 104.00 + */ + recharge_amount?: string; + /** + * @description Whether auto recharge is enabled. + * @example true + */ + enabled?: boolean; + /** @example true */ + invoice_enabled?: boolean; + /** + * @description The payment preference for auto recharge. + * @example credit_paypal + * @enum {string} + */ + preference?: 'credit_paypal' | 'ach'; + }; + AutoRechargePrefRequest: { + /** + * Format: decimal + * @description The threshold amount at which the account will be recharged. + * @example 104.00 + */ + threshold_amount?: string; + /** + * Format: decimal + * @description The amount to recharge the account, the actual recharge amount will be the amount necessary to reach the threshold amount plus the recharge amount. + * @example 104.00 + */ + recharge_amount?: string; + /** + * @description Whether auto recharge is enabled. + * @example true + */ + enabled?: boolean; + /** @example true */ + invoice_enabled?: boolean; + /** + * @description The payment preference for auto recharge. + * @example credit_paypal + * @enum {string} + */ + preference?: 'credit_paypal' | 'ach'; + }; + /** AutoRespConfigCreateSchema */ + AutoRespConfigCreateSchema: { + /** + * Op + * @enum {string} + */ + op: 'start' | 'stop' | 'info'; + /** + * Keywords + * @example [ + * "keyword1", + * "keyword2" + * ] + */ + keywords: string[]; + /** + * Resp Text + * @example Thank you for your message + */ + resp_text?: string; + /** + * Country Code + * @example US + */ + country_code: string; + }; + /** AutorespConfigResponseSchema */ + AutorespConfigResponseSchema: { + data: components['schemas']['AutorespConfigSchema']; + }; + /** AutorespConfigSchema */ + AutorespConfigSchema: { + /** + * Op + * @example start + * @enum {string} + */ + op: 'start' | 'stop' | 'info'; + /** + * Keywords + * @example [ + * "START", + * "BEGIN" + * ] + */ + keywords: string[]; + /** + * Resp Text + * @example Thank you for subscribing to our service. + */ + resp_text?: string; + /** + * Country Code + * @example * + */ + country_code: string; + /** + * Id + * @example b8f9c1c0-5b5a-4b1e-8c1c-0b5a4b1e8c1c + */ + id: string; + /** + * Created At + * Format: date-time + */ + created_at: string; + /** + * Updated At + * Format: date-time + */ + updated_at: string; + }; + /** + * AutorespConfigsResponseSchema + * @description List of Auto-Response Settings + */ + AutorespConfigsResponseSchema: { + /** Data */ + data: components['schemas']['AutorespConfigSchema'][]; + meta: components['schemas']['PaginationMeta']; + }; + /** @example { + * "record_type": "available_phone_number", + * "phone_number": "+19705555098", + * "vanity_format": "", + * "best_effort": false, + * "quickship": true, + * "reservable": true, + * "region_information": [ + * { + * "region_type": "country_code", + * "region_name": "US" + * } + * ], + * "cost_information": { + * "upfront_cost": "3.21", + * "monthly_cost": "6.54", + * "currency": "USD" + * }, + * "features": [ + * { + * "name": "sms" + * }, + * { + * "name": "voice" + * } + * ] + * } */ + AvailablePhoneNumber: { + /** + * @example available_phone_number + * @enum {string} + */ + record_type?: 'available_phone_number'; + /** @example +19705555098 */ + phone_number?: string; + vanity_format?: string; + /** + * @description Specifies whether the phone number is an exact match based on the search criteria or not. + * @example false + */ + best_effort?: boolean; + /** + * @description Specifies whether the phone number can receive calls immediately after purchase or not. + * @example true + */ + quickship?: boolean; + /** + * @description Specifies whether the phone number can be reserved before purchase or not. + * @example true + */ + reservable?: boolean; + region_information?: components['schemas']['RegionInformation'][]; + cost_information?: components['schemas']['CostInformation']; + features?: components['schemas']['Feature'][]; + }; + /** @example { + * "record_type": "available_phone_number_block", + * "phone_number": "+19705555000", + * "range": 10, + * "region_information": [ + * { + * "region_type": "country_code", + * "region_name": "US" + * } + * ], + * "cost_information": { + * "upfront_cost": "3.21", + * "monthly_cost": "6.54", + * "currency": "USD" + * }, + * "features": [ + * { + * "name": "sms" + * }, + * { + * "name": "voice" + * } + * ] + * } */ + AvailablePhoneNumberBlock: { + /** + * @example available_phone_number_block + * @enum {string} + */ + record_type?: 'available_phone_number_block'; + /** @example +19705555000 */ + starting_number?: string; + /** @example 10 */ + range?: number; + region_information?: components['schemas']['RegionInformation'][]; + cost_information?: components['schemas']['CostInformation']; + features?: components['schemas']['Feature'][]; + }; + /** @example { + * "total_results": 100, + * "best_effort_results": 50 + * } */ + AvailablePhoneNumbersMetadata: { + /** @example 1 */ + total_results?: number; + /** @example 0 */ + best_effort_results?: number; + }; + /** + * Available service + * @enum {string} + */ + AvailableService: + | 'cloud_vpn' + | 'private_wireless_gateway' + | 'virtual_cross_connect'; + /** + * @description AWS credentials access key id. + * @example AKIAIOSFODNN7EXAMPLE + */ + AwsAccessKeyId: string; + /** + * @description AWS secret access key. + * @example wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + */ + AwsSecretAccessKey: string; + /** + * @description Azure Blob Storage account key + * @example bPxRfiCYEXAMPLEKEY + */ + AzureAccountKey: string; + /** + * @description Azure Blob Storage account name + * @example my-account + */ + AzureAccountName: string; + /** Azure Blob Storage Configuration Data */ + AzureConfigurationData: { + bucket?: components['schemas']['Bucket']; + account_name?: components['schemas']['AzureAccountName']; + account_key?: components['schemas']['AzureAccountKey']; + }; + /** + * BackgroundTaskStatus + * @description Status of an embeddings task. + * @enum {string} + */ + BackgroundTaskStatus: + | 'queued' + | 'processing' + | 'success' + | 'failure' + | 'partial_success'; + /** BackgroundTasksQueryResponse */ + BackgroundTasksQueryResponse: { + /** User Id */ + user_id: string; + /** Task Id */ + task_id: string; + /** Task Name */ + task_name: string; + status: components['schemas']['BackgroundTaskStatus']; + /** + * Created At + * Format: date-time + */ + created_at: string; + /** + * Finished At + * Format: date-time + */ + finished_at?: string; + /** Bucket */ + bucket?: string; + }; + /** BackgroundTasksQueryResponseData */ + BackgroundTasksQueryResponseData: { + /** Data */ + data: components['schemas']['BackgroundTasksQueryResponse'][]; + }; + /** @example { + * "record_type": "billing_group", + * "id": "f5586561-8ff0-4291-a0ac-84fe544797bd", + * "organization_id": "f1486bae-f067-460c-ad43-73a92848f902", + * "name": "My billing group name", + * "created_at": "2019-10-15T10:07:15.527Z", + * "updated_at": "2019-10-15T10:07:15.527Z", + * "deleted_at": null + * } */ + BillingGroup: { + /** + * @description Identifies the type of the resource. + * @example billing_group + * @enum {string} + */ + record_type?: 'billing_group'; + /** + * Format: uuid + * @description Identifies the type of resource. + * @example f5586561-8ff0-4291-a0ac-84fe544797bd + */ + id?: string; + /** + * Format: uuid + * @description Identifies the organization that owns the resource. + * @example f1486bae-f067-460c-ad43-73a92848f902 + */ + organization_id?: string; + /** + * Format: string + * @description A user-specified name for the billing group + * @example My billing group name + */ + name?: string; + /** + * Format: date-time + * @description ISO 8601 formatted date indicating when the resource was created. + * @example 2019-10-15T10:07:15.527Z + */ + created_at?: string; + /** + * Format: date-time + * @description ISO 8601 formatted date indicating when the resource was updated. + * @example 2019-10-15T10:07:15.527Z + */ + updated_at?: string; + /** + * Format: date-time + * @description ISO 8601 formatted date indicating when the resource was removed. + * @example null + */ + deleted_at?: string; + }; + /** ListedBrand */ + BrandBasic: { + /** + * @description Unique identifier assigned to the brand. + * @example 4b206179-f731-8ab7-f19c-34e19d22ide9 + */ + brandId?: string; + /** + * @description Unique identifier assigned to the brand by the registry. + * @example BBRAND1 + */ + tcrBrandId?: string; + entityType?: components['schemas']['EntityType']; + identityStatus?: components['schemas']['BrandIdentityStatus']; + /** + * @description (Required for Non-profit/private/public) Legal company name. + * @example Example Company Inc. + */ + companyName?: string; + /** + * @description Display or marketing name of the brand. + * @example Example Company + */ + displayName?: string; + /** + * @description Valid email address of brand support contact. + * @example examplename@examplecompany.com + */ + email?: string; + /** + * @description Brand website URL. + * @example www.examplecompany.com + */ + website?: string; + /** + * failureReasons + * @description Failure reasons for brand + */ + failureReasons?: unknown; + /** + * status + * @description Status of the brand + * @enum {unknown} + */ + status?: 'OK' | 'REGISTRATION_PENDING' | 'REGISTRATION_FAILED'; + /** + * @description Date and time that the brand was created at. + * @example 2021-03-08T17:57:48.801186 + */ + createAt?: string; + /** + * @description Date and time that the brand was last updated at. + * @example 2021-03-08T17:57:48.801186 + */ + updatedAt?: string; + /** + * @description Number of campaigns associated with the brand + * @example 2 + */ + assignedCampaingsCount?: number; + }; + /** BrandFeedback */ + BrandFeedback: { + /** + * Brandid + * @description ID of the brand being queried about + * @example d88dd2aa-1bb9-4ef0-9ec8-1752b80316a5 + */ + brandId: string; + /** + * Category + * @description A list of reasons why brand creation/revetting didn't go as planned + */ + category: components['schemas']['BrandFeedbackCategory'][]; + }; + /** BrandFeedbackCategory */ + BrandFeedbackCategory: { + /** + * Id + * @description One of `TAX_ID`, `STOCK_SYMBOL`, `GOVERNMENT_ENTITY`, `NONPROFIT`, and `OTHERS` + * @example TAX_ID + */ + id: string; + /** + * Displayname + * @description Human-readable version of the `id` field + * @example Tax Id + */ + displayName: string; + /** + * Description + * @description Long-form description of the feedback with additional information + * @example Tax Id does not match with the company name or business type. + */ + description: string; + /** + * Fields + * @description List of relevant fields in the originally-submitted brand json + * @example [ + * "ein", + * "companyName", + * "entityType" + * ] + */ + fields: string[]; + }; + /** + * BrandIdentityStatus + * @description The verification status of an active brand + * @enum {unknown} + */ + BrandIdentityStatus: + | 'VERIFIED' + | 'UNVERIFIED' + | 'SELF_DECLARED' + | 'VETTED_VERIFIED'; + /** BrandOptionalAttributes */ + BrandOptionalAttributes: { + /** + * Taxexemptstatus + * @description The tax exempt status of the brand + */ + taxExemptStatus?: string; + }; + /** BrandRecordSetCSP */ + BrandRecordSetCSP: { + /** Records */ + records?: components['schemas']['BrandBasic'][]; + /** + * Page + * @example 1 + */ + page?: number; + /** + * Totalrecords + * @example 1 + */ + totalRecords?: number; + }; + /** + * BrandRelationship + * @description Brand relationship to the CSP. + * @enum {unknown} + */ + BrandRelationship: + | 'BASIC_ACCOUNT' + | 'SMALL_ACCOUNT' + | 'MEDIUM_ACCOUNT' + | 'LARGE_ACCOUNT' + | 'KEY_ACCOUNT'; + /** Brand */ + BrandRequest: { + entityType: components['schemas']['EntityType']; + /** + * Cspid + * @description Unique identifier assigned to the csp by the registry. + */ + cspId?: string; + /** + * Brandid + * @description Unique identifier assigned to the brand. + * @example 4b206179-f731-8ab7-f19c-34e19d22ide9 + */ + brandId?: string; + /** + * Displayname + * @description Display or marketing name of the brand. + * @example Example Company + */ + displayName: string; + /** + * Companyname + * @description (Required for Non-profit/private/public) Legal company name. + * @example Example Company Inc. + */ + companyName?: string; + /** + * Ein + * @description (Required for Non-profit/private/public) Government assigned corporate tax ID. EIN is 9-digits in U.S. The only entity type which does not require an EIN is a Sole Proprietor. + * @example 142536893 + */ + ein?: string; + /** + * Phone + * @description Valid phone number in e.164 international format. + * @example +13259390512 + */ + phone?: string; + /** + * Street + * @description Street number and name. + * @example 123 Example St. + */ + street?: string; + /** + * City + * @description City name + * @example Chicago + */ + city?: string; + /** + * State + * @description State. Must be 2 letters code for United States. + * @example IL + */ + state?: string; + /** + * Postalcode + * @description Postal codes. Use 5 digit zipcode for United States + * @example 60654 + */ + postalCode?: string; + /** + * Country + * @description ISO2 2 characters country code. Example: US - United States + * @example US + */ + country: string; + /** + * Email + * @description Valid email address of brand support contact. + * @example examplename@examplecompany.com + */ + email: string; + /** + * Stocksymbol + * @description (Required for public company) stock symbol. + * @example ABC + */ + stockSymbol?: string; + stockExchange?: components['schemas']['StockExchange']; + /** + * Ipaddress + * @description IP address of the browser requesting to create brand identity. + */ + ipAddress?: string; + /** + * Website + * @description Brand website URL. + * @example www.examplecompany.com + */ + website?: string; + vertical: components['schemas']['Vertical']; + /** + * Altbusinessid + * @description Alternate business identifier such as DUNS, LEI, or GIIN + */ + altBusinessId?: string; + altBusinessIdType?: components['schemas']['AltBusinessIdType']; + /** + * Universalein + * @description Universal EIN of Brand, Read Only. + */ + universalEin?: string; + }; + /** Brand */ + BrandResponse: { + entityType: components['schemas']['EntityType']; + /** + * Cspid + * @description Unique identifier assigned to the csp by the registry. + */ + cspId?: string; + /** + * Brandid + * @description Unique identifier assigned to the brand. + * @example 4b206179-f731-8ab7-f19c-34e19d22ide9 + */ + brandId?: string; + /** + * Displayname + * @description Display or marketing name of the brand. + * @example Example Company + */ + displayName: string; + /** + * Companyname + * @description (Required for Non-profit/private/public) Legal company name. + * @example Example Company Inc. + */ + companyName?: string; + /** + * Ein + * @description (Required for Non-profit/private/public) Government assigned corporate tax ID. EIN is 9-digits in U.S. The only entity type which does not require an EIN is a Sole Proprietor. + * @example 142536893 + */ + ein?: string; + /** + * Phone + * @description Valid phone number in e.164 international format. + * @example +13259390512 + */ + phone?: string; + /** + * Street + * @description Street number and name. + * @example 123 Example St. + */ + street?: string; + /** + * City + * @description City name + * @example Chicago + */ + city?: string; + /** + * State + * @description State. Must be 2 letters code for United States. + * @example IL + */ + state?: string; + /** + * Postalcode + * @description Postal codes. Use 5 digit zipcode for United States + * @example 60654 + */ + postalCode?: string; + /** + * Country + * @description ISO2 2 characters country code. Example: US - United States + * @example US + */ + country: string; + /** + * Email + * @description Valid email address of brand support contact. + * @example examplename@examplecompany.com + */ + email: string; + /** + * Stocksymbol + * @description (Required for public company) stock symbol. + * @example ABC + */ + stockSymbol?: string; + stockExchange?: components['schemas']['StockExchange']; + /** + * Ipaddress + * @description IP address of the browser requesting to create brand identity. + */ + ipAddress?: string; + /** + * Website + * @description Brand website URL. + * @example www.examplecompany.com + */ + website?: string; + brandRelationship?: components['schemas']['BrandRelationship']; + vertical: components['schemas']['Vertical']; + /** + * Altbusinessid + * @description Alternate business identifier such as DUNS, LEI, or GIIN + */ + altBusinessId?: string; + altBusinessIdType?: components['schemas']['AltBusinessIdType']; + /** + * Universalein + * @description Universal EIN of Brand, Read Only. + */ + universalEin?: string; + /** + * identityStatus + * @description TCR assessment of the brand identification status. + * @example VERIFIED + */ + identityStatus?: string; + }; + /** BrandStatus */ + BrandStatus: { + /** + * Displayname + * @description The display name of the brand submitted via bulk creation. + * @example John's Donuts + */ + displayName: string; + /** + * @description The current status of the brand. + * @example pending + */ + status: components['schemas']['CreationStatus']; + /** + * Brandid + * @description The ID of the brand created via bulk creation. This brand will only have a brandId after the brand has been created. + * @example 4b20017a-2f50-4c90-c9e6-5f67304cbde9 + */ + brandId?: string; + /** + * Created At + * Format: date-time + * @description The date and time that the brand was created. + * @example 2021-06-30T10:49:04-07:00 + */ + created_at?: string; + /** + * Error + * @description Errors related to a brand creation failure. + * @example Missing firstName attribute. + */ + error?: string; + }; + /** + * Bridge Request + * @example { + * "call_control_id": "v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg", + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + * "command_id": "891510ac-f3e4-11e8-af5b-de00688a4901", + * "park_after_unbridge": "self" + * } + */ + BridgeRequest: { + /** + * @description The Call Control ID of the call you want to bridge with, can't be used together with queue parameter or video_room_id parameter. + * @example v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg + */ + call_control_id: string; + /** + * @description Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + /** + * @description Use this field to avoid duplicate commands. Telnyx will ignore any command with the same `command_id` for the same `call_control_id`. + * @example 891510ac-f3e4-11e8-af5b-de00688a4901 + */ + command_id?: string; + /** + * @description The name of the queue you want to bridge with, can't be used together with call_control_id parameter or video_room_id parameter. Bridging with a queue means bridging with the first call in the queue. The call will always be removed from the queue regardless of whether bridging succeeds. Returns an error when the queue is empty. + * @example support + */ + queue?: string; + /** + * Format: uuid + * @description The ID of the video room you want to bridge with, can't be used together with call_control_id parameter or queue parameter. + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + */ + video_room_id?: string; + /** + * @description The additional parameter that will be passed to the video conference. It is a text field and the user can decide how to use it. For example, you can set the participant name or pass JSON text. It can be used only with video_room_id parameter. + * @example Alice + */ + video_room_context?: string; + /** + * @description Specifies behavior after the bridge ends (i.e. the opposite leg either hangs up or is transferred). If supplied with the value `self`, the current leg will be parked after unbridge. If not set, the default behavior is to hang up the leg. + * @example self + */ + park_after_unbridge?: string; + /** + * @description Specifies whether to play a ringtone if the call you want to bridge with has not yet been answered. + * @default false + * @example true + */ + play_ringtone: boolean; + }; + /** + * @description Name of the bucket to be used to store recording files. + * @example example-bucket + */ + Bucket: string; + BucketAPIUsageResponse: { + categories?: components['schemas']['BucketOps'][]; + total?: components['schemas']['BucketOpsTotal']; + /** + * Format: date-time + * @description The time the usage was recorded + * @example 2020-01-01T00:00:00Z + */ + timestamp?: string; + }; + /** BucketIds */ + BucketIds: { + /** Bucket Ids */ + bucket_ids: string[]; + /** @description The maximum number of results to retrieve as context for the language model. */ + max_num_results?: number; + }; + /** HTTPValidationError */ + BucketNotFoundError: { + /** Detail */ + detail?: components['schemas']['NotFoundError'][]; + }; + BucketOps: { + /** + * @description The number of bytes sent + * @example 123456 + */ + bytes_sent?: number; + /** + * @description The number of bytes received + * @example 123456 + */ + bytes_received?: number; + /** + * @description The number of operations + * @example 123456 + */ + ops?: number; + /** + * @description The number of successful operations + * @example 123456 + */ + successful_ops?: number; + /** + * @description The category of the bucket operation + * @example put_obj + * @enum {string} + */ + category?: + | 'list_bucket' + | 'list_buckets' + | 'get-bucket_location' + | 'create_bucket' + | 'stat_bucket' + | 'get_bucket_versioning' + | 'set_bucket_versioning' + | 'get_obj' + | 'put_obj' + | 'delete_obj'; + }; + BucketOpsTotal: { + /** + * @description The number of bytes sent + * @example 123456 + */ + bytes_sent?: number; + /** + * @description The number of bytes received + * @example 123456 + */ + bytes_received?: number; + /** + * @description The number of operations + * @example 123456 + */ + ops?: number; + /** + * @description The number of successful operations + * @example 123456 + */ + successful_ops?: number; + }; + BucketUsage: { + /** + * @description The size of the bucket in bytes + * @example 123456 + */ + size?: number; + /** + * @description The size of the bucket in kilobytes + * @example 123456 + */ + size_kb?: number; + /** + * @description The number of objects in the bucket + * @example 123456 + */ + num_objects?: number; + /** + * Format: date-time + * @description The time the snapshot was taken + * @example 2020-01-01T00:00:00Z + */ + timestamp?: string; + }; + /** + * Bulk Credential Request + * @example { + * "name": "Default Name", + * "tag": "My Credentials", + * "connection_id": "804252963366242252" + * } + */ + BulkCredentialRequest: { + /** + * @description A default name for all credentials. + * @example Default Credentials + */ + name?: string; + /** + * @description Tags a credential for bulk operations. A single tag can hold at maximum 1000 credentials. + * @example My Credentials + */ + tag: string; + /** + * @description Amount of credentials to be created. A single tag can hold at maximum 1000 credentials + * @example 100 + */ + amount?: number; + /** + * @description Identifies the connection this credential is associated with. + * @example 1234567890 + */ + connection_id: string; + }; + /** @example { + * "record_type": "messaging_numbers_bulk_update", + * "order_id": "00000000-0000-0000-0000-000000000000", + * "success": [ + * "+18880000000", + * "+18880000001", + * "+18880000002" + * ], + * "pending": [], + * "failed": [] + * } */ + BulkMessagingSettingsUpdatePhoneNumbers: { + /** + * @description Identifies the type of the resource. + * @example messaging_numbers_bulk_update + * @enum {string} + */ + readonly record_type?: 'messaging_numbers_bulk_update'; + /** + * Format: uuid + * @description Order ID to verify bulk update status. + */ + readonly order_id?: string; + /** @description Phoned numbers updated successfully. */ + success?: string[]; + /** @description Phone numbers pending to be updated. */ + pending?: string[]; + /** @description Phone numbers that failed to update. */ + failed?: string[]; + }; + /** @example { + * "messaging_profile_id": "00000000-0000-0000-0000-000000000000", + * "numbers": [ + * "+18880000000", + * "+18880000001", + * "+18880000002" + * ] + * } */ + BulkMessagingSettingsUpdatePhoneNumbersRequest: { + /** @description Configure the messaging profile these phone numbers are assigned to: + * + * * Set this field to `""` to unassign each number from their respective messaging profile + * * Set this field to a quoted UUID of a messaging profile to assign these numbers to that messaging profile */ + messaging_profile_id: string; + /** @description The list of phone numbers to update. */ + numbers: string[]; + }; + /** @description This object represents a bulk SIM card action. It groups SIM card actions created through a bulk endpoint under a single resource for further lookup. */ + BulkSIMCardAction: { + id?: components['schemas']['Id']; + /** @example bulk_sim_card_action */ + readonly record_type?: string; + /** + * @description The operation type. It can be one of the following:
+ *
    + *
  • bulk_set_public_ips - set a public IP for each specified SIM card.
  • + *
+ * @example bulk_set_public_ips + * @enum {string} + */ + readonly action_type?: 'bulk_set_public_ips'; + /** + * @description A JSON object representation of the bulk action payload. + * @example {} + */ + readonly settings?: Record; + created_at?: components['schemas']['CreatedAt']; + updated_at?: components['schemas']['UpdatedAt']; + }; + BulkSIMCardActionDetailed: { + id?: components['schemas']['Id']; + /** @example bulk_sim_card_action */ + readonly record_type?: string; + /** + * @description The operation type. It can be one of the following:
+ *
    + *
  • bulk_set_public_ips - set a public IP for each specified SIM card.
  • + *
+ * @example bulk_set_public_ips + * @enum {string} + */ + readonly action_type?: 'bulk_set_public_ips'; + /** + * @description A JSON object representation of the bulk action payload. + * @example {} + */ + readonly settings?: Record; + sim_card_actions_summary?: components['schemas']['SIMCardActionsSummary'][]; + created_at?: components['schemas']['CreatedAt']; + updated_at?: components['schemas']['UpdatedAt']; + }; + /** + * Call + * @example { + * "call_control_id": "v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg", + * "call_leg_id": "2dc6fc34-f9e0-11ea-b68e-02420a0f7768", + * "call_session_id": "2dc1b3c8-f9e0-11ea-bc5a-02420a0f7768", + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + * "is_alive": false, + * "call_duration": 50, + * "record_type": "call" + * } + */ + Call: { + /** + * @example call + * @enum {string} + */ + record_type: 'call'; + /** + * @description ID that is unique to the call session and can be used to correlate webhook events. Call session is a group of related call legs that logically belong to the same phone call, e.g. an inbound and outbound leg of a transferred call + * @example 428c31b6-7af4-4bcb-b68e-5013ef9657c1 + */ + call_session_id: string; + /** + * @description ID that is unique to the call and can be used to correlate webhook events + * @example 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + */ + call_leg_id: string; + /** + * @description Unique identifier and token for controlling the call. + * @example v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg + */ + call_control_id: string; + /** + * @description Indicates whether the call is alive or not. For Dial command it will always be `false` (dialing is asynchronous). + * @example true + */ + is_alive: boolean; + /** + * @description State received from a command. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + /** + * @description Indicates the duration of the call in seconds + * @example 50 + */ + call_duration?: number; + }; + /** + * Call AI Gather Ended + * @example { + * "record_type": "event", + * "event_type": "call.ai_gather.ended", + * "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + * "occurred_at": "2018-02-02T22:25:27.521992Z", + * "payload": { + * "call_control_id": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ", + * "connection_id": "7267xxxxxxxxxxxxxx", + * "call_leg_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + * "call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + * "from": "+35319605860", + * "to": "+35319605860", + * "status": "valid", + * "message_history": [ + * { + * "content": "Hello, can you tell me your age and where you live?", + * "role": "assistant" + * }, + * { + * "content": "Hello, I'm 29 and I live in Paris?", + * "role": "user" + * } + * ], + * "result": { + * "age": 29, + * "city": "Paris" + * } + * } + * } + */ + CallAIGatherEnded: { + /** + * @description Identifies the type of the resource. + * @example event + * @enum {string} + */ + record_type?: 'event'; + /** + * @description The type of event being delivered. + * @example call.ai_gather.ended + * @enum {string} + */ + event_type?: 'call.ai_gather.ended'; + /** + * Format: uuid + * @description Identifies the type of resource. + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + */ + id?: string; + /** + * Format: date-time + * @description ISO 8601 datetime of when the event occurred. + * @example 2018-02-02T22:25:27.521992Z + */ + occurred_at?: string; + payload?: { + /** + * @description Call ID used to issue commands via Call Control API. + * @example v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ + */ + call_control_id?: string; + /** + * @description Telnyx connection ID used in the call. + * @example 7267xxxxxxxxxxxxxx + */ + connection_id?: string; + /** + * @description ID that is unique to the call and can be used to correlate webhook events. + * @example 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + */ + call_leg_id?: string; + /** + * @description ID that is unique to the call session and can be used to correlate webhook events. Call session is a group of related call legs that logically belong to the same phone call, e.g. an inbound and outbound leg of a transferred call. + * @example 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + */ + call_session_id?: string; + /** + * @description State received from a command. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + /** + * @description Number or SIP URI placing the call. + * @example +35319605860 + */ + from?: string; + /** + * @description Destination number or SIP URI of the call. + * @example +13129457420 + */ + to?: string; + /** @description The history of the messages exchanged during the AI gather */ + message_history?: { + /** + * @description The content of the message + * @example Hello, I'm 29 and I live in Paris. + */ + content?: string; + /** + * @description The role of the message sender + * @example user + * @enum {string} + */ + role?: 'assistant' | 'user'; + }[]; + /** + * @description The result of the AI gather, its type depends of the `parameters` provided in the command + * @example { + * "age": 29, + * "city": "Paris" + * } + */ + result?: Record; + /** + * @description Reflects how command ended. + * @example valid + * @enum {string} + */ + status?: 'valid' | 'invalid'; + }; + }; + /** Call AI Gather Ended Event */ + CallAIGatherEndedEvent: { + data?: components['schemas']['CallAIGatherEnded']; + }; + /** + * Call Answered + * @example { + * "record_type": "event", + * "event_type": "call.answered", + * "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + * "occurred_at": "2018-02-02T22:25:27.521992Z", + * "payload": { + * "call_control_id": "v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg", + * "connection_id": "7267xxxxxxxxxxxxxx", + * "call_leg_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + * "call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + * "from": "+35319605860", + * "to": "+35319605860", + * "start_time": "2018-02-02T22:25:27.521992Z", + * "state": "answered" + * } + * } + */ + CallAnswered: { + /** + * @description Identifies the type of the resource. + * @example event + * @enum {string} + */ + record_type?: 'event'; + /** + * @description The type of event being delivered. + * @example call.answered + * @enum {string} + */ + event_type?: 'call.answered'; + /** + * Format: uuid + * @description Identifies the type of resource. + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + */ + id?: string; + /** + * Format: date-time + * @description ISO 8601 datetime of when the event occurred. + * @example 2018-02-02T22:25:27.521992Z + */ + occurred_at?: string; + payload?: { + /** + * @description Call ID used to issue commands via Call Control API. + * @example v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg + */ + call_control_id?: string; + /** + * @description Call Control App ID (formerly Telnyx connection ID) used in the call. + * @example 7267xxxxxxxxxxxxxx + */ + connection_id?: string; + /** + * @description ID that is unique to the call and can be used to correlate webhook events. + * @example 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + */ + call_leg_id?: string; + /** + * @description ID that is unique to the call session and can be used to correlate webhook events. Call session is a group of related call legs that logically belong to the same phone call, e.g. an inbound and outbound leg of a transferred call. + * @example 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + */ + call_session_id?: string; + /** + * @description State received from a command. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + /** + * @description Custom headers set on answer command + * @example [ + * { + * "name": "head_1", + * "value": "val_1" + * }, + * { + * "name": "head_2", + * "value": "val_2" + * } + * ] + */ + custom_headers?: components['schemas']['CustomSipHeader'][]; + /** + * @description Number or SIP URI placing the call. + * @example +35319605860 + */ + from?: string; + /** + * @description Destination number or SIP URI of the call. + * @example +13129457420 + */ + to?: string; + /** + * Format: date-time + * @description ISO 8601 datetime of when the call started. + * @example 2018-02-02T22:20:27.521992Z + */ + start_time?: string; + /** + * @description State received from a command. + * @example answered + * @enum {string} + */ + state?: 'answered'; + }; + }; + /** Call Answered Event */ + CallAnsweredEvent: { + data?: components['schemas']['CallAnswered']; + }; + /** + * Call Bridged + * @example { + * "record_type": "event", + * "event_type": "call.bridged", + * "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + * "occurred_at": "2018-02-02T22:25:27.521992Z", + * "payload": { + * "call_control_id": "v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg", + * "connection_id": "7267xxxxxxxxxxxxxx", + * "call_leg_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + * "call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + * "from": "+35319605860", + * "to": "+35319605860", + * "state": "bridged" + * } + * } + */ + CallBridged: { + /** + * @description Identifies the type of the resource. + * @example event + * @enum {string} + */ + record_type?: 'event'; + /** + * @description The type of event being delivered. + * @example call.bridged + * @enum {string} + */ + event_type?: 'call.bridged'; + /** + * Format: uuid + * @description Identifies the type of resource. + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + */ + id?: string; + /** + * Format: date-time + * @description ISO 8601 datetime of when the event occurred. + * @example 2018-02-02T22:25:27.521992Z + */ + occurred_at?: string; + payload?: { + /** + * @description Call ID used to issue commands via Call Control API. + * @example v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg + */ + call_control_id?: string; + /** + * @description Call Control App ID (formerly Telnyx connection ID) used in the call. + * @example 7267xxxxxxxxxxxxxx + */ + connection_id?: string; + /** + * @description ID that is unique to the call and can be used to correlate webhook events. + * @example 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + */ + call_leg_id?: string; + /** + * @description ID that is unique to the call session and can be used to correlate webhook events. Call session is a group of related call legs that logically belong to the same phone call, e.g. an inbound and outbound leg of a transferred call. + * @example 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + */ + call_session_id?: string; + /** + * @description State received from a command. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + /** + * @description Number or SIP URI placing the call. + * @example +35319605860 + */ + from?: string; + /** + * @description Destination number or SIP URI of the call. + * @example +13129457420 + */ + to?: string; + /** + * @description State received from a command. + * @example bridged + * @enum {string} + */ + state?: 'bridged'; + }; + }; + /** Call Bridged Event */ + CallBridgedEvent: { + data?: components['schemas']['CallBridged']; + }; + /** + * Call Control Application + * @example { + * "active": false, + * "anchorsite_override": "\"Latency\"", + * "application_name": "call-router", + * "created_at": "2018-02-02T22:25:27.521Z", + * "dtmf_type": "Inband", + * "first_command_timeout": true, + * "first_command_timeout_secs": 10, + * "id": "1293384261075731499", + * "inbound": { + * "channel_limit": 10, + * "shaken_stir_enabled": true, + * "sip_subdomain": "example", + * "sip_subdomain_receive_settings": "only_my_connections" + * }, + * "outbound": { + * "channel_limit": 10, + * "outbound_voice_profile_id": "1293384261075731499" + * }, + * "record_type": "call_control_application", + * "updated_at": "2018-02-02T22:25:27.521Z", + * "webhook_api_version": "1", + * "webhook_event_failover_url": "https://failover.example.com", + * "webhook_event_url": "https://example.com", + * "webhook_timeout_secs": 25 + * } + */ + CallControlApplication: { + /** + * @description Specifies whether the connection can be used. + * @default true + */ + active: boolean; + /** + * @description `Latency` directs Telnyx to route media through the site with the lowest round-trip time to the user's connection. Telnyx calculates this time using ICMP ping messages. This can be disabled by specifying a site to handle all media. + * + * @default "Latency" + * @example "Amsterdam, Netherlands" + * @enum {string} + */ + anchorsite_override: + | '"Latency"' + | '"Chicago, IL"' + | '"Ashburn, VA"' + | '"San Jose, CA"'; + /** + * @description A user-assigned name to help manage the application. + * @example call-router + */ + application_name?: string; + /** + * @description ISO 8601 formatted date of when the resource was created + * @example 2018-02-02T22:25:27.521Z + */ + created_at?: string; + /** + * @description Sets the type of DTMF digits sent from Telnyx to this Connection. Note that DTMF digits sent to Telnyx will be accepted in all formats. + * @default RFC 2833 + * @example Inband + * @enum {string} + */ + dtmf_type: 'RFC 2833' | 'Inband' | 'SIP INFO'; + /** + * @description Specifies whether calls to phone numbers associated with this connection should hangup after timing out. + * @default false + * @example true + */ + first_command_timeout: boolean; + /** + * @description Specifies how many seconds to wait before timing out a dial command. + * @default 30 + * @example 10 + */ + first_command_timeout_secs: number; + /** + * Format: int64 + * @example 1293384261075731499 + */ + id?: string; + inbound?: components['schemas']['CallControlApplicationInbound']; + outbound?: components['schemas']['CallControlApplicationOutbound']; + /** + * @default call_control_application + * @enum {string} + */ + record_type: 'call_control_application'; + /** + * @description ISO 8601 formatted date of when the resource was last updated + * @example 2018-02-02T22:25:27.521Z + */ + updated_at?: string; + /** + * @description Determines which webhook format will be used, Telnyx API v1 or v2. + * @default 1 + * @example 1 + * @enum {string} + */ + webhook_api_version: '1' | '2'; + /** + * Format: url + * @description The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails. Must include a scheme, such as `https`. + * @default + * @example https://failover.example.com + */ + webhook_event_failover_url: string | null; + /** + * Format: url + * @description The URL where webhooks related to this connection will be sent. Must include a scheme, such as `https`. + * @example https://example.com + */ + webhook_event_url?: string; + /** + * @default null + * @example 25 + */ + webhook_timeout_secs: number | null; + }; + /** Call Control Application Inbound */ + CallControlApplicationInbound: { + /** + * @description When set, this will limit the total number of inbound calls to phone numbers associated with this connection. + * @default null + * @example 10 + */ + channel_limit: number; + /** + * @description When enabled Telnyx will include Shaken/Stir data in the Webhook for new inbound calls. + * @default false + * @example false + */ + shaken_stir_enabled: boolean; + /** + * @description Specifies a subdomain that can be used to receive Inbound calls to a Connection, in the same way a phone number is used, from a SIP endpoint. Example: the subdomain "example.sip.telnyx.com" can be called from any SIP endpoint by using the SIP URI "sip:@example.sip.telnyx.com" where the user part can be any alphanumeric value. Please note TLS encrypted calls are not allowed for subdomain calls. + * @default null + * @example example + */ + sip_subdomain: string; + /** + * @description This option can be enabled to receive calls from: "Anyone" (any SIP endpoint in the public Internet) or "Only my connections" (any connection assigned to the same Telnyx user). + * @default from_anyone + * @example only_my_connections + * @enum {string} + */ + sip_subdomain_receive_settings: 'only_my_connections' | 'from_anyone'; + }; + /** Call Control Application Outbound */ + CallControlApplicationOutbound: { + /** + * @description When set, this will limit the total number of outbound calls to phone numbers associated with this connection. + * @default null + * @example 10 + */ + channel_limit: number; + /** + * Format: int64 + * @description Identifies the associated outbound voice profile. + * @example 1293384261075731499 + */ + outbound_voice_profile_id?: string; + }; + /** + * Call Control Command Result + * @example { + * "result": "ok" + * } + */ + CallControlCommandResult: { + /** @example ok */ + result?: string; + }; + /** @example v3:KBnLO0ZK3DhKM5s7bE9VluaSmKsOchKht_fUYvxcp8ysbmzCCtpkmA */ + CallControlId: string; + /** Call Cost Received Event */ + CallCost: { + /** + * @description Identifies the type of resource. + * @example event + * @enum {string} + */ + record_type?: 'event'; + /** + * @description The type of the event being delivered + * @example call.cost + * @enum {string} + */ + event_type?: 'call.cost'; + /** + * Format: uuid + * @description Uniquely identifies a webhook + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + */ + id?: string; + /** + * Format: date-time + * @description ISO 8601 datetime of when the event occurred. + * @example 2018-02-02T22:25:27.521992Z + */ + occurred_at?: string; + meta?: { + meta?: { + /** + * @description The number of attempts made to deliver the webhook + * @example 1 + */ + attempt?: number; + /** + * @description The URL where webhook was sent + * @example https://example.com + */ + delivered_to?: string; + }; + }; + payload?: { + /** + * @description The number of seconds for which this call will be billed + * @example 0 + */ + billed_duration_secs?: number; + /** + * @description Call ID used to issue commands via Call Control API. + * @example v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg + */ + call_control_id?: string; + /** + * @description ID that is unique to the call and can be used to correlate webhook events. + * @example 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + */ + call_leg_id?: string; + /** + * @description ID that is unique to the call session and can be used to correlate webhook events. Call session is a group of related call legs that logically belong to the same phone call, e.g. an inbound and outbound leg of a transferred call. + * @example 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + */ + call_session_id?: string; + /** + * @description State received from a command. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + /** + * @description Identifies the type of resource. + * @example 7267xxxxxxxxxxxxxx + */ + connection_id?: string; + cost_parts?: { + /** + * @description The number of seconds for which this item will be billed + * @example 0 + */ + billed_duration_secs?: number; + /** + * @description The service incurring a charge + * @example call-control + */ + call_part?: string; + /** + * @description The billed cost of the item, in currency shown in the `currency` field + * @example 0 + */ + cost?: number; + /** + * @description The currency in which `cost` is measured + * @example USD + */ + currency?: string; + /** + * @description The cost per unit of the item incurring a charge + * @example 0.001 + */ + rate?: number; + }[]; + /** + * @description The billed cost of the call + * @example 0 + */ + total_cost?: number; + /** + * @description Reflects how command ended. + * @example valid + * @enum {string} + */ + status?: + | 'valid' + | 'invalid' + | 'call_hangup' + | 'cancelled' + | 'cancelled_amd'; + }; + }; + /** + * Call DTMF Received + * @example { + * "record_type": "event", + * "event_type": "call.dtmf.received", + * "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + * "occurred_at": "2018-02-02T22:25:27.521992Z", + * "payload": { + * "call_control_id": "v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg", + * "connection_id": "7267xxxxxxxxxxxxxx", + * "call_leg_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + * "call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + * "from": "+35319605860", + * "to": "+35319605860", + * "digit": "#" + * } + * } + */ + CallDtmfReceived: { + /** + * @description Identifies the type of the resource. + * @example event + * @enum {string} + */ + record_type?: 'event'; + /** + * @description The type of event being delivered. + * @example call.dtmf.received + * @enum {string} + */ + event_type?: 'call.dtmf.received'; + /** + * Format: uuid + * @description Identifies the type of resource. + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + */ + id?: string; + /** + * Format: date-time + * @description ISO 8601 datetime of when the event occurred. + * @example 2018-02-02T22:25:27.521992Z + */ + occurred_at?: string; + payload?: { + /** + * @description Call ID used to issue commands via Call Control API. + * @example v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg + */ + call_control_id?: string; + /** + * @description Identifies the type of resource. + * @example 7267xxxxxxxxxxxxxx + */ + connection_id?: string; + /** + * @description ID that is unique to the call and can be used to correlate webhook events. + * @example 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + */ + call_leg_id?: string; + /** + * @description ID that is unique to the call session and can be used to correlate webhook events. Call session is a group of related call legs that logically belong to the same phone call, e.g. an inbound and outbound leg of a transferred call. + * @example 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + */ + call_session_id?: string; + /** + * @description State received from a command. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + /** + * @description Number or SIP URI placing the call. + * @example +35319605860 + */ + from?: string; + /** + * @description Destination number or SIP URI of the call. + * @example +13129457420 + */ + to?: string; + /** + * @description The received DTMF digit or symbol. + * @example # + */ + digit?: string; + }; + }; + /** Call DTMF Received Event */ + CallDtmfReceivedEvent: { + data?: components['schemas']['CallDtmfReceived']; + }; + /** + * Call Enqueued + * @example { + * "record_type": "event", + * "event_type": "call.enqueued", + * "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + * "occurred_at": "2018-02-02T22:25:27.521992Z", + * "payload": { + * "call_control_id": "v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg", + * "connection_id": "7267xxxxxxxxxxxxxx", + * "call_leg_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + * "call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + * "queue": "support", + * "current_position": 5 + * } + * } + */ + CallEnqueued: { + /** + * @description Identifies the type of the resource. + * @example event + * @enum {string} + */ + record_type?: 'event'; + /** + * @description The type of event being delivered. + * @example call.enqueued + * @enum {string} + */ + event_type?: 'call.enqueued'; + /** + * Format: uuid + * @description Identifies the type of resource. + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + */ + id?: string; + /** + * Format: date-time + * @description ISO 8601 datetime of when the event occurred. + * @example 2018-02-02T22:25:27.521992Z + */ + occurred_at?: string; + payload?: { + /** + * @description Call ID used to issue commands via Call Control API. + * @example v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg + */ + call_control_id?: string; + /** + * @description Call Control App ID (formerly Telnyx connection ID) used in the call. + * @example 7267xxxxxxxxxxxxxx + */ + connection_id?: string; + /** + * @description ID that is unique to the call and can be used to correlate webhook events. + * @example 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + */ + call_leg_id?: string; + /** + * @description ID that is unique to the call session and can be used to correlate webhook events. Call session is a group of related call legs that logically belong to the same phone call, e.g. an inbound and outbound leg of a transferred call. + * @example 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + */ + call_session_id?: string; + /** + * @description State received from a command. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + /** + * @description The name of the queue + * @example support + */ + queue?: string; + /** + * @description Current position of the call in the queue. + * @example 7 + */ + current_position?: number; + }; + }; + /** Call Enqueued Event */ + CallEnqueuedEvent: { + data?: components['schemas']['CallEnqueued']; + }; + /** + * Call Event + * @example { + * "record_type": "call_event", + * "call_leg_id": "308fe500-5213-11e9-ace7-02420a0f0668", + * "call_session_id": "308fec30-5213-11e9-9d3f-02420a0f0668", + * "event_timestamp": "2019-03-29T11:10:19.127783Z", + * "name": "call.hangup", + * "type": "webhook", + * "metadata": {} + * } + */ + CallEvent: { + /** + * @example call_event + * @enum {string} + */ + record_type: 'call_event'; + /** + * @description Uniquely identifies an individual call leg. + * @example 308fe500-5213-11e9-ace7-02420a0f0668 + */ + call_leg_id: string; + /** + * @description Uniquely identifies the call control session. A session may include multiple call leg events. + * @example 308fec30-5213-11e9-9d3f-02420a0f0668 + */ + call_session_id: string; + /** + * @description Event timestamp + * @example 2019-03-29T11:10:19.127783Z + */ + event_timestamp: string; + /** + * @description Event name + * @example call.hangup + */ + name: string; + /** + * @description Event type + * @example webhook + * @enum {string} + */ + type: 'command' | 'webhook'; + /** @description Event metadata, which includes raw event, and extra information based on event type */ + metadata: Record; + }; + /** + * Call Fork Started + * @example { + * "record_type": "event", + * "event_type": "call.fork.started", + * "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + * "occurred_at": "2018-02-02T22:25:27.521992Z", + * "payload": { + * "connection_id": "7267xxxxxxxxxxxxxx", + * "call_control_id": "v2:OycMASgvIjsGIAVEx8x3n9rYeKnUJx6a3V8VGhs5futnr17KZhujZA", + * "call_leg_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + * "call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + * "stream_type": "decrypted" + * } + * } + */ + CallForkStarted: { + /** + * @description Identifies the type of the resource. + * @example event + * @enum {string} + */ + record_type?: 'event'; + /** + * @description The type of event being delivered. + * @example call.fork.started + * @enum {string} + */ + event_type?: 'call.fork.started'; + /** + * Format: uuid + * @description Identifies the type of resource. + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + */ + id?: string; + /** + * Format: date-time + * @description ISO 8601 datetime of when the event occurred. + * @example 2018-02-02T22:25:27.521992Z + */ + occurred_at?: string; + payload?: { + /** + * @description Call Control App ID (formerly Telnyx connection ID) used in the call. + * @example 7267xxxxxxxxxxxxxx + */ + connection_id?: string; + /** + * @description Unique ID for controlling the call. + * @example v2:OycMASgvIjsGIAVEx8x3n9rYeKnUJx6a3V8VGhs5futnr17KZhujZA + */ + call_control_id?: string; + /** + * @description ID that is unique to the call and can be used to correlate webhook events. + * @example 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + */ + call_leg_id?: string; + /** + * @description ID that is unique to the call session and can be used to correlate webhook events. Call session is a group of related call legs that logically belong to the same phone call, e.g. an inbound and outbound leg of a transferred call. + * @example 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + */ + call_session_id?: string; + /** + * @description State received from a command. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + /** + * @description Type of media streamed. It can be either 'raw' or 'decrypted'. + * @example raw + * @enum {string} + */ + stream_type?: 'raw' | 'decrypted'; + }; + }; + /** Call Fork Started Event */ + CallForkStartedEvent: { + data?: components['schemas']['CallForkStarted']; + }; + /** + * Call Fork Stopped + * @example { + * "record_type": "event", + * "event_type": "call.fork.stopped", + * "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + * "occurred_at": "2018-02-02T22:25:27.521992Z", + * "payload": { + * "connection_id": "7267xxxxxxxxxxxxxx", + * "call_control_id": "v2:OycMASgvIjsGIAVEx8x3n9rYeKnUJx6a3V8VGhs5futnr17KZhujZA", + * "call_leg_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + * "call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + * "stream_type": "decrypted" + * } + * } + */ + CallForkStopped: { + /** + * @description Identifies the type of the resource. + * @example event + * @enum {string} + */ + record_type?: 'event'; + /** + * @description The type of event being delivered. + * @example call.fork.stopped + * @enum {string} + */ + event_type?: 'call.fork.stopped'; + /** + * Format: uuid + * @description Identifies the type of resource. + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + */ + id?: string; + /** + * Format: date-time + * @description ISO 8601 datetime of when the event occurred. + * @example 2018-02-02T22:25:27.521992Z + */ + occurred_at?: string; + payload?: { + /** + * @description Call Control App ID (formerly Telnyx connection ID) used in the call. + * @example 7267xxxxxxxxxxxxxx + */ + connection_id?: string; + /** + * @description Unique ID for controlling the call. + * @example v2:OycMASgvIjsGIAVEx8x3n9rYeKnUJx6a3V8VGhs5futnr17KZhujZA + */ + call_control_id?: string; + /** + * @description ID that is unique to the call and can be used to correlate webhook events. + * @example 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + */ + call_leg_id?: string; + /** + * @description ID that is unique to the call session and can be used to correlate webhook events. Call session is a group of related call legs that logically belong to the same phone call, e.g. an inbound and outbound leg of a transferred call. + * @example 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + */ + call_session_id?: string; + /** + * @description State received from a command. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + /** + * @description Type of media streamed. It can be either 'raw' or 'decrypted'. + * @example raw + * @enum {string} + */ + stream_type?: 'raw' | 'decrypted'; + }; + }; + /** Call Fork Stopped Event */ + CallForkStoppedEvent: { + data?: components['schemas']['CallForkStopped']; + }; + /** + * @description The call forwarding settings for a phone number. + * @example { + * "call_forwarding_enabled": true, + * "forwards_to": "+13035559123", + * "forwarding_type": "always" + * } + */ + CallForwarding: { + /** + * @description Indicates if call forwarding will be enabled for this number if forwards_to and forwarding_type are filled in. Defaults to true for backwards compatibility with APIV1 use of numbers endpoints. + * @default true + * @example true + */ + call_forwarding_enabled: boolean; + /** @description The phone number to which inbound calls to this number are forwarded. Inbound calls will not be forwarded if this field is left blank. If set, must be a +E.164-formatted phone number. */ + forwards_to?: string; + /** + * @description Call forwarding type. 'forwards_to' must be set for this to have an effect. + * @example always + * @enum {string} + */ + forwarding_type?: 'always' | 'on_failure'; + }; + /** + * Call Gather Ended + * @example { + * "record_type": "event", + * "event_type": "call.gather.ended", + * "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + * "occurred_at": "2018-02-02T22:25:27.521992Z", + * "payload": { + * "call_control_id": "v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg", + * "connection_id": "7267xxxxxxxxxxxxxx", + * "call_leg_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + * "call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + * "from": "+35319605860", + * "to": "+35319605860", + * "digits": "123", + * "status": "valid" + * } + * } + */ + CallGatherEnded: { + /** + * @description Identifies the type of the resource. + * @example event + * @enum {string} + */ + record_type?: 'event'; + /** + * @description The type of event being delivered. + * @example call.gather.ended + * @enum {string} + */ + event_type?: 'call.gather.ended'; + /** + * Format: uuid + * @description Identifies the type of resource. + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + */ + id?: string; + /** + * Format: date-time + * @description ISO 8601 datetime of when the event occurred. + * @example 2018-02-02T22:25:27.521992Z + */ + occurred_at?: string; + payload?: { + /** + * @description Call ID used to issue commands via Call Control API. + * @example v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg + */ + call_control_id?: string; + /** + * @description Call Control App ID (formerly Telnyx connection ID) used in the call. + * @example 7267xxxxxxxxxxxxxx + */ + connection_id?: string; + /** + * @description ID that is unique to the call and can be used to correlate webhook events. + * @example 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + */ + call_leg_id?: string; + /** + * @description ID that is unique to the call session and can be used to correlate webhook events. Call session is a group of related call legs that logically belong to the same phone call, e.g. an inbound and outbound leg of a transferred call. + * @example 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + */ + call_session_id?: string; + /** + * @description State received from a command. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + /** + * @description Number or SIP URI placing the call. + * @example +35319605860 + */ + from?: string; + /** + * @description Destination number or SIP URI of the call. + * @example +13129457420 + */ + to?: string; + /** + * @description The received DTMF digit or symbol. + * @example 5503 + */ + digits?: string; + /** + * @description Reflects how command ended. + * @example valid + * @enum {string} + */ + status?: + | 'valid' + | 'invalid' + | 'call_hangup' + | 'cancelled' + | 'cancelled_amd' + | 'timeout'; + }; + }; + /** Call Gather Ended Event */ + CallGatherEndedEvent: { + data?: components['schemas']['CallGatherEnded']; + }; + /** + * Call Hangup + * @example { + * "record_type": "event", + * "event_type": "call.hangup", + * "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + * "occurred_at": "2018-02-02T22:25:27.521992Z", + * "payload": { + * "call_control_id": "v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg", + * "connection_id": "7267xxxxxxxxxxxxxx", + * "call_leg_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + * "call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + * "from": "+35319605860", + * "to": "+35319605860", + * "start_time": "2018-02-02T22:20:27.521992Z", + * "state": "hangup", + * "hangup_cause": "call_rejected", + * "hangup_source": "caller", + * "sip_hangup_cause": "603" + * } + * } + */ + CallHangup: { + /** + * @description Identifies the type of the resource. + * @example event + * @enum {string} + */ + record_type?: 'event'; + /** + * @description The type of event being delivered. + * @example call.hangup + * @enum {string} + */ + event_type?: 'call.hangup'; + /** + * Format: uuid + * @description Identifies the type of resource. + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + */ + id?: string; + /** + * Format: date-time + * @description ISO 8601 datetime of when the event occurred. + * @example 2018-02-02T22:25:27.521992Z + */ + occurred_at?: string; + payload?: { + /** + * @description Call ID used to issue commands via Call Control API. + * @example v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg + */ + call_control_id?: string; + /** + * @description Call Control App ID (formerly Telnyx connection ID) used in the call. + * @example 7267xxxxxxxxxxxxxx + */ + connection_id?: string; + /** + * @description ID that is unique to the call and can be used to correlate webhook events. + * @example 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + */ + call_leg_id?: string; + /** + * @description ID that is unique to the call session and can be used to correlate webhook events. Call session is a group of related call legs that logically belong to the same phone call, e.g. an inbound and outbound leg of a transferred call. + * @example 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + */ + call_session_id?: string; + /** + * @description State received from a command. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + /** + * @description Number or SIP URI placing the call. + * @example +35319605860 + */ + from?: string; + /** + * @description Destination number or SIP URI of the call. + * @example +13129457420 + */ + to?: string; + /** + * Format: date-time + * @description ISO 8601 datetime of when the call started. + * @example 2018-02-02T22:20:27.521992Z + */ + start_time?: string; + /** + * @description State received from a command. + * @example hangup + * @enum {string} + */ + state?: 'hangup'; + /** + * @description The reason the call was ended (`call_rejected`, `normal_clearing`, `originator_cancel`, `timeout`, `time_limit`, `user_busy`, `not_found` or `unspecified`). + * @example call_rejected + * @enum {string} + */ + hangup_cause?: + | 'call_rejected' + | 'normal_clearing' + | 'originator_cancel' + | 'timeout' + | 'time_limit' + | 'user_busy' + | 'not_found' + | 'unspecified'; + /** + * @description The party who ended the call (`callee`, `caller`, `unknown`). + * @example caller + * @enum {string} + */ + hangup_source?: 'caller' | 'callee' | 'unknown'; + /** + * @description The reason the call was ended (SIP response code). If the SIP response is unavailable (in inbound calls for example) this is set to `unspecified`. + * @example 603 + */ + sip_hangup_cause?: string; + }; + }; + /** Call Hangup Event */ + CallHangupEvent: { + data?: components['schemas']['CallHangup']; + }; + /** + * Call Initiated + * @example { + * "record_type": "event", + * "event_type": "call.initiated", + * "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + * "occurred_at": "2018-02-02T22:25:27.521992Z", + * "payload": { + * "call_control_id": "v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg", + * "connection_id": "7267xxxxxxxxxxxxxx", + * "call_leg_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + * "call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + * "from": "+35319605860", + * "to": "+35319605860", + * "direction": "incoming", + * "state": "parked" + * } + * } + */ + CallInitiated: { + /** + * @description Identifies the type of the resource. + * @example event + * @enum {string} + */ + record_type?: 'event'; + /** + * @description The type of event being delivered. + * @example call.initiated + * @enum {string} + */ + event_type?: 'call.initiated'; + /** + * Format: uuid + * @description Identifies the type of resource. + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + */ + id?: string; + /** + * Format: date-time + * @description ISO 8601 datetime of when the event occurred. + * @example 2018-02-02T22:25:27.521992Z + */ + occurred_at?: string; + payload?: { + /** + * @description Call ID used to issue commands via Call Control API. + * @example v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg + */ + call_control_id?: string; + /** + * @description Call Control App ID (formerly Telnyx connection ID) used in the call. + * @example 7267xxxxxxxxxxxxxx + */ + connection_id?: string; + /** + * @description ID that is unique to the call and can be used to correlate webhook events. + * @example 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + */ + call_leg_id?: string; + /** + * @description Custom headers from sip invite + * @example [ + * { + * "name": "head_1", + * "value": "val_1" + * }, + * { + * "name": "head_2", + * "value": "val_2" + * } + * ] + */ + custom_headers?: components['schemas']['CustomSipHeader'][]; + /** + * @description ID that is unique to the call session and can be used to correlate webhook events. Call session is a group of related call legs that logically belong to the same phone call, e.g. an inbound and outbound leg of a transferred call. + * @example 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + */ + call_session_id?: string; + /** + * @description State received from a command. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + /** + * @description Number or SIP URI placing the call. + * @example +35319605860 + */ + from?: string; + /** + * @description Destination number or SIP URI of the call. + * @example +13129457420 + */ + to?: string; + /** + * @description Whether the call is `incoming` or `outgoing`. + * @example incoming + * @enum {string} + */ + direction?: 'incoming' | 'outgoing'; + /** + * @description State received from a command. + * @example parked + * @enum {string} + */ + state?: 'parked' | 'bridging'; + }; + }; + /** Call Initiated Event */ + CallInitiatedEvent: { + data?: components['schemas']['CallInitiated']; + }; + /** + * Call Left Queue + * @example { + * "record_type": "event", + * "event_type": "call.dequeued", + * "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + * "occurred_at": "2018-02-02T22:25:27.521992Z", + * "payload": { + * "call_control_id": "v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg", + * "connection_id": "7267xxxxxxxxxxxxxx", + * "call_leg_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + * "call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + * "queue": "support", + * "queue_position": 3, + * "reason": "leave" + * } + * } + */ + CallLeftQueue: { + /** + * @description Identifies the type of the resource. + * @example event + * @enum {string} + */ + record_type?: 'event'; + /** + * @description The type of event being delivered. + * @example call.dequeued + * @enum {string} + */ + event_type?: 'call.dequeued'; + /** + * Format: uuid + * @description Identifies the type of resource. + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + */ + id?: string; + /** + * Format: date-time + * @description ISO 8601 datetime of when the event occurred. + * @example 2018-02-02T22:25:27.521992Z + */ + occurred_at?: string; + payload?: { + /** + * @description Call ID used to issue commands via Call Control API. + * @example v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg + */ + call_control_id?: string; + /** + * @description Call Control App ID (formerly Telnyx connection ID) used in the call. + * @example 7267xxxxxxxxxxxxxx + */ + connection_id?: string; + /** + * @description ID that is unique to the call and can be used to correlate webhook events. + * @example 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + */ + call_leg_id?: string; + /** + * @description ID that is unique to the call session and can be used to correlate webhook events. Call session is a group of related call legs that logically belong to the same phone call, e.g. an inbound and outbound leg of a transferred call. + * @example 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + */ + call_session_id?: string; + /** + * @description State received from a command. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + /** + * @description The name of the queue + * @example support + */ + queue?: string; + /** + * @description Last position of the call in the queue. + * @example 7 + */ + queue_position?: number; + /** + * @description The reason for leaving the queue + * @example bridged + * @enum {string} + */ + reason?: + | 'bridged' + | 'bridging-in-process' + | 'hangup' + | 'leave' + | 'timeout'; + }; + }; + /** Call Left Queue Event */ + CallLeftQueueEvent: { + data?: components['schemas']['CallLeftQueue']; + }; + /** + * Call Machine Detection Ended + * @example { + * "record_type": "event", + * "event_type": "call.machine.detection.ended", + * "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + * "occurred_at": "2018-02-02T22:25:27.521992Z", + * "payload": { + * "connection_id": "7267xxxxxxxxxxxxxx", + * "call_leg_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + * "call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + * "from": "+35319605860", + * "to": "+35319605860", + * "result": "human" + * } + * } + */ + CallMachineDetectionEnded: { + /** + * @description Identifies the type of the resource. + * @example event + * @enum {string} + */ + record_type?: 'event'; + /** + * @description The type of event being delivered. + * @example call.machine.detection.ended + * @enum {string} + */ + event_type?: 'call.machine.detection.ended'; + /** + * Format: uuid + * @description Identifies the type of resource. + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + */ + id?: string; + /** + * Format: date-time + * @description ISO 8601 datetime of when the event occurred. + * @example 2018-02-02T22:25:27.521992Z + */ + occurred_at?: string; + payload?: { + /** + * @description Call ID used to issue commands via Call Control API. + * @example v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg + */ + call_control_id?: string; + /** + * @description Call Control App ID (formerly Telnyx connection ID) used in the call. + * @example 7267xxxxxxxxxxxxxx + */ + connection_id?: string; + /** + * @description ID that is unique to the call and can be used to correlate webhook events. + * @example 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + */ + call_leg_id?: string; + /** + * @description ID that is unique to the call session and can be used to correlate webhook events. Call session is a group of related call legs that logically belong to the same phone call, e.g. an inbound and outbound leg of a transferred call. + * @example 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + */ + call_session_id?: string; + /** + * @description State received from a command. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + /** + * @description Number or SIP URI placing the call. + * @example +35319605860 + */ + from?: string; + /** + * @description Destination number or SIP URI of the call. + * @example +13129457420 + */ + to?: string; + /** + * @description Answering machine detection result. + * @example machine + * @enum {string} + */ + result?: 'human' | 'machine' | 'not_sure'; + }; + }; + /** Call Machine Detection Ended Event */ + CallMachineDetectionEndedEvent: { + data?: components['schemas']['CallMachineDetectionEnded']; + }; + /** + * Call Machine Greeting Ended + * @example { + * "record_type": "event", + * "event_type": "call.machine.greeting.ended", + * "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + * "occurred_at": "2018-02-02T22:25:27.521992Z", + * "payload": { + * "connection_id": "7267xxxxxxxxxxxxxx", + * "call_leg_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + * "call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + * "from": "+35319605860", + * "to": "+35319605860", + * "result": "ended" + * } + * } + */ + CallMachineGreetingEnded: { + /** + * @description Identifies the type of the resource. + * @example event + * @enum {string} + */ + record_type?: 'event'; + /** + * @description The type of event being delivered. + * @example call.machine.greeting.ended + * @enum {string} + */ + event_type?: 'call.machine.greeting.ended'; + /** + * Format: uuid + * @description Identifies the type of resource. + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + */ + id?: string; + /** + * Format: date-time + * @description ISO 8601 datetime of when the event occurred. + * @example 2018-02-02T22:25:27.521992Z + */ + occurred_at?: string; + payload?: { + /** + * @description Call ID used to issue commands via Call Control API. + * @example v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg + */ + call_control_id?: string; + /** + * @description Call Control App ID (formerly Telnyx connection ID) used in the call. + * @example 7267xxxxxxxxxxxxxx + */ + connection_id?: string; + /** + * @description ID that is unique to the call and can be used to correlate webhook events. + * @example 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + */ + call_leg_id?: string; + /** + * @description ID that is unique to the call session and can be used to correlate webhook events. Call session is a group of related call legs that logically belong to the same phone call, e.g. an inbound and outbound leg of a transferred call. + * @example 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + */ + call_session_id?: string; + /** + * @description State received from a command. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + /** + * @description Number or SIP URI placing the call. + * @example +35319605860 + */ + from?: string; + /** + * @description Destination number or SIP URI of the call. + * @example +13129457420 + */ + to?: string; + /** + * @description Answering machine greeting ended result. + * @example ended + * @enum {string} + */ + result?: 'ended' | 'not_sure'; + }; + }; + /** Call Machine Greeting Ended Event */ + CallMachineGreetingEndedEvent: { + data?: components['schemas']['CallMachineGreetingEnded']; + }; + /** + * Call Machine Premium Detection Ended + * @example { + * "record_type": "event", + * "event_type": "call.machine.premium.detection.ended", + * "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + * "occurred_at": "2018-02-02T22:25:27.521992Z", + * "payload": { + * "connection_id": "7267xxxxxxxxxxxxxx", + * "call_leg_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + * "call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + * "from": "+35319605860", + * "to": "+35319605860", + * "result": "machine" + * } + * } + */ + CallMachinePremiumDetectionEnded: { + /** + * @description Identifies the type of the resource. + * @example event + * @enum {string} + */ + record_type?: 'event'; + /** + * @description The type of event being delivered. + * @example call.machine.premium.detection.ended + * @enum {string} + */ + event_type?: 'call.machine.premium.detection.ended'; + /** + * Format: uuid + * @description Identifies the type of resource. + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + */ + id?: string; + /** + * Format: date-time + * @description ISO 8601 datetime of when the event occurred. + * @example 2018-02-02T22:25:27.521992Z + */ + occurred_at?: string; + payload?: { + /** + * @description Call ID used to issue commands via Call Control API. + * @example v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg + */ + call_control_id?: string; + /** + * @description Call Control App ID (formerly Telnyx connection ID) used in the call. + * @example 7267xxxxxxxxxxxxxx + */ + connection_id?: string; + /** + * @description ID that is unique to the call and can be used to correlate webhook events. + * @example 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + */ + call_leg_id?: string; + /** + * @description ID that is unique to the call session and can be used to correlate webhook events. Call session is a group of related call legs that logically belong to the same phone call, e.g. an inbound and outbound leg of a transferred call. + * @example 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + */ + call_session_id?: string; + /** + * @description State received from a command. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + /** + * @description Number or SIP URI placing the call. + * @example +35319605860 + */ + from?: string; + /** + * @description Destination number or SIP URI of the call. + * @example +13129457420 + */ + to?: string; + /** + * @description Premium Answering Machine Detection result. + * @example machine + * @enum {string} + */ + result?: + | 'human_residence' + | 'human_business' + | 'machine' + | 'silence' + | 'fax_detected'; + }; + }; + /** Call Machine Premium Detection Ended Event */ + CallMachinePremiumDetectionEndedEvent: { + data?: components['schemas']['CallMachinePremiumDetectionEnded']; + }; + /** + * Call Machine Premium Greeting Ended + * @example { + * "record_type": "event", + * "event_type": "call.machine.premium.greeting.ended", + * "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + * "occurred_at": "2018-02-02T22:25:27.521992Z", + * "payload": { + * "connection_id": "7267xxxxxxxxxxxxxx", + * "call_leg_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + * "call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + * "from": "+35319605860", + * "to": "+35319605860", + * "result": "beep_detected" + * } + * } + */ + CallMachinePremiumGreetingEnded: { + /** + * @description Identifies the type of the resource. + * @example event + * @enum {string} + */ + record_type?: 'event'; + /** + * @description The type of event being delivered. + * @example call.machine.premium.greeting.ended + * @enum {string} + */ + event_type?: 'call.machine.premium.greeting.ended'; + /** + * Format: uuid + * @description Identifies the type of resource. + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + */ + id?: string; + /** + * Format: date-time + * @description ISO 8601 datetime of when the event occurred. + * @example 2018-02-02T22:25:27.521992Z + */ + occurred_at?: string; + payload?: { + /** + * @description Call ID used to issue commands via Call Control API. + * @example v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg + */ + call_control_id?: string; + /** + * @description Call Control App ID (formerly Telnyx connection ID) used in the call. + * @example 7267xxxxxxxxxxxxxx + */ + connection_id?: string; + /** + * @description ID that is unique to the call and can be used to correlate webhook events. + * @example 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + */ + call_leg_id?: string; + /** + * @description ID that is unique to the call session and can be used to correlate webhook events. Call session is a group of related call legs that logically belong to the same phone call, e.g. an inbound and outbound leg of a transferred call. + * @example 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + */ + call_session_id?: string; + /** + * @description State received from a command. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + /** + * @description Number or SIP URI placing the call. + * @example +35319605860 + */ + from?: string; + /** + * @description Destination number or SIP URI of the call. + * @example +13129457420 + */ + to?: string; + /** + * @description Premium Answering Machine Greeting Ended result. + * @example beep_detected + * @enum {string} + */ + result?: 'beep_detected'; + }; + }; + /** Call Machine Premium Greeting Ended Event */ + CallMachinePremiumGreetingEndedEvent: { + data?: components['schemas']['CallMachinePremiumGreetingEnded']; + }; + /** + * Call Playback Ended + * @example { + * "record_type": "event", + * "event_type": "call.playback.ended", + * "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + * "occurred_at": "2018-02-02T22:25:27.521992Z", + * "payload": { + * "call_control_id": "v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg", + * "connection_id": "7267xxxxxxxxxxxxxx", + * "call_leg_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + * "call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + * "media_name": "my_media_uploaded_to_media_storage_api", + * "overlay": false, + * "status": "completed" + * } + * } + */ + CallPlaybackEnded: { + /** + * @description Identifies the type of the resource. + * @example event + * @enum {string} + */ + record_type?: 'event'; + /** + * @description The type of event being delivered. + * @example call.playback.ended + * @enum {string} + */ + event_type?: 'call.playback.ended'; + /** + * Format: uuid + * @description Identifies the type of resource. + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + */ + id?: string; + /** + * Format: date-time + * @description ISO 8601 datetime of when the event occurred. + * @example 2018-02-02T22:25:27.521992Z + */ + occurred_at?: string; + payload?: { + /** + * @description Call ID used to issue commands via Call Control API. + * @example v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg + */ + call_control_id?: string; + /** + * @description Call Control App ID (formerly Telnyx connection ID) used in the call. + * @example 7267xxxxxxxxxxxxxx + */ + connection_id?: string; + /** + * @description ID that is unique to the call and can be used to correlate webhook events. + * @example 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + */ + call_leg_id?: string; + /** + * @description ID that is unique to the call session and can be used to correlate webhook events. Call session is a group of related call legs that logically belong to the same phone call, e.g. an inbound and outbound leg of a transferred call. + * @example 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + */ + call_session_id?: string; + /** + * @description State received from a command. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + /** + * @description The audio URL being played back, if audio_url has been used to start. + * @example http://example.com/audio.wav + */ + media_url?: string; + /** + * @description The name of the audio media file being played back, if media_name has been used to start. + * @example my_media_uploaded_to_media_storage_api + */ + media_name?: string; + /** + * @description Whether the stopped audio was in overlay mode or not. + * @example false + */ + overlay?: boolean; + /** + * @description Reflects how command ended. + * @example completed + * @enum {string} + */ + status?: + | 'file_not_found' + | 'call_hangup' + | 'unknown' + | 'failed' + | 'cancelled_amd' + | 'completed' + | 'failed'; + }; + }; + /** Call Playback Ended Event */ + CallPlaybackEndedEvent: { + data?: components['schemas']['CallPlaybackEnded']; + }; + /** + * Call Playback Started + * @example { + * "record_type": "event", + * "event_type": "call.playback.started", + * "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + * "occurred_at": "2018-02-02T22:25:27.521992Z", + * "payload": { + * "call_control_id": "v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg", + * "connection_id": "7267xxxxxxxxxxxxxx", + * "call_leg_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + * "call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + * "media_url": "http://example.com/audio.wav", + * "overlay": false + * } + * } + */ + CallPlaybackStarted: { + /** + * @description Identifies the type of the resource. + * @example event + * @enum {string} + */ + record_type?: 'event'; + /** + * @description The type of event being delivered. + * @example call.playback.started + * @enum {string} + */ + event_type?: 'call.playback.started'; + /** + * Format: uuid + * @description Identifies the type of resource. + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + */ + id?: string; + /** + * Format: date-time + * @description ISO 8601 datetime of when the event occurred. + * @example 2018-02-02T22:25:27.521992Z + */ + occurred_at?: string; + payload?: { + /** + * @description Call ID used to issue commands via Call Control API. + * @example v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg + */ + call_control_id?: string; + /** + * @description Call Control App ID (formerly Telnyx connection ID) used in the call. + * @example 7267xxxxxxxxxxxxxx + */ + connection_id?: string; + /** + * @description ID that is unique to the call and can be used to correlate webhook events. + * @example 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + */ + call_leg_id?: string; + /** + * @description ID that is unique to the call session and can be used to correlate webhook events. Call session is a group of related call legs that logically belong to the same phone call, e.g. an inbound and outbound leg of a transferred call. + * @example 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + */ + call_session_id?: string; + /** + * @description State received from a command. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + /** + * @description The audio URL being played back, if audio_url has been used to start. + * @example http://example.com/audio.wav + */ + media_url?: string; + /** + * @description The name of the audio media file being played back, if media_name has been used to start. + * @example my_media_uploaded_to_media_storage_api + */ + media_name?: string; + /** + * @description Whether the audio is going to be played in overlay mode or not. + * @example false + */ + overlay?: boolean; + }; + }; + /** Call Playback Started Event */ + CallPlaybackStartedEvent: { + data?: components['schemas']['CallPlaybackStarted']; + }; + /** + * @description The call recording settings for a phone number. + * @example { + * "inbound_call_recording_enabled": true, + * "inbound_call_recording_format": "wav", + * "inbound_call_recording_channels": "single" + * } + */ + CallRecording: { + /** + * @description When enabled, any inbound call to this number will be recorded. + * @default false + */ + inbound_call_recording_enabled: boolean; + /** + * @description The audio file format for calls being recorded. + * @default wav + * @enum {string} + */ + inbound_call_recording_format: 'wav' | 'mp3'; + /** + * @description When using 'dual' channels, final audio file will be stereo recorded with the first leg on channel A, and the rest on channel B. + * @default single + * @enum {string} + */ + inbound_call_recording_channels: 'single' | 'dual'; + }; + /** + * Call Recording Saved + * @example { + * "record_type": "event", + * "event_type": "call.recording.saved", + * "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + * "occurred_at": "2018-02-02T22:25:27.521992Z", + * "payload": { + * "call_control_id": "v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg", + * "connection_id": "7267xxxxxxxxxxxxxx", + * "call_leg_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + * "call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + * "recording_started_at": "2018-02-02T22:20:27.521992Z", + * "recording_ended_at": "2018-02-02T22:20:27.521992Z", + * "channels": "single", + * "recording_urls": { + * "mp3": "http://example.com/recording.mp3", + * "wav": "http://example.com/recording.wav" + * }, + * "public_recording_urls": { + * "mp3": "http://example.com/recording.mp3", + * "wav": "http://example.com/recording.wav" + * } + * } + * } + */ + CallRecordingSaved: { + /** + * @description Identifies the type of the resource. + * @example event + * @enum {string} + */ + record_type?: 'event'; + /** + * @description The type of event being delivered. + * @example call.recording.saved + * @enum {string} + */ + event_type?: 'call.recording.saved'; + /** + * Format: uuid + * @description Identifies the type of resource. + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + */ + id?: string; + /** + * Format: date-time + * @description ISO 8601 datetime of when the event occurred. + * @example 2018-02-02T22:25:27.521992Z + */ + occurred_at?: string; + payload?: { + /** + * @description ID that is unique to the call and can be used to correlate webhook events. + * @example 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + */ + call_leg_id?: string; + /** + * @description ID that is unique to the call session and can be used to correlate webhook events. Call session is a group of related call legs that logically belong to the same phone call, e.g. an inbound and outbound leg of a transferred call. + * @example 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + */ + call_session_id?: string; + /** + * @description Call Control App ID (formerly Telnyx connection ID) used in the call. + * @example 7267xxxxxxxxxxxxxx + */ + connection_id?: string; + /** + * @description State received from a command. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + /** + * Format: date-time + * @description ISO 8601 datetime of when recording started. + * @example 2018-02-02T22:20:27.521992Z + */ + recording_started_at?: string; + /** + * Format: date-time + * @description ISO 8601 datetime of when recording ended. + * @example 2018-02-02T22:25:27.521992Z + */ + recording_ended_at?: string; + /** + * @description Whether recording was recorded in `single` or `dual` channel. + * @example single + * @enum {string} + */ + channels?: 'single' | 'dual'; + /** @description Recording URLs in requested format. These URLs are valid for 10 minutes. After 10 minutes, you may retrieve recordings via API using Reports -> Call Recordings documentation, or via Mission Control under Reporting -> Recordings. */ + recording_urls?: { + /** + * @description Recording URL in requested `mp3` format. + * @example http://example.com/recording.mp3 + */ + mp3?: string | null; + /** + * @description Recording URL in requested `wav` format. + * @example http://example.com/recording.wav + */ + wav?: string | null; + }; + /** @description Recording URLs in requested format. The URL is valid for as long as the file exists. For security purposes, this feature is activated on a per request basis. Please contact customer support with your Account ID to request activation. */ + public_recording_urls?: { + /** + * @description Recording URL in requested `mp3` format. + * @example http://example.com/recording.mp3 + */ + mp3?: string | null; + /** + * @description Recording URL in requested `wav` format. + * @example http://example.com/recording.wav + */ + wav?: string | null; + }; + }; + }; + /** Call Recording Saved Event */ + CallRecordingSavedEvent: { + data?: components['schemas']['CallRecordingSaved']; + }; + /** @example { + * "record_type": "event", + * "event_type": "call.refer.completed", + * "id": "4ce4366d-8d87-44be-a00b-942154e9c5f5", + * "occurred_at": "2020-03-30T13:29:44.650000Z", + * "payload": { + * "call_control_id": "v2:OycMASgvIjsGIAVEx8x3n9rYeKnUJx6a3V8VGhs5futnr17KZhujZA", + * "call_leg_id": "817f7de8-728a-11ea-9ce6-02420a0f8969", + * "call_session_id": "817f8c2a-728a-11ea-9cbe-02420a0f8969", + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + * "connection_id": "1289082222292239760", + * "from": "+35319605860", + * "sip_notify_response": 200, + * "to": "+13129457420" + * } + * } */ + CallReferCompleted: { + /** + * @description Identifies the type of the resource. + * @example event + * @enum {string} + */ + record_type?: 'event'; + /** + * @description The type of event being delivered. + * @example call.refer.completed + * @enum {string} + */ + event_type?: 'call.refer.completed'; + /** + * Format: uuid + * @description Identifies the type of resource. + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + */ + id?: string; + /** + * Format: date-time + * @description ISO 8601 datetime of when the event occurred. + * @example 2018-02-02T22:25:27.521992Z + */ + occurred_at?: string; + payload?: { + /** + * @description Unique ID for controlling the call. + * @example v2:OycMASgvIjsGIAVEx8x3n9rYeKnUJx6a3V8VGhs5futnr17KZhujZA + */ + call_control_id?: string; + /** + * @description ID that is unique to the call and can be used to correlate webhook events. + * @example 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + */ + call_leg_id?: string; + /** + * @description ID that is unique to the call session and can be used to correlate webhook events. Call session is a group of related call legs that logically belong to the same phone call, e.g. an inbound and outbound leg of a transferred call. + * @example 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + */ + call_session_id?: string; + /** + * @description Call Control App ID (formerly Telnyx connection ID) used in the call. + * @example 7267xxxxxxxxxxxxxx + */ + connection_id?: string; + /** + * @description State received from a command. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + /** + * @description Number or SIP URI placing the call. + * @example +35319605860 + */ + from?: string; + /** + * @description SIP NOTIFY event status for tracking the REFER attempt. + * @example 200 + */ + sip_notify_response?: number; + /** + * @description Destination number or SIP URI of the call. + * @example +13129457420 + */ + to?: string; + }; + }; + /** Call Refer Completed Event */ + CallReferCompletedEvent: { + data?: components['schemas']['CallReferCompleted']; + }; + /** @example { + * "record_type": "event", + * "event_type": "call.refer.failed", + * "id": "fbeb70e0-54eb-4e26-8d19-56b43e66f754", + * "occurred_at": "2020-03-30T13:29:42.130013Z", + * "payload": { + * "call_control_id": "v2:OycMASgvIjsGIAVEx8x3n9rYeKnUJx6a3V8VGhs5futnr17KZhujZA", + * "call_leg_id": "817f7de8-728a-11ea-9ce6-02420a0f8969", + * "call_session_id": "817f8c2a-728a-11ea-9cbe-02420a0f8969", + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + * "connection_id": "1289082222292239760", + * "from": "+35319605860", + * "sip_notify_response": 603, + * "to": "+13129457420" + * } + * } */ + CallReferFailed: { + /** + * @description Identifies the type of the resource. + * @example event + * @enum {string} + */ + record_type?: 'event'; + /** + * @description The type of event being delivered. + * @example call.refer.failed + * @enum {string} + */ + event_type?: 'call.refer.failed'; + /** + * Format: uuid + * @description Identifies the type of resource. + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + */ + id?: string; + /** + * Format: date-time + * @description ISO 8601 datetime of when the event occurred. + * @example 2018-02-02T22:25:27.521992Z + */ + occurred_at?: string; + payload?: { + /** + * @description Unique ID for controlling the call. + * @example v2:OycMASgvIjsGIAVEx8x3n9rYeKnUJx6a3V8VGhs5futnr17KZhujZA + */ + call_control_id?: string; + /** + * @description ID that is unique to the call and can be used to correlate webhook events. + * @example 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + */ + call_leg_id?: string; + /** + * @description ID that is unique to the call session and can be used to correlate webhook events. Call session is a group of related call legs that logically belong to the same phone call, e.g. an inbound and outbound leg of a transferred call. + * @example 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + */ + call_session_id?: string; + /** + * @description Call Control App ID (formerly Telnyx connection ID) used in the call. + * @example 7267xxxxxxxxxxxxxx + */ + connection_id?: string; + /** + * @description State received from a command. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + /** + * @description Number or SIP URI placing the call. + * @example +35319605860 + */ + from?: string; + /** + * @description SIP NOTIFY event status for tracking the REFER attempt. + * @example 603 + */ + sip_notify_response?: number; + /** + * @description Destination number or SIP URI of the call. + * @example +13129457420 + */ + to?: string; + }; + }; + /** Call Refer Failed Event */ + CallReferFailedEvent: { + data?: components['schemas']['CallReferFailed']; + }; + /** + * Call Refer Started + * @example { + * "record_type": "event", + * "event_type": "call.refer.started", + * "id": "fbeb70e0-54eb-4e26-8d19-56b43e66f754", + * "occurred_at": "2020-03-30T13:29:42.130013Z", + * "payload": { + * "call_control_id": "v2:OycMASgvIjsGIAVEx8x3n9rYeKnUJx6a3V8VGhs5futnr17KZhujZA", + * "call_leg_id": "817f7de8-728a-11ea-9ce6-02420a0f8969", + * "call_session_id": "817f8c2a-728a-11ea-9cbe-02420a0f8969", + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + * "connection_id": "1289082222292239760", + * "from": "+35319605860", + * "sip_notify_response": 100, + * "to": "+13129457420" + * } + * } + */ + CallReferStarted: { + /** + * @description Identifies the type of the resource. + * @example event + * @enum {string} + */ + record_type?: 'event'; + /** + * @description The type of event being delivered. + * @example call.refer.started + * @enum {string} + */ + event_type?: 'call.refer.started'; + /** + * Format: uuid + * @description Identifies the type of resource. + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + */ + id?: string; + /** + * Format: date-time + * @description ISO 8601 datetime of when the event occurred. + * @example 2018-02-02T22:25:27.521992Z + */ + occurred_at?: string; + payload?: { + /** + * @description Unique ID for controlling the call. + * @example v2:OycMASgvIjsGIAVEx8x3n9rYeKnUJx6a3V8VGhs5futnr17KZhujZA + */ + call_control_id?: string; + /** + * @description ID that is unique to the call and can be used to correlate webhook events. + * @example 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + */ + call_leg_id?: string; + /** + * @description ID that is unique to the call session and can be used to correlate webhook events. Call session is a group of related call legs that logically belong to the same phone call, e.g. an inbound and outbound leg of a transferred call. + * @example 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + */ + call_session_id?: string; + /** + * @description Call Control App ID (formerly Telnyx connection ID) used in the call. + * @example 7267xxxxxxxxxxxxxx + */ + connection_id?: string; + /** + * @description State received from a command. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + /** + * @description Number or SIP URI placing the call. + * @example +35319605860 + */ + from?: string; + /** + * @description SIP NOTIFY event status for tracking the REFER attempt. + * @example 100 + */ + sip_notify_response?: number; + /** + * @description Destination number or SIP URI of the call. + * @example +13129457420 + */ + to?: string; + }; + }; + /** Call Refer Started Event */ + CallReferStartedEvent: { + data?: components['schemas']['CallReferStarted']; + }; + /** + * Dial Request + * @example { + * "to": "+18005550100 or sip:username@sip.telnyx.com", + * "from": "+18005550101", + * "from_display_name": "Company Name", + * "connection_id": "7267xxxxxxxxxxxxxx", + * "conference_config": { + * "conference_name": "telnyx-conference", + * "start_conference_on_enter": true + * }, + * "audio_url": "http://www.example.com/sounds/greeting.wav", + * "timeout_secs": 60, + * "timeout_limit_secs": 60, + * "webhook_url": "https://www.example.com/server-b/", + * "webhook_url_method": "POST", + * "answering_machine_detection": "detect", + * "answering_machine_detection_config": { + * "total_analysis_time_millis": 5000, + * "after_greeting_silence_millis": 1000, + * "between_words_silence_millis": 1000, + * "greeting_duration_millis": 1000, + * "initial_silence_millis": 1000, + * "maximum_number_of_words": 1000, + * "maximum_word_length_millis": 2000, + * "silence_threshold": 512, + * "greeting_total_analysis_time_millis": 50000, + * "greeting_silence_duration_millis": 2000 + * }, + * "custom_headers": [ + * { + * "name": "head_1", + * "value": "val_1" + * }, + * { + * "name": "head_2", + * "value": "val_2" + * } + * ], + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + * "command_id": "891510ac-f3e4-11e8-af5b-de00688a4901", + * "link_to": "ilditnZK_eVysupV21KzmzN_sM29ygfauQojpm4BgFtfX5hXAcjotg==", + * "media_encryption": "SRTP", + * "sip_auth_username": "username", + * "sip_auth_password": "password", + * "sip_headers": [ + * { + * "name": "User-to-User", + * "value": "12345" + * } + * ], + * "sip_transport_protocol": "TLS", + * "stream_url": "wss://www.example.com/websocket", + * "stream_track": "both_tracks", + * "send_silence_when_idle": true, + * "enable_dialogflow": false, + * "dialogflow_config": { + * "analyze_sentiment": false, + * "partial_automated_agent_reply": false + * } + * } + */ + CallRequest: { + /** @description The DID or SIP URI to dial out to. Multiple DID or SIP URIs can be provided using an array of strings */ + to: string | string[]; + /** + * @description The `from` number to be used as the caller id presented to the destination (`to` number). The number should be in +E164 format. + * @example +18005550101 + */ + from: string; + /** + * @description The `from_display_name` string to be used as the caller id name (SIP From Display Name) presented to the destination (`to` number). The string should have a maximum of 128 characters, containing only letters, numbers, spaces, and -_~!.+ special characters. If ommited, the display name will be the same as the number in the `from` field. + * @example Company Name + */ + from_display_name?: string; + /** @description The ID of the Call Control App (formerly ID of the connection) to be used when dialing the destination. */ + connection_id: string; + /** + * @description The URL of a file to be played back to the callee when the call is answered. The URL can point to either a WAV or MP3 file. media_name and audio_url cannot be used together in one request. + * @example http://example.com/message.wav + */ + audio_url?: string; + /** + * @description The media_name of a file to be played back to the callee when the call is answered. The media_name must point to a file previously uploaded to api.telnyx.com/v2/media by the same user/organization. The file must either be a WAV or MP3 file. + * @example my_media_uploaded_to_media_storage_api + */ + media_name?: string; + /** + * @description The list of comma-separated codecs in a preferred order for the forked media to be received. + * @example G722,PCMU,PCMA,G729,OPUS,VP8,H264 + */ + preferred_codecs?: string; + /** + * Format: int32 + * @description The number of seconds that Telnyx will wait for the call to be answered by the destination to which it is being called. If the timeout is reached before an answer is received, the call will hangup and a `call.hangup` webhook with a `hangup_cause` of `timeout` will be sent. Minimum value is 5 seconds. Maximum value is 120 seconds. + * @default 30 + * @example 60 + */ + timeout_secs: number; + /** + * Format: int32 + * @description Sets the maximum duration of a Call Control Leg in seconds. If the time limit is reached, the call will hangup and a `call.hangup` webhook with a `hangup_cause` of `time_limit` will be sent. For example, by setting a time limit of 120 seconds, a Call Leg will be automatically terminated two minutes after being answered. The default time limit is 14400 seconds or 4 hours and this is also the maximum allowed call length. + * @default 14400 + * @example 600 + */ + time_limit_secs: number; + /** + * @description Enables Answering Machine Detection. Telnyx offers Premium and Standard detections. With Premium detection, when a call is answered, Telnyx runs real-time detection and sends a `call.machine.premium.detection.ended` webhook with one of the following results: `human_residence`, `human_business`, `machine`, `silence` or `fax_detected`. If we detect a beep, we also send a `call.machine.premium.greeting.ended` webhook with the result of `beep_detected`. If we detect a beep before `call.machine.premium.detection.ended` we only send `call.machine.premium.greeting.ended`, and if we detect a beep after `call.machine.premium.detection.ended`, we send both webhooks. With Standard detection, when a call is answered, Telnyx runs real-time detection to determine if it was picked up by a human or a machine and sends an `call.machine.detection.ended` webhook with the analysis result. If `greeting_end` or `detect_words` is used and a `machine` is detected, you will receive another `call.machine.greeting.ended` webhook when the answering machine greeting ends with a beep or silence. If `detect_beep` is used, you will only receive `call.machine.greeting.ended` if a beep is detected. + * @default disabled + * @enum {string} + */ + answering_machine_detection: + | 'premium' + | 'detect' + | 'detect_beep' + | 'detect_words' + | 'greeting_end' + | 'disabled'; + /** @description Optional configuration parameters to modify 'answering_machine_detection' performance. */ + answering_machine_detection_config?: { + /** + * Format: int32 + * @description Maximum timeout threshold for overall detection. + * @default 3500 + * @example 5000 + */ + total_analysis_time_millis: number; + /** + * Format: int32 + * @description Silence duration threshold after a greeting message or voice for it be considered human. + * @default 800 + * @example 1000 + */ + after_greeting_silence_millis: number; + /** + * Format: int32 + * @description Maximum threshold for silence between words. + * @default 50 + * @example 100 + */ + between_words_silence_millis: number; + /** + * Format: int32 + * @description Maximum threshold of a human greeting. If greeting longer than this value, considered machine. + * @default 3500 + * @example 1500 + */ + greeting_duration_millis: number; + /** + * Format: int32 + * @description If initial silence duration is greater than this value, consider it a machine. + * @default 3500 + * @example 1800 + */ + initial_silence_millis: number; + /** + * Format: int32 + * @description If number of detected words is greater than this value, consder it a machine. + * @default 5 + * @example 3 + */ + maximum_number_of_words: number; + /** + * Format: int32 + * @description If a single word lasts longer than this threshold, consider it a machine. + * @default 3500 + * @example 2000 + */ + maximum_word_length_millis: number; + /** + * Format: int32 + * @description Minimum noise threshold for any analysis. + * @default 256 + * @example 512 + */ + silence_threshold: number; + /** + * Format: int32 + * @description If machine already detected, maximum timeout threshold to determine the end of the machine greeting. + * @default 5000 + * @example 7500 + */ + greeting_total_analysis_time_millis: number; + /** + * Format: int32 + * @description If machine already detected, maximum threshold for silence between words. If exceeded, the greeting is considered ended. + * @default 1500 + * @example 2000 + */ + greeting_silence_duration_millis: number; + }; + /** @description Optional configuration parameters to dial new participant into a conference. */ + conference_config?: { + /** + * Format: uuid + * @description Conference ID to be joined + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + */ + id?: string; + /** + * @description Conference name to be joined + * @example telnyx-conference + */ + conference_name?: string; + /** + * @description Whether the conference should end and all remaining participants be hung up after the participant leaves the conference. Defaults to "false". + * @example true + */ + end_conference_on_exit?: boolean; + /** + * @description Whether the conference should end after the participant leaves the conference. NOTE this doesn't hang up the other participants. Defaults to "false". + * @example true + */ + soft_end_conference_on_exit?: boolean; + /** + * @description Whether the participant should be put on hold immediately after joining the conference. Defaults to "false". + * @example true + */ + hold?: boolean; + /** + * @description The URL of a file to be played to the participant when they are put on hold after joining the conference. hold_media_name and hold_audio_url cannot be used together in one request. Takes effect only when "start_conference_on_create" is set to "false". This property takes effect only if "hold" is set to "true". + * @example http://example.com/message.wav + */ + hold_audio_url?: string; + /** + * @description The media_name of a file to be played to the participant when they are put on hold after joining the conference. The media_name must point to a file previously uploaded to api.telnyx.com/v2/media by the same user/organization. The file must either be a WAV or MP3 file. Takes effect only when "start_conference_on_create" is set to "false". This property takes effect only if "hold" is set to "true". + * @example my_media_uploaded_to_media_storage_api + */ + hold_media_name?: string; + /** + * @description Whether the participant should be muted immediately after joining the conference. Defaults to "false". + * @example true + */ + mute?: boolean; + /** + * @description Whether the conference should be started after the participant joins the conference. Defaults to "false". + * @example true + */ + start_conference_on_enter?: boolean; + /** + * @description Whether the conference should be started on creation. If the conference isn't started all participants that join are automatically put on hold. Defaults to "true". + * @example false + */ + start_conference_on_create?: boolean; + /** + * @description Sets the joining participant as a supervisor for the conference. A conference can have multiple supervisors. "barge" means the supervisor enters the conference as a normal participant. This is the same as "none". "monitor" means the supervisor is muted but can hear all participants. "whisper" means that only the specified "whisper_call_control_ids" can hear the supervisor. Defaults to "none". + * @example whisper + * @enum {string} + */ + supervisor_role?: 'barge' | 'monitor' | 'none' | 'whisper'; + /** + * @description Array of unique call_control_ids the joining supervisor can whisper to. If none provided, the supervisor will join the conference as a monitoring participant only. + * @example [ + * "v2:Sg1xxxQ_U3ixxxyXT_VDNI3xxxazZdg6Vxxxs4-GNYxxxVaJPOhFMRQ", + * "v2:qqpb0mmvd-ovhhBr0BUQQn0fld5jIboaaX3-De0DkqXHzbf8d75xkw" + * ] + */ + whisper_call_control_ids?: string[]; + /** + * @description Whether a beep sound should be played when the participant joins and/or leaves the conference. Can be used to override the conference-level setting. + * @example on_exit + * @enum {string} + */ + beep_enabled?: 'always' | 'never' | 'on_enter' | 'on_exit'; + }; + /** + * @description Custom headers to be added to the SIP INVITE. + * @example [ + * { + * "name": "head_1", + * "value": "val_1" + * }, + * { + * "name": "head_2", + * "value": "val_2" + * } + * ] + */ + custom_headers?: components['schemas']['CustomSipHeader'][]; + /** + * Format: uuid + * @description Use this field to set the Billing Group ID for the call. Must be a valid and existing Billing Group ID. + * @example f5586561-8ff0-4291-a0ac-84fe544797bd + */ + billing_group_id?: string; + /** + * @description Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + /** + * @description Use this field to avoid duplicate commands. Telnyx will ignore others Dial commands with the same `command_id`. + * @example 891510ac-f3e4-11e8-af5b-de00688a4901 + */ + command_id?: string; + /** + * @description Use another call's control id for sharing the same call session id + * @example ilditnZK_eVysupV21KzmzN_sM29ygfauQojpm4BgFtfX5hXAcjotg== + */ + link_to?: string; + /** + * @description Defines whether media should be encrypted on the call. + * @default disabled + * @enum {string} + */ + media_encryption: 'disabled' | 'SRTP'; + /** @description SIP Authentication username used for SIP challenges. */ + sip_auth_username?: string; + /** @description SIP Authentication password used for SIP challenges. */ + sip_auth_password?: string; + /** + * @description SIP headers to be added to the SIP INVITE request. Currently only User-to-User header is supported. + * @example [ + * { + * "name": "User-to-User", + * "value": "value" + * } + * ] + */ + sip_headers?: components['schemas']['SipHeader'][]; + /** + * @description Defines SIP transport protocol to be used on the call. + * @default UDP + * @enum {string} + */ + sip_transport_protocol: 'UDP' | 'TCP' | 'TLS'; + sound_modifications?: components['schemas']['SoundModifications']; + /** + * @description The destination WebSocket address where the stream is going to be delivered. + * @example wss://www.example.com/websocket + */ + stream_url?: string; + /** + * @description Specifies which track should be streamed. + * @default inbound_track + * @example both_tracks + * @enum {string} + */ + stream_track: 'inbound_track' | 'outbound_track' | 'both_tracks'; + stream_bidirectional_mode?: components['schemas']['StreamBidirectionalMode']; + stream_bidirectional_codec?: components['schemas']['StreamBidirectionalCodec']; + /** + * @description Generate silence RTP packets when no transmission available. + * @default false + * @example true + */ + send_silence_when_idle: boolean; + /** + * @description Use this field to override the URL for which Telnyx will send subsequent webhooks to for this call. + * @example https://www.example.com/server-b/ + */ + webhook_url?: string; + /** + * @description HTTP request type used for `webhook_url`. + * @default POST + * @example GET + * @enum {string} + */ + webhook_url_method: 'POST' | 'GET'; + /** + * @description Start recording automatically after an event. Disabled by default. + * @example record-from-answer + * @enum {string} + */ + record?: 'record-from-answer'; + /** + * @description Defines which channel should be recorded ('single' or 'dual') when `record` is specified. + * @default dual + * @example single + * @enum {string} + */ + record_channels: 'single' | 'dual'; + /** + * @description Defines the format of the recording ('wav' or 'mp3') when `record` is specified. + * @default mp3 + * @example wav + * @enum {string} + */ + record_format: 'wav' | 'mp3'; + /** + * Format: int32 + * @description Defines the maximum length for the recording in seconds when `record` is specified. The minimum value is 0. The maximum value is 43200. The default value is 0 (infinite). + * @default 0 + * @example 1000 + */ + record_max_length: number; + /** + * Format: int32 + * @description The number of seconds that Telnyx will wait for the recording to be stopped if silence is detected when `record` is specified. The timer only starts when the speech is detected. Please note that call transcription is used to detect silence and the related charge will be applied. The minimum value is 0. The default value is 0 (infinite). + * @default 0 + * @example 100 + */ + record_timeout_secs: number; + /** + * @description When set to `trim-silence`, silence will be removed from the beginning and end of the recording. + * @example trim-silence + * @enum {string} + */ + record_trim?: 'trim-silence'; + /** + * @description The custom recording file name to be used instead of the default `call_leg_id`. Telnyx will still add a Unix timestamp suffix. + * @example my_recording_file_name + */ + record_custom_file_name?: string; + /** + * @description Enables Dialogflow for the current call. The default value is false. + * @default false + * @example true + */ + enable_dialogflow: boolean; + dialogflow_config?: components['schemas']['DialogflowConfig']; + /** + * @description Enable transcription upon call answer. The default value is false. + * @default false + * @example true + */ + transcription: boolean; + transcription_config?: components['schemas']['TranscriptionStartRequest']; + }; + /** + * Call resource + * @example { + * "account_sid": "61bf923e-5e4d-4595-a110-56190ea18a1b", + * "answered_by": null, + * "caller_name": "+13122010094", + * "date_created": "Thu, 15 Jun 2023 09:56:45 +0000", + * "date_updated": "Thu, 15 Jun 2023 09:56:56 +0000", + * "direction": "inbound", + * "duration": "11", + * "end_time": "Thu, 15 Jun 2023 09:56:56 +0000", + * "from": "+13123456789", + * "from_formatted": "(312) 345-6789", + * "price": null, + * "price_unit": null, + * "sid": "v3:KBnLO0ZK3DhKM5s7bE9VluaSmKsOchKht_fUYvxcp8ysbmzCCtpkmA", + * "start_time": "Thu, 15 Jun 2023 09:56:45 +0000", + * "status": "completed", + * "to": "+13987654321", + * "to_formatted": "(398) 765-4321", + * "uri": "/v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Calls/v3:KBnLO0ZK3DhKM5s7bE9VluaSmKsOchKht_fUYvxcp8ysbmzCCtpkmA.json" + * } + */ + CallResource: { + /** + * @description The id of the account the resource belongs to. + * @example 61bf923e-5e4d-4595-a110-56190ea18a1b + */ + account_sid?: string; + /** + * @description The value of the answering machine detection result, if this feature was enabled for the call. + * @example human + * @enum {string} + */ + answered_by?: 'human' | 'machine' | 'not_sure'; + /** + * @description Caller ID, if present. + * @example CALLER + */ + caller_name?: string; + /** + * @description The timestamp of when the resource was created. + * @example Thu, 15 Jun 2023 09:56:45 +0000 + */ + date_created?: string; + /** + * @description The timestamp of when the resource was last updated. + * @example Thu, 15 Jun 2023 09:56:45 +0000 + */ + date_updated?: string; + /** + * @description The direction of this call. + * @example inbound + * @enum {string} + */ + direction?: 'inbound' | 'outbound'; + /** + * @description The duration of this call, given in seconds. + * @example 12 + */ + duration?: string; + /** + * @description The end time of this call. + * @example Thu, 15 Jun 2023 09:56:45 +0000 + */ + end_time?: string; + /** + * @description The phone number or SIP address that made this call. + * @example +13123456789 + */ + from?: string; + /** + * @description The from number formatted for display. + * @example (312) 345-6789 + */ + from_formatted?: string; + /** + * @description The price of this call, the currency is specified in the price_unit field. Only populated when the call cost feature is enabled for the account. + * @example 0.10 + */ + price?: string; + /** + * @description The unit in which the price is given. + * @example USD + */ + price_unit?: string; + /** + * @description The identifier of this call. + * @example v3:KBnLO0ZK3DhKM5s7bE9VluaSmKsOchKht_fUYvxcp8ysbmzCCtpkmA + */ + sid?: string; + /** + * @description The start time of this call. + * @example Thu, 15 Jun 2023 09:56:45 +0000 + */ + start_time?: string; + /** + * @description The status of this call. + * @example completed' + * @enum {string} + */ + status?: + | 'ringing' + | 'in-progress' + | 'canceled' + | 'completed' + | 'failed' + | 'busy' + | 'no-answer'; + /** + * @description The phone number or SIP address that received this call. + * @example +13987654321 + */ + to?: string; + /** + * @description The to number formatted for display. + * @example (398) 765-4321 + */ + to_formatted?: string; + /** + * @description The relative URI for this call. + * @example /v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Calls/v3:KBnLO0ZK3DhKM5s7bE9VluaSmKsOchKht_fUYvxcp8ysbmzCCtpkmA.json + */ + uri?: string; + }; + /** + * Multiple call resources + * @example { + * "calls": [], + * "end": 0, + * "first_page_uri": "/v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Calls.json?Page=0&PageSize=1", + * "next_page_uri": "/v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Calls.json?Page=1&PageSize=1&PageToken=MTY4AjgyNDkwNzIxMQ", + * "page": 0, + * "page_size": 1, + * "start": 0, + * "uri": "/v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Calls.json?Page=0&PageSize=1" + * } + */ + CallResourceIndex: { + calls?: components['schemas']['CallResource'][]; + /** + * @description The number of the last element on the page, zero-indexed. + * @example 19 + */ + end?: number; + /** + * @description /v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Calls.json?Page=0&PageSize=1 + * @example accepted + */ + first_page_uri?: string; + /** + * @description /v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Calls.json?Page=1&PageSize=1&PageToken=MTY4AjgyNDkwNzIxMQ + * @example accepted + */ + next_page_uri?: string; + /** + * @description Current page number, zero-indexed. + * @example 0 + */ + page?: number; + /** + * @description The number of items on the page + * @example 20 + */ + page_size?: number; + /** + * @description The number of the first element on the page, zero-indexed. + * @example 0 + */ + start?: number; + /** + * @description The URI of the current page. + * @example /v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Calls.json?Page=0&PageSize=1 + */ + uri?: string; + }; + /** + * Call Speak Ended + * @example { + * "record_type": "event", + * "event_type": "call.speak.ended", + * "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + * "occurred_at": "2018-02-02T22:25:27.521992Z", + * "payload": { + * "call_control_id": "v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg", + * "connection_id": "7267xxxxxxxxxxxxxx", + * "call_leg_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + * "call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + * "status": "completed" + * } + * } + */ + CallSpeakEnded: { + /** + * @description Identifies the type of the resource. + * @example event + * @enum {string} + */ + record_type?: 'event'; + /** + * @description The type of event being delivered. + * @example call.speak.ended + * @enum {string} + */ + event_type?: 'call.speak.ended'; + /** + * Format: uuid + * @description Identifies the type of resource. + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + */ + id?: string; + /** + * Format: date-time + * @description ISO 8601 datetime of when the event occurred. + * @example 2018-02-02T22:25:27.521992Z + */ + occurred_at?: string; + payload?: { + /** + * @description Call ID used to issue commands via Call Control API. + * @example v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg + */ + call_control_id?: string; + /** + * @description Call Control App ID (formerly Telnyx connection ID) used in the call. + * @example 7267xxxxxxxxxxxxxx + */ + connection_id?: string; + /** + * @description ID that is unique to the call and can be used to correlate webhook events. + * @example 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + */ + call_leg_id?: string; + /** + * @description ID that is unique to the call session and can be used to correlate webhook events. Call session is a group of related call legs that logically belong to the same phone call, e.g. an inbound and outbound leg of a transferred call. + * @example 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + */ + call_session_id?: string; + /** + * @description State received from a command. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + /** + * @description Reflects how the command ended. + * @example completed + * @enum {string} + */ + status?: 'completed' | 'call_hangup' | 'cancelled_amd'; + }; + }; + /** Call Speak Ended Event */ + CallSpeakEndedEvent: { + data?: components['schemas']['CallSpeakEnded']; + }; + /** + * Call Speak Started + * @example { + * "record_type": "event", + * "event_type": "call.speak.started", + * "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + * "occurred_at": "2018-02-02T22:25:27.521992Z", + * "payload": { + * "call_control_id": "v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg", + * "connection_id": "7267xxxxxxxxxxxxxx", + * "call_leg_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + * "call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d" + * } + * } + */ + CallSpeakStarted: { + /** + * @description Identifies the type of the resource. + * @example event + * @enum {string} + */ + record_type?: 'event'; + /** + * @description The type of event being delivered. + * @example call.speak.started + * @enum {string} + */ + event_type?: 'call.speak.started'; + /** + * Format: uuid + * @description Identifies the type of resource. + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + */ + id?: string; + /** + * Format: date-time + * @description ISO 8601 datetime of when the event occurred. + * @example 2018-02-02T22:25:27.521992Z + */ + occurred_at?: string; + payload?: { + /** + * @description Call ID used to issue commands via Call Control API. + * @example v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg + */ + call_control_id?: string; + /** + * @description Call Control App ID (formerly Telnyx connection ID) used in the call. + * @example 7267xxxxxxxxxxxxxx + */ + connection_id?: string; + /** + * @description ID that is unique to the call and can be used to correlate webhook events. + * @example 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + */ + call_leg_id?: string; + /** + * @description ID that is unique to the call session and can be used to correlate webhook events. Call session is a group of related call legs that logically belong to the same phone call, e.g. an inbound and outbound leg of a transferred call. + * @example 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + */ + call_session_id?: string; + /** + * @description State received from a command. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + }; + }; + /** Call Speak Started Event */ + CallSpeakStartedEvent: { + data?: components['schemas']['CallSpeakStarted']; + }; + /** + * Streaming Failed + * @example { + * "record_type": "event", + * "event_type": "streaming.failed", + * "id": "25dc3731-e51e-4927-a50d-a61cc25984b1", + * "occurred_at": "2021-12-15T14:11:24.613295Z", + * "payload": { + * "call_control_id": "31f19208-5db0-11ec-9ea7-02420a0d3a69", + * "connection_id": "7267xxxxxxxxxxxxxx", + * "call_leg_id": "31f19208-5db0-11ec-9ea7-02420a0d3a69", + * "call_session_id": "31f19208-5db0-11ec-9ea7-02420a0d3a69", + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + * "failure_reason": "connection_failed", + * "stream_id": "1edb94f9-7ef0-4150-b502-e0ebadfd9491", + * "stream_params": { + * "stream_url": "wss://www.example.com/websocket", + * "stream_track": "inbound_track" + * }, + * "stream_type": "websocket" + * } + * } + */ + CallStreamingFailed: { + /** + * @description Identifies the resource. + * @example event + * @enum {string} + */ + record_type?: 'event'; + /** + * @description The type of event being delivered. + * @example streaming.failed + * @enum {string} + */ + event_type?: 'streaming.failed'; + /** + * Format: uuid + * @description Identifies the type of resource. + * @example 25dc3731-e51e-4927-a50d-a61cc25984b1 + */ + id?: string; + /** + * Format: date-time + * @description ISO 8601 datetime of when the event occurred. + * @example 2021-12-15T14:11:24.613295Z + */ + occurred_at?: string; + payload?: { + /** + * @description Call ID used to issue commands via Call Control API. + * @example 31f19208-5db0-11ec-9ea7-02420a0d3a69 + */ + call_control_id?: string; + /** + * @description Call Control App ID (formerly Telnyx connection ID) used in the call. + * @example 7267xxxxxxxxxxxxxx + */ + connection_id?: string; + /** + * @description ID that is unique to the call and can be used to correlate webhook events. + * @example 31f19208-5db0-11ec-9ea7-02420a0d3a69 + */ + call_leg_id?: string; + /** + * @description ID that is unique to the call session and can be used to correlate webhook events. Call session is a group of related call legs that logically belong to the same phone call, e.g. an inbound and outbound leg of a transferred call. + * @example 31f19208-5db0-11ec-9ea7-02420a0d3a69 + */ + call_session_id?: string; + /** + * @description State received from a command. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + /** + * @description A short description explaning why the media streaming failed. + * @example connection_failed + */ + failure_reason?: string; + /** + * Format: uuid + * @description Identifies the streaming. + * @example 1edb94f9-7ef0-4150-b502-e0ebadfd9491 + */ + stream_id?: string; + /** @description Streaming parameters as they were originally given to the Call Control API. */ + stream_params?: { + /** + * @description The destination WebSocket address where the stream is going to be delivered. + * @example wss://www.example.com/websocket + */ + stream_url?: string; + /** + * @description Specifies which track should be streamed. + * @default inbound_track + * @example inbound_track + * @enum {string} + */ + track: 'inbound_track' | 'outbound_track' | 'both_tracks'; + }; + /** + * @description The type of stream connection the stream is performing. + * @example websocket + * @enum {string} + */ + stream_type?: 'websocket' | 'dialogflow'; + }; + }; + /** Streaming Failed Event */ + CallStreamingFailedEvent: { + data?: components['schemas']['CallStreamingFailed']; + }; + /** + * Streaming Started + * @example { + * "record_type": "event", + * "event_type": "streaming.started", + * "id": "7d743d69-f7e8-4761-b7d4-8cacf9d3c031", + * "occurred_at": "2021-12-15T14:06:32.059436Z", + * "payload": { + * "call_control_id": "31f19208-5db0-11ec-9ea7-02420a0d3a69", + * "connection_id": "7267xxxxxxxxxxxxxx", + * "call_leg_id": "31f19208-5db0-11ec-9ea7-02420a0d3a69", + * "call_session_id": "31f19208-5db0-11ec-9ea7-02420a0d3a69", + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + * "stream_url": "wss://www.example.com/websocket" + * } + * } + */ + CallStreamingStarted: { + /** + * @description Identifies the type of the resource. + * @example event + * @enum {string} + */ + record_type?: 'event'; + /** + * @description The type of event being delivered. + * @example streaming.started + * @enum {string} + */ + event_type?: 'streaming.started'; + /** + * Format: uuid + * @description Identifies the type of resource. + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + */ + id?: string; + /** + * Format: date-time + * @description ISO 8601 datetime of when the event occurred. + * @example 2021-12-15T14:06:32.059436Z + */ + occurred_at?: string; + payload?: { + /** + * @description Call ID used to issue commands via Call Control API. + * @example 31f19208-5db0-11ec-9ea7-02420a0d3a69 + */ + call_control_id?: string; + /** + * @description Call Control App ID (formerly Telnyx connection ID) used in the call. + * @example 7267xxxxxxxxxxxxxx + */ + connection_id?: string; + /** + * @description ID that is unique to the call and can be used to correlate webhook events. + * @example 31f19208-5db0-11ec-9ea7-02420a0d3a69 + */ + call_leg_id?: string; + /** + * @description ID that is unique to the call session and can be used to correlate webhook events. Call session is a group of related call legs that logically belong to the same phone call, e.g. an inbound and outbound leg of a transferred call. + * @example 31f19208-5db0-11ec-9ea7-02420a0d3a69 + */ + call_session_id?: string; + /** + * @description State received from a command. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + /** + * @description Destination WebSocket address where the stream is going to be delivered. + * @example wss://www.example.com/websocket + */ + stream_url?: string; + }; + }; + /** Streaming Started Event */ + CallStreamingStartedEvent: { + data?: components['schemas']['CallStreamingStarted']; + }; + /** + * Streaming Stopped + * @example { + * "record_type": "event", + * "event_type": "streaming.stopped", + * "id": "25dc3731-e51e-4927-a50d-a61cc25984b1", + * "occurred_at": "2021-12-15T14:11:24.613295Z", + * "payload": { + * "call_control_id": "31f19208-5db0-11ec-9ea7-02420a0d3a69", + * "connection_id": "7267xxxxxxxxxxxxxx", + * "call_leg_id": "31f19208-5db0-11ec-9ea7-02420a0d3a69", + * "call_session_id": "31f19208-5db0-11ec-9ea7-02420a0d3a69", + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + * "stream_url": "wss://www.example.com/websocket" + * } + * } + */ + CallStreamingStopped: { + /** + * @description Identifies the type of the resource. + * @example event + * @enum {string} + */ + record_type?: 'event'; + /** + * @description The type of event being delivered. + * @example streaming.stopped + * @enum {string} + */ + event_type?: 'streaming.stopped'; + /** + * Format: uuid + * @description Identifies the type of resource. + * @example 25dc3731-e51e-4927-a50d-a61cc25984b1 + */ + id?: string; + /** + * Format: date-time + * @description ISO 8601 datetime of when the event occurred. + * @example 2021-12-15T14:11:24.613295Z + */ + occurred_at?: string; + payload?: { + /** + * @description Call ID used to issue commands via Call Control API. + * @example 31f19208-5db0-11ec-9ea7-02420a0d3a69 + */ + call_control_id?: string; + /** + * @description Call Control App ID (formerly Telnyx connection ID) used in the call. + * @example 7267xxxxxxxxxxxxxx + */ + connection_id?: string; + /** + * @description ID that is unique to the call and can be used to correlate webhook events. + * @example 31f19208-5db0-11ec-9ea7-02420a0d3a69 + */ + call_leg_id?: string; + /** + * @description ID that is unique to the call session and can be used to correlate webhook events. Call session is a group of related call legs that logically belong to the same phone call, e.g. an inbound and outbound leg of a transferred call. + * @example 31f19208-5db0-11ec-9ea7-02420a0d3a69 + */ + call_session_id?: string; + /** + * @description State received from a command. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + /** + * @description Destination WebSocket address where the stream is going to be delivered. + * @example wss://www.example.com/websocket + */ + stream_url?: string; + }; + }; + /** Streaming Stopped Event */ + CallStreamingStoppedEvent: { + data?: components['schemas']['CallStreamingStopped']; + }; + CallbackWebhookMeta: { + /** + * @description The number of times the callback webhook has been attempted. + * @example 1 + */ + attempt?: number; + /** + * @description The URL that the callback webhook was delivered to. + * @example https://example.com/webhook + */ + delivered_to?: string; + }; + CallerName: { + /** + * @description The name of the requested phone number's owner as per the CNAM database + * @example TELNYX LLC + */ + caller_name?: string; + /** + * @description A caller-name lookup specific error code, expressed as a stringified 5-digit integer + * @example 10001 + */ + error_code?: string; + }; + /** CampaignCSP */ + CampaignCSP: { + /** + * Campaignid + * @description Alphanumeric identifier assigned by the registry for a campaign. This identifier is required by the NetNumber OSR SMS enabling process of 10DLC. + * @example 4b30017a-15eb-6a25-2e3f-59b6422cud79 + */ + campaignId?: string; + /** + * Resellerid + * @description Alphanumeric identifier of the reseller that you want to associate with this campaign. + * @example RPQFAOY + */ + resellerId?: string; + /** @description Current campaign status. Possible values: ACTIVE, EXPIRED. A newly created campaign defaults to ACTIVE status. */ + status?: components['schemas']['Status']; + /** + * Createdate + * Format: date-time + * @description Unix timestamp when campaign was created. + */ + createDate?: string; + /** + * Autorenewal + * @description Campaign subscription auto-renewal status. + */ + autoRenewal?: boolean; + /** + * Billeddate + * Format: date-time + * @description Campaign recent billed date. + */ + billedDate?: string; + /** + * Brandid + * @description Alphanumeric identifier of the brand associated with this campaign. + * @example 4b206179-f731-8ab7-f19c-34e19d22ide9 + */ + brandId: string; + vertical: components['schemas']['Vertical']; + usecase: components['schemas']['Usecase']; + subUsecases?: components['schemas']['Usecase']; + /** + * Description + * @description Summary description of this campaign. + * @example Campaign description goes here. + */ + description: string; + /** + * Embeddedlink + * @description Does message generated by the campaign include URL link in SMS? + * @default false + */ + embeddedLink: boolean; + /** + * Embeddedphone + * @description Does message generated by the campaign include phone number in SMS? + * @default false + */ + embeddedPhone: boolean; + /** + * Affiliatemarketing + * @description Does message content controlled by affiliate marketing other than the brand? + */ + affiliateMarketing?: boolean; + /** + * Numberpool + * @description Does campaign utilize pool of phone nubers? + * @default false + */ + numberPool: boolean; + /** + * Agegated + * @description Age gated content in campaign. + */ + ageGated?: boolean; + /** Directlending */ + directLending?: boolean; + /** + * Subscriberoptin + * @description Does campaign require subscriber to opt-in before SMS is sent to subscriber? + * @default false + */ + subscriberOptin: boolean; + /** + * Subscriberoptout + * @description Does campaign support subscriber opt-out keyword(s)? + * @default false + */ + subscriberOptout: boolean; + /** + * Subscriberhelp + * @description Does campaign responds to help keyword(s)? + * @default false + */ + subscriberHelp: boolean; + /** + * Sample1 + * @description Message sample. Some campaign tiers require 1 or more message samples. + * @example This is a sample message associated with your campaign! + */ + sample1?: string; + /** + * Sample2 + * @description Message sample. Some campaign tiers require 2 or more message samples. + */ + sample2?: string; + /** + * Sample3 + * @description Message sample. Some campaign tiers require 3 or more message samples. + */ + sample3?: string; + /** + * Sample4 + * @description Message sample. Some campaign tiers require 4 or more message samples. + */ + sample4?: string; + /** + * Sample5 + * @description Message sample. Some campaign tiers require 5 or more message samples. + */ + sample5?: string; + /** + * Messageflow + * @description Message flow description. + */ + messageFlow?: string; + /** + * Helpmessage + * @description Help message of the campaign. + */ + helpMessage?: string; + }; + /** CampaignCost */ + CampaignCost: { + /** Campaignusecase */ + campaignUsecase: string; + /** Monthlycost */ + monthlyCost: string; + /** Upfrontcost */ + upFrontCost: string; + /** Description */ + description: string; + }; + /** CampaignDeletionResponse */ + CampaignDeletionResponse: { + /** Time */ + time: number; + /** Record Type */ + record_type?: string; + /** Message */ + message?: string; + }; + /** CampaignRecordSetCSP */ + CampaignRecordSetCSP: { + /** Records */ + records?: components['schemas']['CampaignCSP'][]; + /** + * Page + * @example 1 + */ + page?: number; + /** + * Totalrecords + * @example 1 + */ + totalRecords?: number; + }; + /** CampaignRecordSet_CSP */ + CampaignRecordSet_CSP: { + /** Page */ + page?: number; + /** Records */ + records?: components['schemas']['TelnyxCampaignWithAssignedCount_CSP'][]; + /** Totalrecords */ + totalRecords?: number; + }; + /** + * CampaignRequest + * @description CampaignRequest object describes the campaign to be submitted via '/campaignBuilder/brand/{brandId}/usecase/{usecase}' operation. It is also used in operations for retrieving status of campaign request and for updating a pending request. + */ + CampaignRequest: { + /** + * Affiliatemarketing + * @description Does message content controlled by affiliate marketing other than the brand? + */ + affiliateMarketing?: boolean; + /** + * Agegated + * @description Age gated message content in campaign. + */ + ageGated?: boolean; + /** + * Autorenewal + * @description Campaign subscription auto-renewal option. If set to true, then campaign will automatically renewal at end of billing cycle. + */ + autoRenewal?: boolean; + /** + * Brandid + * @description Alphanumeric identifier of the brand associated with this campaign. + */ + brandId: string; + /** + * Description + * @description Summary description of this campaign. + */ + description: string; + /** + * Directlending + * @description Direct lending or loan arrangement + */ + directLending?: boolean; + /** + * Embeddedlink + * @description Does message generated by the campaign include URL link in SMS? + */ + embeddedLink?: boolean; + /** + * Embeddedphone + * @description Does message generated by the campaign include phone number in SMS? + */ + embeddedPhone?: boolean; + /** + * Helpkeywords + * @description Subscriber help keywords. Multiple keywords are comma separated without space. + */ + helpKeywords?: string; + /** + * Helpmessage + * @description Help message of the campaign. + */ + helpMessage?: string; + /** + * Messageflow + * @description Message flow description. + */ + messageFlow?: string; + /** + * Mnoids + * @description Submit campaign to given list of MNOs by MNO's network ID. Default is all MNOs if no value provided. + */ + mnoIds?: number[]; + /** + * Numberpool + * @description Does campaign utilize pool of phone numbers? + */ + numberPool?: boolean; + /** + * Optinkeywords + * @description Subscriber opt-in keywords. Multiple keywords are comma separated without space. + */ + optinKeywords?: string; + /** + * Optinmessage + * @description Subscriber opt-in message. + */ + optinMessage?: string; + /** + * Optoutkeywords + * @description Subscriber opt-out keywords. Multiple keywords are comma separated without space. + */ + optoutKeywords?: string; + /** + * Optoutmessage + * @description Subscriber opt-out message. + */ + optoutMessage?: string; + /** + * Referenceid + * @description Caller supplied campaign reference ID. If supplied, the value must be unique across all submitted campaigns. Can be used to prevent duplicate campaign registrations. + */ + referenceId?: string; + /** + * Resellerid + * @description Alphanumeric identifier of the reseller that you want to associate with this campaign. + */ + resellerId?: string; + /** + * Sample1 + * @description Message sample. Some campaign tiers require 1 or more message samples. + */ + sample1?: string; + /** + * Sample2 + * @description Message sample. Some campaign tiers require 2 or more message samples. + */ + sample2?: string; + /** + * Sample3 + * @description Message sample. Some campaign tiers require 3 or more message samples. + */ + sample3?: string; + /** + * Sample4 + * @description Message sample. Some campaign tiers require 4 or more message samples. + */ + sample4?: string; + /** + * Sample5 + * @description Message sample. Some campaign tiers require 5 or more message samples. + */ + sample5?: string; + /** + * Subusecases + * @description Campaign sub-usecases. Must be of defined valid sub-usecase types. Use `/registry/enum/usecase` operation to retrieve list of valid sub-usecases + */ + subUsecases?: string[]; + /** + * Subscriberhelp + * @description Does campaign responds to help keyword(s)? + */ + subscriberHelp?: boolean; + /** + * Subscriberoptin + * @description Does campaign require subscriber to opt-in before SMS is sent to subscriber? + */ + subscriberOptin?: boolean; + /** + * Subscriberoptout + * @description Does campaign support subscriber opt-out keyword(s)? + */ + subscriberOptout?: boolean; + /** + * Tag + * @description Tags to be set on the Campaign. + */ + tag?: string[]; + /** + * Termsandconditions + * @description Is terms and conditions accepted? + */ + termsAndConditions?: boolean; + /** + * Usecase + * @description Campaign usecase. Must be of defined valid types. Use `/registry/enum/usecase` operation to retrieve usecases available for given brand. + */ + usecase: string; + /** + * WebhookURL + * @description Webhook to which campaign status updates are sent. + * @example https://webhook.com/67ea78a8-9f32-4d04-b62d-f9502e8e5f93 + */ + webhookURL?: string; + /** + * WebhookFailoverURL + * @description Failover webhook to which campaign status updates are sent. + * @example https://webhook.com/93711262-23e5-4048-a966-c0b2a16d5963 + */ + webhookFailoverURL?: string; + }; + /** CampaignSharingChain */ + CampaignSharingChain: { + sharedByMe?: components['schemas']['CampaignSharingStatus']; + sharedWithMe?: components['schemas']['CampaignSharingStatus']; + }; + /** CampaignSharingStatus */ + CampaignSharingStatus: { + /** Downstreamcnpid */ + downstreamCnpId?: string; + /** Shareddate */ + sharedDate?: string; + /** Sharingstatus */ + sharingStatus?: string; + /** Statusdate */ + statusDate?: string; + /** Upstreamcnpid */ + upstreamCnpId?: string; + }; + /** CampaignStatus */ + CampaignStatus: { + /** + * Description + * @description The campaign description. + * @example This campaign belongs to John's Donuts and will be used for marketing. + */ + description: string; + /** + * @description The current status of the campaign. + * @example pending + */ + status: components['schemas']['CreationStatus']; + /** + * Campaignid + * @description The ID of the campaign created via bulk creation. This campaign will only have a campaignId after the campaign has been created. + * @example 4b30017a-2f50-4c90-c9e6-5f67304cbde7 + */ + campaignId?: string; + /** + * Created At + * Format: date-time + * @description The date and time that the campaign was created. + * @example 2021-06-30T10:49:04-07:00 + */ + created_at?: string; + /** + * Error + * @description Errors related to a campaign creation failure. + * @example More sample messages required for some mobile network operators. + */ + error?: string; + }; + /** Campaign Status Update Event */ + CampaignStatusUpdateEvent: { + /** + * Brandid + * @description Brand ID associated with the campaign. + * @example d88dd2aa-1bb9-4ef0-9ec8-1752b80316a5 + */ + brandId?: string; + /** + * Campaignid + * @description The ID of the campaign. + * @example 4b300178-131c-d902-d54e-72d90ba1620j + */ + campaignId?: string; + /** + * CreateDate + * @description Unix timestamp when campaign was created. + */ + createDate?: string; + /** + * Cspid + * @description Alphanumeric identifier of the CSP associated with this campaign. + */ + cspId?: string; + /** + * IsTMobileRegistered + * @description Indicates whether the campaign is registered with T-Mobile. + */ + isTMobileRegistered?: boolean; + }; + Carrier: { + /** + * @description Region code that matches the specific country calling code if the requested phone number type is mobile + * @example US + */ + mobile_country_code?: string; + /** + * @description National destination code (NDC), with a 0 prefix, if an NDC is found and the requested phone number type is mobile + * @example 0866 + */ + mobile_network_code?: string; + /** + * @description SPID (Service Provider ID) name, if the requested phone number has been ported; otherwise, the name of carrier who owns the phone number block + * @example Telnyx/4 + */ + name?: string; + /** + * @description A phone number type that identifies the type of service associated with the requested phone number + * @example voip + * @enum {string} + */ + type?: + | 'fixed line' + | 'mobile' + | 'voip' + | 'fixed line or mobile' + | 'toll free' + | 'premium rate' + | 'shared cost' + | 'personal number' + | 'pager' + | 'uan' + | 'voicemail' + | 'unknown'; + /** + * @description Unused + * @example null + */ + error_code?: string; + /** + * @description If known to Telnyx and applicable, the primary network carrier. + * @example AT&T + */ + normalized_carrier?: string; + }; + CdrGetSyncUsageReportResponse: { + data?: components['schemas']['CdrUsageReportResponse']; + }; + CdrUsageReportResponse: { + /** + * Format: uuid + * @description Identifies the resource + */ + id?: string; + /** + * Format: date-time + * @example 2018-02-02T22:25:27.521Z + */ + start_time?: string; + /** + * Format: date-time + * @example 2018-02-02T22:25:27.521Z + */ + end_time?: string; + /** @example [1234567890L, 9876543210L] */ + connections?: number[]; + /** @enum {string} */ + aggregation_type?: + | 'NO_AGGREGATION' + | 'CONNECTION' + | 'TAG' + | 'BILLING_GROUP'; + /** @enum {string} */ + status?: 'PENDING' | 'COMPLETE' | 'FAILED' | 'EXPIRED'; + /** @example http://portal.telnyx.com/downloads/report_name_8hvb45Gu.csv */ + report_url?: string; + result?: Record; + /** + * Format: date-time + * @example 2018-02-02T22:25:27.521Z + */ + created_at?: string; + /** + * Format: date-time + * @example 2018-02-02T22:25:27.521Z + */ + updated_at?: string; + /** @example cdr_usage_report */ + record_type?: string; + /** @enum {string} */ + product_breakdown?: + | 'NO_BREAKDOWN' + | 'DID_VS_TOLL_FREE' + | 'COUNTRY' + | 'DID_VS_TOLL_FREE_PER_COUNTRY'; + }; + /** Function */ + ChatCompletionMessageToolCallFunctionParam: { + /** Arguments */ + arguments: string; + /** Name */ + name: string; + }; + /** ChatCompletionMessageToolCallParam */ + ChatCompletionMessageToolCallParam: { + /** Id */ + id: string; + function: components['schemas']['ChatCompletionMessageToolCallFunctionParam']; + /** Type */ + type: string; + }; + /** Function */ + ChatCompletionNamedToolChoiceFunctionParam: { + /** Name */ + name: string; + }; + /** ChatCompletionRequest */ + ChatCompletionRequest: { + /** + * @description A list of the previous chat messages for context. + * @example [ + * { + * "role": "system", + * "content": "You are a friendly chatbot." + * }, + * { + * "role": "user", + * "content": "Hello, world!" + * } + * ] + */ + messages: components['schemas']['ChatCompletionSystemMessageParam'][]; + /** + * @description The language model to chat with. If you are optimizing for speed + price, try `meta-llama/Meta-Llama-3.1-8B-Instruct`. For quality, try `meta-llama/Meta-Llama-3.1-70B-Instruct`. Or explore our [LLM Library](https://telnyx.com/products/llm-library). + * @default meta-llama/Meta-Llama-3.1-8B-Instruct + */ + model: string; + /** + * @description Whether or not to stream data-only server-sent events as they become available. + * @default false + */ + stream: boolean; + /** + * @description Adjusts the "creativity" of the model. Lower values make the model more deterministic and repetitive, while higher values make the model more random and creative. + * @default 0.1 + */ + temperature: number; + /** @description Maximum number of completion tokens the model should generate. */ + max_tokens?: number; + /** @description The `function` tool type follows the same schema as the [OpenAI Chat Completions API](https://platform.openai.com/docs/api-reference/chat). The `retrieval` tool type is unique to Telnyx. You may pass a list of [embedded storage buckets](https://developers.telnyx.com/api/inference/inference-embedding/post-embedding) for retrieval-augmented generation. */ + tools?: ( + | components['schemas']['ChatCompletionToolParam'] + | components['schemas']['Retrieval'] + )[]; + /** @enum {string} */ + tool_choice?: 'none' | 'auto' | 'required'; + /** @description Use this is you want to guarantee a JSON output without defining a schema. For control over the schema, use `guided_json`. */ + response_format?: components['schemas']['ChatCompletionResponseFormatParam']; + /** @description Must be a valid JSON schema. If specified, the output will follow the JSON schema. */ + guided_json?: Record; + /** @description If specified, the output will follow the regex pattern. */ + guided_regex?: string; + /** @description If specified, the output will be exactly one of the choices. */ + guided_choice?: string[]; + /** @description This is an alternative to `top_p` that [many prefer](https://github.com/huggingface/transformers/issues/27670). Must be in [0, 1]. */ + min_p?: number; + /** @description This will return multiple choices for you instead of a single chat completion. */ + n?: number; + /** + * @description Setting this to `true` will allow the model to [explore more completion options](https://huggingface.co/blog/how-to-generate#beam-search). This is not supported by OpenAI. + * @default false + */ + use_beam_search: boolean; + /** @description This is used with `use_beam_search` to determine how many candidate beams to explore. */ + best_of?: number; + /** + * @description This is used with `use_beam_search` to prefer shorter or longer completions. + * @default 1 + */ + length_penalty: number; + /** + * @description This is used with `use_beam_search`. If `true`, generation stops as soon as there are `best_of` complete candidates; if `false`, a heuristic is applied and the generation stops when is it very unlikely to find better candidates. + * @default false + */ + early_stopping: boolean; + /** + * @description Whether to return log probabilities of the output tokens or not. If true, returns the log probabilities of each output token returned in the `content` of `message`. + * @default false + */ + logprobs: boolean; + /** @description This is used with `logprobs`. An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. */ + top_logprobs?: number; + /** + * @description Higher values will penalize the model from repeating the same output tokens. + * @default 0 + */ + frequency_penalty: number; + /** + * @description Higher values will penalize the model from repeating the same output tokens. + * @default 0 + */ + presence_penalty: number; + /** @description An alternative or complement to `temperature`. This adjusts how many of the top possibilities to consider. */ + top_p?: number; + /** @description If you are using OpenAI models using our API, this is how you pass along your OpenAI API key. */ + openai_api_key?: string; + }; + /** ChatCompletionResponseFormatParam */ + ChatCompletionResponseFormatParam: { + /** @enum {string} */ + type: 'text' | 'json_object'; + }; + /** ChatCompletionSystemMessageParam */ + ChatCompletionSystemMessageParam: { + content: + | string + | { + /** @enum {string} */ + type: 'text' | 'image_url'; + text?: string; + image_url?: string; + }[]; + /** @enum {string} */ + role: 'system' | 'user' | 'assistant' | 'tool'; + }; + /** Function */ + ChatCompletionToolParam: { + /** @enum {string} */ + type: 'function'; + function: components['schemas']['FunctionDefinition']; + }; + /** + * Civic Address + * @example { + * "id": "07a4dc5d-9b3b-4ba2-88a4-6ba172316c65", + * "record_type": "civic_address", + * "city_or_town": "Chicago", + * "city_or_town_alias": null, + * "company_name": "Telnyx", + * "country": "US", + * "county_or_district": "US", + * "default_location_id": "18ded4bb-b694-44c1-a89b-a35b7acd4c9e", + * "description": "Chicago Office", + * "house_number": "311", + * "house_number_suffix": null, + * "locations": [ + * { + * "id": "18ded4bb-b694-44c1-a89b-a35b7acd4c9e", + * "additional_info": null, + * "description": "Chicago Office", + * "is_default": true + * }, + * { + * "id": "d420a57f-c4ae-4697-87e1-fbefd9e86f72", + * "additional_info": "Main building, Suite 504", + * "description": null, + * "is_default": false + * } + * ], + * "postal_or_zip_code": "60654", + * "state_or_province": "IL", + * "street_name": "West Superior Street", + * "street_suffix": null + * } + */ + CivicAddress: { + id?: components['schemas']['UUID']; + /** + * @description Identifies the type of the resource. + * @example civic_address + */ + record_type?: string; + /** @example Chicago */ + city_or_town?: string; + city_or_town_alias?: string; + /** @example Telnyx */ + company_name?: string; + /** @example US */ + country?: string; + /** @example US */ + country_or_district?: string; + /** + * Format: uuid + * @description Identifies what is the default location in the list of locations. + */ + default_location_id?: string; + /** @example Chicago Office */ + description?: string; + /** @example 311 */ + house_number?: string; + house_number_suffix?: string; + /** @example 60654 */ + postal_or_zip_code?: string; + /** @example IL */ + state_or_province?: string; + /** @example West Superior Street */ + street_name?: string; + street_suffix?: string; + locations?: components['schemas']['Location'][]; + }; + /** + * Update client state Request + * @example { + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d" + * } + */ + ClientStateUpdateRequest: { + /** + * @description Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state: string; + }; + /** + * CloudflareSyncStatus + * @description An enumeration. + * @enum {string} + */ + CloudflareSyncStatus: 'pending' | 'added'; + /** + * @description The CNAM listing settings for a phone number. + * @example { + * "cnam_listing_enabled": true, + * "cnam_listing_details": "example" + * } + */ + CnamListing: { + /** + * @description Enables CNAM listings for this number. Requires cnam_listing_details to also be set. + * @default false + */ + cnam_listing_enabled: boolean; + /** @description The CNAM listing details for this number. Must be alphanumeric characters or spaces with a maximum length of 15. Requires cnam_listing_enabled to also be set to true. */ + cnam_listing_details?: string; + }; + Comment: { + /** + * Format: uuid + * @example 12ade33a-21c0-473b-b055-b3c836e1c292 + */ + readonly id?: string; + /** @example Hi there, .... */ + body?: string; + /** @example user@company.com */ + readonly commenter?: string; + /** + * @example user + * @enum {string} + */ + readonly commenter_type?: 'admin' | 'user'; + /** + * @example sub_number_order + * @enum {string} + */ + comment_record_type?: + | 'number_order' + | 'sub_number_order' + | 'number_order_phone_number'; + /** + * Format: uuid + * @example 8ffb3622-7c6b-4ccc-b65f-7a3dc0099576 + */ + comment_record_id?: string; + /** + * Format: datetime + * @description An ISO 8901 datetime string for when the comment was read. + * @example 2018-01-01T00:00:00.000000Z + */ + readonly read_at?: string; + /** + * Format: datetime + * @description An ISO 8901 datetime string denoting when the comment was created. + * @example 2018-01-01T00:00:00.000000Z + */ + readonly created_at?: string; + /** + * Format: datetime + * @description An ISO 8901 datetime string for when the comment was updated. + * @example 2018-01-01T00:00:00.000000Z + */ + readonly updated_at?: string; + }; + /** + * OTAUpdate + * @description This object represents an Over the Air (OTA) update request. It allows tracking the current status of a operation that apply settings in a particular SIM card.

+ * @example { + * "created_at": "2018-02-02T22:25:27.521Z", + * "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58", + * "record_type": "ota_update", + * "settings": { + * "mobile_network_operators_preferences": [ + * { + * "mobile_network_operator_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58", + * "mobile_network_operator_name": "AT&T Mobility (USACG)", + * "priority": 0 + * } + * ] + * }, + * "sim_card_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58", + * "status": "in-progress", + * "type": "sim_card_network_preferences", + * "updated_at": "2018-02-02T22:25:27.521Z" + * } + */ + CompleteOTAUpdate: { + /** + * Format: uuid + * @description Identifies the resource. + * @example 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + */ + readonly id?: string; + /** @example ota_update */ + readonly record_type?: string; + /** + * Format: uuid + * @description The identification UUID of the related SIM card resource. + * @example 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + */ + sim_card_id?: string; + /** + * @description Represents the type of the operation requested. This will relate directly to the source of the request. + * @example sim_card_network_preferences + * @enum {string} + */ + type?: 'sim_card_network_preferences'; + /** + * @example in-progress + * @enum {string} + */ + status?: 'in-progress' | 'completed' | 'failed'; + /** @description A JSON object representation of the operation. The information present here will relate directly to the source of the OTA request. */ + settings?: { + mobile_network_operators_preferences?: components['schemas']['MobileNetworkOperatorsPreferencesResponse']; + }; + /** + * @description ISO 8601 formatted date-time indicating when the resource was created. + * @example 2018-02-02T22:25:27.521Z + */ + readonly created_at?: string; + /** + * @description ISO 8601 formatted date-time indicating when the resource was updated. + * @example 2018-02-02T22:25:27.521Z + */ + readonly updated_at?: string; + }; + /** + * Composition Completed + * @example { + * "record_type": "event", + * "event_type": "video.room.composition.completed", + * "id": "d51754fc-6888-4b0e-8f29-fc3ae41250cd", + * "occurred_at": "2022-03-02 04:47:29.980874Z", + * "payload": { + * "composition_id": "5970ce77-4aeb-4e18-ac8c-3effca0c145a", + * "download_url": "https://www.example.com", + * "duration_secs": 53, + * "format": "mp4", + * "resolution": "1280x720", + * "room_id": "2fbf2c0d-b6aa-463f-aeed-83ce298be978", + * "session_id": "7c4da191-2600-4df6-a35e-0ecae6caa5d3", + * "size_mb": 2.6 + * } + * } + */ + CompositionCompleted: { + /** + * @description An identifier for the type of the resource. + * @example event + * @enum {string} + */ + record_type?: 'event'; + /** + * @description The type of event being delivered. + * @example video.room.composition.completed + * @enum {string} + */ + event_type?: 'video.room.composition.completed'; + /** + * Format: uuid + * @description Uniquely identify the event. + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + */ + id?: string; + /** + * Format: date-time + * @description ISO 8601 datetime of when the event occurred. + * @example 2018-02-02T22:25:27.521992Z + */ + occurred_at?: string; + payload?: { + /** + * Format: uuid + * @description Composition ID that identifies the room composition. + * @example 0ccc7b54-4df3-4bca-a65a-35a1ecc777f0 + */ + composition_id?: string; + /** + * @description Url to download the room composition. + * @example https://www.example.com + */ + download_url?: string; + /** + * @description Room composition duration in seconds. + * @example 67 + */ + duration_secs?: number; + /** + * @description Format of the room composition. + * @example mp4 + */ + format?: string; + /** + * @description Format of the room composition. + * @example 1280x720 + */ + resolution?: string; + /** + * Format: uuid + * @description Room ID associated with the room composition. + * @example 0ccc7b54-4df3-4bca-a65a-35a1ecc777f0 + */ + room_id?: string; + /** + * Format: uuid + * @description Session ID associated with the room composition. + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + */ + session_id?: string; + /** + * Format: float + * @description Room composition size in MB. + * @example 10.5 + */ + size_mb?: number; + }; + }; + /** Composition Completed Event */ + CompositionCompletedEvent: { + data?: components['schemas']['CompositionCompleted']; + }; + /** + * Conference + * @example { + * "record_type": "conference", + * "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + * "name": "All hands meeting", + * "created_at": "2019-01-23T18:10:02.574Z", + * "expires_at": "2019-01-23T18:10:02.574Z", + * "updated_at": "2019-01-23T18:10:02.574Z", + * "region": "sv1", + * "status": "completed", + * "end_reason": "all_left", + * "ended_by": { + * "call_control_id": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQczRrZvZakpWxBlpw48KyZQ==", + * "call_session_id": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1" + * }, + * "connection_id": "3fa85f64-9191-4567-b3fc-2c963f66afa6" + * } + */ + Conference: { + /** + * @example conference + * @enum {string} + */ + record_type: 'conference'; + /** + * @description Uniquely identifies the conference + * @example 3fa85f64-5717-4562-b3fc-2c963f66afa6 + */ + id: string; + /** + * @description Name of the conference + * @example All hands meeting + */ + name: string; + /** + * @description ISO 8601 formatted date of when the conference was created + * @example 2019-01-23T18:10:02.574Z + */ + created_at: string; + /** + * @description ISO 8601 formatted date of when the conference will expire + * @example 2019-01-23T18:10:02.574Z + */ + expires_at: string; + /** + * @description ISO 8601 formatted date of when the conference was last updated + * @example 2019-01-23T18:10:02.574Z + */ + updated_at?: string; + /** + * @description Region where the conference is hosted + * @example sv1 + */ + region?: string; + /** + * @description Status of the conference + * @example completed + * @enum {string} + */ + status?: 'init' | 'in_progress' | 'completed'; + /** + * @description Reason why the conference ended + * @example all_left + * @enum {string} + */ + end_reason?: 'all_left' | 'ended_via_api' | 'host_left' | 'time_exceeded'; + /** @description IDs related to who ended the conference. It is expected for them to all be there or all be null */ + ended_by?: { + /** + * @description Call Control ID which ended the conference + * @example v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQczRrZvZakpWxBlpw48KyZQ== + */ + call_control_id?: string; + /** + * @description Call Session ID which ended the conference + * @example 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + */ + call_session_id?: string; + }; + /** + * @description Identifies the connection associated with the conference + * @example 3fa85f64-9191-4567-b3fc-2c963f66afa6 + */ + connection_id?: string; + }; + /** + * Conference Command Result + * @example { + * "result": "ok" + * } + */ + ConferenceCommandResult: { + /** @example ok */ + result: string; + }; + /** + * Conference Created + * @example { + * "record_type": "event", + * "event_type": "conference.created", + * "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + * "occurred_at": "2018-02-02T22:25:27.521992Z", + * "payload": { + * "call_control_id": "v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg", + * "connection_id": "7267xxxxxxxxxxxxxx", + * "call_leg_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + * "call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + * "conference_id": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", + * "occured_at": "2018-02-02T22:25:27.521Z" + * } + * } + */ + ConferenceCreated: { + /** + * @description Identifies the type of the resource. + * @example event + * @enum {string} + */ + record_type?: 'event'; + /** + * @description The type of event being delivered. + * @example conference.created + * @enum {string} + */ + event_type?: 'conference.created'; + /** + * Format: uuid + * @description Identifies the type of resource. + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + */ + id?: string; + payload?: { + /** + * @description Call ID used to issue commands via Call Control API. + * @example v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg + */ + call_control_id?: string; + /** + * @description Call Control App ID (formerly Telnyx connection ID) used in the call. + * @example 7267xxxxxxxxxxxxxx + */ + connection_id?: string; + /** + * @description ID that is unique to the call and can be used to correlate webhook events. + * @example 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + */ + call_leg_id?: string; + /** + * @description ID that is unique to the call session and can be used to correlate webhook events. Call session is a group of related call legs that logically belong to the same phone call, e.g. an inbound and outbound leg of a transferred call. + * @example 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + */ + call_session_id?: string; + /** + * @description State received from a command. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + /** + * @description Conference ID that the participant joined. + * @example 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + */ + conference_id?: string; + /** + * Format: date-time + * @description ISO 8601 datetime of when the event occurred. + * @example 2018-02-02T22:25:27.521Z + */ + occurred_at?: string; + }; + }; + /** Conference Created Event */ + ConferenceCreatedEvent: { + data?: components['schemas']['ConferenceCreated']; + }; + ConferenceDetailRecord: { + /** + * @description Conference id + * @example 3ca7bd3d-7d82-4e07-9df4-009123068320 + */ + id?: string; + /** + * @description Conference name + * @example My Conference + */ + name?: string; + /** + * @description User id + * @example 3ca7bd3d-7d82-4e07-9df4-009123068320 + */ + user_id?: string; + /** + * Format: date-time + * @description Conference start time + * @example 2020-07-01T00:00:00-06:00 + */ + started_at?: string; + /** + * Format: date-time + * @description Conference end time + * @example 2020-07-01T00:00:00-06:00 + */ + ended_at?: string; + /** + * Format: date-time + * @description Conference expiry time + * @example 2020-07-01T00:00:00-06:00 + */ + expires_at?: string; + /** + * @description Region where the conference is hosted + * @example ch1 + */ + region?: string; + /** + * @description Telnyx UUID that identifies the conference call leg + * @example 3ca7bd3d-7d82-4e07-9df4-009123068320 + */ + call_leg_id?: string; + /** + * @description Telnyx UUID that identifies with conference call session + * @example 3ca7bd3d-7d82-4e07-9df4-009123068320 + */ + call_session_id?: string; + /** + * @description Connection id + * @example 1583941447772537867 + */ + connection_id?: string; + /** + * @description Duration of the conference call in seconds + * @example 100 + */ + call_sec?: number; + /** + * @description Number of participants that joined the conference call + * @example 5 + */ + participant_count?: number; + /** + * @description Sum of the conference call duration for all participants in seconds + * @example 100 + */ + participant_call_sec?: number; + /** + * @description Indicates whether Telnyx billing charges might be applicable + * @example false + */ + is_telnyx_billable?: boolean; + /** + * @description discriminator enum property added by openapi-typescript + * @enum {string} + */ + record_type: 'ConferenceDetailRecord'; + }; + /** + * Conference Ended + * @example { + * "record_type": "event", + * "event_type": "conference.ended", + * "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + * "occurred_at": "2018-02-02T22:25:27.521992Z", + * "payload": { + * "call_control_id": "v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg", + * "connection_id": "7267xxxxxxxxxxxxxx", + * "call_leg_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + * "call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + * "conference_id": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", + * "occured_at": "2018-02-02T22:25:27.521Z", + * "reason": "host_left" + * } + * } + */ + ConferenceEnded: { + /** + * @description Identifies the type of the resource. + * @example event + * @enum {string} + */ + record_type?: 'event'; + /** + * @description The type of event being delivered. + * @example conference.ended + * @enum {string} + */ + event_type?: 'conference.ended'; + /** + * Format: uuid + * @description Identifies the type of resource. + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + */ + id?: string; + payload?: { + /** + * @description Call ID used to issue commands via Call Control API. + * @example v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg + */ + call_control_id?: string; + /** + * @description Call Control App ID (formerly Telnyx connection ID) used in the call. + * @example 7267xxxxxxxxxxxxxx + */ + connection_id?: string; + /** + * @description ID that is unique to the call and can be used to correlate webhook events. + * @example 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + */ + call_leg_id?: string; + /** + * @description ID that is unique to the call session and can be used to correlate webhook events. Call session is a group of related call legs that logically belong to the same phone call, e.g. an inbound and outbound leg of a transferred call. + * @example 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + */ + call_session_id?: string; + /** + * @description State received from a command. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + /** + * @description Conference ID that the participant joined. + * @example 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + */ + conference_id?: string; + /** + * Format: date-time + * @description ISO 8601 datetime of when the event occurred. + * @example 2018-02-02T22:25:27.521Z + */ + occurred_at?: string; + /** + * @description Reason the conference ended. + * @enum {string} + */ + reason?: 'all_left' | 'host_left' | 'time_exceeded'; + }; + }; + /** Conference Ended Event */ + ConferenceEndedEvent: { + data?: components['schemas']['ConferenceEnded']; + }; + /** + * Conference Floor Changed + * @example { + * "record_type": "event", + * "event_type": "conference.floor.changed", + * "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + * "occurred_at": "2018-02-02T22:25:27.521992Z", + * "payload": { + * "call_control_id": "v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg", + * "connection_id": "7267xxxxxxxxxxxxxx", + * "call_leg_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + * "call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + * "conference_id": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", + * "occured_at": "2018-02-02T22:25:27.521Z" + * } + * } + */ + ConferenceFloorChangedEvent: { + /** + * @description Identifies the type of the resource. + * @example event + * @enum {string} + */ + record_type?: 'event'; + /** + * @description The type of event being delivered. + * @example conference.floor.changed + * @enum {string} + */ + event_type?: 'conference.floor.changed'; + /** + * Format: uuid + * @description Identifies the type of resource. + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + */ + id?: string; + payload?: { + /** + * @description Call Control ID of the new speaker. + * @example v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg + */ + call_control_id?: string; + /** + * @description Call Control App ID (formerly Telnyx connection ID) used in the call. + * @example 7267xxxxxxxxxxxxxx + */ + connection_id?: string; + /** + * @description Call Leg ID of the new speaker. + * @example 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + */ + call_leg_id?: string; + /** + * @description Call Session ID of the new speaker. + * @example 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + */ + call_session_id?: string; + /** + * @description State received from a command. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + /** + * @description Conference ID that had a speaker change event. + * @example 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + */ + conference_id?: string; + /** + * Format: date-time + * @description ISO 8601 datetime of when the event occurred. + * @example 2018-02-02T22:25:27.521Z + */ + occurred_at?: string; + }; + }; + /** + * Conference Hold Request + * @example { + * "call_control_ids": [ + * "v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg" + * ], + * "audio_url": "http://example.com/message.wav" + * } + */ + ConferenceHoldRequest: { + /** @description List of unique identifiers and tokens for controlling the call. When empty all participants will be placed on hold. */ + call_control_ids?: string[]; + /** + * @description The URL of a file to be played to the participants when they are put on hold. media_name and audio_url cannot be used together in one request. + * @example http://example.com/message.wav + */ + audio_url?: string; + /** + * @description The media_name of a file to be played to the participants when they are put on hold. The media_name must point to a file previously uploaded to api.telnyx.com/v2/media by the same user/organization. The file must either be a WAV or MP3 file. + * @example my_media_uploaded_to_media_storage_api + */ + media_name?: string; + }; + /** + * Conference Mute Request + * @example { + * "call_control_ids": [ + * "v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg" + * ] + * } + */ + ConferenceMuteRequest: { + /** @description Array of unique identifiers and tokens for controlling the call. When empty all participants will be muted. */ + call_control_ids?: string[]; + }; + ConferenceParticipantDetailRecord: { + /** + * @description Participant id + * @example 3ca7bd3d-7d82-4e07-9df4-009123068320 + */ + id?: string; + /** + * @description User id + * @example 3ca7bd3d-7d82-4e07-9df4-009123068320 + */ + user_id?: string; + /** + * @description Conference id + * @example 3ca7bd3d-7d82-4e07-9df4-009123068320 + */ + conference_id?: string; + /** + * Format: date-time + * @description Participant join time + * @example 2020-07-01T00:00:00-06:00 + */ + joined_at?: string; + /** + * Format: date-time + * @description Participant leave time + * @example 2020-07-01T00:00:00-06:00 + */ + left_at?: string; + /** + * @description Number called by the participant to join the conference + * @example +18005550199 + */ + destination_number?: string; + /** + * @description Participant origin number used in the conference call + * @example +18005550199 + */ + originating_number?: string; + /** + * @description Telnyx UUID that identifies the conference call leg + * @example 3ca7bd3d-7d82-4e07-9df4-009123068320 + */ + call_leg_id?: string; + /** + * @description Telnyx UUID that identifies with conference call session + * @example 3ca7bd3d-7d82-4e07-9df4-009123068320 + */ + call_session_id?: string; + /** + * @description Duration of the conference call in seconds + * @example 100 + */ + call_sec?: number; + /** + * @description Duration of the conference call for billing purposes + * @example 120 + */ + billed_sec?: number; + /** + * @description Indicates whether Telnyx billing charges might be applicable + * @example true + */ + is_telnyx_billable?: boolean; + /** + * @description Currency amount per billing unit used to calculate the Telnyx billing cost + * @example 0.002 + */ + rate?: string; + /** + * @description Billing unit used to calculate the Telnyx billing cost + * @example minutes + */ + rate_measured_in?: string; + /** + * @description Currency amount for Telnyx billing cost + * @example 0.004 + */ + cost?: string; + /** + * @description Telnyx account currency used to describe monetary values, including billing cost + * @example USD + */ + currency?: string; + /** + * @description discriminator enum property added by openapi-typescript + * @enum {string} + */ + record_type: 'ConferenceParticipantDetailRecord'; + }; + /** + * Conference Participant Joined + * @example { + * "record_type": "event", + * "event_type": "conference.participant.joined", + * "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + * "occurred_at": "2018-02-02T22:25:27.521992Z", + * "payload": { + * "call_control_id": "v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg", + * "connection_id": "7267xxxxxxxxxxxxxx", + * "call_leg_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + * "call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + * "conference_id": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1" + * } + * } + */ + ConferenceParticipantJoined: { + /** + * @description Identifies the type of the resource. + * @example event + * @enum {string} + */ + record_type?: 'event'; + /** + * @description The type of event being delivered. + * @example conference.participant.joined + * @enum {string} + */ + event_type?: 'conference.participant.joined'; + /** + * Format: uuid + * @description Identifies the type of resource. + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + */ + id?: string; + /** + * Format: date-time + * @description ISO 8601 datetime of when the event occurred. + * @example 2018-02-02T22:25:27.521Z + */ + occurred_at?: string; + payload?: { + /** + * @description Call ID used to issue commands via Call Control API. + * @example v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg + */ + call_control_id?: string; + /** + * @description Call Control App ID (formerly Telnyx connection ID) used in the call. + * @example 7267xxxxxxxxxxxxxx + */ + connection_id?: string; + /** + * @description ID that is unique to the call and can be used to correlate webhook events. + * @example 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + */ + call_leg_id?: string; + /** + * @description ID that is unique to the call session and can be used to correlate webhook events. Call session is a group of related call legs that logically belong to the same phone call, e.g. an inbound and outbound leg of a transferred call. + * @example 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + */ + call_session_id?: string; + /** + * @description State received from a command. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + /** + * @description Conference ID that the participant joined. + * @example 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + */ + conference_id?: string; + }; + }; + /** Conference Participant Joined Event */ + ConferenceParticipantJoinedEvent: { + data?: components['schemas']['ConferenceParticipantJoined']; + }; + /** + * Conference Participant Left + * @example { + * "record_type": "event", + * "event_type": "conference.participant.left", + * "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + * "occurred_at": "2018-02-02T22:25:27.521992Z", + * "payload": { + * "call_control_id": "v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg", + * "connection_id": "7267xxxxxxxxxxxxxx", + * "call_leg_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + * "call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + * "conference_id": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1" + * } + * } + */ + ConferenceParticipantLeft: { + /** + * @description Identifies the type of the resource. + * @example event + * @enum {string} + */ + record_type?: 'event'; + /** + * @description The type of event being delivered. + * @example conference.participant.left + * @enum {string} + */ + event_type?: 'conference.participant.left'; + /** + * Format: uuid + * @description Identifies the type of resource. + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + */ + id?: string; + /** + * Format: date-time + * @description ISO 8601 datetime of when the event occurred. + * @example 2018-02-02T22:25:27.521Z + */ + occurred_at?: string; + payload?: { + /** + * @description Call ID used to issue commands via Call Control API. + * @example v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg + */ + call_control_id?: string; + /** + * @description Call Control App ID (formerly Telnyx connection ID) used in the call. + * @example 7267xxxxxxxxxxxxxx + */ + connection_id?: string; + /** + * @description ID that is unique to the call and can be used to correlate webhook events. + * @example 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + */ + call_leg_id?: string; + /** + * @description ID that is unique to the call session and can be used to correlate webhook events. Call session is a group of related call legs that logically belong to the same phone call, e.g. an inbound and outbound leg of a transferred call. + * @example 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + */ + call_session_id?: string; + /** + * @description State received from a command. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + /** + * @description Conference ID that the participant joined. + * @example 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + */ + conference_id?: string; + }; + }; + /** Conference Participant Left Event */ + ConferenceParticipantLeftEvent: { + data?: components['schemas']['ConferenceParticipantLeft']; + }; + /** + * Conference Participant Playback Ended + * @example { + * "record_type": "event", + * "event_type": "conference.participant.playback.ended", + * "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + * "occurred_at": "2018-02-02T22:25:27.521992Z", + * "payload": { + * "call_control_id": "v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg", + * "connection_id": "7267xxxxxxxxxxxxxx", + * "call_leg_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + * "call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + * "creator_call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + * "conference_id": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", + * "media_url": "https://www.example.com/audio.mp3", + * "occured_at": "2018-02-02T22:25:27.521Z" + * } + * } + */ + ConferenceParticipantPlaybackEnded: { + /** + * @description Identifies the type of the resource. + * @example event + * @enum {string} + */ + record_type?: 'event'; + /** + * @description The type of event being delivered. + * @example conference.participant.playback.ended + * @enum {string} + */ + event_type?: 'conference.participant.playback.ended'; + /** + * Format: uuid + * @description Identifies the type of resource. + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + */ + id?: string; + payload?: { + /** + * @description Participant's call ID used to issue commands via Call Control API. + * @example v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg + */ + call_control_id?: string; + /** + * @description ID that is unique to the call and can be used to correlate webhook events. + * @example 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + */ + call_leg_id?: string; + /** + * @description ID that is unique to the call session and can be used to correlate webhook events. Call session is a group of related call legs that logically belong to the same phone call, e.g. an inbound and outbound leg of a transferred call. + * @example 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + */ + call_session_id?: string; + /** + * @description State received from a command. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + /** + * @description Call Control App ID (formerly Telnyx connection ID) used in the call. + * @example 7267xxxxxxxxxxxxxx + */ + connection_id?: string; + /** + * @description ID that is unique to the call session that started the conference. + * @example 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + */ + creator_call_session_id?: string; + /** + * @description ID of the conference the text was spoken in. + * @example 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + */ + conference_id?: string; + /** + * @description The audio URL being played back, if audio_url has been used to start. + * @example http://example.com/audio.wav + */ + media_url?: string; + /** + * @description The name of the audio media file being played back, if media_name has been used to start. + * @example my_media_uploaded_to_media_storage_api + */ + media_name?: string; + /** + * Format: date-time + * @description ISO 8601 datetime of when the event occurred. + * @example 2018-02-02T22:25:27.521Z + */ + occurred_at?: string; + }; + }; + /** Conference Participant Playback Ended Event */ + ConferenceParticipantPlaybackEndedEvent: { + data?: components['schemas']['ConferenceParticipantPlaybackEnded']; + }; + /** + * Conference Participant Playback Started + * @example { + * "record_type": "event", + * "event_type": "conference.participant.playback.started", + * "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + * "occurred_at": "2018-02-02T22:25:27.521992Z", + * "payload": { + * "call_control_id": "v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg", + * "connection_id": "7267xxxxxxxxxxxxxx", + * "call_leg_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + * "call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + * "creator_call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + * "conference_id": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", + * "media_url": "https://www.example.com/audio.mp3", + * "occured_at": "2018-02-02T22:25:27.521Z" + * } + * } + */ + ConferenceParticipantPlaybackStarted: { + /** + * @description Identifies the type of the resource. + * @example event + * @enum {string} + */ + record_type?: 'event'; + /** + * @description The type of event being delivered. + * @example conference.participant.playback.started + * @enum {string} + */ + event_type?: 'conference.participant.playback.started'; + /** + * Format: uuid + * @description Identifies the type of resource. + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + */ + id?: string; + payload?: { + /** + * @description Participant's call ID used to issue commands via Call Control API. + * @example v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg + */ + call_control_id?: string; + /** + * @description ID that is unique to the call and can be used to correlate webhook events. + * @example 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + */ + call_leg_id?: string; + /** + * @description ID that is unique to the call session and can be used to correlate webhook events. Call session is a group of related call legs that logically belong to the same phone call, e.g. an inbound and outbound leg of a transferred call. + * @example 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + */ + call_session_id?: string; + /** + * @description State received from a command. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + /** + * @description Call Control App ID (formerly Telnyx connection ID) used in the call. + * @example 7267xxxxxxxxxxxxxx + */ + connection_id?: string; + /** + * @description ID that is unique to the call session that started the conference. + * @example 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + */ + creator_call_session_id?: string; + /** + * @description ID of the conference the text was spoken in. + * @example 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + */ + conference_id?: string; + /** + * @description The audio URL being played back, if audio_url has been used to start. + * @example http://example.com/audio.wav + */ + media_url?: string; + /** + * @description The name of the audio media file being played back, if media_name has been used to start. + * @example my_media_uploaded_to_media_storage_api + */ + media_name?: string; + /** + * Format: date-time + * @description ISO 8601 datetime of when the event occurred. + * @example 2018-02-02T22:25:27.521Z + */ + occurred_at?: string; + }; + }; + /** Conference Participant Playback Started Event */ + ConferenceParticipantPlaybackStartedEvent: { + data?: components['schemas']['ConferenceParticipantPlaybackStarted']; + }; + /** + * Conference Participant Speak Ended + * @example { + * "record_type": "event", + * "event_type": "conference.participant.speak.ended", + * "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + * "occurred_at": "2018-02-02T22:25:27.521992Z", + * "payload": { + * "call_control_id": "v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg", + * "connection_id": "7267xxxxxxxxxxxxxx", + * "call_leg_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + * "call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + * "creator_call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + * "conference_id": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", + * "occured_at": "2018-02-02T22:25:27.521Z" + * } + * } + */ + ConferenceParticipantSpeakEnded: { + /** + * @description Identifies the type of the resource. + * @example event + * @enum {string} + */ + record_type?: 'event'; + /** + * @description The type of event being delivered. + * @example conference.participant.speak.ended + * @enum {string} + */ + event_type?: 'conference.participant.speak.ended'; + /** + * Format: uuid + * @description Identifies the type of resource. + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + */ + id?: string; + payload?: { + /** + * @description Participant's call ID used to issue commands via Call Control API. + * @example v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg + */ + call_control_id?: string; + /** + * @description ID that is unique to the call and can be used to correlate webhook events. + * @example 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + */ + call_leg_id?: string; + /** + * @description ID that is unique to the call session and can be used to correlate webhook events. Call session is a group of related call legs that logically belong to the same phone call, e.g. an inbound and outbound leg of a transferred call. + * @example 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + */ + call_session_id?: string; + /** + * @description State received from a command. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + /** + * @description Call Control App ID (formerly Telnyx connection ID) used in the call. + * @example 7267xxxxxxxxxxxxxx + */ + connection_id?: string; + /** + * @description ID that is unique to the call session that started the conference. + * @example 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + */ + creator_call_session_id?: string; + /** + * @description ID of the conference the text was spoken in. + * @example 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + */ + conference_id?: string; + /** + * Format: date-time + * @description ISO 8601 datetime of when the event occurred. + * @example 2018-02-02T22:25:27.521Z + */ + occurred_at?: string; + }; + }; + /** Conference Participant Speak Ended Event */ + ConferenceParticipantSpeakEndedEvent: { + data?: components['schemas']['ConferenceParticipantSpeakEnded']; + }; + /** + * Conference Participant Speak Started + * @example { + * "record_type": "event", + * "event_type": "conference.participant.speak.started", + * "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + * "occurred_at": "2018-02-02T22:25:27.521992Z", + * "payload": { + * "call_control_id": "v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg", + * "connection_id": "7267xxxxxxxxxxxxxx", + * "call_leg_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + * "call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + * "creator_call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + * "conference_id": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", + * "occured_at": "2018-02-02T22:25:27.521Z" + * } + * } + */ + ConferenceParticipantSpeakStarted: { + /** + * @description Identifies the type of the resource. + * @example event + * @enum {string} + */ + record_type?: 'event'; + /** + * @description The type of event being delivered. + * @example conference.participant.speak.started + * @enum {string} + */ + event_type?: 'conference.participant.speak.started'; + /** + * Format: uuid + * @description Identifies the type of resource. + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + */ + id?: string; + payload?: { + /** + * @description Participant's call ID used to issue commands via Call Control API. + * @example v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg + */ + call_control_id?: string; + /** + * @description ID that is unique to the call and can be used to correlate webhook events. + * @example 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + */ + call_leg_id?: string; + /** + * @description ID that is unique to the call session and can be used to correlate webhook events. Call session is a group of related call legs that logically belong to the same phone call, e.g. an inbound and outbound leg of a transferred call. + * @example 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + */ + call_session_id?: string; + /** + * @description State received from a command. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + /** + * @description Call Control App ID (formerly Telnyx connection ID) used in the call. + * @example 7267xxxxxxxxxxxxxx + */ + connection_id?: string; + /** + * @description ID that is unique to the call session that started the conference. + * @example 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + */ + creator_call_session_id?: string; + /** + * @description ID of the conference the text was spoken in. + * @example 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + */ + conference_id?: string; + /** + * Format: date-time + * @description ISO 8601 datetime of when the event occurred. + * @example 2018-02-02T22:25:27.521Z + */ + occurred_at?: string; + }; + }; + /** Conference Participant Speak Started Event */ + ConferenceParticipantSpeakStartedEvent: { + data?: components['schemas']['ConferenceParticipantSpeakStarted']; + }; + /** + * Conference Play Request + * @example { + * "audio_url": "http://www.example.com/sounds/greeting.wav" + * } + */ + ConferencePlayRequest: { + /** + * @description The URL of a file to be played back in the conference. media_name and audio_url cannot be used together in one request. + * @example http://example.com/message.wav + */ + audio_url?: string; + /** + * @description The media_name of a file to be played back in the conference. The media_name must point to a file previously uploaded to api.telnyx.com/v2/media by the same user/organization. The file must either be a WAV or MP3 file. + * @example my_media_uploaded_to_media_storage_api + */ + media_name?: string; + /** + * @description The number of times the audio file should be played. If supplied, the value must be an integer between 1 and 100, or the special string `infinity` for an endless loop. + * @default 1 + * @example infinity + */ + loop: components['schemas']['Loopcount']; + /** @description List of call control ids identifying participants the audio file should be played to. If not given, the audio file will be played to the entire conference. */ + call_control_ids?: string[]; + }; + /** + * Conference Playback Ended + * @example { + * "record_type": "event", + * "event_type": "conference.playback.ended", + * "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + * "occurred_at": "2018-02-02T22:25:27.521992Z", + * "payload": { + * "connection_id": "7267xxxxxxxxxxxxxx", + * "creator_call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + * "conference_id": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", + * "media_url": "https://www.example.com/audio.mp3", + * "occured_at": "2018-02-02T22:25:27.521Z" + * } + * } + */ + ConferencePlaybackEnded: { + /** + * @description Identifies the type of the resource. + * @example event + * @enum {string} + */ + record_type?: 'event'; + /** + * @description The type of event being delivered. + * @example conference.playback.ended + * @enum {string} + */ + event_type?: 'conference.playback.ended'; + /** + * Format: uuid + * @description Identifies the type of resource. + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + */ + id?: string; + payload?: { + /** + * @description Call Control App ID (formerly Telnyx connection ID) used in the call. + * @example 7267xxxxxxxxxxxxxx + */ + connection_id?: string; + /** + * @description ID that is unique to the call session that started the conference. + * @example 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + */ + creator_call_session_id?: string; + /** + * @description ID of the conference the text was spoken in. + * @example 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + */ + conference_id?: string; + /** + * @description The audio URL being played back, if audio_url has been used to start. + * @example http://example.com/audio.wav + */ + media_url?: string; + /** + * @description The name of the audio media file being played back, if media_name has been used to start. + * @example my_media_uploaded_to_media_storage_api + */ + media_name?: string; + /** + * Format: date-time + * @description ISO 8601 datetime of when the event occurred. + * @example 2018-02-02T22:25:27.521Z + */ + occurred_at?: string; + }; + }; + /** Conference Playback Ended Event */ + ConferencePlaybackEndedEvent: { + data?: components['schemas']['ConferencePlaybackEnded']; + }; + /** + * Conference Playback Started + * @example { + * "record_type": "event", + * "event_type": "conference.playback.started", + * "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + * "occurred_at": "2018-02-02T22:25:27.521992Z", + * "payload": { + * "connection_id": "7267xxxxxxxxxxxxxx", + * "creator_call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + * "conference_id": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", + * "media_url": "https://www.example.com/audio.mp3", + * "occured_at": "2018-02-02T22:25:27.521Z" + * } + * } + */ + ConferencePlaybackStarted: { + /** + * @description Identifies the type of the resource. + * @example event + * @enum {string} + */ + record_type?: 'event'; + /** + * @description The type of event being delivered. + * @example conference.playback.started + * @enum {string} + */ + event_type?: 'conference.playback.started'; + /** + * Format: uuid + * @description Identifies the type of resource. + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + */ + id?: string; + payload?: { + /** + * @description Call Control App ID (formerly Telnyx connection ID) used in the call. + * @example 7267xxxxxxxxxxxxxx + */ + connection_id?: string; + /** + * @description ID that is unique to the call session that started the conference. + * @example 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + */ + creator_call_session_id?: string; + /** + * @description ID of the conference the text was spoken in. + * @example 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + */ + conference_id?: string; + /** + * @description The audio URL being played back, if audio_url has been used to start. + * @example http://example.com/audio.wav + */ + media_url?: string; + /** + * @description The name of the audio media file being played back, if media_name has been used to start. + * @example my_media_uploaded_to_media_storage_api + */ + media_name?: string; + /** + * Format: date-time + * @description ISO 8601 datetime of when the event occurred. + * @example 2018-02-02T22:25:27.521Z + */ + occurred_at?: string; + }; + }; + /** Conference Playback Started Event */ + ConferencePlaybackStartedEvent: { + data?: components['schemas']['ConferencePlaybackStarted']; + }; + /** + * Conference recording resource + * @example { + * "account_sid": "4e71926f-8f13-450e-b91c-23c2ef786aa6", + * "call_sid": "v3:9X2vxPDFY2RHSJ1EdMS0RHRksMTg7ldNxdjWbVr9zBjbGjGsSe-aiQ", + * "channels": 1, + * "conference_sid": "6dc6cc1a-1ba1-4351-86b8-4c22c95cd98f", + * "date_created": "Fri, 27 Oct 2023 07:41:58 +0000", + * "date_updated": "Fri, 27 Oct 2023 07:41:58 +0000", + * "duration": 5, + * "error_code": null, + * "media_url": "https://www.example.com/download.mp3", + * "sid": "136285da-4b74-46f1-a016-fe2982fa77c3", + * "source": "StartConferenceRecordingAPI", + * "start_time": "Fri, 27 Oct 2023 07:41:58 +0000", + * "status": "completed", + * "subresource_uris": { + * "transcriptions": null + * }, + * "uri": "/v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Recordings/136285da-4b74-46f1-a016-fe2982fa77c3.json" + * } + */ + ConferenceRecordingResource: { + /** + * @description The id of the account the resource belongs to. + * @example 61bf923e-5e4d-4595-a110-56190ea18a1b + */ + account_sid?: string; + /** + * @description The identifier of the related participant's call. + * @example v3:9X2vxPDFY2RHSJ1EdMS0RHRksMTg7ldNxdjWbVr9zBjbGjGsSe-aiQ + */ + call_sid?: string; + /** + * @description The number of channels in the recording. + * @example 1 + */ + channels?: number; + /** + * @description The identifier of the related conference. + * @example 6dc6cc1a-1ba1-4351-86b8-4c22c95cd98f + */ + conference_sid?: string; + /** + * @description The timestamp of when the resource was created. + * @example Thu, 15 Jun 2023 09:56:45 +0000 + */ + date_created?: string; + /** + * @description The timestamp of when the resource was last updated. + * @example Thu, 15 Jun 2023 09:56:45 +0000 + */ + date_updated?: string; + /** + * @description Duratin of the recording in seconds. + * @example 10 + */ + duration?: number; + /** + * @description The recording error, if any. + * @example null + */ + error_code?: string; + /** + * @description The URL to use to download the recording. + * @example https://www.example.com/download.mp3 + */ + media_url?: string; + /** + * @description The unique identifier of the recording. + * @example 136285da-4b74-46f1-a016-fe2982fa77c3 + */ + sid?: string; + /** + * @description How the recording was started. + * @example StartConferenceRecordingAPI + * @enum {string} + */ + source?: + | 'DialVerb' + | 'Conference' + | 'OutboundAPI' + | 'Trunking' + | 'RecordVerb' + | 'StartCallRecordingAPI' + | 'StartConferenceRecordingAPI'; + /** + * @description The timestamp of when the recording was started. + * @example Thu, 15 Jun 2023 09:56:45 +0000 + */ + start_time?: string; + /** + * @description The status of the recording. + * @example completed + * @enum {string} + */ + status?: 'processing' | 'absent' | 'completed' | 'deleted'; + /** + * @description A list of related resources identified by their relative URIs. + * @example { + * "transcriptions": null + * } + */ + subresource_uris?: Record; + /** + * @description The relative URI for this recording. + * @example /v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Recordings/136285da-4b74-46f1-a016-fe2982fa77c3.json + */ + uri?: string; + }; + /** + * Multiple conference recording resources + * @example { + * "participants": [], + * "end": 0, + * "first_page_uri": "/v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Conferences/6dc6cc1a-1ba1-4351-86b8-4c22c95cd98f/Recordings.json?page=0&pagesize=20", + * "next_page_uri": null, + * "page": 0, + * "page_size": 20, + * "start": 0, + * "uri": "/v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Conferences/6dc6cc1a-1ba1-4351-86b8-4c22c95cd98f/Recordings.json?page=0&pagesize=20" + * } + */ + ConferenceRecordingResourceIndex: { + recordings?: components['schemas']['ConferenceRecordingResource'][]; + /** + * @description The number of the last element on the page, zero-indexed. + * @example 19 + */ + end?: number; + /** + * @description /v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Conferences/6dc6cc1a-1ba1-4351-86b8-4c22c95cd98f/Recordings.json?page=0&pagesize=20 + * @example accepted + */ + first_page_uri?: string; + /** + * @description /v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Conferences/6dc6cc1a-1ba1-4351-86b8-4c22c95cd98f/Recordings.json?Page=1&PageSize=1&PageToken=MTY4AjgyNDkwNzIxMQ + * @example accepted + */ + next_page_uri?: string; + /** + * @description Current page number, zero-indexed. + * @example 0 + */ + page?: number; + /** + * @description The number of items on the page + * @example 20 + */ + page_size?: number; + /** + * @description The number of the first element on the page, zero-indexed. + * @example 0 + */ + start?: number; + /** + * @description The URI of the current page. + * @example /v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Conferences/6dc6cc1a-1ba1-4351-86b8-4c22c95cd98f/Recordings.json?Page=0&PageSize=1 + */ + uri?: string; + }; + /** + * Conference Recording Saved + * @example { + * "record_type": "event", + * "event_type": "conference.recording.saved", + * "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + * "occurred_at": "2018-02-02T22:25:27.521992Z", + * "payload": { + * "call_control_id": "v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg", + * "call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + * "channels": "single", + * "conference_id": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", + * "connection_id": "7267xxxxxxxxxxxxxx", + * "format": "mp3", + * "public_recording_urls": { + * "mp3": "http://example.com/recording.mp3", + * "wav": "http://example.com/recording.wav" + * }, + * "recording_ended_at": "2018-02-02T22:20:27.521992Z", + * "recording_id": "4577f9a2-cf0e-44f3-ac57-9f95fb03fa47", + * "recording_started_at": "2021-05-11T10:17:03.692107Z", + * "recording_urls": { + * "mp3": "http://example.com/recording.mp3", + * "wav": "http://example.com/recording.wav" + * } + * } + * } + */ + ConferenceRecordingSaved: { + /** + * @description Identifies the type of the resource. + * @example event + * @enum {string} + */ + record_type?: 'event'; + /** + * @description The type of event being delivered. + * @example conference.recording.saved + * @enum {string} + */ + event_type?: 'conference.recording.saved'; + /** + * Format: uuid + * @description Identifies the type of resource. + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + */ + id?: string; + payload?: { + /** + * @description Participant's call ID used to issue commands via Call Control API. + * @example v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg + */ + call_control_id?: string; + /** + * @description ID that is unique to the call session and can be used to correlate webhook events. Call session is a group of related call legs that logically belong to the same phone call, e.g. an inbound and outbound leg of a transferred call. + * @example 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + */ + call_session_id?: string; + /** + * @description State received from a command. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + /** + * @description Whether recording was recorded in `single` or `dual` channel. + * @example single + * @enum {string} + */ + channels?: 'single' | 'dual'; + /** + * Format: uuid + * @description ID of the conference that is being recorded. + * @example 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + */ + conference_id?: string; + /** + * @description Call Control App ID (formerly Telnyx connection ID) used in the call. + * @example 7267xxxxxxxxxxxxxx + */ + connection_id?: string; + /** + * @description The audio file format used when storing the call recording. Can be either `mp3` or `wav`. + * @example mp3 + * @enum {string} + */ + format?: 'wav' | 'mp3'; + /** @description Recording URLs in requested format. The URL is valid for as long as the file exists. For security purposes, this feature is activated on a per request basis. Please contact customer support with your Account ID to request activation. */ + public_recording_urls?: { + /** + * @description Recording URL in requested `mp3` format. + * @example http://example.com/recording.mp3 + */ + mp3?: string | null; + /** + * @description Recording URL in requested `wav` format. + * @example http://example.com/recording.wav + */ + wav?: string | null; + }; + /** + * Format: date-time + * @description ISO 8601 datetime of when recording ended. + * @example 2018-02-02T22:25:27.521992Z + */ + recording_ended_at?: string; + /** + * Format: uuid + * @description ID of the conference recording. + * @example 4577f9a2-cf0e-44f3-ac57-9f95fb03fa47 + */ + recording_id?: string; + /** + * Format: date-time + * @description ISO 8601 datetime of when recording started. + * @example 2018-02-02T22:20:27.521992Z + */ + recording_started_at?: string; + /** @description Recording URLs in requested format. These URLs are valid for 10 minutes. After 10 minutes, you may retrieve recordings via API using Reports -> Call Recordings documentation, or via Mission Control under Reporting -> Recordings. */ + recording_urls?: { + /** + * @description Recording URL in requested `mp3` format. + * @example http://example.com/recording.mp3 + */ + mp3?: string | null; + /** + * @description Recording URL in requested `wav` format. + * @example http://example.com/recording.wav + */ + wav?: string | null; + }; + }; + }; + /** Conference Recording Saved Event */ + ConferenceRecordingSavedEvent: { + data?: components['schemas']['ConferenceRecordingSaved']; + }; + /** + * Conference resource + * @example { + * "account_sid": "4e71926f-8f13-450e-b91c-23c2ef786aa6", + * "api_version": "v2/texml", + * "call_sid_ending_conference": null, + * "date_created": "Fri, 27 Oct 2023 07:41:58 +0000", + * "date_updated": "Fri, 27 Oct 2023 07:41:58 +0000", + * "friendly_name": "weekly_review_call", + * "reason_conference_ended": null, + * "region": "dc2", + * "sid": "cd5a70f4-759b-4d5e-9c06-88c00f16f3c1", + * "status": "in-progress", + * "subresource_uris": { + * "participants": "/v2/texml/Accounts/4e71926f-8f13-450e-b91c-23c2ef786aa6/Conferences/cd5a70f4-759b-4d5e-9c06-88c00f16f3c1/Participants.json", + * "recordings": "/v2/texml/Accounts/4e71926f-8f13-450e-b91c-23c2ef786aa6/Conferences/cd5a70f4-759b-4d5e-9c06-88c00f16f3c1/Recordings.json" + * }, + * "uri": "/v2/texml/Accounts/4e71926f-8f13-450e-b91c-23c2ef786aa6/Conferences/cd5a70f4-759b-4d5e-9c06-88c00f16f3c1.json" + * } + */ + ConferenceResource: { + /** + * @description The id of the account the resource belongs to. + * @example 61bf923e-5e4d-4595-a110-56190ea18a1b + */ + account_sid?: string; + /** + * @description The version of the API that was used to make the request. + * @example v2/texml + */ + api_version?: string; + /** + * @description Caller ID, if present. + * @example v3:9X2vxPDFY2RHSJ1EdMS0RHRksMTg7ldNxdjWbVr9zBjbGjGsSe-aiQ + */ + call_sid_ending_conference?: string; + /** + * @description The timestamp of when the resource was created. + * @example Thu, 15 Jun 2023 09:56:45 +0000 + */ + date_created?: string; + /** + * @description The timestamp of when the resource was last updated. + * @example Thu, 15 Jun 2023 09:56:45 +0000 + */ + date_updated?: string; + /** + * @description A string that you assigned to describe this conference room. + * @example weekly_review_call + */ + friendly_name?: string; + /** + * @description The reason why a conference ended. When a conference is in progress, will be null. + * @example time-exceeded + * @enum {string} + */ + reason_conference_ended?: + | 'participant-with-end-conference-on-exit-left' + | 'last-participant-left' + | 'conference-ended-via-api' + | 'time-exceeded'; + /** + * @description A string representing the region where the conference is hosted. + * @example dc2 + */ + region?: string; + /** + * @description The unique identifier of the conference. + * @example cd5a70f4-759b-4d5e-9c06-88c00f16f3c1 + */ + sid?: string; + /** + * @description The status of this conference. + * @example in-progress + * @enum {string} + */ + status?: 'init' | 'in-progress' | 'completed'; + /** + * @description A list of related resources identified by their relative URIs. + * @example { + * "participants": "/v2/texml/Accounts/4e71926f-8f13-450e-b91c-23c2ef786aa6/Conferences/cd5a70f4-759b-4d5e-9c06-88c00f16f3c1/Participants.json", + * "recordings": "/v2/texml/Accounts/4e71926f-8f13-450e-b91c-23c2ef786aa6/Conferences/cd5a70f4-759b-4d5e-9c06-88c00f16f3c1/Recordings.json" + * } + */ + subresource_uris?: Record; + /** + * @description The relative URI for this conference. + * @example /v2/texml/Accounts/4e71926f-8f13-450e-b91c-23c2ef786aa6/Conferences/cd5a70f4-759b-4d5e-9c06-88c00f16f3c1.json + */ + uri?: string; + }; + /** + * Multiple conference resources + * @example { + * "conferences": [], + * "end": 0, + * "first_page_uri": "/v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Conferences.json?Page=0&PageSize=1", + * "next_page_uri": "/v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Conferences.json?Page=1&PageSize=1&PageToken=MTY4AjgyNDkwNzIxMQ", + * "page": 0, + * "page_size": 1, + * "start": 0, + * "uri": "/v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Conferences.json?Page=0&PageSize=1" + * } + */ + ConferenceResourceIndex: { + conferences?: components['schemas']['ConferenceResource'][]; + /** + * @description The number of the last element on the page, zero-indexed. + * @example 19 + */ + end?: number; + /** + * @description /v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Conferences.json?Page=0&PageSize=1 + * @example accepted + */ + first_page_uri?: string; + /** + * @description /v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Conferences.json?Page=1&PageSize=1&PageToken=MTY4AjgyNDkwNzIxMQ + * @example accepted + */ + next_page_uri?: string; + /** + * @description Current page number, zero-indexed. + * @example 0 + */ + page?: number; + /** + * @description The number of items on the page + * @example 20 + */ + page_size?: number; + /** + * @description The number of the first element on the page, zero-indexed. + * @example 0 + */ + start?: number; + /** + * @description The URI of the current page. + * @example /v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Conferences.json?Page=0&PageSize=1 + */ + uri?: string; + }; + /** + * Format: uuid + * @example cd5a70f4-759b-4d5e-9c06-88c00f16f3c1 + */ + ConferenceSid: string | null; + /** + * Conference Speak Ended + * @example { + * "record_type": "event", + * "event_type": "conference.speak.ended", + * "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + * "occurred_at": "2018-02-02T22:25:27.521992Z", + * "payload": { + * "connection_id": "7267xxxxxxxxxxxxxx", + * "creator_call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + * "conference_id": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", + * "occured_at": "2018-02-02T22:25:27.521Z" + * } + * } + */ + ConferenceSpeakEnded: { + /** + * @description Identifies the type of the resource. + * @example event + * @enum {string} + */ + record_type?: 'event'; + /** + * @description The type of event being delivered. + * @example conference.speak.ended + * @enum {string} + */ + event_type?: 'conference.speak.ended'; + /** + * Format: uuid + * @description Identifies the type of resource. + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + */ + id?: string; + payload?: { + /** + * @description Call Control App ID (formerly Telnyx connection ID) used in the call. + * @example 7267xxxxxxxxxxxxxx + */ + connection_id?: string; + /** + * @description ID that is unique to the call session that started the conference. + * @example 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + */ + creator_call_session_id?: string; + /** + * @description ID of the conference the text was spoken in. + * @example 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + */ + conference_id?: string; + /** + * Format: date-time + * @description ISO 8601 datetime of when the event occurred. + * @example 2018-02-02T22:25:27.521Z + */ + occurred_at?: string; + }; + }; + /** Conference Speak Ended Event */ + ConferenceSpeakEndedEvent: { + data?: components['schemas']['ConferenceSpeakEnded']; + }; + /** + * Conference Speak Request + * @example { + * "call_control_ids": [ + * "v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg" + * ], + * "payload": "Say this to participants", + * "payload_type": "text", + * "voice": "female", + * "language": "en-US", + * "command_id": "891510ac-f3e4-11e8-af5b-de00688a4901" + * } + */ + ConferenceSpeakRequest: { + /** @description Call Control IDs of participants who will hear the spoken text. When empty all participants will hear the spoken text. */ + call_control_ids?: string[]; + /** + * @description The text or SSML to be converted into speech. There is a 3,000 character limit. + * @example Say this to participants + */ + payload: string; + /** + * @description The type of the provided payload. The payload can either be plain text, or Speech Synthesis Markup Language (SSML). + * @default text + * @example ssml + * @enum {string} + */ + payload_type: 'text' | 'ssml'; + /** + * @description The gender of the voice used to speak back the text or the specific Amazon Polly voice to be used in the form of `Polly.`, e.g. `Polly.Brian`. All standard Amazon Polly voices are supported. + * @example female + * @enum {string} + */ + voice: 'male' | 'female'; + /** + * @description The language you want spoken. This parameter is ignored when a `Polly.*` voice is specified. + * @example en-US + * @enum {string} + */ + language?: + | 'arb' + | 'cmn-CN' + | 'cy-GB' + | 'da-DK' + | 'de-DE' + | 'en-AU' + | 'en-GB' + | 'en-GB-WLS' + | 'en-IN' + | 'en-US' + | 'es-ES' + | 'es-MX' + | 'es-US' + | 'fr-CA' + | 'fr-FR' + | 'hi-IN' + | 'is-IS' + | 'it-IT' + | 'ja-JP' + | 'ko-KR' + | 'nb-NO' + | 'nl-NL' + | 'pl-PL' + | 'pt-BR' + | 'pt-PT' + | 'ro-RO' + | 'ru-RU' + | 'sv-SE' + | 'tr-TR'; + /** + * @description Use this field to avoid execution of duplicate commands. Telnyx will ignore subsequent commands with the same `command_id` as one that has already been executed. + * @example 891510ac-f3e4-11e8-af5b-de00688a4901 + */ + command_id?: string; + }; + /** + * Conference Speak Started + * @example { + * "record_type": "event", + * "event_type": "conference.speak.started", + * "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + * "occurred_at": "2018-02-02T22:25:27.521992Z", + * "payload": { + * "connection_id": "7267xxxxxxxxxxxxxx", + * "creator_call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + * "conference_id": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", + * "occured_at": "2018-02-02T22:25:27.521Z" + * } + * } + */ + ConferenceSpeakStarted: { + /** + * @description Identifies the type of the resource. + * @example event + * @enum {string} + */ + record_type?: 'event'; + /** + * @description The type of event being delivered. + * @example conference.speak.started + * @enum {string} + */ + event_type?: 'conference.speak.started'; + /** + * Format: uuid + * @description Identifies the type of resource. + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + */ + id?: string; + payload?: { + /** + * @description Call Control App ID (formerly Telnyx connection ID) used in the call. + * @example 7267xxxxxxxxxxxxxx + */ + connection_id?: string; + /** + * @description ID that is unique to the call session that started the conference. + * @example 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + */ + creator_call_session_id?: string; + /** + * @description ID of the conference the text was spoken in. + * @example 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + */ + conference_id?: string; + /** + * Format: date-time + * @description ISO 8601 datetime of when the event occurred. + * @example 2018-02-02T22:25:27.521Z + */ + occurred_at?: string; + }; + }; + /** Conference Speak Started Event */ + ConferenceSpeakStartedEvent: { + data?: components['schemas']['ConferenceSpeakStarted']; + }; + /** Conference Stop Request */ + ConferenceStopRequest: { + /** @description List of call control ids identifying participants the audio file should stop be played to. If not given, the audio will be stoped to the entire conference. */ + call_control_ids?: string[]; + }; + /** + * Conference Unhold Request + * @example { + * "call_control_ids": [ + * "v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg" + * ] + * } + */ + ConferenceUnholdRequest: { + /** @description List of unique identifiers and tokens for controlling the call. Enter each call control ID to be unheld. */ + call_control_ids: string[]; + }; + /** + * Conference Unmute Request + * @example { + * "call_control_ids": [ + * "v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg" + * ] + * } + */ + ConferenceUnmuteRequest: { + /** @description List of unique identifiers and tokens for controlling the call. Enter each call control ID to be unmuted. When empty all participants will be unmuted. */ + call_control_ids?: string[]; + }; + /** + * Connection + * @example { + * "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58", + * "record_type": "ip_connection", + * "active": true, + * "anchorsite_override": "Latency", + * "connection_name": "string", + * "created_at": "2018-02-02T22:25:27.521Z", + * "updated_at": "2018-02-02T22:25:27.521Z", + * "webhook_event_url": "https://example.com", + * "webhook_event_failover_url": "https://failover.example.com", + * "webhook_api_version": "1", + * "outbound_voice_profile_id": "1293384261075731499" + * } + */ + Connection: { + /** + * Format: int64 + * @description Identifies the specific resource. + * @example 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + */ + id?: string; + /** + * @description Identifies the type of the resource. + * @example ip_connection + */ + record_type?: string; + /** + * @description Defaults to true + * @example true + */ + active?: boolean; + anchorsite_override?: components['schemas']['AnchorsiteOverride']; + /** @example string */ + connection_name?: string; + /** + * @description ISO 8601 formatted date indicating when the resource was created. + * @example 2018-02-02T22:25:27.521Z + */ + created_at?: string; + /** + * @description ISO 8601 formatted date indicating when the resource was updated. + * @example 2018-02-02T22:25:27.521Z + */ + updated_at?: string; + /** + * Format: url + * @description The URL where webhooks related to this connection will be sent. + * @default null + * @example https://example.com + */ + webhook_event_url: string | null; + /** + * Format: url + * @description The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails. + * @default + * @example https://failover.example.com + */ + webhook_event_failover_url: string | null; + /** + * @description Determines which webhook format will be used, Telnyx API v1 or v2. + * @default 1 + * @example 1 + * @enum {string} + */ + webhook_api_version: '1' | '2'; + outbound_voice_profile_id?: components['schemas']['OutboundVoiceProfileId']; + }; + /** + * Connection Active + * @description Specifies whether the connection can be used. + * @default true + * @example false + */ + ConnectionActive: boolean; + /** + * Android Push Credential Id + * @description The uuid of the push credential for Android + * @default null + * @example 06b09dfd-7154-4980-8b75-cebf7a9d4f8e + */ + ConnectionAndroidPushCredentialId: string | null; + /** + * @description The ID of the connection used to send the fax. + * @example 234423 + */ + ConnectionId: string; + /** + * Ios Push Credential Id + * @description The uuid of the push credential for Ios + * @default null + * @example ec0c8e5d-439e-4620-a0c1-9d9c8d02a836 + */ + ConnectionIosPushCredentialId: string | null; + /** + * Connection Name + * @description A user-assigned name to help manage the connection. + * @example office-connection + */ + ConnectionName: string; + /** + * Connection RTCP Settings + * @example { + * "port": "rtcp-mux", + * "capture_enabled": true, + * "report_frequency_secs": 10 + * } + */ + ConnectionRtcpSettings: { + /** + * @description RTCP port by default is rtp+1, it can also be set to rtcp-mux + * @default rtp+1 + * @enum {unknown} + */ + port: 'rtcp-mux' | 'rtp+1'; + /** + * @description BETA - Enable the capture and storage of RTCP messages to create QoS reports on the Telnyx Mission Control Portal. + * @default false + * @example true + */ + capture_enabled: boolean; + /** + * @description RTCP reports are sent to customers based on the frequency set. Frequency is in seconds and it can be set to values from 5 to 3000 seconds. + * @default 5 + * @example 10 + */ + report_frequency_secs: number; + }; + /** + * ConsumedData + * @description Represents the amount of data consumed. + */ + ConsumedData: { + /** + * @default MB + * @example MB + */ + unit: string; + /** + * Format: decimal + * @example 2048.1 + */ + amount?: string; + }; + /** + * Format: binary + * @description The file you want to upload. The maximum allowed size is 20 MB. contents and media_name/media_url can't be submitted together. + */ + Contents: string; + /** @example { + * "upfront_cost": "3.21", + * "monthly_cost": "6.54", + * "currency": "USD" + * } */ + CostInformation: { + /** @example 3.21 */ + upfront_cost?: string; + /** @example 6.54 */ + monthly_cost?: string; + /** + * @description The ISO 4217 code for the currency. + * @example USD + */ + currency?: string; + }; + /** @example { + * "United States of America": { + * "code": "US", + * "numbers": true, + * "features": [ + * "hd_voice", + * "emergency", + * "voice", + * "mms", + * "fax", + * "sms", + * "international_sms" + * ], + * "phone_number_type": [ + * "local", + * "local", + * "local", + * "local", + * "toll_free" + * ], + * "reservable": true, + * "quickship": true, + * "international_sms": true, + * "p2p": true, + * "local": { + * "features": [ + * "hd_voice", + * "voice", + * "international_sms", + * "mms", + * "fax", + * "sms", + * "emergency" + * ], + * "reservable": true, + * "quickship": false, + * "international_sms": true, + * "p2p": true + * }, + * "toll_free": { + * "features": [ + * "voice", + * "mms", + * "fax", + * "sms", + * "emergency" + * ], + * "reservable": true, + * "quickship": true, + * "international_sms": false, + * "p2p": false + * }, + * "mobile": {}, + * "national": {}, + * "inventory_coverage": true, + * "shared_cost": {} + * } + * } */ + CountryCoverage: { + /** @description Country ISO code */ + code?: string; + numbers?: boolean; + /** @description Set of features supported */ + features?: string[]; + /** @description Phone number type */ + phone_number_type?: string[]; + /** @description Supports reservable */ + reservable?: boolean; + /** @description Supports quickship */ + quickship?: boolean; + international_sms?: boolean; + p2p?: boolean; + local?: { + features?: string[]; + reservable?: boolean; + quickship?: boolean; + international_sms?: boolean; + p2p?: boolean; + }; + toll_free?: { + features?: string[]; + reservable?: boolean; + quickship?: boolean; + international_sms?: boolean; + p2p?: boolean; + }; + mobile?: Record; + national?: Record; + /** @description Indicates whether country can be queried with inventory coverage endpoint */ + inventory_coverage?: boolean; + shared_cost?: Record; + }; + /** Create Android Push Credential Request */ + CreateAndroidPushCredentialRequest: { + /** + * @description Type of mobile push credential. Should be android here + * @enum {string} + */ + type: 'android'; + /** + * @description Private key file in JSON format + * @example { + * "private_key": "BBBB0J56jd8kda:APA91vjb11BCjvxx3Jxja...", + * "client_email": "account@customer.org" + * } + */ + project_account_json_file: Record; + /** + * @description Alias to uniquely identify the credential + * @example LucyAndroidCredential + */ + alias: string; + }; + /** CreateAssistantRequest */ + CreateAssistantRequest: { + /** Name */ + name: string; + /** Model */ + model: string; + /** + * Description + * @default + */ + description: string; + /** Instructions */ + instructions: string; + /** @description The `function` tool type follows the same schema as the [OpenAI Assistants API](https://platform.openai.com/docs/api-reference/assistants/createAssistant). The `retrieval` tool type is unique to Telnyx. You may pass a list of [embedded storage buckets](https://developers.telnyx.com/api/inference/inference-embedding/post-embedding) for retrieval-augmented generation. */ + tools?: ( + | components['schemas']['ChatCompletionToolParam'] + | components['schemas']['Retrieval'] + )[]; + }; + /** CreateBrand */ + CreateBrand: { + /** @description Entity type behind the brand. This is the form of business establishment. */ + entityType: components['schemas']['EntityType']; + /** + * Displayname + * @description Display name, marketing name, or DBA name of the brand. + * @example ABC Mobile + */ + displayName: string; + /** + * Companyname + * @description (Required for Non-profit/private/public) Legal company name. + * @example ABC Inc. + */ + companyName?: string; + /** + * Firstname + * @description First name of business contact. + * @example John + */ + firstName?: string; + /** + * Lastname + * @description Last name of business contact. + * @example Smith + */ + lastName?: string; + /** + * Ein + * @description (Required for Non-profit) Government assigned corporate tax ID. EIN is 9-digits in U.S. + * @example 111111111 + */ + ein?: string; + /** + * Phone + * @description Valid phone number in e.164 international format. + * @example +12024567890 + */ + phone?: string; + /** + * Street + * @description Street number and name. + * @example 123 + */ + street?: string; + /** + * City + * @description City name + * @example New York + */ + city?: string; + /** + * State + * @description State. Must be 2 letters code for United States. + * @example NY + */ + state?: string; + /** + * Postalcode + * @description Postal codes. Use 5 digit zipcode for United States + * @example 10001 + */ + postalCode?: string; + /** + * Country + * @description ISO2 2 characters country code. Example: US - United States + * @example US + */ + country: string; + /** + * Email + * @description Valid email address of brand support contact. + */ + email: string; + /** + * Stocksymbol + * @description (Required for public company) stock symbol. + * @example ABC + */ + stockSymbol?: string; + /** + * @description (Required for public company) stock exchange. + * @example NASDAQ + */ + stockExchange?: components['schemas']['StockExchange']; + /** + * Ipaddress + * @description IP address of the browser requesting to create brand identity. + */ + ipAddress?: string; + /** + * Website + * @description Brand website URL. + * @example http://www.abcmobile.com + */ + website?: string; + /** @description Vertical or industry segment of the brand. */ + vertical: components['schemas']['Vertical']; + /** + * Isreseller + * @default false + */ + isReseller: boolean; + /** + * Mock + * @description Mock brand for testing purposes + * @default false + */ + mock: boolean; + /** + * Mobilephone + * @description Valid mobile phone number in e.164 international format. + * @example +12024567890 + */ + mobilePhone?: string; + /** + * BusinessContactEmail + * @description Business contact email. + * + * Required if `entityType` is `PUBLIC_PROFIT`. + * @example name@example.com + */ + businessContactEmail?: string; + /** + * WebhookURL + * @description Webhook URL for brand status updates. + * @example https://webhook.com/67ea78a8-9f32-4d04-b62d-f9502e8e5f93 + */ + webhookURL?: string; + /** + * WebhookFailoverURL + * @description Webhook failover URL for brand status updates. + * @example https://webhook.com/9010a453-4df8-4be6-a551-1070892888d6 + */ + webhookFailoverURL?: string; + }; + CreateBucketRequest: { + LocationConstraint?: string; + }; + /** + * Create Call Control Application Request + * @example { + * "application_name": "call-router", + * "webhook_event_url": "https://example.com", + * "active": false, + * "anchorsite_override": "\"Latency\"", + * "dtmf_type": "Inband", + * "first_command_timeout": true, + * "first_command_timeout_secs": 10, + * "inbound": { + * "channel_limit": 10, + * "shaken_stir_enabled": true, + * "sip_subdomain": "example", + * "sip_subdomain_receive_settings": "only_my_connections" + * }, + * "outbound": { + * "channel_limit": 10, + * "outbound_voice_profile_id": "1293384261075731499" + * }, + * "webhook_api_version": "1", + * "webhook_event_failover_url": "https://failover.example.com", + * "webhook_timeout_secs": 25 + * } + */ + CreateCallControlApplicationRequest: { + /** + * @description A user-assigned name to help manage the application. + * @example call-router + */ + application_name: string; + /** + * Format: url + * @description The URL where webhooks related to this connection will be sent. Must include a scheme, such as 'https'. + * @example https://example.com + */ + webhook_event_url: string; + /** + * @description Specifies whether the connection can be used. + * @default true + */ + active: boolean; + /** + * @description Latency directs Telnyx to route media through the site with the lowest round-trip time to the user's connection. Telnyx calculates this time using ICMP ping messages. This can be disabled by specifying a site to handle all media. + * + * @default "Latency" + * @example "Amsterdam, Netherlands" + * @enum {string} + */ + anchorsite_override: + | '"Latency"' + | '"Chicago, IL"' + | '"Ashburn, VA"' + | '"San Jose, CA"'; + /** + * @description Sets the type of DTMF digits sent from Telnyx to this Connection. Note that DTMF digits sent to Telnyx will be accepted in all formats. + * @default RFC 2833 + * @example Inband + * @enum {string} + */ + dtmf_type: 'RFC 2833' | 'Inband' | 'SIP INFO'; + /** + * @description Specifies whether calls to phone numbers associated with this connection should hangup after timing out. + * @default false + * @example true + */ + first_command_timeout: boolean; + /** + * @description Specifies how many seconds to wait before timing out a dial command. + * @default 30 + * @example 10 + */ + first_command_timeout_secs: number; + inbound?: components['schemas']['CallControlApplicationInbound']; + outbound?: components['schemas']['CallControlApplicationOutbound']; + /** + * @description Determines which webhook format will be used, Telnyx API v1 or v2. + * @default 1 + * @example 1 + * @enum {string} + */ + webhook_api_version: '1' | '2'; + /** + * Format: url + * @description The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails. Must include a scheme, such as 'https'. + * @default + * @example https://failover.example.com + */ + webhook_event_failover_url: string | null; + /** + * @description Specifies how many seconds to wait before timing out a webhook. + * @default null + * @example 25 + */ + webhook_timeout_secs: number | null; + }; + /** + * Create Conference Request + * @example { + * "call_control_id": "v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg", + * "name": "Business", + * "beep_enabled": "always", + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + * "command_id": "891510ac-f3e4-11e8-af5b-de00688a4901", + * "duration_minutes": 5, + * "hold_audio_url": "http://www.example.com/audio.wav", + * "start_conference_on_create": false, + * "max_participants": 250 + * } + */ + CreateConferenceRequest: { + /** + * @description Unique identifier and token for controlling the call + * @example v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQczRrZvZakpWxBlpw48KyZQ== + */ + call_control_id: string; + /** + * @description Name of the conference + * @example Business + */ + name: string; + /** + * @description Whether a beep sound should be played when participants join and/or leave the conference. + * @default never + * @example on_exit + * @enum {string} + */ + beep_enabled: 'always' | 'never' | 'on_enter' | 'on_exit'; + /** + * @description Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string. The client_state will be updated for the creator call leg and will be used for all webhooks related to the created conference. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + /** + * @description Toggle background comfort noise. + * @default true + * @example false + */ + comfort_noise: boolean; + /** + * @description Use this field to avoid execution of duplicate commands. Telnyx will ignore subsequent commands with the same `command_id` as one that has already been executed. + * @example 891510ac-f3e4-11e8-af5b-de00688a4901 + */ + command_id?: string; + /** + * @description Time length (minutes) after which the conference will end. + * @example 5 + */ + duration_minutes?: number; + /** + * @description The URL of a file to be played to participants joining the conference. The URL can point to either a WAV or MP3 file. hold_media_name and hold_audio_url cannot be used together in one request. Takes effect only when "start_conference_on_create" is set to "false". + * @example http://example.com/message.wav + */ + hold_audio_url?: string; + /** + * @description The media_name of a file to be played to participants joining the conference. The media_name must point to a file previously uploaded to api.telnyx.com/v2/media by the same user/organization. The file must either be a WAV or MP3 file. Takes effect only when "start_conference_on_create" is set to "false". + * @example my_media_uploaded_to_media_storage_api + */ + hold_media_name?: string; + /** + * @description The maximum number of active conference participants to allow. Must be between 2 and 800. Defaults to 250 + * @example 3 + */ + max_participants?: number; + /** + * @description Whether the conference should be started on creation. If the conference isn't started all participants that join are automatically put on hold. Defaults to "true". + * @example false + */ + start_conference_on_create?: boolean; + }; + /** + * Create Credential Connection Request + * @example { + * "active": true, + * "password": "my123secure456password789", + * "user_name": "myusername123", + * "anchorsite_override": "Latency", + * "connection_name": "my name", + * "sip_uri_calling_preference": " disabled", + * "default_on_hold_comfort_noise_enabled": false, + * "dtmf_type": "RFC 2833", + * "encode_contact_header_enabled": true, + * "encrypted_media": "SRTP", + * "onnet_t38_passthrough_enabled": true, + * "ios_push_credential_id": "ec0c8e5d-439e-4620-a0c1-9d9c8d02a836", + * "android_push_credential_id": "06b09dfd-7154-4980-8b75-cebf7a9d4f8e", + * "webhook_event_url": "https://example.com", + * "webhook_event_failover_url": "https://failover.example.com", + * "webhook_api_version": "1", + * "webhook_timeout_secs": 25, + * "rtcp_settings": { + * "port": "rtcp-mux", + * "capture_enabled": true, + * "report_frequency_seconds": 10 + * }, + * "inbound": { + * "ani_number_format": "+E.164", + * "dnis_number_format": "+e164", + * "codecs": "G722", + * "default_routing_method": "sequential", + * "channel_limit": 10, + * "generate_ringback_tone": true, + * "isup_headers_enabled": true, + * "prack_enabled": true, + * "privacy_zone_enabled": true, + * "sip_compact_headers_enabled": true, + * "timeout_1xx_secs": 10, + * "timeout_2xx_secs": 20, + * "shaken_stir_enabled": true + * }, + * "outbound": { + * "call_parking_enabled": true, + * "ani_override": "always", + * "channel_limit": 10, + * "instant_ringback_enabled": true, + * "generate_ringback_tone": true, + * "localization": "US", + * "t38_reinvite_source": "customer", + * "outbound_voice_profile_id": "1293384261075731499" + * } + * } + */ + CreateCredentialConnectionRequest: { + /** @description Defaults to true */ + active?: boolean; + /** + * @description The user name to be used as part of the credentials. Must be 4-32 characters long and alphanumeric values only (no spaces or special characters). + * @example myusername123 + */ + user_name: string; + /** + * @description The password to be used as part of the credentials. Must be 8 to 128 characters long. + * @example my123secure456password789 + */ + password: string; + anchorsite_override?: components['schemas']['AnchorsiteOverride']; + connection_name: components['schemas']['ConnectionName']; + /** + * @description This feature enables inbound SIP URI calls to your Credential Auth Connection. If enabled for all (unrestricted) then anyone who calls the SIP URI @telnyx.com will be connected to your Connection. You can also choose to allow only calls that are originated on any Connections under your account (internal). + * @enum {string} + */ + sip_uri_calling_preference?: 'disabled' | 'unrestricted' | 'internal'; + /** + * @description When enabled, Telnyx will generate comfort noise when you place the call on hold. If disabled, you will need to generate comfort noise or on hold music to avoid RTP timeout. + * @default false + */ + default_on_hold_comfort_noise_enabled: boolean; + dtmf_type?: components['schemas']['DtmfType']; + /** + * @description Encode the SIP contact header sent by Telnyx to avoid issues for NAT or ALG scenarios. + * @default false + */ + encode_contact_header_enabled: boolean; + encrypted_media?: components['schemas']['EncryptedMedia']; + /** + * @description Enable on-net T38 if you prefer the sender and receiver negotiating T38 directly if both are on the Telnyx network. If this is disabled, Telnyx will be able to use T38 on just one leg of the call depending on each leg's settings. + * @default false + */ + onnet_t38_passthrough_enabled: boolean; + ios_push_credential_id?: components['schemas']['ConnectionIosPushCredentialId']; + android_push_credential_id?: components['schemas']['ConnectionAndroidPushCredentialId']; + /** + * Format: url + * @description The URL where webhooks related to this connection will be sent. Must include a scheme, such as 'https'. + * @example https://example.com + */ + webhook_event_url?: string; + /** + * Format: url + * @description The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails. Must include a scheme, such as 'https'. + * @default + * @example https://failover.example.com + */ + webhook_event_failover_url: string | null; + /** + * @description Determines which webhook format will be used, Telnyx API v1, v2 or texml. Note - texml can only be set when the outbound object parameter call_parking_enabled is included and set to true. + * @default 1 + * @example 1 + * @enum {string} + */ + webhook_api_version: '1' | '2' | 'texml'; + /** + * @description Specifies how many seconds to wait before timing out a webhook. + * @default null + * @example 25 + */ + webhook_timeout_secs: number | null; + rtcp_settings?: components['schemas']['ConnectionRtcpSettings']; + inbound?: components['schemas']['CredentialInbound']; + outbound?: components['schemas']['CredentialOutbound']; + }; + CreateDocServiceDocumentRequest: + | components['schemas']['DocServiceDocumentUploadURL'] + | components['schemas']['DocServiceDocumentUploadInline']; + /** + * Create External Connection Request + * @example { + * "external_sip_connection": "zoom", + * "active": false, + * "outbound": { + * "outbound_voice_profile_id": "1911630617284445511" + * } + * } + */ + CreateExternalConnectionRequest: { + active?: components['schemas']['ConnectionActive']; + external_sip_connection: components['schemas']['ExternalSipConnectionZoomOnly']; + /** + * Format: url + * @description The URL where webhooks related to this connection will be sent. Must include a scheme, such as 'https'. + * @example https://example.com + */ + webhook_event_url?: string; + /** + * Format: url + * @description The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails. Must include a scheme, such as 'https'. + * @default + * @example https://failover.example.com + */ + webhook_event_failover_url: string | null; + /** + * @description Specifies how many seconds to wait before timing out a webhook. + * @default null + * @example 25 + */ + webhook_timeout_secs: number | null; + inbound?: { + /** + * @description When set, this will limit the number of concurrent inbound calls to phone numbers associated with this connection. + * @default null + * @example 10 + */ + channel_limit: number; + }; + outbound?: { + /** + * @description When set, this will limit the number of concurrent outbound calls to phone numbers associated with this connection. + * @default null + * @example 10 + */ + channel_limit: number; + outbound_voice_profile_id?: components['schemas']['OutboundVoiceProfileId']; + }; + }; + /** + * Create Upload Request + * @example { + * "number_ids": [ + * "3920457616934164700", + * "3920457616934164701", + * "3920457616934164702", + * "3920457616934164703" + * ], + * "usage": "first_party_app_assignment", + * "location_id": "67ea7693-9cd5-4a68-8c76-abb3aa5bf5d2" + * } + */ + CreateExternalConnectionUploadRequest: { + number_ids?: string[]; + /** + * @description The use case of the upload request. NOTE: `calling_user_assignment` is not supported for toll free numbers. + * @enum {string} + */ + usage?: 'calling_user_assignment' | 'first_party_app_assignment'; + additional_usages?: ( + | 'calling_user_assignment' + | 'first_party_app_assignment' + )[]; + /** + * Format: uuid + * @description Identifies the location to assign all phone numbers to. + */ + location_id?: string; + /** + * Format: uuid + * @description Identifies the civic address to assign all phone numbers to. + */ + civic_address_id?: string; + }; + /** + * Create Fax Application Request + * @example { + * "application_name": "fax-router", + * "active": false, + * "anchorsite_override": "Amsterdam, Netherlands", + * "webhook_event_url": "https://example.com", + * "webhook_event_failover_url": "https://failover.example.com", + * "webhook_timeout_secs": 25, + * "inbound": { + * "channel_limit": 10, + * "sip_subdomain": "example", + * "sip_subdomain_receive_settings": "only_my_connections" + * }, + * "outbound": { + * "channel_limit": 10, + * "outbound_voice_profile_id": "1293384261075731499" + * } + * } + */ + CreateFaxApplicationRequest: { + application_name: components['schemas']['ApplicationName']; + active?: components['schemas']['ConnectionActive']; + anchorsite_override?: components['schemas']['AnchorsiteOverride']; + webhook_event_url: components['schemas']['WebhookEventUrl']; + webhook_event_failover_url?: components['schemas']['WebhookEventFailoverUrl']; + webhook_timeout_secs?: components['schemas']['WebhookTimeoutSecs']; + inbound?: { + /** + * @description When set, this will limit the number of concurrent inbound calls to phone numbers associated with this connection. + * @default null + * @example 10 + */ + channel_limit: number; + /** + * @description Specifies a subdomain that can be used to receive Inbound calls to a Connection, in the same way a phone number is used, from a SIP endpoint. Example: the subdomain "example.sip.telnyx.com" can be called from any SIP endpoint by using the SIP URI "sip:@example.sip.telnyx.com" where the user part can be any alphanumeric value. Please note TLS encrypted calls are not allowed for subdomain calls. + * @default null + * @example example + */ + sip_subdomain: string; + /** + * @description This option can be enabled to receive calls from: "Anyone" (any SIP endpoint in the public Internet) or "Only my connections" (any connection assigned to the same Telnyx user). + * @default from_anyone + * @example only_my_connections + * @enum {string} + */ + sip_subdomain_receive_settings: 'only_my_connections' | 'from_anyone'; + }; + outbound?: { + /** + * @description When set, this will limit the number of concurrent outbound calls to phone numbers associated with this connection. + * @default null + * @example 10 + */ + channel_limit: number; + outbound_voice_profile_id?: components['schemas']['OutboundVoiceProfileId']; + }; + }; + /** + * Create FQDN Connection Request + * @example { + * "active": true, + * "anchorsite_override": "Latency", + * "connection_name": "string", + * "transport_protocol": "UDP", + * "default_on_hold_comfort_noise_enabled": true, + * "dtmf_type": "RFC 2833", + * "encode_contact_header_enabled": true, + * "encrypted_media": "SRTP", + * "onnet_t38_passthrough_enabled": true, + * "ios_push_credential_id": "ec0c8e5d-439e-4620-a0c1-9d9c8d02a836", + * "android_push_credential_id": "06b09dfd-7154-4980-8b75-cebf7a9d4f8e", + * "webhook_event_url": "https://example.com", + * "webhook_event_failover_url": "https://failover.example.com", + * "webhook_api_version": "1", + * "webhook_timeout_secs": 25, + * "rtcp_settings": { + * "port": "rtcp-mux", + * "capture_enabled": true, + * "report_frequency_secs": 10 + * }, + * "inbound": { + * "ani_number_format": "+E.164", + * "dnis_number_format": "+e164", + * "codecs": [ + * "G722" + * ], + * "default_routing_method": "sequential", + * "channel_limit": 10, + * "generate_ringback_tone": true, + * "isup_headers_enabled": true, + * "prack_enabled": true, + * "privacy_zone_enabled": true, + * "sip_compact_headers_enabled": true, + * "sip_region": "US", + * "sip_subdomain": "string", + * "sip_subdomain_receive_settings": "only_my_connections", + * "timeout_1xx_secs": 10, + * "timeout_2xx_secs": 10, + * "shaken_stir_enabled": true + * }, + * "outbound": { + * "ani_override": "+1234567890", + * "ani_override_type": "always", + * "call_parking_enabled": true, + * "channel_limit": 10, + * "generate_ringback_tone": true, + * "instant_ringback_enabled": true, + * "ip_authentication_method": "token", + * "ip_authentication_token": "aBcD1234", + * "localization": "string", + * "outbound_voice_profile_id": "1293384261075731499", + * "t38_reinvite_source": "customer", + * "tech_prefix": "0123", + * "encrypted_media": "string", + * "timeout_1xx_secs": 10, + * "timeout_2xx_secs": 10 + * } + * } + */ + CreateFqdnConnectionRequest: { + /** + * @description Defaults to true + * @default true + */ + active: boolean; + anchorsite_override?: components['schemas']['AnchorsiteOverride']; + connection_name: components['schemas']['ConnectionName']; + transport_protocol?: components['schemas']['FqdnConnectionTransportProtocol']; + /** + * @description When enabled, Telnyx will generate comfort noise when you place the call on hold. If disabled, you will need to generate comfort noise or on hold music to avoid RTP timeout. + * @default true + */ + default_on_hold_comfort_noise_enabled: boolean; + dtmf_type?: components['schemas']['DtmfType']; + /** + * @description Encode the SIP contact header sent by Telnyx to avoid issues for NAT or ALG scenarios. + * @default false + */ + encode_contact_header_enabled: boolean; + encrypted_media?: components['schemas']['EncryptedMedia']; + /** + * @description When enabled, the connection will be created for Microsoft Teams Direct Routing. A *.mstsbc.telnyx.tech FQDN will be created for the connection automatically. + * @default false + */ + microsoft_teams_sbc: boolean; + /** + * @description Enable on-net T38 if you prefer the sender and receiver negotiating T38 directly if both are on the Telnyx network. If this is disabled, Telnyx will be able to use T38 on just one leg of the call depending on each leg's settings. + * @default false + */ + onnet_t38_passthrough_enabled: boolean; + ios_push_credential_id?: components['schemas']['ConnectionIosPushCredentialId']; + android_push_credential_id?: components['schemas']['ConnectionAndroidPushCredentialId']; + webhook_event_url?: components['schemas']['WebhookEventUrl']; + webhook_event_failover_url?: components['schemas']['WebhookEventFailoverUrl']; + webhook_api_version?: components['schemas']['WebhookApiVersion']; + webhook_timeout_secs?: components['schemas']['WebhookTimeoutSecs']; + rtcp_settings?: components['schemas']['ConnectionRtcpSettings']; + inbound?: components['schemas']['InboundFqdn']; + outbound?: components['schemas']['OutboundFqdn']; + }; + /** + * Create Fqdn Request + * @example { + * "connection_id": "1516447646313612565", + * "fqdn": "example.com", + * "port": 8080, + * "dns_record_type": "a" + * } + */ + CreateFqdnRequest: { + /** @description ID of the FQDN connection to which this IP should be attached. */ + connection_id: string; + /** + * @description FQDN represented by this resource. + * @example example.com + */ + fqdn: string; + /** + * @description Port to use when connecting to this FQDN. + * @default 5060 + * @example 5060 + */ + port: number; + /** + * @description The DNS record type for the FQDN. For cases where a port is not set, the DNS record type must be 'srv'. For cases where a port is set, the DNS record type must be 'a'. If the DNS record type is 'a' and a port is not specified, 5060 will be used. + * @example a + */ + dns_record_type: string; + }; + /** @example { + * "from": "+13125551234", + * "to": [ + * "+18655551234", + * "+14155551234" + * ], + * "text": "Hello, World!", + * "subject": "From Telnyx!", + * "media_urls": [ + * "http://example.com" + * ], + * "webhook_url": "http://example.com/webhooks", + * "webhook_failover_url": "https://backup.example.com/hooks", + * "use_profile_webhooks": true + * } */ + CreateGroupMMSMessageRequest: { + /** + * Format: address + * @description Phone number, in +E.164 format, used to send the message. + */ + from: string; + /** @description A list of destinations. No more than 8 destinations are allowed. */ + to: components['schemas']['ToNumber'][]; + /** @description Message body (i.e., content) as a non-empty string. */ + text?: string; + /** @description Subject of multimedia message */ + subject?: string; + /** @description A list of media URLs. The total media size must be less than 1 MB. */ + media_urls?: string[]; + /** + * Format: url + * @description The URL where webhooks related to this message will be sent. + */ + webhook_url?: string; + /** + * Format: url + * @description The failover URL where webhooks related to this message will be sent if sending to the primary URL fails. + */ + webhook_failover_url?: string; + /** + * @description If the profile this number is associated with has webhooks, use them for delivery notifications. If webhooks are also specified on the message itself, they will be attempted first, then those on the profile. + * @default true + */ + use_profile_webhooks: boolean; + }; + /** + * Create Inbound Ip Request + * @example { + * "ani_number_format": "+E.164", + * "dnis_number_format": "+e164", + * "codecs": "G722", + * "default_routing_method": "sequential", + * "channel_limit": 10, + * "generate_ringback_tone": true, + * "isup_headers_enabled": true, + * "prack_enabled": true, + * "privacy_zone_enabled": true, + * "sip_compact_headers_enabled": true, + * "sip_region": "US", + * "sip_subdomain": "test", + * "sip_subdomain_receive_settings": "only_my_connections", + * "timeout_1xx_secs": 10, + * "timeout_2xx_secs": 20, + * "shaken_stir_enabled": true + * } + */ + CreateInboundIpRequest: { + /** + * @description This setting allows you to set the format with which the caller's number (ANI) is sent for inbound phone calls. + * @default E.164-national + * @enum {string} + */ + ani_number_format: + | '+E.164' + | 'E.164' + | '+E.164-national' + | 'E.164-national'; + /** + * @default e164 + * @enum {string} + */ + dnis_number_format: '+e164' | 'e164' | 'national' | 'sip_username'; + /** + * @description Defines the list of codecs that Telnyx will send for inbound calls to a specific number on your portal account, in priority order. This only works when the Connection the number is assigned to uses Media Handling mode: default. OPUS and H.264 codecs are available only when using TCP or TLS transport for SIP. + * @default [ + * "G722", + * "G711U", + * "G711A", + * "G729", + * "OPUS", + * "H.264" + * ] + */ + codecs: string[]; + /** + * @description Default routing method to be used when a number is associated with the connection. Must be one of the routing method types or left blank, other values are not allowed. + * @enum {string} + */ + default_routing_method?: 'sequential' | 'round-robin'; + /** + * @description When set, this will limit the total number of inbound calls to phone numbers associated with this connection. + * @default null + */ + channel_limit: number; + /** + * @description Generate ringback tone through 183 session progress message with early media. + * @default false + */ + generate_ringback_tone: boolean; + /** + * @description When set, inbound phone calls will receive ISUP parameters via SIP headers. (Only when available and only when using TCP or TLS transport.) + * @default false + */ + isup_headers_enabled: boolean; + /** + * @description Enable PRACK messages as defined in RFC3262. + * @default false + */ + prack_enabled: boolean; + /** + * @description By default, Telnyx does not send caller-id information when the caller has chosen to hide this information. When this option is enabled, Telnyx will send the SIP header Privacy:id plus the caller-id information so that the receiver side can choose when to hide it. + * @default false + */ + privacy_zone_enabled: boolean; + /** + * @description Defaults to true. + * @default true + */ + sip_compact_headers_enabled: boolean; + /** + * @description Selects which `sip_region` to receive inbound calls from. If null, the default region (US) will be used. + * @default US + * @enum {string} + */ + sip_region: 'US' | 'Europe' | 'Australia'; + /** @description Specifies a subdomain that can be used to receive Inbound calls to a Connection, in the same way a phone number is used, from a SIP endpoint. Example: the subdomain "example.sip.telnyx.com" can be called from any SIP endpoint by using the SIP URI "sip:@example.sip.telnyx.com" where the user part can be any alphanumeric value. Please note TLS encrypted calls are not allowed for subdomain calls. */ + sip_subdomain?: string; + /** + * @description This option can be enabled to receive calls from: "Anyone" (any SIP endpoint in the public Internet) or "Only my connections" (any connection assigned to the same Telnyx user). + * @enum {string} + */ + sip_subdomain_receive_settings?: 'only_my_connections' | 'from_anyone'; + /** + * @description Time(sec) before aborting if connection is not made. + * @default 3 + */ + timeout_1xx_secs: number; + /** + * @description Time(sec) before aborting if call is unanswered (min: 1, max: 600). + * @default 90 + */ + timeout_2xx_secs: number; + /** + * @description When enabled the SIP Connection will receive the Identity header with Shaken/Stir data in the SIP INVITE message of inbound calls, even when using UDP transport. + * @default false + */ + shaken_stir_enabled: boolean; + }; + /** Create iOS push credential request */ + CreateIosPushCredentialRequest: { + /** + * @description Type of mobile push credential. Should be ios here + * @enum {string} + */ + type: 'ios'; + /** + * @description Certificate as received from APNs + * @example -----BEGIN CERTIFICATE----- MIIGVDCCBTKCAQEAsNlRJVZn9ZvXcECQm65czs... -----END CERTIFICATE----- + */ + certificate: string; + /** + * @description Corresponding private key to the certificate as received from APNs + * @example -----BEGIN RSA PRIVATE KEY----- MIIEpQIBAAKCAQEAsNlRJVZn9ZvXcECQm65czs... -----END RSA PRIVATE KEY----- + */ + private_key: string; + /** + * @description Alias to uniquely identify the credential + * @example LucyIosCredential + */ + alias: string; + }; + /** + * Create IP Connection Request + * @example { + * "active": true, + * "anchorsite_override": "Latency", + * "connection_name": "string", + * "transport_protocol": "UDP", + * "default_on_hold_comfort_noise_enabled": true, + * "dtmf_type": "RFC 2833", + * "encode_contact_header_enabled": true, + * "encrypted_media": "SRTP", + * "onnet_t38_passthrough_enabled": false, + * "ios_push_credential_id": "ec0c8e5d-439e-4620-a0c1-9d9c8d02a836", + * "android_push_credential_id": "06b09dfd-7154-4980-8b75-cebf7a9d4f8e", + * "webhook_event_url": "https://example.com", + * "webhook_event_failover_url": "https://failover.example.com", + * "webhook_api_version": "1", + * "webhook_timeout_secs": 25, + * "rtcp_settings": { + * "port": "rtcp-mux", + * "capture_enabled": true, + * "report_frequency_secs": 10 + * }, + * "inbound:": { + * "ani_number_format": "+E.164", + * "dns_number_format": "+e164", + * "codecs": "G722", + * "default_primary_ip_id": "192.168.0.0", + * "default_tertiary_ip_id": "192.168.0.0", + * "default_secondary_ip_id": "192.168.0.0", + * "default_routing_method": "sequential", + * "channel_limit": 10, + * "generate_ringback_tone": true, + * "isup_headers_enabled": true, + * "prack_enabled": true, + * "privacy_zone_enabled": true, + * "sip_compact_headers_enabled": true, + * "sip_region": "US", + * "sip_subdomain": "test", + * "sip_subdomain_receive_settings": "only_my_connections", + * "timeout_1xx_secs": 10, + * "timeout_2xx_secs": 20, + * "shaken_stir_enabled": true + * }, + * "outbound": { + * "call_parking_enabled": true, + * "ani_override": "string", + * "ani_override_type": "always", + * "channel_limit": 10, + * "instant_ringback_enabled": true, + * "generate_ringback_tone": true, + * "localization": "string", + * "t38_reinvite_source": "customer", + * "tech_prefix": "string", + * "ip_authentication_method": "token", + * "ip_authentication_token": "string", + * "outbound_voice_profile_id": "1293384261075731499" + * } + * } + */ + CreateIpConnectionRequest: { + /** + * @description Defaults to true + * @example true + */ + active?: boolean; + anchorsite_override?: components['schemas']['AnchorsiteOverride']; + /** @example string */ + connection_name?: string; + /** + * @description One of UDP, TLS, or TCP. Applies only to connections with IP authentication or FQDN authentication. + * @default UDP + * @example UDP + * @enum {string} + */ + transport_protocol: 'UDP' | 'TCP' | 'TLS'; + /** + * @description When enabled, Telnyx will generate comfort noise when you place the call on hold. If disabled, you will need to generate comfort noise or on hold music to avoid RTP timeout. + * @default true + * @example true + */ + default_on_hold_comfort_noise_enabled: boolean; + dtmf_type?: components['schemas']['DtmfType']; + /** + * @description Encode the SIP contact header sent by Telnyx to avoid issues for NAT or ALG scenarios. + * @default false + * @example true + */ + encode_contact_header_enabled: boolean; + encrypted_media?: components['schemas']['EncryptedMedia']; + /** + * @description Enable on-net T38 if you prefer the sender and receiver negotiating T38 directly if both are on the Telnyx network. If this is disabled, Telnyx will be able to use T38 on just one leg of the call depending on each leg's settings. + * @default false + * @example false + */ + onnet_t38_passthrough_enabled: boolean; + ios_push_credential_id?: components['schemas']['ConnectionIosPushCredentialId']; + android_push_credential_id?: components['schemas']['ConnectionAndroidPushCredentialId']; + /** + * Format: url + * @description The URL where webhooks related to this connection will be sent. Must include a scheme, such as 'https'. + * @example https://example.com + */ + webhook_event_url?: string; + /** + * Format: url + * @description The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails. Must include a scheme, such as 'https'. + * @default + * @example https://failover.example.com + */ + webhook_event_failover_url: string | null; + /** + * @description Determines which webhook format will be used, Telnyx API v1 or v2. + * @default 1 + * @example 1 + * @enum {string} + */ + webhook_api_version: '1' | '2'; + /** + * @description Specifies how many seconds to wait before timing out a webhook. + * @default null + * @example 25 + */ + webhook_timeout_secs: number | null; + rtcp_settings?: components['schemas']['ConnectionRtcpSettings']; + inbound?: components['schemas']['CreateInboundIpRequest']; + outbound?: components['schemas']['OutboundIp']; + }; + /** + * Create Ip Request + * @example { + * "connection_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58", + * "ip_address": "192.168.0.0", + * "port": 5060 + * } + */ + CreateIpRequest: { + /** @description ID of the IP Connection to which this IP should be attached. */ + connection_id?: string; + /** + * @description IP adddress represented by this resource. + * @example 192.168.0.0 + */ + ip_address: string; + /** + * @description Port to use when connecting to this IP. + * @default 5060 + * @example 5060 + */ + port: number; + }; + /** @example { + * "from": "+18445550001", + * "to": "+13125550002", + * "text": "Hello, World!", + * "subject": "From Telnyx!", + * "media_urls": [ + * "http://example.com" + * ], + * "webhook_url": "http://example.com/webhooks", + * "webhook_failover_url": "https://backup.example.com/hooks", + * "use_profile_webhooks": true, + * "type": "MMS" + * } */ + CreateLongCodeMessageRequest: { + /** + * Format: address + * @description Phone number, in +E.164 format, used to send the message. + */ + from: string; + to: components['schemas']['ToNumber']; + /** @description Message body (i.e., content) as a non-empty string. + * + * **Required for SMS** */ + text?: string; + /** @description Subject of multimedia message */ + subject?: string; + /** @description A list of media URLs. The total media size must be less than 1 MB. + * + * **Required for MMS** */ + media_urls?: string[]; + /** + * Format: url + * @description The URL where webhooks related to this message will be sent. + */ + webhook_url?: string; + /** + * Format: url + * @description The failover URL where webhooks related to this message will be sent if sending to the primary URL fails. + */ + webhook_failover_url?: string; + /** + * @description If the profile this number is associated with has webhooks, use them for delivery notifications. If webhooks are also specified on the message itself, they will be attempted first, then those on the profile. + * @default true + */ + use_profile_webhooks: boolean; + /** + * @description The protocol for sending the message, either SMS or MMS. + * @enum {string} + */ + type?: 'SMS' | 'MMS'; + /** + * @description Automatically detect if an SMS message is unusually long and exceeds a recommended limit of message parts. + * @default false + */ + auto_detect: boolean; + }; + /** + * Create Managed Account Request + * @example { + * "email": "larry_cat_food@customer.org", + * "password": "3jVjLq!tMuWKyWx4NN*CvhnB", + * "business_name": "Larry's Cat Food Inc", + * "managed_account_allow_custom_pricing": false, + * "rollup_billing": false + * } + */ + CreateManagedAccountRequest: { + /** + * @description The email address for the managed account. If not provided, the email address will be generated based on the email address of the manager account. + * @example new_managed_account@customer.org + */ + email?: string; + /** + * @description Password for the managed account. If a password is not supplied, the account will not be able to be signed into directly. (A password reset may still be performed later to enable sign-in via password.) + * @example 3jVjLq!tMuWKyWx4NN*CvhnB + */ + password?: string; + /** + * @description The name of the business for which the new managed account is being created, that will be used as the managed accounts's organization's name. + * @example Larry's Cat Food Inc + */ + business_name: string; + /** + * @description Boolean value that indicates if the managed account is able to have custom pricing set for it or not. If false, uses the pricing of the manager account. Defaults to false. This value may be changed after creation, but there may be time lag between when the value is changed and pricing changes take effect. + * @example false + */ + managed_account_allow_custom_pricing?: boolean; + /** + * @description Boolean value that indicates if the billing information and charges to the managed account "roll up" to the manager account. If true, the managed account will not have its own balance and will use the shared balance with the manager account. This value cannot be changed after account creation without going through Telnyx support as changes require manual updates to the account ledger. Defaults to false. + * @example false + */ + rollup_billing?: boolean; + }; + /** @example { + * "from": "+18445550001", + * "messaging_profile_id": "abc85f64-5717-4562-b3fc-2c9600000000", + * "to": "+18445550001", + * "text": "Hello, World!", + * "subject": "From Telnyx!", + * "media_urls": [ + * "http://example.com" + * ], + * "webhook_url": "http://example.com/webhooks", + * "webhook_failover_url": "https://backup.example.com/hooks", + * "use_profile_webhooks": true, + * "type": "MMS" + * } */ + CreateMessageRequest: { + /** + * Format: address + * @description Sending address (+E.164 formatted phone number, alphanumeric sender ID, or short code). + * + * **Required if sending with a phone number, short code, or alphanumeric sender ID.** + * + */ + from?: string; + /** @description Unique identifier for a messaging profile. + * + * **Required if sending via number pool or with an alphanumeric sender ID.** + * */ + messaging_profile_id?: string; + to: components['schemas']['ToNumber']; + /** @description Message body (i.e., content) as a non-empty string. + * + * **Required for SMS** */ + text?: string; + /** @description Subject of multimedia message */ + subject?: string; + /** @description A list of media URLs. The total media size must be less than 1 MB. + * + * **Required for MMS** */ + media_urls?: string[]; + /** + * Format: url + * @description The URL where webhooks related to this message will be sent. + */ + webhook_url?: string; + /** + * Format: url + * @description The failover URL where webhooks related to this message will be sent if sending to the primary URL fails. + */ + webhook_failover_url?: string; + /** + * @description If the profile this number is associated with has webhooks, use them for delivery notifications. If webhooks are also specified on the message itself, they will be attempted first, then those on the profile. + * @default true + */ + use_profile_webhooks: boolean; + /** + * @description The protocol for sending the message, either SMS or MMS. + * @enum {string} + */ + type?: 'SMS' | 'MMS'; + /** + * @description Automatically detect if an SMS message is unusually long and exceeds a recommended limit of message parts. + * @default false + */ + auto_detect: boolean; + }; + /** @example { + * "messaging_profile_id": "dc8f39ac-953d-4520-b93b-786ae87db0da", + * "phone_numbers": [ + * "+18665550001", + * "+18665550002" + * ] + * } */ + CreateMessagingHostedNumberOrderRequest: { + /** @description Phone numbers to be used for hosted messaging. */ + phone_numbers?: string[]; + /** @description Automatically associate the number with this messaging profile ID when the order is complete. */ + messaging_profile_id?: string; + }; + /** @example { + * "name": "My name", + * "enabled": true, + * "webhook_url": "https://www.example.com/hooks", + * "webhook_failover_url": "https://backup.example.com/hooks", + * "webhook_api_version": "2", + * "number_pool_settings": { + * "toll_free_weight": 10, + * "long_code_weight": 1, + * "skip_unhealthy": true, + * "sticky_sender": false, + * "geomatch": false + * }, + * "url_shortener_settings": { + * "domain": "example.ex", + * "prefix": "", + * "replace_blacklist_only": true, + * "send_webhooks": false + * }, + * "whitelisted_destinations": [ + * "US" + * ] + * } */ + CreateMessagingProfileRequest: { + /** @description A user friendly name for the messaging profile. */ + name: string; + /** @description Destinations to which the messaging profile is allowed to send. The elements in the list must be valid ISO 3166-1 alpha-2 country codes. If set to `["*"]` all destinations will be allowed. */ + whitelisted_destinations: string[]; + /** + * @description Specifies whether the messaging profile is enabled or not. + * @default true + */ + enabled: boolean; + /** + * Format: url + * @description The URL where webhooks related to this messaging profile will be sent. + * @default + */ + webhook_url: string | null; + /** + * Format: url + * @description The failover URL where webhooks related to this messaging profile will be sent if sending to the primary URL fails. + * @default + */ + webhook_failover_url: string | null; + /** + * @description Determines which webhook format will be used, Telnyx API v1, v2, or a legacy 2010-04-01 format. + * @default 2 + * @enum {string} + */ + webhook_api_version: '1' | '2' | '2010-04-01'; + number_pool_settings?: components['schemas']['NumberPoolSettings']; + url_shortener_settings?: components['schemas']['UrlShortenerSettings']; + /** @description The alphanumeric sender ID to use when sending to destinations that require an alphanumeric sender ID. */ + alpha_sender?: string | null; + }; + CreateMultiPartDocServiceDocumentRequest: { + /** + * Format: binary + * @description The file you are uploading. + */ + file?: string; + /** + * @description Optional reference string for customer tracking. + * @example MY REF 001 + */ + customer_reference?: string; + }; + /** @example { + * "starting_number": "+19705555000", + * "range": 10 + * } */ + CreateNumberBlockOrderRequest: { + /** + * Format: uuid + * @example 12ade33a-21c0-473b-b055-b3c836e1c292 + */ + readonly id?: string; + /** @example number_block_order */ + readonly record_type?: string; + /** + * Format: e164_phone_number + * @description Starting phone number block + * @example +19705555000 + */ + starting_number: string; + /** + * @description The phone number range included in the block. + * @example 10 + */ + range: number; + /** + * @description The count of phone numbers in the number order. + * @example 10 + */ + readonly phone_numbers_count?: number; + /** + * @description Identifies the connection associated with this phone number. + * @example 346789098765567 + */ + connection_id?: string; + /** + * @description Identifies the messaging profile associated with the phone number. + * @example abc85f64-5717-4562-b3fc-2c9600 + */ + messaging_profile_id?: string; + /** + * @description The status of the order. + * @enum {string} + */ + readonly status?: 'pending' | 'success' | 'failure'; + /** + * @description A customer reference string for customer look ups. + * @example MY REF 001 + */ + customer_reference?: string; + /** + * Format: datetime + * @description An ISO 8901 datetime string denoting when the number order was created. + * @example 2018-01-01T00:00:00.000000Z + */ + readonly created_at?: string; + /** + * Format: datetime + * @description An ISO 8901 datetime string for when the number order was updated. + * @example 2018-01-01T00:00:00.000000Z + */ + readonly updated_at?: string; + /** + * @description True if all requirements are met for every phone number, false otherwise. + * @example true + */ + readonly requirements_met?: boolean; + /** + * @description Errors the reservation could happen upon + * @example Number is already on hold + */ + readonly errors?: string; + }; + /** @example { + * "id": "387d1e31-a218-4375-8151-103f2d5e2d2c", + * "record_type": "number_order_document", + * "file_id": "1e3c5822-0362-4702-8e46-5a129f0d3976", + * "requirements_id": "36aaf27d-986b-493c-bd1b-de16af2e4292", + * "customer_reference": "MY REF 001", + * "requirement_type": "address_proof", + * "created_at": "2018-01-01T00:00:00.000000Z" + * } */ + CreateNumberOrderDocumentRequest: { + /** + * Format: uuid + * @example 387d1e31-a218-4375-8151-103f2d5e2d2c + */ + readonly id?: string; + /** @example number_order_document */ + readonly record_type?: string; + /** + * @description The id of the file to associate as a number order document. + * @example 1e3c5822-0362-4702-8e46-5a129f0d3976 + */ + file_id?: string; + /** + * @description Unique id for a requirement. + * @example 36aaf27d-986b-493c-bd1b-de16af2e4292 + */ + requirements_id?: string; + /** + * @description A customer reference string for customer look ups. + * @example MY REF 001 + */ + customer_reference?: string; + /** @enum {string} */ + readonly requirement_type?: + | 'address_proof' + | 'identification' + | 'reg_form'; + /** + * Format: datetime + * @description An ISO 8901 datetime string denoting when the number order document was uploaded. + * @example 2018-01-01T00:00:00.000000Z + */ + readonly created_at?: string; + }; + /** @example { + * "phone_numbers": [ + * { + * "phone_number": "+19705555098", + * "bundle_id": "bc8e4d67-33a0-4cbb-af74-7b58f05bd494" + * }, + * { + * "phone_number": "+492111609539", + * "requirement_group_id": "dbbd94ee-9079-488f-80ba-f566b247fd79" + * } + * ], + * "connection_id": "346789098765567", + * "messaging_profile_id": "abc85f64-5717-4562-b3fc-2c9600", + * "billing_group_id": "abc85f64-5717-4562-b3fc-2c9600", + * "customer_reference": "MY REF 001" + * } */ + CreateNumberOrderRequest: { + phone_numbers?: { + /** + * @description e164_phone_number + * @example +19705555098 + */ + phone_number: string; + /** + * @description ID of requirement group to use to satisfy number requirements + * @example dbbd94ee-9079-488f-80ba-f566b247fd7 + */ + requirement_group_id?: string; + /** + * @description ID of bundle to associate the number to + * @example bc8e4d67-33a0-4cbb-af74-7b58f05bd494 + */ + bundle_id?: string; + }[]; + /** + * @description Identifies the connection associated with this phone number. + * @example 346789098765567 + */ + connection_id?: string; + /** + * @description Identifies the messaging profile associated with the phone number. + * @example abc85f64-5717-4562-b3fc-2c9600 + */ + messaging_profile_id?: string; + /** + * @description Identifies the billing group associated with the phone number. + * @example abc85f64-5717-4562-b3fc-2c9600 + */ + billing_group_id?: string; + /** + * @description A customer reference string for customer look ups. + * @example MY REF 001 + */ + customer_reference?: string; + }; + /** @example { + * "from": "+18445550001", + * "messaging_profile_id": "abc85f64-5717-4562-b3fc-2c9600000000", + * "to": [ + * "+13125550002" + * ], + * "text": "Hello, World!", + * "subject": "From Telnyx!", + * "media_urls": [ + * "http://example.com" + * ], + * "webhook_url": "http://example.com/webhooks", + * "webhook_failover_url": "https://backup.example.com/hooks", + * "use_profile_webhooks": true, + * "type": "MMS" + * } */ + CreateNumberPoolMessageRequest: { + /** @description Unique identifier for a messaging profile. */ + messaging_profile_id: string; + to: components['schemas']['ToNumber']; + /** @description Message body (i.e., content) as a non-empty string. + * + * **Required for SMS** */ + text?: string; + /** @description Subject of multimedia message */ + subject?: string; + /** @description A list of media URLs. The total media size must be less than 1 MB. + * + * **Required for MMS** */ + media_urls?: string[]; + /** + * Format: url + * @description The URL where webhooks related to this message will be sent. + */ + webhook_url?: string; + /** + * Format: url + * @description The failover URL where webhooks related to this message will be sent if sending to the primary URL fails. + */ + webhook_failover_url?: string; + /** + * @description If the profile this number is associated with has webhooks, use them for delivery notifications. If webhooks are also specified on the message itself, they will be attempted first, then those on the profile. + * @default true + */ + use_profile_webhooks: boolean; + /** + * @description The protocol for sending the message, either SMS or MMS. + * @enum {string} + */ + type?: 'SMS' | 'MMS'; + /** + * @description Automatically detect if an SMS message is unusually long and exceeds a recommended limit of message parts. + * @default false + */ + auto_detect: boolean; + }; + /** @example { + * "id": "12ade33a-21c0-473b-b055-b3c836e1c292", + * "record_type": "number_reservation", + * "phone_numbers": [ + * { + * "id": "12ade33a-21c0-473b-b055-b3c836e1c292", + * "record_type": "reserved_phone_number", + * "phone_number": "+19705555098", + * "status": "pending", + * "created_at": "2018-01-01T00:00:00.000000Z", + * "updated_at": "2018-01-01T00:00:00.000000Z", + * "expired_at": "2018-01-01T00:00:00.000000Z" + * } + * ], + * "status": "pending", + * "customer_reference": "MY REF 001", + * "created_at": "2018-01-01T00:00:00.000000Z", + * "updated_at": "2018-01-01T00:00:00.000000Z" + * } */ + CreateNumberReservationRequest: { + /** + * Format: uuid + * @example 12ade33a-21c0-473b-b055-b3c836e1c292 + */ + readonly id?: string; + /** @example number_reservation */ + readonly record_type?: string; + phone_numbers?: components['schemas']['ReservedPhoneNumber'][]; + /** + * @description The status of the entire reservation. + * @enum {string} + */ + readonly status?: 'pending' | 'success' | 'failure'; + /** + * @description A customer reference string for customer look ups. + * @example MY REF 001 + */ + customer_reference?: string; + /** + * Format: datetime + * @description An ISO 8901 datetime string denoting when the numbers reservation was created. + * @example 2018-01-01T00:00:00.000000Z + */ + readonly created_at?: string; + /** + * Format: datetime + * @description An ISO 8901 datetime string for when the number reservation was updated. + * @example 2018-01-01T00:00:00.000000Z + */ + readonly updated_at?: string; + }; + /** + * Outbound Voice Profile + * @example { + * "name": "office", + * "traffic_type": "conversational", + * "service_plan": "global", + * "concurrent_call_limit": 10, + * "enabled": true, + * "tags": [ + * "office-profile" + * ], + * "usage_payment_method": "rate-deck", + * "whitelisted_destinations": [ + * "US", + * "BR", + * "AU" + * ], + * "max_destination_rate": 10, + * "daily_spend_limit": "100.00", + * "daily_spend_limit_enabled": true, + * "billing_group_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58" + * } + */ + CreateOutboundVoiceProfileRequest: { + /** + * @description A user-supplied name to help with organization. + * @example office + */ + name: string; + traffic_type?: components['schemas']['TrafficType']; + service_plan?: components['schemas']['ServicePlan']; + /** + * @description Must be no more than your global concurrent call limit. Null means no limit. + * @example 10 + */ + concurrent_call_limit?: number | null; + /** + * @description Specifies whether the outbound voice profile can be used. Disabled profiles will result in outbound calls being blocked for the associated Connections. + * @default true + * @example true + */ + enabled: boolean; + /** @example [ + * "office-profile" + * ] */ + tags?: string[]; + usage_payment_method?: components['schemas']['UsagePaymentMethod']; + /** + * @description The list of destinations you want to be able to call using this outbound voice profile formatted in alpha2. + * @default [ + * "US", + * "CA" + * ] + * @example [ + * "US", + * "BR", + * "AU" + * ] + */ + whitelisted_destinations: string[]; + /** @description Maximum rate (price per minute) for a Destination to be allowed when making outbound calls. */ + max_destination_rate?: number; + /** + * @description The maximum amount of usage charges, in USD, you want Telnyx to allow on this outbound voice profile in a day before disallowing new calls. + * @example 100.00 + */ + daily_spend_limit?: string; + /** + * @description Specifies whether to enforce the daily_spend_limit on this outbound voice profile. + * @default false + * @example true + */ + daily_spend_limit_enabled: boolean; + call_recording?: components['schemas']['OutboundCallRecording']; + /** + * Format: uuid + * @description The ID of the billing group associated with the outbound proflile. Defaults to null (for no group assigned). + * @default null + * @example 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + */ + billing_group_id: string | null; + }; + /** CreatePortingOrder */ + CreatePortingOrder: { + /** + * @description The list of +E.164 formatted phone numbers + * @example [ + * "+13035550000", + * "+13035550001", + * "+13035550002" + * ] + */ + phone_numbers: string[]; + /** + * @description A customer-specified reference number for customer bookkeeping purposes + * @example Acct 123abc + */ + customer_reference?: string; + }; + CreatePortingOrderComment: { + /** @example Please, let me know when the port completes */ + body?: string; + }; + CreateRoomClientTokenRequest: { + /** + * @description The time to live in seconds of the Client Token, after that time the Client Token is invalid and can't be used to join a Room. + * @default 600 + * @example 600 + */ + token_ttl_secs: number; + /** + * @description The time to live in seconds of the Refresh Token, after that time the Refresh Token is invalid and can't be used to refresh Client Token. + * @default 3600 + * @example 3600 + */ + refresh_token_ttl_secs: number; + }; + CreateRoomCompositionRequest: { + /** + * @description The desired format of the room composition. + * @default mp4 + * @example mp4 + */ + format: string; + /** + * @description The desired resolution (width/height in pixels) of the resulting video of the room composition. Both width and height are required to be between 16 and 1280; and width * height should not exceed 1280 * 720 + * @default 1280x720 + * @example 800x600 + */ + resolution: string; + /** + * Format: uuid + * @description id of the room session associated with the room composition. + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777b0 + */ + session_id?: string | null; + /** @description Describes the video layout of the room composition in terms of regions. */ + video_layout?: { + [key: string]: components['schemas']['VideoRegion']; + }; + /** + * Format: url + * @description The URL where webhooks related to this room composition will be sent. Must include a scheme, such as 'https'. + * @example https://example.com + */ + webhook_event_url?: string; + /** + * Format: url + * @description The failover URL where webhooks related to this room composition will be sent if sending to the primary URL fails. Must include a scheme, such as 'https'. + * @default + * @example https://failover.example.com + */ + webhook_event_failover_url: string | null; + /** + * @description Specifies how many seconds to wait before timing out a webhook. + * @default null + * @example 25 + */ + webhook_timeout_secs: number | null; + }; + CreateRoomRequest: { + /** + * @description The unique (within the Telnyx account scope) name of the room. + * @example My room + */ + unique_name?: string; + /** + * @description The maximum amount of participants allowed in a room. If new participants try to join after that limit is reached, their request will be rejected. + * @default 10 + * @example 10 + */ + max_participants: number; + /** + * @description Enable or disable recording for that room. + * @default false + * @example true + */ + enable_recording: boolean; + /** + * Format: url + * @description The URL where webhooks related to this room will be sent. Must include a scheme, such as 'https'. + * @example https://example.com + */ + webhook_event_url?: string; + /** + * Format: url + * @description The failover URL where webhooks related to this room will be sent if sending to the primary URL fails. Must include a scheme, such as 'https'. + * @default + * @example https://failover.example.com + */ + webhook_event_failover_url: string | null; + /** + * @description Specifies how many seconds to wait before timing out a webhook. + * @default null + * @example 25 + */ + webhook_timeout_secs: number | null; + }; + /** @example { + * "from": "+18445550001", + * "to": "+18445550001", + * "text": "Hello, World!", + * "subject": "From Telnyx!", + * "media_urls": [ + * "http://example.com" + * ], + * "webhook_url": "http://example.com/webhooks", + * "webhook_failover_url": "https://backup.example.com/hooks", + * "use_profile_webhooks": true, + * "type": "MMS" + * } */ + CreateShortCodeMessageRequest: { + /** + * Format: address + * @description Phone number, in +E.164 format, used to send the message. + */ + from: string; + to: components['schemas']['ToNumber']; + /** @description Message body (i.e., content) as a non-empty string. + * + * **Required for SMS** */ + text?: string; + /** @description Subject of multimedia message */ + subject?: string; + /** @description A list of media URLs. The total media size must be less than 1 MB. + * + * **Required for MMS** */ + media_urls?: string[]; + /** + * Format: url + * @description The URL where webhooks related to this message will be sent. + */ + webhook_url?: string; + /** + * Format: url + * @description The failover URL where webhooks related to this message will be sent if sending to the primary URL fails. + */ + webhook_failover_url?: string; + /** + * @description If the profile this number is associated with has webhooks, use them for delivery notifications. If webhooks are also specified on the message itself, they will be attempted first, then those on the profile. + * @default true + */ + use_profile_webhooks: boolean; + /** + * @description The protocol for sending the message, either SMS or MMS. + * @enum {string} + */ + type?: 'SMS' | 'MMS'; + /** + * @description Automatically detect if an SMS message is unusually long and exceeds a recommended limit of message parts. + * @default false + */ + auto_detect: boolean; + }; + /** + * Create TeXML Secret request + * @example { + * "name": "My Secret Name", + * "value": "My Secret Value" + * } + */ + CreateTeXMLSecretRequest: { + /** + * @description Name used as a reference for the secret, if the name already exists within the account its value will be replaced + * @example My Secret Name + */ + name: string; + /** + * @description Secret value which will be used when rendering the TeXML template + * @example My Secret Value + */ + value: string; + }; + /** + * Create TeXML Secret result + * @example { + * "name": "My Secret Name", + * "value": "*****" + * } + */ + CreateTeXMLSecretResult: { + /** @example My Secret Name */ + name?: string; + /** + * @example ***** + * @enum {string} + */ + value?: '*****'; + }; + /** + * Create Texml Application Request + * @example { + * "friendly_name": "call-router", + * "active": false, + * "anchorsite_override": "Amsterdam, Netherlands", + * "dtmf_type": "Inband", + * "first_command_timeout": true, + * "first_command_timeout_secs": 10, + * "voice_url": "https://example.com", + * "voice_fallback_url": "https://fallback.example.com", + * "voice_method": "get", + * "status_callback": "https://example.com", + * "status_callback_method": "get", + * "inbound": { + * "channel_limit": 10, + * "shaken_stir_enabled": true, + * "sip_subdomain": "example", + * "sip_subdomain_receive_settings": "only_my_connections" + * }, + * "outbound": { + * "channel_limit": 10, + * "outbound_voice_profile_id": "1293384261075731499" + * } + * } + */ + CreateTexmlApplicationRequest: { + friendly_name: components['schemas']['ApplicationName']; + active?: components['schemas']['ConnectionActive']; + anchorsite_override?: components['schemas']['AnchorsiteOverride']; + dtmf_type?: components['schemas']['DtmfType']; + first_command_timeout?: components['schemas']['FirstCommandTimeout']; + first_command_timeout_secs?: components['schemas']['FirstCommandTimeoutSecs']; + /** + * Format: url + * @description URL to which Telnyx will deliver your XML Translator webhooks. + * @example https://example.com + */ + voice_url: string; + /** + * Format: url + * @description URL to which Telnyx will deliver your XML Translator webhooks if we get an error response from your voice_url. + * @default null + * @example https://fallback.example.com + */ + voice_fallback_url: string; + /** + * @description HTTP request method Telnyx will use to interact with your XML Translator webhooks. Either 'get' or 'post'. + * @default post + * @example get + * @enum {string} + */ + voice_method: 'get' | 'post'; + /** + * Format: url + * @description URL for Telnyx to send requests to containing information about call progress events. + * @default null + * @example https://example.com + */ + status_callback: string; + /** + * @description HTTP request method Telnyx should use when requesting the status_callback URL. + * @default post + * @example get + * @enum {string} + */ + status_callback_method: 'get' | 'post'; + inbound?: { + /** + * @description When set, this will limit the total number of inbound calls to phone numbers associated with this connection. + * @default null + * @example 10 + */ + channel_limit: number; + /** + * @description When enabled Telnyx will include Shaken/Stir data in the Webhook for new inbound calls. + * @default false + * @example false + */ + shaken_stir_enabled: boolean; + /** + * @description Specifies a subdomain that can be used to receive Inbound calls to a Connection, in the same way a phone number is used, from a SIP endpoint. Example: the subdomain "example.sip.telnyx.com" can be called from any SIP endpoint by using the SIP URI "sip:@example.sip.telnyx.com" where the user part can be any alphanumeric value. Please note TLS encrypted calls are not allowed for subdomain calls. + * @default null + * @example example + */ + sip_subdomain: string; + /** + * @description This option can be enabled to receive calls from: "Anyone" (any SIP endpoint in the public Internet) or "Only my connections" (any connection assigned to the same Telnyx user). + * @default from_anyone + * @example only_my_connections + * @enum {string} + */ + sip_subdomain_receive_settings: 'only_my_connections' | 'from_anyone'; + }; + outbound?: { + /** + * @description When set, this will limit the total number of outbound calls to phone numbers associated with this connection. + * @default null + * @example 10 + */ + channel_limit: number; + outbound_voice_profile_id?: components['schemas']['OutboundVoiceProfileId']; + }; + }; + /** + * CreateVerificationRequestCall + * @description The request body when creating a verification. + */ + CreateVerificationRequestCall: { + /** + * @description +E164 formatted phone number. + * @example +13035551234 + */ + phone_number: string; + /** + * Format: uuid + * @description The identifier of the associated Verify profile. + * @example 12ade33a-21c0-473b-b055-b3c836e1c292 + */ + verify_profile_id: string; + /** + * @description Send a self-generated numeric code to the end-user + * @default null + * @example 43612 + */ + custom_code: string | null; + /** + * @description The number of seconds the verification code is valid for. + * @example 300 + */ + timeout_secs?: number; + }; + /** + * CreateVerificationRequestFlashcall + * @description The request body when creating a verification. + */ + CreateVerificationRequestFlashcall: { + /** + * @description +E164 formatted phone number. + * @example +13035551234 + */ + phone_number: string; + /** + * Format: uuid + * @description The identifier of the associated Verify profile. + * @example 12ade33a-21c0-473b-b055-b3c836e1c292 + */ + verify_profile_id: string; + /** + * @description The number of seconds the verification code is valid for. + * @example 300 + */ + timeout_secs?: number; + }; + /** + * CreateVerificationRequestSMS + * @description The request body when creating a verification. + */ + CreateVerificationRequestSMS: { + /** + * @description +E164 formatted phone number. + * @example +13035551234 + */ + phone_number: string; + /** + * Format: uuid + * @description The identifier of the associated Verify profile. + * @example 12ade33a-21c0-473b-b055-b3c836e1c292 + */ + verify_profile_id: string; + /** + * @description Send a self-generated numeric code to the end-user + * @default null + * @example 43612 + */ + custom_code: string | null; + /** + * @description The number of seconds the verification code is valid for. + * @example 300 + */ + timeout_secs?: number; + }; + /** CreateVerifyVerificationResponse */ + CreateVerificationResponse: { + data: components['schemas']['Verification']; + }; + /** CreateVerifiedNumberResponse */ + CreateVerifiedNumberResponse: { + /** @example +15551234567 */ + phone_number?: string; + /** @example sms */ + verification_method?: string; + }; + /** CreateVerifyProfileCallRequest */ + CreateVerifyProfileCallRequest: { + /** + * Format: uuid + * @description The message template identifier selected from /verify_profiles/templates + * @example 0abb5b4f-459f-445a-bfcd-488998b7572d + */ + messaging_template_id?: string; + /** + * @description The name that identifies the application requesting 2fa in the verification message. + * @example Example Secure App + */ + app_name?: string; + /** + * @description The length of the verify code to generate. + * @default 5 + * @example 6 + */ + code_length: number; + /** + * @description Enabled country destinations to send verification codes. The elements in the list must be valid ISO 3166-1 alpha-2 country codes. If set to `["*"]`, all destinations will be allowed. + * @example [ + * "US", + * "CA" + * ] + */ + whitelisted_destinations?: string[]; + /** + * @description For every request that is initiated via this Verify profile, this sets the number of seconds before a verification request code expires. Once the verification request expires, the user cannot use the code to verify their identity. + * @default 300 + * @example 300 + */ + default_verification_timeout_secs: number; + }; + /** CreateVerifyProfileFlashcallRequest */ + CreateVerifyProfileFlashcallRequest: { + /** + * @description Enabled country destinations to send verification codes. The elements in the list must be valid ISO 3166-1 alpha-2 country codes. If set to `["*"]`, all destinations will be allowed. + * @example [ + * "US", + * "CA" + * ] + */ + whitelisted_destinations?: string[]; + /** + * @description For every request that is initiated via this Verify profile, this sets the number of seconds before a verification request code expires. Once the verification request expires, the user cannot use the code to verify their identity. + * @default 300 + * @example 300 + */ + default_verification_timeout_secs: number; + }; + /** CreateVerifyProfileSMSRequest */ + CreateVerifyProfileSMSRequest: { + /** + * Format: uuid + * @description The message template identifier selected from /verify_profiles/templates + * @example 0abb5b4f-459f-445a-bfcd-488998b7572d + */ + messaging_template_id?: string; + /** + * @description The name that identifies the application requesting 2fa in the verification message. + * @example Example Secure App + */ + app_name?: string; + /** + * @description The alphanumeric sender ID to use when sending to destinations that require an alphanumeric sender ID. + * @default Telnyx + */ + alpha_sender: string; + /** + * @description The length of the verify code to generate. + * @default 5 + * @example 6 + */ + code_length: number; + /** + * @description Enabled country destinations to send verification codes. The elements in the list must be valid ISO 3166-1 alpha-2 country codes. If set to `["*"]`, all destinations will be allowed. + * @example [ + * "US", + * "CA" + * ] + */ + whitelisted_destinations: string[]; + /** + * @description For every request that is initiated via this Verify profile, this sets the number of seconds before a verification request code expires. Once the verification request expires, the user cannot use the code to verify their identity. + * @default 300 + * @example 300 + */ + default_verification_timeout_secs: number; + }; + /** + * @description ISO 8601 formatted date-time indicating when the resource was created. + * @example 2018-02-02T22:25:27.521Z + */ + CreatedAt: string; + /** Format: date-time */ + CreationDate: string; + /** + * CreationStatus + * @description An enumeration. + * @enum {string} + */ + CreationStatus: 'pending' | 'created' | 'failed'; + /** + * Credential Active + * @description If the credential associated with this service is active. + * @default false + * @example true + */ + CredentialActive: boolean; + /** + * Credential Connection + * @example { + * "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58", + * "record_type": "credential_connection", + * "active": true, + * "user_name": "myusername123", + * "password": "my123secure456password789", + * "created_at": "2018-02-02T22:25:27.521Z", + * "updated_at": "2018-02-02T22:25:27.521Z", + * "anchorsite_override": "Latency", + * "connection_name": "string", + * "sip_uri_calling_preference": "disabled", + * "default_on_hold_comfort_noise_enabled": true, + * "dtmf_type": "RFC 2833", + * "encode_contact_header_enabled": true, + * "encrypted_media": "SRTP", + * "onnet_t38_passthrough_enabled": true, + * "ios_push_credential_id": "ec0c8e5d-439e-4620-a0c1-9d9c8d02a836", + * "android_push_credential_id": "06b09dfd-7154-4980-8b75-cebf7a9d4f8e", + * "webhook_event_url": "https://example.com", + * "webhook_event_failover_url": "https://failover.example.com", + * "webhook_api_version": "1", + * "webhook_timeout_secs": 25, + * "rtcp_settings": { + * "port": "rtp+1", + * "capture_enabled": true, + * "report_frequency_seconds": 10 + * }, + * "inbound": { + * "ani_number_format": "+E.164", + * "dnis_number_format": "+e164", + * "codecs": [ + * "G722" + * ], + * "channel_limit": 10, + * "generate_ringback_tone": true, + * "isup_headers_enabled": true, + * "prack_enabled": true, + * "privacy_zone_enabled": true, + * "sip_compact_headers_enabled": true, + * "timeout_1xx_secs": 10, + * "timeout_2xx_secs": 15, + * "shaken_stir_enabled": true + * }, + * "outbound": { + * "call_parking_enabled": true, + * "ani_override": "string", + * "ani_override_type": "always", + * "channel_limit": 10, + * "instant_ringback_enabled": true, + * "generate_ringback_tone": true, + * "localization": "string", + * "t38_reinvite_source": "customer", + * "outbound_voice_profile_id": "1293384261075731499" + * } + * } + */ + CredentialConnection: { + /** + * Format: int64 + * @description Identifies the type of resource. + * @example 1293384261075731499 + */ + id?: string; + /** + * @description Identifies the type of the resource. + * @example credential_connection + */ + record_type?: string; + /** @description Defaults to true */ + active?: boolean; + /** + * @description The user name to be used as part of the credentials. Must be 4-32 characters long and alphanumeric values only (no spaces or special characters). + * @example myusername123 + */ + user_name?: string; + /** + * @description The password to be used as part of the credentials. Must be 8 to 128 characters long. + * @example my123secure456password789 + */ + password?: string; + /** + * @description ISO-8601 formatted date indicating when the resource was created. + * @example 2018-02-02T22:25:27.521Z + */ + created_at?: string; + /** + * @description ISO-8601 formatted date indicating when the resource was updated. + * @example 2018-02-02T22:25:27.521Z + */ + updated_at?: string; + anchorsite_override?: components['schemas']['AnchorsiteOverride']; + connection_name?: string; + /** + * @description This feature enables inbound SIP URI calls to your Credential Auth Connection. If enabled for all (unrestricted) then anyone who calls the SIP URI @telnyx.com will be connected to your Connection. You can also choose to allow only calls that are originated on any Connections under your account (internal). + * @example disabled + * @enum {string} + */ + sip_uri_calling_preference?: 'disabled' | 'unrestricted' | 'internal'; + /** + * @description When enabled, Telnyx will generate comfort noise when you place the call on hold. If disabled, you will need to generate comfort noise or on hold music to avoid RTP timeout. + * @default true + */ + default_on_hold_comfort_noise_enabled: boolean; + dtmf_type?: components['schemas']['DtmfType']; + /** + * @description Encode the SIP contact header sent by Telnyx to avoid issues for NAT or ALG scenarios. + * @default false + */ + encode_contact_header_enabled: boolean; + encrypted_media?: components['schemas']['EncryptedMedia']; + /** + * @description Enable on-net T38 if you prefer the sender and receiver negotiating T38 directly if both are on the Telnyx network. If this is disabled, Telnyx will be able to use T38 on just one leg of the call depending on each leg's settings. + * @default false + */ + onnet_t38_passthrough_enabled: boolean; + /** + * Format: url + * @description The URL where webhooks related to this connection will be sent. Must include a scheme, such as 'https'. + * @example https://example.com + */ + webhook_event_url?: string; + /** + * Format: url + * @description The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails. Must include a scheme, such as 'https'. + * @default + * @example https://failover.example.com + */ + webhook_event_failover_url: string | null; + /** + * @description Determines which webhook format will be used, Telnyx API v1 or v2. + * @default 1 + * @example 1 + * @enum {string} + */ + webhook_api_version: '1' | '2'; + /** + * @description Specifies how many seconds to wait before timing out a webhook. + * @default null + * @example 25 + */ + webhook_timeout_secs: number | null; + rtcp_settings?: components['schemas']['ConnectionRtcpSettings']; + inbound?: components['schemas']['CredentialInbound']; + outbound?: components['schemas']['CredentialOutbound']; + }; + /** + * Credential Inbound + * @example { + * "ani_number_format": "+E.164", + * "dnis_number_format": "+e164", + * "codecs": "G722", + * "default_routing_method": "sequential", + * "channel_limit": 10, + * "generate_ringback_tone": true, + * "isup_headers_enabled": true, + * "prack_enabled": true, + * "privacy_zone_enabled": true, + * "sip_compact_headers_enabled": true, + * "timeout_1xx_secs": 10, + * "timeout_2xx_secs": 20, + * "shaken_stir_enabled": true + * } + */ + CredentialInbound: { + /** + * @description This setting allows you to set the format with which the caller's number (ANI) is sent for inbound phone calls. + * @default E.164-national + * @enum {string} + */ + ani_number_format: + | '+E.164' + | 'E.164' + | '+E.164-national' + | 'E.164-national'; + /** + * @default e164 + * @enum {string} + */ + dnis_number_format: '+e164' | 'e164' | 'national' | 'sip_username'; + /** + * @description Defines the list of codecs that Telnyx will send for inbound calls to a specific number on your portal account, in priority order. This only works when the Connection the number is assigned to uses Media Handling mode: default. OPUS and H.264 codecs are available only when using TCP or TLS transport for SIP. + * @default [ + * "G722", + * "G711U", + * "G711A", + * "G729", + * "OPUS", + * "H.264" + * ] + */ + codecs: string[]; + /** + * @description When set, this will limit the total number of inbound calls to phone numbers associated with this connection. + * @default null + */ + channel_limit: number; + /** + * @description Generate ringback tone through 183 session progress message with early media. + * @default false + */ + generate_ringback_tone: boolean; + /** + * @description When set, inbound phone calls will receive ISUP parameters via SIP headers. (Only when available and only when using TCP or TLS transport.) + * @default false + */ + isup_headers_enabled: boolean; + /** + * @description Enable PRACK messages as defined in RFC3262. + * @default false + */ + prack_enabled: boolean; + /** + * @description By default, Telnyx does not send caller-id information when the caller has chosen to hide this information. When this option is enabled, Telnyx will send the SIP header Privacy:id plus the caller-id information so that the receiver side can choose when to hide it. + * @default false + */ + privacy_zone_enabled: boolean; + /** + * @description Defaults to true. + * @default true + */ + sip_compact_headers_enabled: boolean; + /** + * @description Time(sec) before aborting if connection is not made. + * @default 3 + */ + timeout_1xx_secs: number; + /** + * @description Time(sec) before aborting if call is unanswered (min: 1, max: 600). + * @default 90 + */ + timeout_2xx_secs: string; + /** + * @description When enabled the SIP Connection will receive the Identity header with Shaken/Stir data in the SIP INVITE message of inbound calls, even when using UDP transport. + * @default false + */ + shaken_stir_enabled: boolean; + }; + /** + * Credential Outbound + * @example { + * "call_parking_enabled": true, + * "ani_override": "always", + * "channel_limit": 10, + * "instant_ringback_enabled": true, + * "generate_ringback_tone": true, + * "localization": "US", + * "t38_reinvite_source": "customer", + * "outbound_voice_profile_id": "1293384261075731499" + * } + */ + CredentialOutbound: { + /** + * @description Forces all SIP calls originated on this connection to be "parked" instead of "bridged" to the destination specified on the URI. Parked calls will return ringback to the caller and will await for a Call Control command to define which action will be taken next. + * @default false + */ + call_parking_enabled: boolean | null; + /** + * @description Set a phone number as the ani_override value to override caller id number on outbound calls. + * @default + */ + ani_override: string; + /** + * @description Specifies when we apply your ani_override setting. Only applies when ani_override is not blank. + * @default always + * @enum {string} + */ + ani_override_type: 'always' | 'normal' | 'emergency'; + /** + * @description When set, this will limit the total number of outbound calls to phone numbers associated with this connection. + * @default null + */ + channel_limit: number; + /** + * @description When set, ringback will not wait for indication before sending ringback tone to calling party. + * @default true + */ + instant_ringback_enabled: boolean; + /** + * @description Generate ringback tone through 183 session progress message with early media. + * @default false + */ + generate_ringback_tone: boolean; + /** + * @description A 2-character country code specifying the country whose national dialing rules should be used. For example, if set to `US` then any US number can be dialed without preprending +1 to the number. When left blank, Telnyx will try US and GB dialing rules, in that order, by default. + * @default US + * @example US + */ + localization: string; + /** + * @description This setting only affects connections with Fax-type Outbound Voice Profiles. The setting dictates whether or not Telnyx sends a t.38 reinvite.

By default, Telnyx will send the re-invite. If set to `customer`, the caller is expected to send the t.38 reinvite. + * @default telnyx + * @enum {string} + */ + t38_reinvite_source: + | 'telnyx' + | 'customer' + | 'disabled' + | 'passthru' + | 'caller-passthru' + | 'callee-passthru'; + outbound_voice_profile_id?: components['schemas']['OutboundVoiceProfileId']; + }; + /** + * Format: password + * @description Opaque credential token used to authenticate and authorize with storage provider. + * @example OPAQUE_CREDENTIALS_TOKEN + */ + Credentials: string; + /** CredentialsResponse */ + CredentialsResponse: { + data: components['schemas']['CustomStorageConfiguration']; + connection_id: components['parameters']['ConnectionId']; + record_type: components['schemas']['RecordType']; + }; + /** @example { + * "id": "42587e44-3a3e-46de-9255-0c9a7a1d1ec7", + * "record_type": "csv_download", + * "url": "https://www.telnyx.com/sample/42587e44-3a3e-46de-9255-0c9a7a1d1ec7", + * "status": "pending" + * } */ + CsvDownload: { + /** + * @description Identifies the resource. + * @example 42587e44-3a3e-46de-9255-0c9a7a1d1ec7 + */ + readonly id?: string; + /** + * @description Identifies the type of the resource. + * @example csv_download + */ + readonly record_type?: string; + /** + * @description The URL at which the CSV file can be retrieved. + * @example https://www.telnyx.com/sample/42587e44-3a3e-46de-9255-0c9a7a1d1ec7 + */ + url?: string; + /** + * @description Indicates the completion level of the CSV report. Only complete CSV download requests will be able to be retrieved. + * @default pending + * @example pending + * @enum {string} + */ + status: 'pending' | 'complete' | 'failed' | 'expired'; + }; + /** + * Currencies + * @description The supported currencies. + * @example USD + * @enum {string} + */ + Currencies: 'USD' | 'EUR' | 'GBP' | 'AUD' | 'CAD'; + Cursor: { + /** + * @description Opaque identifier of next page. + * @example v1:g3QAAAADZAAKdGVsbnl4X2lkc2wAAAABbQAAACRlYmRiYzdkNi1kZWRmLTExZWQtYTM3MS0wMjQyMGFlZjAwYjRqZAAJdGltZXN0YW1wbggA8Le4pGhpVxdkAAR0eXBlZAAFYWZ0ZXI= + */ + after?: string; + /** + * @description Opaque identifier of previous page. + * @example v1:g3QAAAADZAAKdGVsbnl4X2lkc2wAAAABbQAAACRlYmRiYzdkNi1kZWRmLTExZWQtYTM3MS0wMjQyMGFlZjAwYjRqZAAJdGltZXN0YW1wbggA8Le4pGhpVxdkAAR0eXBlZAAFYWZ0ZXI= + */ + before?: string; + }; + /** Cursor Pagination Meta */ + CursorPaginationMeta: { + cursors?: components['schemas']['Cursor']; + /** + * @description Path to next page. + * @example /v2/recording_transcriptions?page[after]=v1:g3QAAAADZAAKdGVsbnl4X2lkc2wAAAABbQAAACRlYmRiYzdkNi1kZWRmLTExZWQtYTM3MS0wMjQyMGFlZjAwYjRqZAAJdGltZXN0YW1wbggA8Le4pGhpVxdkAAR0eXBlZAAFYWZ0ZXI= + */ + next?: string; + /** + * @description Path to previous page. + * @example /v2/recording_transcriptions?page[before]=v1:g3QAAAADZAAKdGVsbnl4X2lkc2wAAAABbQAAACRlYmRiYzdkNi1kZWRmLTExZWQtYTM3MS0wMjQyMGFlZjAwYjRqZAAJdGltZXN0YW1wbggA8Le4pGhpVxdkAAR0eXBlZAAFYWZ0ZXI= + */ + previous?: string; + }; + /** + * Custom SIP Header + * @example { + * "name": "head_1", + * "value": "val_1" + * } + */ + CustomSipHeader: { + /** + * @description The name of the header to add. + * @example head_1 + */ + name: string; + /** + * @description The value of the header. + * @example val_1 + */ + value: string; + }; + /** Custom Storage Configuration */ + CustomStorageConfiguration: { + /** + * @example gcs + * @enum {string} + */ + backend: 'gcs' | 's3' | 'azure'; + configuration: + | components['schemas']['GCSConfigurationData'] + | components['schemas']['S3ConfigurationData'] + | components['schemas']['AzureConfigurationData']; + }; + CustomerServiceRecord: { + /** + * Format: uuid + * @description Uniquely identifies this customer service record + * @example f1486bae-f067-460c-ad43-73a92848f902 + */ + readonly id?: string; + /** + * @description The phone number of the customer service record. + * @example +12065551212 + */ + phone_number?: string; + /** + * @description The status of the customer service record + * @example completed + * @enum {string} + */ + status?: 'pending' | 'completed' | 'failed'; + /** + * @description The error message in case status is `failed`. This field would be null in case of `pending` or `completed` status. + * @example CSR information not available. + */ + error_message?: string; + /** @description The result of the CSR request. This field would be null in case of `pending` or `failed` status. */ + result?: { + /** + * @description The name of the carrier that the customer service record is for. + * @example ABC CARRIER, INC. + */ + carrier_name?: string; + /** @description The associated phone numbers of the customer service record. */ + associated_phone_numbers?: string[]; + /** @description The admin of the customer service record. */ + admin?: { + /** + * @description The name of the customer service record. + * @example John Doe + */ + name?: string; + /** + * @description The billing phone number of the customer service record. + * @example +12065551212 + */ + billing_phone_number?: string; + /** + * @description The account number of the customer service record. + * @example 1234567890 + */ + account_number?: string; + /** + * @description The authorized person name of the customer service record. + * @example John Doe + */ + authorized_person_name?: string; + }; + /** @description The address of the customer service record */ + address?: { + /** + * @description The state of the address + * @example NY + */ + administrative_area?: string; + /** + * @description The city of the address + * @example New York + */ + locality?: string; + /** + * @description The zip code of the address + * @example 10001 + */ + postal_code?: string; + /** + * @description The street address + * @example 123 Main St + */ + street_address?: string; + /** + * @description The full address + * @example 123 Main St; New York; NY; 10001 + */ + full_address?: string; + }; + }; + /** + * @description Identifies the type of the resource. + * @example customer_service_record + */ + readonly record_type?: string; + /** + * Format: date-time + * @description ISO 8601 formatted date indicating when the resource was created. + * @example 2021-03-19T10:07:15.527Z + */ + readonly created_at?: string; + /** + * Format: date-time + * @description ISO 8601 formatted date indicating when the resource was created. + * @example 2021-03-19T10:07:15.527Z + */ + readonly updated_at?: string; + }; + CustomerServiceRecordAdditionalData: { + /** + * @description The name of the administrator of CSR. + * @example Entity Inc. + */ + name?: string; + /** + * @description The name of the authorized person. + * @example John Doe + */ + authorized_person_name?: string; + /** + * @description The PIN of the customer service record. + * @example 1234 + */ + pin?: string; + /** + * @description The account number of the customer service record. + * @example 123456789 + */ + account_number?: string; + /** + * @description The customer code of the customer service record. + * @example 123456789 + */ + customer_code?: string; + /** + * @description The first line of the address of the customer service record. + * @example 123 Main St + */ + address_line_1?: string; + /** + * @description The city of the customer service record. + * @example New York + */ + city?: string; + /** + * @description The state of the customer service record. + * @example NY + */ + state?: string; + /** + * @description The zip code of the customer service record. + * @example 10001 + */ + zip_code?: string; + /** + * @description The billing phone number of the customer service record. + * @example +12065551212 + */ + billing_phone_number?: string; + }; + CustomerServiceRecordPhoneNumberCoverage: { + /** + * @description The phone number that is being verified. + * @example +12223334444 + */ + phone_number?: string; + /** + * @description Indicates whether the phone number is covered or not. + * @example true + */ + has_csr_coverage?: boolean; + /** + * @description The reason why the phone number is not covered. Only returned if `has_csr_coverage` is false. + * @example The phone number '+19999999999' is invalid. + */ + reason?: string; + /** @description Additional data required to perform CSR for the phone number. Only returned if `has_csr_coverage` is true. */ + additional_data_required?: ( + | 'name' + | 'authorized_person_name' + | 'account_number' + | 'customer_code' + | 'pin' + | 'address_line_1' + | 'city' + | 'state' + | 'zip_code' + | 'billing_phone_number' + )[]; + /** + * @description Identifies the type of the resource. + * @example customer_service_record_phone_number_coverage + */ + record_type?: string; + }; + CustomerServiceRecordStatusChangedEvent: { + /** + * Format: uuid + * @description Uniquely identifies the callback event. + * @example d3c462b5-8afa-4d48-9af1-4f9b1f00e7bd + */ + id?: string; + /** + * @description The type of the callback event. + * @example customer_service_record.status_changed + * @enum {string} + */ + event_type?: 'customer_service_record.status_changed'; + payload?: { + /** + * Format: uuid + * @description Uniquely identifies the customer service record. + * @example f1486bae-f067-460c-ad43-73a92848f902 + */ + id?: string; + /** + * @description The phone number of the customer service record. + * @example +12065551212 + */ + phone_number?: string; + /** + * @description The status of the customer service record + * @example completed + * @enum {string} + */ + status?: 'pending' | 'completed' | 'failed'; + /** + * Format: date-time + * @description ISO 8601 formatted date indicating the last time where the resource was updated. + * @example 2021-03-19T10:07:15.527Z + */ + updated_at?: string; + }; + /** + * Format: date-time + * @description ISO 8601 formatted date indicating when the callback event occurred. + * @example 2021-03-19T10:07:15.527Z + */ + occurred_at?: string; + /** + * @description Identifies the type of the resource. + * @example event + * @enum {string} + */ + record_type?: 'event'; + }; + /** + * Format: datetime-rfc2822 + * @example Fri, 11 Aug 2023 19:12:11 +0000 + */ + DateTimeRFC2822: string; + /** Dca */ + Dca: { + /** + * Id + * @description Unique identifier of the direct connect aggregator + */ + id: string; + /** + * Displayname + * @description Display name of the direct connect aggregator. + */ + displayName: string; + }; + DefaultGateway: components['schemas']['Record'] & { + /** + * @description Identifies the type of the resource. + * @example default_gateway + */ + readonly record_type?: string; + /** + * Format: uuid + * @description Network ID. + * @example e66c496d-4a85-423b-8b2a-8e63fac20320 + */ + network_id?: string; + /** + * Format: uuid + * @description Wireguard peer ID. + * @example e66c496d-4a85-423b-8b2a-8e63fac20320 + */ + wireguard_peer_id?: string; + status?: components['schemas']['InterfaceStatus']; + }; + DeleteObjectsRequest: { + Key?: string; + }[]; + DeleteObjectsResponse: Record; + /** @description An object following one of the schemas published in https://developers.telnyx.com/docs/api/v2/detail-records */ + DetailRecord: + | components['schemas']['MessageDetailRecord'] + | components['schemas']['ConferenceDetailRecord'] + | components['schemas']['ConferenceParticipantDetailRecord'] + | components['schemas']['WhatsAppDetailRecord'] + | components['schemas']['WhatsAppConversationDetailRecord'] + | components['schemas']['AmdDetailRecord'] + | components['schemas']['VerifyDetailRecord'] + | components['schemas']['SimCardUsageDetailRecord'] + | components['schemas']['MediaStorageDetailRecord']; + DetailRecordsSearchResponse: { + data?: components['schemas']['DetailRecord'][]; + meta?: components['schemas']['PaginationMeta']; + }; + /** DetailedTaskStatus */ + DetailedTaskStatus: { + /** + * Taskid + * @description The ID of the task associated with bulk Sole Proprietor brand and campaign creation. + * @example 4b60017a-2f50-4c90-c9e6-5f67304cbde2 + */ + taskId: string; + /** + * Referenceid + * @description A user generated unique identifier that keeps track of sole proprietor brand/campaign combinations submitted during bulk creation. + * @example 4q90017a-2f50-4c90-c9e6-5f67304cbde9 + */ + referenceId: string; + /** + * Brand + * @description The status of the individual brand submitted via bulk creation. + */ + brand: components['schemas']['BrandStatus'][]; + /** + * Campaign + * @description The status of the individual campaign submitted via bulk creation. + */ + campaign: components['schemas']['CampaignStatus'][]; + /** Phonenumbers */ + phoneNumbers: components['schemas']['PhoneNumberStatus'][]; + }; + /** + * Create Conference Participant Request + * @example { + * "To": "+12065550100", + * "From": "+12065550200" + * } + */ + DialConferenceParticipantRequest: { + /** + * @description Whether to play a notification beep to the conference when the participant enters and exits. + * @example onExit + * @enum {string} + */ + Beep?: 'true' | 'false' | 'onEnter' | 'onExit'; + /** + * @description URL destination for Telnyx to send status callback events to for the call. + * @example https://www.example.com/callback + */ + StatusCallback?: string; + /** + * @description HTTP request type used for `StatusCallback`. + * @example GET + * @enum {string} + */ + StatusCallbackMethod?: 'GET' | 'POST'; + /** + * @description The changes to the call's state that should generate a call to `StatusCallback`. Can be: `initiated`, `ringing`, `answered`, and `completed`. Separate multiple values with a space. The default value is `completed`. + * @example answered completed + */ + StatusCallbackEvent?: string; + /** + * @description The phone number of the called party. Phone numbers are formatted with a `+` and country code. + * @example +16175551212 + */ + To?: string; + /** + * @description The phone number of the party that initiated the call. Phone numbers are formatted with a `+` and country code. + * @example +16175551212 + */ + From?: string; + /** + * @description The number of seconds that we should allow the phone to ring before assuming there is no answer. Can be an integer between 5 and 120, inclusive. The default value is 30. + * @example 30 + */ + Timeout?: number; + /** + * @description Whether the participant should be muted. + * @example true + */ + Muted?: boolean; + /** + * @description Whether to start the conference when the participant enters. Defaults to `true`. + * @example false + */ + StartConferenceOnEnter?: boolean; + /** + * @description Whether to end the conference when the participant leaves. Defaults to `false`. + * @example true + */ + EndConferenceOnExit?: boolean; + /** + * @description Whether participant shall be bridged to conference before the participant answers (from early media if available). Defaults to `false`. + * @default false + * @example true + */ + EarlyMedia: boolean; + /** + * @description The URL the conference callbacks will be sent to. + * @example https://example.com/conference_status_callback + */ + ConferenceStatusCallback?: string; + /** + * @description HTTP request type used for `ConferenceStatusCallback`. Defaults to `POST`. + * @example GET + * @enum {string} + */ + ConferenceStatusCallbackMethod?: 'GET' | 'POST'; + /** + * @description The changes to the conference's state that should generate a call to `ConferenceStatusCallback`. Can be: `start`, `end`, `join` and `leave`. Separate multiple values with a space. By default no callbacks are sent. + * @example start end join leave + */ + ConferenceStatusCallbackEvent?: string; + /** + * @description The URL to call for an audio file to play while the participant is waiting for the conference to start. + * @example https://www.example.com/wait_music.mp3 + */ + WaitUrl?: string; + /** + * @description The maximum number of participants in the conference. Can be a positive integer from 2 to 800. The default value is 250. + * @example 30 + */ + MaxParticipants?: number; + /** + * @description Whether the participant is coaching another call. When `true`, `CallSidToCoach` has to be given. + * @example false + */ + Coaching?: boolean; + /** + * @description The SID of the participant who is being coached. The participant being coached is the only participant who can hear the participant who is coaching. + * @example v3:9X2vxPDFY2RHSJ1EdMS0RHRksMTg7ldNxdjWbVr9zBjbGjGsSe-aiQ + */ + CallSidToCoach?: string; + /** + * @description To be used as the caller id name (SIP From Display Name) presented to the destination (`To` number). The string should have a maximum of 128 characters, containing only letters, numbers, spaces, and `-_~!.+` special characters. If ommited, the display name will be the same as the number in the `From` field. + * @example Info + */ + CallerId?: string; + /** + * @description The maximum duration of the call in seconds. + * @example 30 + */ + TimeLimit?: number; + /** + * @description Whether to detect if a human or an answering machine picked up the call. Use `Enable` if you would like to ne notified as soon as the called party is identified. Use `DetectMessageEnd`, if you would like to leave a message on an answering machine. + * @example Enable + * @enum {string} + */ + MachineDetection?: 'Enable' | 'DetectMessageEnd'; + /** + * @description How long answering machine detection should go on for before sending an `Unknown` result. Given in milliseconds. + * @example 1000 + */ + MachineDetectionTimeout?: number; + /** + * @description Maximum threshold of a human greeting. If greeting longer than this value, considered machine. Ignored when `premium` detection is used. + * @default 3500 + * @example 2000 + */ + MachineDetectionSpeechThreshold: number; + /** + * @description Silence duration threshold after a greeting message or voice for it be considered human. Ignored when `premium` detection is used. + * @default 800 + * @example 2000 + */ + MachineDetectionSpeechEndThreshold: number; + /** + * @description If initial silence duration is greater than this value, consider it a machine. Ignored when `premium` detection is used. + * @default 3500 + * @example 2000 + */ + MachineDetectionSilenceTimeout: number; + /** + * @description The URL the result of answering machine detection will be sent to. + * @example https://www.example.com/amd_result + */ + AmdStatusCallback?: string; + /** + * @description HTTP request type used for `AmdStatusCallback`. Defaults to `POST`. + * @example GET + * @enum {string} + */ + AmdStatusCallbackMethod?: 'GET' | 'POST'; + /** + * @description Whether to cancel ongoing playback on `machine` detection. Defaults to `true`. + * @default true + * @example false + */ + CancelPlaybackOnMachineDetection: boolean; + /** + * @description Whether to cancel ongoing playback on `greeting ended` detection. Defaults to `true`. + * @default true + * @example false + */ + CancelPlaybackOnDetectMessageEnd: boolean; + /** + * @description The list of comma-separated codecs to be offered on a call. + * @example PCMA,PCMU + */ + PreferredCodecs?: string; + /** + * @description Whether to record the entire participant's call leg. Defaults to `false`. + * @example false + */ + Record?: boolean; + /** + * @description The number of channels in the final recording. Defaults to `mono`. + * @example dual + * @enum {string} + */ + RecordingChannels?: 'mono' | 'dual'; + /** + * @description The URL the recording callbacks will be sent to. + * @example https://example.com/recording_status_callback + */ + RecordingStatusCallback?: string; + /** + * @description HTTP request type used for `RecordingStatusCallback`. Defaults to `POST`. + * @example GET + * @enum {string} + */ + RecordingStatusCallbackMethod?: 'GET' | 'POST'; + /** + * @description The changes to the recording's state that should generate a call to `RecoridngStatusCallback`. Can be: `in-progress`, `completed` and `absent`. Separate multiple values with a space. Defaults to `completed`. + * @example in-progress completed absent + */ + RecordingStatusCallbackEvent?: string; + /** + * @description The audio track to record for the call. The default is `both`. + * @example inbound + * @enum {string} + */ + RecordingTrack?: 'inbound' | 'outbound' | 'both'; + /** + * @description The password to use for SIP authentication. + * @example 1234 + */ + SipAuthPassword?: string; + /** + * @description The username to use for SIP authentication. + * @example user + */ + SipAuthUsername?: string; + /** + * @description Whether to trim any leading and trailing silence from the recording. Defaults to `trim-silence`. + * @example false + * @enum {string} + */ + Trim?: 'trim-silence' | 'do-not-trim'; + /** + * @description Whether to record the conference the participant is joining. Defualts to `do-not-record`. The boolean values `true` and `false` are synonymous with `record-from-start` and `do-not-record` respectively. + * @example record-from-start + * @enum {string} + */ + ConferenceRecord?: + | 'true' + | 'false' + | 'record-from-start' + | 'do-not-record'; + /** + * @description The URL the conference recording callbacks will be sent to. + * @example https://example.com/conference_recording_status_callback + */ + ConferenceRecordingStatusCallback?: string; + /** + * @description HTTP request type used for `ConferenceRecordingStatusCallback`. Defaults to `POST`. + * @example GET + * @enum {string} + */ + ConferenceRecordingStatusCallbackMethod?: 'GET' | 'POST'; + /** + * @description The changes to the conference recording's state that should generate a call to `RecoridngStatusCallback`. Can be: `in-progress`, `completed` and `absent`. Separate multiple values with a space. Defaults to `completed`. `failed` and `absent` are synonymous. + * @example in-progress completed failed absent + */ + ConferenceRecordingStatusCallbackEvent?: string; + /** + * @description The number of seconds that Telnyx will wait for the recording to be stopped if silence is detected. The timer only starts when the speech is detected. Please note that the transcription is used to detect silence and the related charge will be applied. The minimum value is 0. The default value is 0 (infinite) + * @default 0 + * @example 5 + */ + ConferenceRecordingTimeout: number; + /** + * @description Whether to trim any leading and trailing silence from the conference recording. Defaults to `trim-silence`. + * @example false + * @enum {string} + */ + ConferenceTrim?: 'trim-silence' | 'do-not-trim'; + }; + /** Dialogflow Config */ + DialogflowConfig: { + /** + * @description Enable sentiment analysis from Dialogflow. + * @default false + * @example true + */ + analyze_sentiment: boolean; + /** + * @description Enable partial automated agent reply from Dialogflow. + * @default false + * @example true + */ + partial_automated_agent_reply: boolean; + }; + /** + * Dialogflow Connection Params + * @example { + * "service_Account": "{\"type\":\"service_account\",\"project_id\":\"your-project-id\",\"private_key_id\":\"your-private-key\",\"private_key\":\"-----BEGIN PRIVATE KEY-----n-----END PRIVATE\",\"client_email\":\"example@example.com\",\"client_id\":\"your-client-id\",\"auth_uri\":\"http://example.com\",\"token_uri\":\"http://example.com\",\"auth_provider_x509_cert_url\":\"http://example.com\",\"client_x509_cert_url\":\"http://example.com\"}", + * "dialogflow_api": "cx", + * "conversation_profile_id": "a-VMHLWzTmKjiJw5S6O0-w", + * "location": "global", + * "environment": "development" + * } + */ + DialogflowConnection: { + /** + * @description The JSON map to connect your Dialoglow account. + * @example {"service_account":{"type":"service_account","project_id":"your-project-id","private_key_id":"your-private-key","private_key":"-----BEGIN PRIVATE KEY-----n-----END PRIVATE","client_email":"example@example.com","client_id":"your-client-id","auth_uri":"http://example.com","token_uri":"http://example.com","auth_provider_x509_cert_url":"http://example.com","client_x509_cert_url":"http://example.com"}} + */ + service_account: Record; + /** + * @description Determin which Dialogflow will be used. + * @default es + * @example cx + * @enum {string} + */ + dialogflow_api: 'cx' | 'es'; + /** + * @description The id of a configured conversation profile on your Dialogflow account. (If you use Dialogflow CX, this param is required) + * @example a-VMHLWzTmKjiJw5S6O0-w + */ + conversation_profile_id?: string; + /** + * @description The region of your agent is. (If you use Dialogflow CX, this param is required) + * @example global + */ + location?: string; + /** + * @description Which Dialogflow environment will be used. + * @example development + */ + environment?: string; + }; + /** Dialogflow Connection Response */ + DialogflowConnectionResponse: { + /** Dialogflow Connection */ + data: { + /** @example dialogflow_connections */ + record_type?: string; + /** + * @description Uniquely identifies a Telnyx application (Call Control). + * @example 1234541231 + */ + connection_id?: string; + /** + * @description The id of a configured conversation profile on your Dialogflow account. (If you use Dialogflow CX, this param is required) + * @example a-VMHLWzTmKjiJw5S6O0-w + */ + conversation_profile_id?: string; + /** + * @description Which Dialogflow environment will be used. + * @example development + */ + environment?: string; + /** + * @description The JSON map to connect your Dialoglow account. + * @example **** + */ + service_account?: string; + }; + }; + /** + * @description The direction of the fax. + * @example outbound + * @enum {string} + */ + Direction: 'inbound' | 'outbound'; + DocReqsRequirement: { + /** + * @description Identifies the type of the resource. + * @example requirement + */ + readonly record_type?: string; + /** + * @description The 2-character (ISO 3166-1 alpha-2) country code where this requirement applies + * @example FR + */ + country_code?: string; + /** + * @description The locality where this requirement applies + * @example Nice + */ + locality?: string; + /** + * @description Indicates the phone_number_type this requirement applies to. Leave blank if this requirement applies to all number_types. + * @example local + * @enum {string} + */ + phone_number_type?: 'local' | 'national' | 'toll_free'; + /** + * @description Indicates whether this requirement applies to ordering, porting, or both + * @example ordering + * @enum {string} + */ + action?: 'both' | 'ordering' | 'porting'; + /** @description Lists the requirement types necessary to fulfill this requirement */ + readonly requirements_types?: components['schemas']['DocReqsRequirementType'][]; + /** + * Format: uuid + * @description Identifies the associated document + * @example 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + */ + readonly id?: string; + /** + * @description ISO 8601 formatted date-time indicating when the resource was created. + * @example 2021-04-09T22:25:27.521Z + */ + readonly created_at?: string; + /** + * @description ISO 8601 formatted date-time indicating when the resource was last updated. + * @example 2021-04-12T20:20:20.020Z + */ + readonly updated_at?: string; + }; + DocReqsRequirementList: components['schemas']['DocReqsRequirement'][]; + DocReqsRequirementType: { + /** @description Specifies objective criteria for acceptance */ + acceptance_criteria?: { + /** + * @description Specifies time-based acceptance criteria + * @example Current and not expired + */ + time_limit?: string; + /** + * @description Specifies geography-based acceptance criteria + * @example Issued by the same country that the phone number belongs to + */ + locality_limit?: string; + /** @description Specifies the list of strictly possible values for the requirement. Ignored when empty */ + acceptable_values?: string[]; + }; + /** + * @description Describes the requirement type + * @example Proves the customer has a physical address in the same locality as the phone number + */ + description?: string; + /** + * @description Provides one or more examples of acceptable documents + * @example Utility bill, internet bill, phone bill, or lease + */ + example?: string; + /** + * @description Defines the type of this requirement type + * @example document + * @enum {string} + */ + type?: 'document' | 'address' | 'textual'; + /** + * @description A short descriptive name for this requirement_type + * @example Proof of Address + */ + readonly name?: string; + /** + * @description Identifies the type of the resource + * @example requirement_type + */ + readonly record_type?: string; + /** + * Format: uuid + * @description Identifies the associated document + * @example 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + */ + readonly id?: string; + /** + * @description ISO 8601 formatted date-time indicating when the resource was created. + * @example 2021-04-09T22:25:27.521Z + */ + readonly created_at?: string; + /** + * @description ISO 8601 formatted date-time indicating when the resource was last updated. + * @example 2021-04-12T20:20:20.020Z + */ + readonly updated_at?: string; + }; + DocReqsRequirementTypeList: components['schemas']['DocReqsRequirementType'][]; + DocServiceDocument: components['schemas']['DocServiceRecord'] & { + /** + * @description Identifies the type of the resource. + * @example document + */ + readonly record_type?: string; + /** + * @description The document's content_type. + * @example application/pdf + */ + readonly content_type?: string; + /** @description Indicates the document's filesize */ + readonly size?: { + /** + * @description Identifies the unit + * @example bytes + */ + readonly unit?: string; + /** + * @description The number of bytes + * @example 123456 + */ + readonly amount?: number; + }; + /** + * @description Indicates the current document reviewing status + * @example pending + * @enum {string} + */ + readonly status?: 'pending' | 'verified' | 'denied'; + /** + * @description The document's SHA256 hash provided for optional verification purposes. + * @example 08a96c641c3a74e44eb59afb61a24f2cb9f4d7188748e76ba4bb5edfa3cb7d1c + */ + readonly sha256?: string; + /** + * @description The filename of the document. + * @example test-document.pdf + */ + filename?: string; + /** + * @description Optional reference string for customer tracking. + * @example MY REF 001 + */ + customer_reference?: string; + }; + DocServiceDocumentLink: components['schemas']['DocServiceRecord'] & { + /** + * @description Identifies the type of the resource. + * @example document_link + */ + readonly record_type?: string; + /** + * Format: uuid + * @description Identifies the associated document. + * @example 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + */ + readonly document_id?: string; + /** + * @description The linked resource's record type. + * @example porting_order + */ + readonly linked_record_type?: string; + /** + * @description Identifies the linked resource. + * @example 132091b4-442b-4a2a-b87f-61e707e46d54 + */ + readonly linked_resource_id?: string; + }; + DocServiceDocumentUploadInline: { + /** + * Format: byte + * @description The Base64 encoded contents of the file you are uploading. + * @example [Base64 encoded content] + */ + file: string; + /** + * @description The filename of the document. + * @example test-document.pdf + */ + filename?: string; + /** + * @description A customer reference string for customer look ups. + * @example MY REF 001 + */ + customer_reference?: string; + }; + DocServiceDocumentUploadURL: { + /** + * @description If the file is already hosted publicly, you can provide a URL and have the documents service fetch it for you. + * @example https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf + */ + url: string; + /** + * @description The filename of the document. + * @example test-document.pdf + */ + filename?: string; + /** + * @description Optional reference string for customer tracking. + * @example MY REF 001 + */ + customer_reference?: string; + }; + DocServiceRecord: { + /** + * Format: uuid + * @description Identifies the resource. + * @example 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + */ + readonly id?: string; + /** + * @description Identifies the type of the resource. + * @example sample_record_type + */ + readonly record_type?: string; + /** + * @description ISO 8601 formatted date-time indicating when the resource was created. + * @example 2018-02-02T22:25:27.521Z + */ + readonly created_at?: string; + /** + * @description ISO 8601 formatted date-time indicating when the resource was updated. + * @example 2018-02-02T22:25:27.521Z + */ + readonly updated_at?: string; + }; + DownlinkData: { + /** + * @description Downlink data + * @example 1 + */ + amount?: number; + /** + * @description Transmission unit + * @default MB + * @enum {string} + */ + unit: 'B' | 'KB' | 'MB'; + }; + /** + * DTMF Type + * @description Sets the type of DTMF digits sent from Telnyx to this Connection. Note that DTMF digits sent to Telnyx will be accepted in all formats. + * @default RFC 2833 + * @example Inband + * @enum {string} + */ + DtmfType: 'RFC 2833' | 'Inband' | 'SIP INFO'; + DynamicEmergencyAddress: { + /** @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f1 */ + readonly id?: string; + /** + * @description Identifies the type of the resource. + * @example dynamic_emergency_address + */ + readonly record_type?: string; + /** + * @description Unique location reference string to be used in SIP INVITE from / p-asserted headers. + * @example XYZ123 + */ + readonly sip_geolocation_id?: string; + /** + * @description Status of dynamic emergency address + * @example pending + * @enum {string} + */ + readonly status?: 'pending' | 'activated' | 'rejected'; + /** @example 311 */ + house_number: string; + house_suffix?: string; + /** @example W */ + street_pre_directional?: string; + /** @example Superior */ + street_name: string; + street_suffix?: string; + street_post_directional?: string; + extended_address?: string; + /** @example Chicago */ + locality: string; + /** @example IL */ + administrative_area: string; + /** @example 60654 */ + postal_code: string; + /** + * @example US + * @enum {string} + */ + country_code?: 'US' | 'CA' | 'PR'; + /** + * @description ISO 8601 formatted date of when the resource was created + * @example 2018-02-02T22:25:27.521Z + */ + readonly created_at?: string; + /** + * @description ISO 8601 formatted date of when the resource was last updated + * @example 2018-02-02T22:25:27.521Z + */ + readonly updated_at?: string; + }; + DynamicEmergencyEndpoint: { + /** @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 */ + readonly id?: string; + /** + * @description Identifies the type of the resource. + * @example dynamic_emergency_endpoint + */ + readonly record_type?: string; + /** + * @description An id of a currently active dynamic emergency location. + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + */ + dynamic_emergency_address_id: string; + /** + * @description Status of dynamic emergency address + * @example pending + * @enum {string} + */ + readonly status?: 'pending' | 'activated' | 'rejected'; + /** @example FXDFWEDF */ + readonly sip_from_id?: string; + /** @example +13125550000 */ + callback_number: string; + /** @example Jane Doe Desk Phone */ + caller_name: string; + /** + * @description ISO 8601 formatted date of when the resource was created + * @example 2018-02-02T22:25:27.521Z + */ + readonly created_at?: string; + /** + * @description ISO 8601 formatted date of when the resource was last updated + * @example 2018-02-02T22:25:27.521Z + */ + readonly updated_at?: string; + }; + /** SIMCardRegistration */ + ESimPurchase: { + /** + * Format: uuid + * @description The group SIMCardGroup identification. This attribute can be null when it's present in an associated resource. + * @example 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + */ + sim_card_group_id?: string; + /** + * @description Searchable tags associated with the SIM cards + * @example [ + * "personal", + * "customers", + * "active-customers" + * ] + */ + tags?: string[]; + /** + * @description The amount of eSIMs to be purchased. + * @example 10 + */ + amount: number; + /** + * @description Status on which the SIM cards will be set after being successfully registered. + * @default enabled + * @example standby + * @enum {string} + */ + status: 'enabled' | 'disabled' | 'standby'; + }; + /** ElevenLabs Voice Settings */ + ElevenLabsVoiceSettings: { + /** + * @description The reference to the ElevenLabs API key to be used for the voice assistant. The API key must be added to the account text-to-speech secrets `/v2/text-to-speech/secrets`. + * @example my_elevenlabs_api_key + */ + api_key_ref?: string; + }; + /** EmbeddingBucketRequest */ + EmbeddingBucketRequest: { + /** Bucket Name */ + bucket_name: string; + /** + * Document Chunk Size + * @default 1024 + */ + document_chunk_size: number; + /** + * Document Chunk Overlap Size + * @default 512 + */ + document_chunk_overlap_size: number; + /** @default thenlper/gte-large */ + embedding_model: components['schemas']['SupportedEmbeddingModels']; + /** @default default */ + loader: components['schemas']['SupportedEmbeddingLoaders']; + }; + /** EmbeddingMetadata */ + EmbeddingMetadata: { + /** Source */ + source: string; + /** Checksum */ + checksum: string; + /** Embedding */ + embedding: string; + /** Filename */ + filename: string; + /** Certainty */ + certainty?: number; + /** Loader Metadata */ + loader_metadata?: Record; + }; + /** EmbeddingResponse */ + EmbeddingResponse: { + data: { + /** + * Task ID + * Format: uuid + */ + task_id?: string; + /** Task Name */ + task_name?: string; + /** Status */ + status?: string; + /** Created At */ + created_at?: string; + /** Finished At */ + finished_at?: string | null; + /** + * User ID + * Format: uuid + */ + user_id?: string; + }; + }; + /** + * EmbeddingSimilaritySearchDocument + * @description Example document response from embedding service + * { + * "document_chunk": "your status? This is Vanessa Bloome...", + * "distance": 0.18607724, + * "metadata": { + * "source": "https://us-central-1.telnyxstorage.com/scripts/bee_movie_script.txt", + * "checksum": "343054dd19bab39bbf6761a3d20f1daa", + * "embedding": "openai/text-embedding-ada-002", + * "filename": "bee_movie_script.txt", + * "certainty": 0.9069613814353943, + * "loader_metadata": {} + * } + * } + */ + EmbeddingSimilaritySearchDocument: { + /** Document Chunk */ + document_chunk: string; + /** Distance */ + distance: number; + metadata: components['schemas']['EmbeddingMetadata']; + }; + /** EmbeddingSimilaritySearchRequest */ + EmbeddingSimilaritySearchRequest: { + /** Bucket Name */ + bucket_name: string; + /** Query */ + query: string; + /** + * Num Of Docs + * @default 3 + */ + num_of_docs: number; + }; + /** EmbeddingSimilaritySearchResponse */ + EmbeddingSimilaritySearchResponse: { + /** Data */ + data: components['schemas']['EmbeddingSimilaritySearchDocument'][]; + }; + /** EmbeddingsBucketFiles */ + EmbeddingsBucketFiles: { + /** Filename */ + filename: string; + /** Status */ + status: string; + /** + * Created At + * Format: date-time + */ + created_at: string; + /** + * Updated At + * Format: date-time + */ + updated_at?: string; + /** + * Last Embedded At + * Format: date-time + */ + last_embedded_at?: string; + /** Error Reason */ + error_reason?: string; + }; + /** EmbeddingsBucketFilesData */ + EmbeddingsBucketFilesData: { + /** Data */ + data: components['schemas']['EmbeddingsBucketFiles'][]; + }; + /** + * @description The emergency services settings for a phone number. + * @example { + * "emergency_enabled": true, + * "emergency_address_id": "1315261609962112019" + * } + */ + EmergencySettings: { + /** + * @description Allows you to enable or disable emergency services on the phone number. In order to enable emergency services, you must also set an emergency_address_id. + * @default false + */ + emergency_enabled: boolean; + /** + * Format: int64 + * @description Identifies the address to be used with emergency services. + */ + emergency_address_id?: string; + /** + * @description Represents the state of the number regarding emergency activation. + * @default disabled + * @enum {string} + */ + emergency_status: + | 'disabled' + | 'active' + | 'provisioning' + | 'deprovisioning'; + }; + /** + * @description Enable use of SRTP for encryption. Cannot be set if the transport_portocol is TLS. + * @example SRTP + * @enum {string|null} + */ + EncryptedMedia: 'SRTP' | null; + /** + * Enqueue Request + * @example { + * "queue_name": "support", + * "max_wait_time_secs": 600, + * "max_size": 20, + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + * "command_id": "891510ac-f3e4-11e8-af5b-de00688a4901" + * } + */ + EnqueueRequest: { + /** + * @description The name of the queue the call should be put in. If a queue with a given name doesn't exist yet it will be created. + * @example tier_1_support + */ + queue_name?: string; + /** + * @description Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + /** + * @description Use this field to avoid duplicate commands. Telnyx will ignore any command with the same `command_id` for the same `call_control_id`. + * @example 891510ac-f3e4-11e8-af5b-de00688a4901 + */ + command_id?: string; + /** + * @description The number of seconds after which the call will be removed from the queue. + * @example 600 + */ + max_wait_time_secs?: number; + /** + * @description The maximum number of calls allowed in the queue at a given time. Can't be modified for an existing queue. + * @default 100 + * @example 200 + */ + max_size: number; + }; + /** + * EntityType + * @description Entity type behind the brand. This is the form of business establishment. + * @example PRIVATE_PROFIT + * @enum {unknown} + */ + EntityType: + | 'PRIVATE_PROFIT' + | 'PUBLIC_PROFIT' + | 'NON_PROFIT' + | 'SOLE_PROPRIETOR' + | 'GOVERNMENT'; + /** + * EnumListResponse + * @example ["BASIC_ACCOUNT", "SMALL_ACCOUNT", "MEDIUM_ACCOUNT", "LARGE_ACCOUNT", "KEY_ACCOUNT"] + */ + EnumListResponse: (string | Record)[]; + /** + * EnumObjectResponse + * @example {"AREIS": "AREIS", "BANDW": "Bandwidth", "SINCH": "Sinch"} + */ + EnumObjectResponse: Record; + /** + * EnumPaginatedResponse + * @example {"page": 1, "records": [{"isin": "US68243Q1067", "iso2": "US", "symbol": "FLWS", "exchange": "NASDAQ", "displayName": "1-800 FLOWERS.COM, Inc."}, {"isin": "US88025U1097", "iso2": "US", "symbol": "TXG", "exchange": "NASDAQ", "displayName": "10X GENOMICS INC CLASS A"}], "totalRecords": 2} + */ + EnumPaginatedResponse: Record; + Error: { + /** Format: int */ + code: string; + title: string; + detail?: string; + source?: { + /** + * Format: json-pointer + * @description JSON pointer (RFC6901) to the offending entity. + */ + pointer?: string; + /** @description Indicates which query parameter caused the error. */ + parameter?: string; + }; + meta?: Record; + }; + ErrorRecord: { + /** + * @description an application-specific error code, expressed as a stringified 5-digit integer + * @example 10003 + */ + code?: string; + /** + * @description a short, human-readable summary of the problem, with NO punctuation, that SHOULD NOT CHANGE from occurrence to occurrence of the problem, except for purposes of localization + * @example Metrics invalid values + */ + title?: string; + /** + * @description a human-readable explanation specific to this occurrence of the problem. Like title, this field’s value can be localized + * @example Available metrics values for sip-trunking: connected,cost,completed,call_sec,attempted,billed_sec. + */ + detail?: string; + source?: components['schemas']['SourceResponse']; + meta?: components['schemas']['MetaResponse']; + }; + ErrorResponse: { + errors?: components['schemas']['ErrorRecord'][]; + }; + Errors: { + errors?: components['schemas']['Error'][]; + }; + /** + * Exchange + * @description An enumeration. + * @enum {unknown} + */ + Exchange: + | 'NONE' + | 'NASDAQ' + | 'NYSE' + | 'AMEX' + | 'AMX' + | 'ASX' + | 'B3' + | 'BME' + | 'BSE' + | 'FRA' + | 'ICEX' + | 'JPX' + | 'JSE' + | 'KRX' + | 'LON' + | 'NSE' + | 'OMX' + | 'SEHK' + | 'SSE' + | 'STO' + | 'SWX' + | 'SZSE' + | 'TSX' + | 'TWSE' + | 'VSE'; + /** @description The parameters for generating a porting orders CSV report. */ + ExportPortingOrdersCSVReport: { + /** @description The filters to apply to the export porting order CSV report. */ + filters: { + /** @description The status of the porting orders to include in the report. */ + status__in?: ( + | 'draft' + | 'in-process' + | 'submitted' + | 'exception' + | 'foc-date-confirmed' + | 'cancel-pending' + | 'ported' + | 'cancelled' + )[]; + /** @description The customer reference of the porting orders to include in the report. */ + customer_reference__in?: string[]; + /** + * Format: date-time + * @description The date and time the porting order was created before. + */ + created_at__lt?: string; + /** + * Format: date-time + * @description The date and time the porting order was created after. + */ + created_at__gt?: string; + }; + }; + /** @description The parameters for generating a port-outs CSV report. */ + ExportPortoutsCSVReport: { + /** @description The filters to apply to the export port-out CSV report. */ + filters: { + /** @description The status of the port-outs to include in the report. */ + status__in?: ( + | 'pending' + | 'authorized' + | 'ported' + | 'rejected' + | 'rejected-pending' + | 'canceled' + )[]; + /** @description The customer reference of the port-outs to include in the report. */ + customer_reference__in?: string[]; + /** + * @description The end user name of the port-outs to include in the report. + * @example McPortersen + */ + end_user_name?: string; + /** @description A list of phone numbers that the port-outs phone numbers must overlap with. */ + phone_numbers__overlaps?: string[]; + /** + * Format: date-time + * @description The date and time the port-out was created before. + */ + created_at__lt?: string; + /** + * Format: date-time + * @description The date and time the port-out was created after. + */ + created_at__gt?: string; + }; + }; + /** ExtVettingProvider */ + ExtVettingProvider: { + /** Evpid */ + evpId?: string; + /** Displayname */ + displayName?: string; + /** Tcrbillable */ + tcrBillable?: boolean; + /** Vettingclasses */ + vettingClasses?: string[]; + /** Vettinginstruction */ + vettingInstruction?: string; + }; + /** + * External Connection + * @example { + * "id": "1930241863466354012", + * "record_type": "external_connection", + * "external_sip_connection": "zoom", + * "credential_active": false, + * "active": false, + * "created_at": "2022-06-29T19:23:59Z", + * "updated_at": "2022-06-29T19:39:47Z", + * "outbound": { + * "outbound_voice_profile_id": "1911630617284445511" + * } + * } + */ + ExternalConnection: { + id?: components['schemas']['IntId']; + /** + * @description Identifies the type of the resource. + * @example external_connection + */ + record_type?: string; + active?: components['schemas']['ConnectionActive']; + credential_active?: components['schemas']['CredentialActive']; + external_sip_connection?: components['schemas']['ExternalSipConnection']; + /** + * Format: url + * @description The URL where webhooks related to this connection will be sent. Must include a scheme, such as 'https'. + * @example https://example.com + */ + webhook_event_url?: string; + /** + * Format: url + * @description The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails. Must include a scheme, such as 'https'. + * @default + * @example https://failover.example.com + */ + webhook_event_failover_url: string | null; + /** + * @description Determines which webhook format will be used, Telnyx API v1 or v2. + * @default 1 + * @example 1 + * @enum {string} + */ + webhook_api_version: '1' | '2'; + /** + * @description Specifies how many seconds to wait before timing out a webhook. + * @default null + * @example 25 + */ + webhook_timeout_secs: number | null; + inbound?: { + /** + * @description When set, this will limit the number of concurrent inbound calls to phone numbers associated with this connection. + * @default null + * @example 10 + */ + channel_limit: number; + }; + outbound?: { + /** + * @description When set, this will limit the number of concurrent outbound calls to phone numbers associated with this connection. + * @default null + * @example 10 + */ + channel_limit: number; + outbound_voice_profile_id?: components['schemas']['OutboundVoiceProfileId']; + }; + /** + * @description ISO 8601 formatted date indicating when the resource was created. + * @example 2018-02-02T22:25:27.521Z + */ + created_at?: string; + /** + * @description ISO 8601 formatted date indicating when the resource was updated. + * @example 2018-02-02T22:25:27.521Z + */ + updated_at?: string; + }; + /** Phone number details with relation to an external connection */ + ExternalConnectionPhoneNumber: { + ticket_id?: components['schemas']['UUID']; + /** @description Phone number in E164 format. */ + telephone_number?: string; + /** @description Phone number ID from the Telnyx API. */ + number_id?: string; + /** + * Format: uuid + * @description Identifies the civic address assigned to the phone number. + */ + civic_address_id?: string; + /** + * Format: uuid + * @description Identifies the location assigned to the phone number. + */ + location_id?: string; + /** @description The iso country code that will be displayed to the user when they receive a call from this phone number. */ + displayed_country_code?: string; + acquired_capabilities?: ( + | 'FirstPartyAppAssignment' + | 'InboundCalling' + | 'Office365' + | 'OutboundCalling' + | 'UserAssignment' + )[]; + }; + /** + * External SIP Connection + * @description The service that will be consuming this connection. + * @default zoom + * @example zoom + * @enum {string} + */ + ExternalSipConnection: 'zoom' | 'operator_connect'; + /** + * External SIP Connection + * @description The service that will be consuming this connection. + * @default zoom + * @example zoom + * @enum {string} + */ + ExternalSipConnectionZoomOnly: 'zoom'; + /** ExternalVetting */ + ExternalVetting: { + /** + * Evpid + * @description External vetting provider ID for the brand. + */ + evpId?: string; + /** + * vettingId + * @description Unique ID that identifies a vetting transaction performed by a vetting provider. This ID is provided by the vetting provider at time of vetting. + */ + vettingId?: string; + /** + * vettingToken + * @description Required by some providers for vetting record confirmation. + */ + vettingToken?: string; + /** + * vettingScore + * @description Vetting score ranging from 0-100. + */ + vettingScore?: number; + /** + * Vettingclass + * @description Identifies the vetting classification. + */ + vettingClass?: string; + /** + * vettedDate + * @description Vetting effective date. This is the date when vetting was completed, or the starting effective date in ISO 8601 format. If this date is missing, then the vetting was not complete or not valid. + */ + vettedDate?: string; + /** + * createDate + * @description Vetting submission date. This is the date when the vetting request is generated in ISO 8601 format. + */ + createDate?: string; + }; + ExternalWdrDetailRecordDto: { + /** + * @description WDR id + * @example 3ca7bd3d-7d82-4e07-9df4-009123068320 + */ + id?: string; + /** + * Format: date-time + * @description Record created time + * @example 2020-07-01T00:00:00-06:00 + */ + created_at?: string; + cost?: components['schemas']['WirelessCost']; + /** + * @description Mobile country code. + * @example 204 + */ + mcc?: string; + /** + * @description Mobile network code. + * @example 01 + */ + mnc?: string; + downlink_data?: components['schemas']['DownlinkData']; + /** + * @description Session duration in seconds. + * @example 1 + */ + duration_seconds?: number; + /** + * @description International mobile subscriber identity. + * @example 123 + */ + imsi?: string; + rate?: components['schemas']['WirelessRate']; + /** + * @description Defined sim group name + * @example sim name + */ + sim_group_name?: string; + /** + * @description Sim group unique identifier + * @example f05a189f-7c46-4531-ac56-1460dc465a42 + */ + sim_group_id?: string; + /** + * @description Sim card unique identifier + * @example 877f80a6-e5b2-4687-9a04-88076265720f + */ + sim_card_id?: string; + /** + * @description Phone number + * @example +12345678910 + */ + phone_number?: string; + uplink_data?: components['schemas']['UplinkData']; + /** @example wdr */ + record_type?: string; + }; + ExternalWdrGetDetailResponse: { + data?: components['schemas']['ExternalWdrDetailRecordDto'][]; + meta?: components['schemas']['PaginationMeta']; + }; + /** @example { + * "record_type": "fax", + * "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + * "connection_id": "c-1", + * "direction": "outbound", + * "from": "+123", + * "to": "+456", + * "media_url": "http://www.example.com/fax.pdf", + * "store_media": true, + * "stored_media_url": "https://s3.amazonaws.com/faxes-dev/user-1/cf4a6b52-bf8e-4945-9f49-611d0d2b083b.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=xxxxxxxxxx%2F20200505%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20200505T095917Z&X-Amz-Expires=7200&X-Amz-SignedHeaders=host&X-Amz-Signature=fac2af40464fcc77673ad762db86e34f9c1b91a82699b5578c5327f53874df51", + * "preview_url": "https://s3.amazonaws.com/faxes-dev/user-1/cf4a6b52-bf8e-4945-9f49-611d0d2b083b_preview.tiff?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=xxxxxxxxxx%2F20200505%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20200505T095917Z&X-Amz-Expires=7200&X-Amz-SignedHeaders=host&X-Amz-Signature=fac2af40464fcc77673ad762db86e34f9c1b91a82699b5578c5327f53874df51", + * "quality": "high", + * "webhook_url": "http://www.example.com/webhooks", + * "webhook_failover_url": "", + * "status": "queued", + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + * "created_at": "2020-05-05T09:59:12", + * "updated_at": "2020-05-05T09:59:12" + * } */ + Fax: { + /** + * @description Identifies the type of the resource. + * @example fax + * @enum {string} + */ + record_type?: 'fax'; + id?: components['schemas']['Id']; + connection_id?: components['schemas']['ConnectionId']; + direction?: components['schemas']['Direction']; + media_url?: components['schemas']['MediaUrl']; + media_name?: components['schemas']['MediaName']; + to?: components['schemas']['To']; + from?: components['schemas']['From']; + /** + * @description The string used as the caller id name (SIP From Display Name) presented to the destination (`to` number). + * @example Company Name + */ + from_display_name?: string; + quality?: components['schemas']['Quality']; + /** + * @description Status of the fax + * @example queued + * @enum {string} + */ + status?: + | 'queued' + | 'media.processed' + | 'originated' + | 'sending' + | 'delivered' + | 'failed' + | 'initiated' + | 'receiving' + | 'media.processing' + | 'received'; + /** @description URL that will receive fax webhooks */ + webhook_url?: string; + /** @description Optional failover URL that will receive fax webhooks if webhook_url doesn't return a 2XX response */ + webhook_failover_url?: string; + /** @description Should fax media be stored on temporary URL. It does not support media_name. */ + store_media?: boolean; + /** @description If store_media was set to true, this is a link to temporary location. Link expires after 10 minutes. */ + stored_media_url?: string; + /** @description If store_preview was set to true, this is a link to temporary location. Link expires after 10 minutes. */ + preview_url?: string; + /** + * @description State received from a command. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + /** + * Format: datetime + * @description ISO 8601 timestamp when resource was created + */ + created_at?: string; + /** + * Format: datetime + * @description ISO 8601 timestamp when resource was updated + */ + updated_at?: string; + }; + /** + * Fax Application + * @example { + * "id": "1293384261075731499", + * "record_type": "fax_application", + * "application_name": "fax-router", + * "active": false, + * "anchorsite_override": "Amsterdam, Netherlands", + * "webhook_event_url": "https://example.com", + * "webhook_event_failover_url": "https://failover.example.com", + * "webhook_timeout_secs": 25, + * "inbound": { + * "channel_limit": 10, + * "sip_subdomain": "example", + * "sip_subdomain_receive_settings": "only_my_connections" + * }, + * "outbound": { + * "channel_limit": 10, + * "outbound_voice_profile_id": "1293384261075731499" + * }, + * "created_at": "2018-02-02T22:25:27.521Z", + * "updated_at": "2018-02-02T22:25:27.521Z" + * } + */ + FaxApplication: { + id?: components['schemas']['IntId']; + /** + * @description Identifies the type of the resource. + * @example fax_application + */ + record_type?: string; + application_name?: components['schemas']['ApplicationName']; + active?: components['schemas']['ConnectionActive']; + anchorsite_override?: components['schemas']['AnchorsiteOverride']; + webhook_event_url?: components['schemas']['WebhookEventUrl']; + webhook_event_failover_url?: components['schemas']['WebhookEventFailoverUrl']; + webhook_timeout_secs?: components['schemas']['WebhookTimeoutSecs']; + inbound?: { + /** + * @description When set, this will limit the number of concurrent inbound calls to phone numbers associated with this connection. + * @default null + * @example 10 + */ + channel_limit: number; + /** + * @description Specifies a subdomain that can be used to receive Inbound calls to a Connection, in the same way a phone number is used, from a SIP endpoint. Example: the subdomain "example.sip.telnyx.com" can be called from any SIP endpoint by using the SIP URI "sip:@example.sip.telnyx.com" where the user part can be any alphanumeric value. Please note TLS encrypted calls are not allowed for subdomain calls. + * @default null + * @example example + */ + sip_subdomain: string; + /** + * @description This option can be enabled to receive calls from: "Anyone" (any SIP endpoint in the public Internet) or "Only my connections" (any connection assigned to the same Telnyx user). + * @default from_anyone + * @example only_my_connections + * @enum {string} + */ + sip_subdomain_receive_settings: 'only_my_connections' | 'from_anyone'; + }; + outbound?: { + /** + * @description When set, this will limit the number of concurrent outbound calls to phone numbers associated with this connection. + * @default null + * @example 10 + */ + channel_limit: number; + outbound_voice_profile_id?: components['schemas']['OutboundVoiceProfileId']; + }; + /** + * @description ISO 8601 formatted date indicating when the resource was created. + * @example 2018-02-02T22:25:27.521Z + */ + created_at?: string; + /** + * @description ISO 8601 formatted date indicating when the resource was updated. + * @example 2018-02-02T22:25:27.521Z + */ + updated_at?: string; + }; + /** @example { + * "data": { + * "event_type": "fax.delivered", + * "id": "95479a2e-b947-470a-a88f-2da6dd07ae0f", + * "occurred_at": "2020-05-05T13:08:22.039204Z", + * "payload": { + * "call_duration_secs": 25, + * "connection_id": "234423", + * "direction": "outbound", + * "fax_id": "f8338808-3dc6-4f2b-942a-5d1f39255784", + * "from": "+17733372107", + * "original_media_url": "http://www.example.com/fax.pdf", + * "page_count": 2, + * "status": "delivered", + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + * "to": "+15107882622", + * "user_id": "19a75cea-02c6-4b9a-84fa-c9bc8341feb8" + * }, + * "record_type": "event" + * } + * } */ + FaxDelivered: { + record_type?: components['schemas']['RecordType']; + id?: components['schemas']['Id']; + /** + * @description The type of event being delivered. + * @example fax.delivered + * @enum {string} + */ + event_type?: 'fax.delivered'; + payload?: { + /** + * @description The duration of the call in seconds. + * @example 25 + */ + call_duration_secs?: number; + connection_id?: components['schemas']['ConnectionId']; + direction?: components['schemas']['Direction']; + fax_id?: components['schemas']['FaxId']; + original_media_url?: components['schemas']['OriginalMediaUrl']; + media_name?: components['schemas']['MediaName']; + to?: components['schemas']['To']; + from?: components['schemas']['From']; + user_id?: components['schemas']['UserId']; + /** + * @description Number of transferred pages + * @example 2 + */ + page_count?: number; + /** + * @description The status of the fax. + * @example delivered + * @enum {string} + */ + status?: 'delivered'; + /** + * @description State received from a command. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + }; + }; + /** + * Fax Email Recipient + * Format: email + * @description Specifies an email address where faxes sent to this application will be forwarded to (as pdf or tiff attachments) + * @default null + * @example user@example.com + */ + FaxEmailRecipient: string | null; + /** @example { + * "data": { + * "event_type": "fax.failed", + * "id": "95479a2e-b947-470a-a88f-2da6dd07ae0f", + * "occurred_at": "2020-05-05T13:08:22.039204Z", + * "payload": { + * "connection_id": "234423", + * "direction": "outbound", + * "failure_reason": "rejected", + * "fax_id": "f8338808-3dc6-4f2b-942a-5d1f39255784", + * "from": "+17733372107", + * "original_media_url": "http://www.example.com/fax.pdf", + * "status": "failed", + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + * "to": "+15107882622", + * "user_id": "19a75cea-02c6-4b9a-84fa-c9bc8341feb8" + * }, + * "record_type": "event" + * } + * } */ + FaxFailed: { + record_type?: components['schemas']['RecordType']; + id?: components['schemas']['Id']; + /** + * @description The type of event being delivered. + * @example fax.failed + * @enum {string} + */ + event_type?: 'fax.failed'; + payload?: { + connection_id?: components['schemas']['ConnectionId']; + direction?: components['schemas']['Direction']; + fax_id?: components['schemas']['FaxId']; + original_media_url?: components['schemas']['OriginalMediaUrl']; + media_name?: components['schemas']['MediaName']; + to?: components['schemas']['To']; + from?: components['schemas']['From']; + user_id?: components['schemas']['UserId']; + /** + * @description Cause of the sending failure + * @enum {string} + */ + failure_reason?: 'rejected'; + /** + * @description The status of the fax. + * @example failed + * @enum {string} + */ + status?: 'failed'; + /** + * @description State received from a command. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + }; + }; + /** + * Format: uuid + * @description Identifies the fax. + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + */ + FaxId: string; + /** @example { + * "data": { + * "event_type": "fax.media.processed", + * "id": "95479a2e-b947-470a-a88f-2da6dd07ae0f", + * "occurred_at": "2020-05-05T13:08:22.039204Z", + * "payload": { + * "connection_id": "234423", + * "direction": "outbound", + * "fax_id": "f8338808-3dc6-4f2b-942a-5d1f39255784", + * "from": "+17733372107", + * "original_media_url": "http://www.example.com/fax.pdf", + * "status": "media.processed", + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + * "to": "+15107882622", + * "user_id": "19a75cea-02c6-4b9a-84fa-c9bc8341feb8" + * }, + * "record_type": "event" + * } + * } */ + FaxMediaProcessed: { + record_type?: components['schemas']['RecordType']; + id?: components['schemas']['Id']; + /** + * @description The type of event being delivered. + * @example fax.media.processed + * @enum {string} + */ + event_type?: 'fax.media.processed'; + payload?: { + connection_id?: components['schemas']['ConnectionId']; + direction?: components['schemas']['Direction']; + fax_id?: components['schemas']['FaxId']; + original_media_url?: components['schemas']['OriginalMediaUrl']; + media_name?: components['schemas']['MediaName']; + to?: components['schemas']['To']; + from?: components['schemas']['From']; + user_id?: components['schemas']['UserId']; + /** + * @description The status of the fax. + * @example media.processed + * @enum {string} + */ + status?: 'media.processed'; + /** + * @description State received from a command. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + }; + }; + /** @example { + * "data": { + * "event_type": "fax.queued", + * "id": "95479a2e-b947-470a-a88f-2da6dd07ae0f", + * "occurred_at": "2020-05-05T13:08:22.039204Z", + * "payload": { + * "connection_id": "234423", + * "direction": "outbound", + * "fax_id": "f8338808-3dc6-4f2b-942a-5d1f39255784", + * "from": "+17733372107", + * "original_media_url": "http://www.example.com/fax.pdf", + * "status": "queued", + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + * "to": "+15107882622", + * "user_id": "19a75cea-02c6-4b9a-84fa-c9bc8341feb8" + * }, + * "record_type": "event" + * } + * } */ + FaxQueued: { + record_type?: components['schemas']['RecordType']; + id?: components['schemas']['Id']; + /** + * @description The type of event being delivered. + * @example fax.queued + * @enum {string} + */ + event_type?: 'fax.queued'; + payload?: { + connection_id?: components['schemas']['ConnectionId']; + direction?: components['schemas']['Direction']; + fax_id?: components['schemas']['FaxId']; + original_media_url?: components['schemas']['OriginalMediaUrl']; + media_name?: components['schemas']['MediaName']; + to?: components['schemas']['To']; + from?: components['schemas']['From']; + user_id?: components['schemas']['UserId']; + /** + * @description The status of the fax. + * @example queued + * @enum {string} + */ + status?: 'queued'; + /** + * @description State received from a command. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + }; + }; + /** @example { + * "data": { + * "event_type": "fax.sending.started", + * "id": "95479a2e-b947-470a-a88f-2da6dd07ae0f", + * "occurred_at": "2020-05-05T13:08:22.039204Z", + * "payload": { + * "connection_id": "234423", + * "direction": "outbound", + * "fax_id": "f8338808-3dc6-4f2b-942a-5d1f39255784", + * "from": "+17733372107", + * "original_media_url": "http://www.example.com/fax.pdf", + * "status": "sending", + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + * "to": "+15107882622", + * "user_id": "19a75cea-02c6-4b9a-84fa-c9bc8341feb8" + * }, + * "record_type": "event" + * } + * } */ + FaxSendingStarted: { + record_type?: components['schemas']['RecordType']; + id?: components['schemas']['Id']; + /** + * @description The type of event being delivered. + * @example fax.sending.started + * @enum {string} + */ + event_type?: 'fax.sending.started'; + payload?: { + connection_id?: components['schemas']['ConnectionId']; + direction?: components['schemas']['Direction']; + fax_id?: components['schemas']['FaxId']; + original_media_url?: components['schemas']['OriginalMediaUrl']; + media_name?: components['schemas']['MediaName']; + to?: components['schemas']['To']; + from?: components['schemas']['From']; + user_id?: components['schemas']['UserId']; + /** + * @description The status of the fax. + * @example sending + * @enum {string} + */ + status?: 'sending'; + /** + * @description State received from a command. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + }; + }; + /** @example { + * "name": "sms" + * } */ + Feature: { + /** @example sms */ + name?: string; + }; + Filter: { + /** @enum {string} */ + filter_type?: 'and' | 'or'; + /** @example +13129457420 */ + cli?: string; + /** @enum {string} */ + cli_filter?: 'contains' | 'starts_with' | 'ends_with'; + /** @example +13129457420 */ + cld?: string; + /** @enum {string} */ + cld_filter?: 'contains' | 'starts_with' | 'ends_with'; + /** @example tag1 */ + tags_list?: string; + /** @example adfaa016-f921-4b6c-97bb-e4c1dad231c5 */ + billing_group?: string; + }; + /** + * First Command Timeout + * @description Specifies whether calls to phone numbers associated with this connection should hangup after timing out. + * @default false + * @example true + */ + FirstCommandTimeout: boolean; + /** + * First Command Timeout Secs + * @description Specifies how many seconds to wait before timing out a dial command. + * @default 30 + * @example 10 + */ + FirstCommandTimeoutSecs: number; + ForbiddenError: components['schemas']['GenericError'] & { + /** @example 10010 */ + code?: unknown; + /** @example Authorization failed */ + title?: unknown; + /** @example You do not have permission to perform the requested action on the specified resource or resources. */ + detail?: unknown; + meta?: { + /** @example https://developers.telnyx.com/docs/overview/errors/10010 */ + url?: string; + }; + }; + /** + * Fqdn + * @example { + * "id": "1293384261075731499", + * "record_type": "fqdn", + * "connection_id": "1516447646313612565", + * "fqdn": "example.com", + * "port": 5060, + * "dns_record_type": "a", + * "created_at": "2018-02-02T22:25:27.521Z", + * "updated_at": "2018-02-02T22:25:27.521Z" + * } + */ + Fqdn: { + /** + * Format: int64 + * @description Identifies the resource. + * @example 1293384261075731499 + */ + id?: string; + /** + * @description Identifies the type of the resource. + * @example fqdn + */ + record_type?: string; + /** @description ID of the FQDN connection to which this FQDN is attached. */ + connection_id?: string; + /** + * @description FQDN represented by this resource. + * @example example.com + */ + fqdn?: string; + /** + * @description Port to use when connecting to this FQDN. + * @default 5060 + * @example 5060 + */ + port: number; + /** + * @description The DNS record type for the FQDN. For cases where a port is not set, the DNS record type must be 'srv'. For cases where a port is set, the DNS record type must be 'a'. If the DNS record type is 'a' and a port is not specified, 5060 will be used. + * @example a + */ + dns_record_type?: string; + /** + * @description ISO 8601 formatted date indicating when the resource was created. + * @example 2018-02-02T22:25:27.521Z + */ + created_at?: string; + /** + * @description ISO 8601 formatted date indicating when the resource was updated. + * @example 2018-02-02T22:25:27.521Z + */ + updated_at?: string; + }; + /** + * FQDN Connection + * @example { + * "id": "1293384261075731499", + * "record_type": "fqdn_connection", + * "active": true, + * "anchorsite_override": "Latency", + * "connection_name": "string", + * "transport_protocol": "UDP", + * "default_on_hold_comfort_noise_enabled": true, + * "dtmf_type": "RFC 2833", + * "encode_contact_header_enabled": true, + * "encrypted_media": "SRTP", + * "onnet_t38_passthrough_enabled": true, + * "ios_push_credential_id": "ec0c8e5d-439e-4620-a0c1-9d9c8d02a836", + * "android_push_credential_id": "06b09dfd-7154-4980-8b75-cebf7a9d4f8e", + * "webhook_event_url": "https://example.com", + * "webhook_event_failover_url": "https://failover.example.com", + * "webhook_api_version": "1", + * "webhook_timeout_secs": 25, + * "rtcp_settings": { + * "port": "rtcp-mux", + * "capture_enabled": true, + * "report_frequency_secs": 10 + * }, + * "created_at": "2018-02-02T22:25:27.521Z", + * "updated_at": "2018-02-02T22:25:27.521Z", + * "inbound": { + * "ani_number_format": "+E.164", + * "dnis_number_format": "+e164", + * "codecs": [ + * "G722" + * ], + * "default_routing_method": "sequential", + * "channel_limit": 10, + * "generate_ringback_tone": true, + * "isup_headers_enabled": true, + * "prack_enabled": true, + * "privacy_zone_enabled": true, + * "sip_compact_headers_enabled": true, + * "sip_region": "US", + * "sip_subdomain": "string", + * "sip_subdomain_receive_settings": "only_my_connections", + * "timeout_1xx_secs": 10, + * "timeout_2xx_secs": 10, + * "shaken_stir_enabled": true + * }, + * "outbound": { + * "ani_override": "string", + * "ani_override_type": "always", + * "call_parking_enabled": true, + * "channel_limit": 10, + * "generate_ringback_tone": true, + * "instant_ringback_enabled": true, + * "ip_authentication_method": "token", + * "ip_authentication_token": "string", + * "localization": "string", + * "outbound_voice_profile_id": "1293384261075731499", + * "t38_reinvite_source": "customer", + * "tech_prefix": "string" + * } + * } + */ + FqdnConnection: { + /** + * Format: int64 + * @description Identifies the resource. + * @example 1293384261075731499 + */ + id?: string; + /** + * @description Identifies the type of the resource. + * @example fqdn_connection + */ + record_type?: string; + /** @description Defaults to true */ + active?: boolean; + anchorsite_override?: components['schemas']['AnchorsiteOverride']; + connection_name: components['schemas']['ConnectionName']; + transport_protocol?: components['schemas']['FqdnConnectionTransportProtocol']; + /** + * @description When enabled, Telnyx will generate comfort noise when you place the call on hold. If disabled, you will need to generate comfort noise or on hold music to avoid RTP timeout. + * @default true + */ + default_on_hold_comfort_noise_enabled: boolean; + dtmf_type?: components['schemas']['DtmfType']; + /** + * @description Encode the SIP contact header sent by Telnyx to avoid issues for NAT or ALG scenarios. + * @default false + */ + encode_contact_header_enabled: boolean; + encrypted_media?: components['schemas']['EncryptedMedia']; + /** + * @description The connection is enabled for Microsoft Teams Direct Routing. + * @default false + */ + microsoft_teams_sbc: boolean; + /** + * @description Enable on-net T38 if you prefer that the sender and receiver negotiate T38 directly when both are on the Telnyx network. If this is disabled, Telnyx will be able to use T38 on just one leg of the call according to each leg's settings. + * @default false + */ + onnet_t38_passthrough_enabled: boolean; + /** @description The username for the FQDN connection. */ + user_name?: string; + /** @description The password for the FQDN connection. */ + password?: string; + /** @description Defines if codecs should be passed on stream change. */ + rtp_pass_codecs_on_stream_change?: boolean; + /** @description Indicates whether DTMF timestamp adjustment is enabled. */ + adjust_dtmf_timestamp?: boolean; + /** @description Indicates whether DTMF duration should be ignored. */ + ignore_dtmf_duration?: boolean; + /** @description Indicates whether the mark bit should be ignored. */ + ignore_mark_bit?: boolean; + /** @description Indicates whether call cost calculation is enabled. */ + call_cost_enabled?: boolean; + /** @description Indicates whether noise suppression is enabled. */ + noise_suppression?: boolean; + /** @description Indicates whether normalized timestamps should be sent. */ + send_normalized_timestamps?: boolean; + /** @description Indicates whether third-party control is enabled. */ + third_party_control_enabled?: boolean; + /** @description The name for the TXT record associated with the FQDN connection. */ + txt_name?: string; + /** @description The value for the TXT record associated with the FQDN connection. */ + txt_value?: string; + /** @description The time to live for the TXT record associated with the FQDN connection. */ + txt_ttl?: number; + webhook_event_url?: components['schemas']['WebhookEventUrl']; + webhook_event_failover_url?: components['schemas']['WebhookEventFailoverUrl']; + webhook_api_version?: components['schemas']['WebhookApiVersion']; + webhook_timeout_secs?: components['schemas']['WebhookTimeoutSecs']; + rtcp_settings?: components['schemas']['ConnectionRtcpSettings']; + created_at?: components['schemas']['CreatedAt']; + updated_at?: components['schemas']['UpdatedAt']; + inbound?: components['schemas']['InboundFqdn']; + outbound?: components['schemas']['OutboundFqdn']; + }; + /** + * @description One of UDP, TLS, or TCP. Applies only to connections with IP authentication or FQDN authentication. + * @default UDP + * @enum {string} + */ + FqdnConnectionTransportProtocol: 'UDP' | 'TCP' | 'TLS'; + /** + * @description The phone number, in E.164 format, the fax will be sent from. + * @example +13125790015 + */ + From: string; + /** FunctionCall */ + FunctionCall: { + /** Arguments */ + arguments: string; + /** Name */ + name: string; + }; + /** FunctionDefinition */ + FunctionDefinition: { + name: string; + description?: string; + parameters?: Record; + }; + /** FunctionDetail */ + 'FunctionDetail-Input': { + /** Name */ + name: string; + /** + * Description + * @default + */ + description: string; + parameters?: components['schemas']['FunctionParameters']; + }; + /** FunctionDetail */ + 'FunctionDetail-Output': { + /** Name */ + name: string; + /** + * Description + * @default + */ + description: string; + parameters?: components['schemas']['FunctionParameters']; + }; + /** FunctionParameters */ + FunctionParameters: { + /** Type */ + type: string; + /** Properties */ + properties: { + [key: string]: components['schemas']['ParameterProperties']; + }; + /** Required */ + required: string[]; + }; + /** Google Cloud Storage Configuration Data */ + GCSConfigurationData: { + credentials?: components['schemas']['Credentials']; + bucket?: components['schemas']['Bucket']; + }; + /** Gather */ + GatherRequest: { + /** + * Format: int32 + * @description The minimum number of digits to fetch. This parameter has a minimum value of 1. + * @default 1 + * @example 1 + */ + minimum_digits: number; + /** + * Format: int32 + * @description The maximum number of digits to fetch. This parameter has a maximum value of 128. + * @default 128 + * @example 10 + */ + maximum_digits: number; + /** + * Format: int32 + * @description The number of milliseconds to wait to complete the request. + * @default 60000 + * @example 60000 + */ + timeout_millis: number; + /** + * Format: int32 + * @description The number of milliseconds to wait for input between digits. + * @default 5000 + * @example 10000 + */ + inter_digit_timeout_millis: number; + /** + * Format: int32 + * @description The number of milliseconds to wait for the first DTMF. + * @default 5000 + * @example 10000 + */ + initial_timeout_millis: number; + /** + * @description The digit used to terminate input if fewer than `maximum_digits` digits have been gathered. + * @default # + * @example # + */ + terminating_digit: string; + /** + * @description A list of all digits accepted as valid. + * @default 0123456789#* + * @example 123 + */ + valid_digits: string; + /** + * @description An id that will be sent back in the corresponding `call.gather.ended` webhook. Will be randomly generated if not specified. + * @example my_gather_id + */ + gather_id?: string; + /** + * @description Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + /** + * @description Use this field to avoid duplicate commands. Telnyx will ignore any command with the same `command_id` for the same `call_control_id`. + * @example 891510ac-f3e4-11e8-af5b-de00688a4901 + */ + command_id?: string; + }; + /** + * Gather Using AI Request + * @example { + * "parameters": { + * "properties": { + * "age": { + * "description": "The age of the customer.", + * "type": "integer" + * }, + * "location": { + * "description": "The location of the customer.", + * "type": "string" + * } + * }, + * "required": [ + * "age", + * "location" + * ], + * "type": "object" + * }, + * "voice": "Telnyx.LibriTTS.0", + * "voice_settings": { + * "voice_speed": 1.25 + * }, + * "greeting": "Hello, can you tell me your age and where you live?", + * "message_history": [ + * { + * "content": "Hello, what's your name?", + * "role": "assistant" + * }, + * { + * "content": "Hello, I'm John.", + * "role": "user" + * } + * ], + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + * "command_id": "891510ac-f3e4-11e8-af5b-de00688a4901" + * } + */ + GatherUsingAIRequest: { + /** + * @description The parameters described as a JSON Schema object that needs to be gathered by the voice assistant. See the [JSON Schema reference](https://json-schema.org/understanding-json-schema) for documentation about the format + * @example { + * "properties": { + * "age": { + * "description": "The age of the customer.", + * "type": "integer" + * }, + * "location": { + * "description": "The location of the customer.", + * "type": "string" + * } + * }, + * "required": [ + * "age", + * "location" + * ], + * "type": "object" + * } + */ + parameters: Record; + /** + * @description The voice to be used by the voice assistant. Currently we support ElevenLabs, Telnyx and AWS voices only, for ElevenLabs voices you can pass the voice as `ElevenLabs..`, for Telnyx voices you can pass the voice as `Telnyx..`, for AWS Polly voices you can pass the voice as `AWS.Polly.` + * @default Telnyx.LibriTTS.0 + * @example Telnyx.LibriTTS.0 + */ + voice: string; + /** @description The settings associated with the voice selected */ + voice_settings?: + | components['schemas']['ElevenLabsVoiceSettings'] + | components['schemas']['TelnyxVoiceSettings'] + | components['schemas']['AWSVoiceSettings']; + /** + * @description Text that will be played when the gathering starts, if none then nothing will be played when the gathering starts. The greeting can be text or SSML. There is a 3,000 character limit. + * @example Hello, can you tell me your age and where you live? + */ + greeting?: string; + /** @description The message history you want the voice assistant to be aware of, this can be useful to keep the context of the conversation, or to pass additional information to the voice assistant. */ + message_history?: { + /** + * @description The content of the message + * @example Hello, I'm 29 and I live in Paris. + */ + content?: string; + /** + * @description The role of the message sender + * @example user + * @enum {string} + */ + role?: 'assistant' | 'user'; + }[]; + /** + * @description Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + /** + * @description Use this field to avoid duplicate commands. Telnyx will ignore any command with the same `command_id` for the same `call_control_id`. + * @example 891510ac-f3e4-11e8-af5b-de00688a4901 + */ + command_id?: string; + }; + /** + * Gather Using Audio Request + * @example { + * "audio_url": "http://example.com/message.wav", + * "invalid_audio_url": "http://example.com/message.wav", + * "minimum_digits": 1, + * "maximum_digits": 10, + * "timeout_millis": 10000, + * "terminating_digit": "#", + * "valid_digits": "123", + * "inter_digit_timeout_millis": 10000, + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + * "command_id": "891510ac-f3e4-11e8-af5b-de00688a4901" + * } + */ + GatherUsingAudioRequest: { + /** + * @description The URL of a file to be played back at the beginning of each prompt. The URL can point to either a WAV or MP3 file. media_name and audio_url cannot be used together in one request. + * @example http://example.com/message.wav + */ + audio_url?: string; + /** + * @description The media_name of a file to be played back at the beginning of each prompt. The media_name must point to a file previously uploaded to api.telnyx.com/v2/media by the same user/organization. The file must either be a WAV or MP3 file. + * @example my_media_uploaded_to_media_storage_api + */ + media_name?: string; + /** + * @description The URL of a file to play when digits don't match the `valid_digits` parameter or the number of digits is not between `min` and `max`. The URL can point to either a WAV or MP3 file. invalid_media_name and invalid_audio_url cannot be used together in one request. + * @example http://example.com/invalid.wav + */ + invalid_audio_url?: string; + /** + * @description The media_name of a file to be played back when digits don't match the `valid_digits` parameter or the number of digits is not between `min` and `max`. The media_name must point to a file previously uploaded to api.telnyx.com/v2/media by the same user/organization. The file must either be a WAV or MP3 file. + * @example my_media_uploaded_to_media_storage_api + */ + invalid_media_name?: string; + /** + * Format: int32 + * @description The minimum number of digits to fetch. This parameter has a minimum value of 1. + * @default 1 + * @example 1 + */ + minimum_digits: number; + /** + * Format: int32 + * @description The maximum number of digits to fetch. This parameter has a maximum value of 128. + * @default 128 + * @example 10 + */ + maximum_digits: number; + /** + * Format: int32 + * @description The maximum number of times the file should be played if there is no input from the user on the call. + * @default 3 + * @example 3 + */ + maximum_tries: number; + /** + * Format: int32 + * @description The number of milliseconds to wait for a DTMF response after file playback ends before a replaying the sound file. + * @default 60000 + * @example 60000 + */ + timeout_millis: number; + /** + * @description The digit used to terminate input if fewer than `maximum_digits` digits have been gathered. + * @default # + * @example # + */ + terminating_digit: string; + /** + * @description A list of all digits accepted as valid. + * @default 0123456789#* + * @example 123 + */ + valid_digits: string; + /** + * Format: int32 + * @description The number of milliseconds to wait for input between digits. + * @default 5000 + * @example 10000 + */ + inter_digit_timeout_millis: number; + /** + * @description Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + /** + * @description Use this field to avoid duplicate commands. Telnyx will ignore any command with the same `command_id` for the same `call_control_id`. + * @example 891510ac-f3e4-11e8-af5b-de00688a4901 + */ + command_id?: string; + }; + /** + * Gather Using Speak Request + * @example { + * "payload": "say this on call", + * "invalid_payload": "say this on call", + * "payload_type": "text", + * "service_level": "premium", + * "voice": "male", + * "language": "arb", + * "minimum_digits": 1, + * "maximum_digits": 10, + * "terminating_digit": "#", + * "valid_digits": "123", + * "inter_digit_timeout_millis": 10000, + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + * "command_id": "891510ac-f3e4-11e8-af5b-de00688a4901" + * } + */ + GatherUsingSpeakRequest: { + /** + * @description The text or SSML to be converted into speech. There is a 3,000 character limit. + * @example Say this on the call + */ + payload: string; + /** + * @description The text or SSML to be converted into speech when digits don't match the `valid_digits` parameter or the number of digits is not between `min` and `max`. There is a 3,000 character limit. + * @example Say this on the call + */ + invalid_payload?: string; + /** + * @description The type of the provided payload. The payload can either be plain text, or Speech Synthesis Markup Language (SSML). + * @default text + * @example ssml + * @enum {string} + */ + payload_type: 'text' | 'ssml'; + /** + * @description This parameter impacts speech quality, language options and payload types. When using `basic`, only the `en-US` language and payload type `text` are allowed. + * @default premium + * @example premium + * @enum {string} + */ + service_level: 'basic' | 'premium'; + /** + * @description The gender of the voice used to speak back the text or the specific Amazon Polly voice to be used in the form of `Polly.`, e.g. `Polly.Brian`. All standard Amazon Polly voices are supported. + * @example female + * @enum {string} + */ + voice: 'male' | 'female'; + /** + * @description The language you want spoken. This parameter is ignored when a `Polly.*` voice is specified. + * @example en-US + * @enum {string} + */ + language?: + | 'arb' + | 'cmn-CN' + | 'cy-GB' + | 'da-DK' + | 'de-DE' + | 'en-AU' + | 'en-GB' + | 'en-GB-WLS' + | 'en-IN' + | 'en-US' + | 'es-ES' + | 'es-MX' + | 'es-US' + | 'fr-CA' + | 'fr-FR' + | 'hi-IN' + | 'is-IS' + | 'it-IT' + | 'ja-JP' + | 'ko-KR' + | 'nb-NO' + | 'nl-NL' + | 'pl-PL' + | 'pt-BR' + | 'pt-PT' + | 'ro-RO' + | 'ru-RU' + | 'sv-SE' + | 'tr-TR'; + /** + * Format: int32 + * @description The minimum number of digits to fetch. This parameter has a minimum value of 1. + * @default 1 + * @example 1 + */ + minimum_digits: number; + /** + * Format: int32 + * @description The maximum number of digits to fetch. This parameter has a maximum value of 128. + * @default 128 + * @example 10 + */ + maximum_digits: number; + /** + * Format: int32 + * @description The maximum number of times that a file should be played back if there is no input from the user on the call. + * @default 3 + * @example 3 + */ + maximum_tries: number; + /** + * Format: int32 + * @description The number of milliseconds to wait for a DTMF response after speak ends before a replaying the sound file. + * @default 60000 + * @example 60000 + */ + timeout_millis: number; + /** + * @description The digit used to terminate input if fewer than `maximum_digits` digits have been gathered. + * @default # + * @example # + */ + terminating_digit: string; + /** + * @description A list of all digits accepted as valid. + * @default 0123456789#* + * @example 123 + */ + valid_digits: string; + /** + * Format: int32 + * @description The number of milliseconds to wait for input between digits. + * @default 5000 + * @example 10000 + */ + inter_digit_timeout_millis: number; + /** + * @description Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + /** + * @description Use this field to avoid duplicate commands. Telnyx will ignore any command with the same `command_id` for the same `call_control_id`. + * @example 891510ac-f3e4-11e8-af5b-de00688a4901 + */ + command_id?: string; + }; + /** Channel zone object */ + GcbChannelZone: { + /** + * @example channel_zone + * @enum {string} + */ + record_type: 'channel_zone'; + /** + * @description List of countries (in ISO 3166-2, capitalized) members of the billing channel zone + * @example [ + * "BE", + * "EL", + * "LT", + * "PT", + * "BG", + * "ES", + * "LU", + * "RO", + * "CZ", + * "FR", + * "HU", + * "SI", + * "DK", + * "HR", + * "MT", + * "SK", + * "DE", + * "IT", + * "NL", + * "FI", + * "EE", + * "CY", + * "AT", + * "SE", + * "IE", + * "LV", + * "PL" + * ] + */ + countries: string[]; + /** @example 1653e6a1-4bfd-4857-97c6-6a51e1c34477 */ + id: string; + /** @example Euro channel zone */ + name: string; + /** + * Format: int64 + * @example 7 + */ + channels: number; + /** + * @description ISO 8601 formatted date of when the channel zone was created + * @example 2019-01-23T18:10:02.574Z + */ + created_at?: string; + /** + * @description ISO 8601 formatted date of when the channel zone was updated + * @example 2019-01-23T18:10:02.574Z + */ + updated_at?: string; + }; + /** Phone Number object */ + GcbPhoneNumber: { + /** + * @example channel_zone_phone_number + * @enum {string} + */ + record_type: 'channel_zone_phone_number'; + /** @example 1653e6a1-4bfd-4857-97c6-6a51e1c34477 */ + channel_zone_id: string; + /** @example 3da3c749-bb7d-4ad6-acae-ca0d415ae08b */ + id?: string; + /** + * Format: +E.164 + * @example +15554441234 + */ + phone_number: string; + /** + * @description ISO 8601 formatted date of when the phone number was created + * @example 2019-01-23T18:10:02.574Z + */ + created_at?: string; + }; + GenericError: { + /** Format: int */ + code?: string; + title?: string; + detail?: string; + source?: { + /** + * Format: json-pointer + * @description JSON pointer (RFC6901) to the offending entity. + */ + pointer?: string; + /** @description Indicates which query parameter caused the error. */ + parameter?: string; + }; + meta?: Record; + }; + GetSubRequestByPortingOrder: { + /** + * @description Identifies the Sub Request associated with the Porting Order + * @example 9787fb5f-cbe5-4de4-b765-3303774ee9fe + */ + sub_request_id?: string; + /** + * @description Identifies the Port Request associated with the Porting Order + * @example 59b0762a-b274-4f76-ac32-4d5cf0272e66 + */ + port_request_id?: string; + }; + GlobalIP: components['schemas']['Record'] & { + /** + * @description Identifies the type of the resource. + * @example global_ip + */ + readonly record_type?: string; + /** + * @description The Global IP address. + * @example 198.51.100.1 + */ + readonly ip_address?: string; + /** + * @description A Global IP ports grouped by protocol code. + * @example { + * "tcp": [ + * 80, + * 8080 + * ], + * "udp": [ + * 5000, + * 5050 + * ] + * } + */ + ports?: Record; + /** + * @description A user specified name for the address. + * @example test interface + */ + name?: string; + /** + * @description A user specified description for the address. + * @example test interface + */ + description?: string; + }; + GlobalIPAllowedPort: { + /** + * Format: uuid + * @description Identifies the resource. + * @example 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + */ + readonly id?: string; + /** + * @description Identifies the type of the resource. + * @example global_ip_allowed_port + */ + readonly record_type?: string; + /** + * @description The Global IP Protocol code. + * @example tcp + */ + readonly protocol_code?: string; + /** + * @description A name for the Global IP ports range. + * @example TCP Registered + */ + name?: string; + /** + * @description First port of a range. + * @example 1024 + */ + first_port?: number; + /** + * @description Last port of a range. + * @example 49151 + */ + last_port?: number; + }; + GlobalIPHealthCheck: components['schemas']['Record'] & { + /** + * @description Identifies the type of the resource. + * @example global_ip_health_check + */ + readonly record_type?: string; + /** + * @description The Global IP health check type. + * @example http_status_2xx + */ + health_check_type?: string; + /** + * @description A Global IP health check params. + * @example { + * "path": "/", + * "port": 8080 + * } + */ + health_check_params?: Record; + /** + * Format: uuid + * @description Global IP ID. + * @example a836125b-20b6-452e-9c03-2653f09c7ed7 + */ + global_ip_id?: string; + }; + GlobalIPProtocol: { + /** + * @description Identifies the type of the resource. + * @example global_ip_protocol + */ + readonly record_type?: string; + /** + * @description The Global IP Protocol code. + * @example tcp + */ + readonly code?: string; + /** + * @description A name for Global IP Protocol. + * @example TCP + */ + name?: string; + }; + GlobalIpAssignment: components['schemas']['Record'] & { + /** + * @description Identifies the type of the resource. + * @example global_ip_assignment + */ + readonly record_type?: string; + /** + * Format: uuid + * @description Global IP ID. + * @example a836125b-20b6-452e-9c03-2653f09c7ed7 + */ + global_ip_id?: string; + /** + * Format: uuid + * @description Wireguard peer ID. + * @example e66c496d-4a85-423b-8b2a-8e63fac20320 + */ + wireguard_peer_id?: string; + status?: components['schemas']['InterfaceStatus']; + /** @description Wireguard peer is connected. */ + readonly is_connected?: boolean; + /** @description Enable/disable BGP announcement. */ + is_in_maintenance?: boolean; + /** @description Status of BGP announcement. */ + readonly is_announced?: boolean; + }; + GlobalIpAssignmentHealthMetric: { + /** + * Format: date-time + * @description The timestamp of the metric. + * @example 2020-01-01T00:00:00.000Z + */ + timestamp?: string; + global_ip?: { + /** + * Format: uuid + * @description Global IP ID. + * @example a836125b-20b6-452e-9c03-2653f09c7ed7 + */ + id?: string; + /** + * @description The Global IP address. + * @example null + */ + readonly ip_address?: string; + }; + global_ip_assignment?: { + /** + * Format: uuid + * @description Global IP assignment ID. + * @example a836125b-20b6-452e-9c03-2653f09c7ed7 + */ + id?: string; + /** + * Format: uuid + * @description Wireguard peer ID. + * @example e66c496d-4a85-423b-8b2a-8e63fac20320 + */ + wireguard_peer_id?: string; + wireguard_peer?: { + /** + * @description A user specified name for the interface. + * @example Wireguard Peer 1 + */ + name?: string; + /** + * @description The IP address of the interface. + * @example 73.47.1.23 + */ + ip_address?: string; + }; + }; + health?: { + /** + * @description The number of successful health checks. + * @example 100 + */ + pass?: number; + /** + * @description The number of failed health checks. + * @example 0 + */ + fail?: number; + }; + }; + GlobalIpAssignmentUpdate: components['schemas']['GlobalIpAssignment'] & { + readonly global_ip_id?: unknown; + readonly wireguard_peer_id?: unknown; + }; + GlobalIpAssignmentUsageMetric: { + /** + * Format: date-time + * @description The timestamp of the metric. + * @example 2020-01-01T00:00:00.000Z + */ + timestamp?: string; + global_ip?: { + /** + * Format: uuid + * @description Global IP ID. + * @example a836125b-20b6-452e-9c03-2653f09c7ed7 + */ + id?: string; + /** + * @description The Global IP address. + * @example 64.1.4.130 + */ + readonly ip_address?: string; + }; + global_ip_assignment?: { + /** + * Format: uuid + * @description Global IP assignment ID. + * @example a836125b-20b6-452e-9c03-2653f09c7ed7 + */ + id?: string; + /** + * Format: uuid + * @description Wireguard peer ID. + * @example e66c496d-4a85-423b-8b2a-8e63fac20320 + */ + wireguard_peer_id?: string; + wireguard_peer?: { + /** + * @description A user specified name for the interface. + * @example Wireguard Peer 1 + */ + name?: string; + /** + * @description The IP address of the interface. + * @example 172.1.0.1 + */ + ip_address?: string; + }; + }; + transmitted?: { + /** + * @description The amount of data transmitted. + * @example 100000 + */ + amount?: number; + /** + * @description The unit of the amount of data transmitted. + * @example B + */ + unit?: string; + }; + received?: { + /** + * @description The amount of data received. + * @example 100000 + */ + amount?: number; + /** + * @description The unit of the amount of data received. + * @example B + */ + unit?: string; + }; + }; + GlobalIpHealthCheckType: { + /** + * @description Identifies the type of the resource. + * @example global_ip_health_check_type + */ + readonly record_type?: string; + /** + * @description Global IP Health check type. + * @example http_status_2xx + */ + health_check_type?: string; + /** + * @description Global IP Health check params. + * @example { + * "health_check_params": { + * "path": "str", + * "port": "int" + * } + * } + */ + health_check_params?: Record; + }; + GlobalIpLatencyMetric: { + /** + * Format: date-time + * @description The timestamp of the metric. + * @example 2020-01-01T00:00:00.000Z + */ + timestamp?: string; + global_ip?: { + /** + * Format: uuid + * @description Global IP ID. + * @example a836125b-20b6-452e-9c03-2653f09c7ed7 + */ + id?: string; + /** + * @description The Global IP address. + * @example null + */ + readonly ip_address?: string; + }; + prober_location?: { + /** + * Format: uuid + * @description Location ID. + * @example 1 + */ + id?: string; + /** + * @description Location name. + * @example Amsterdam + */ + name?: string; + /** + * @description Latitude. + * @example 52.370216 + */ + lat?: number; + /** + * @description Longitude. + * @example 4.895168 + */ + lon?: number; + }; + mean_latency?: { + /** + * @description The average latency. + * @example 100 + */ + amount?: number; + /** + * @description The unit of the average latency. + * @example ms + */ + unit?: string; + }; + percentile_latency?: { + 0?: { + /** + * @description The minimum latency. + * @example 100 + */ + amount?: number; + /** + * @description The unit of the minimum latency. + * @example ms + */ + unit?: string; + }; + 25?: { + /** + * @description The 25th percentile latency. + * @example 100 + */ + amount?: number; + /** + * @description The unit of the 25th percentile latency. + * @example ms + */ + unit?: string; + }; + 50?: { + /** + * @description The 50th percentile latency. + * @example 100 + */ + amount?: number; + /** + * @description The unit of the 50th percentile latency. + * @example ms + */ + unit?: string; + }; + 75?: { + /** + * @description The 75th percentile latency. + * @example 100 + */ + amount?: number; + /** + * @description The unit of the 75th percentile latency. + * @example ms + */ + unit?: string; + }; + 90?: { + /** + * @description The 90th percentile latency. + * @example 100 + */ + amount?: number; + /** + * @description The unit of the 90th percentile latency. + * @example ms + */ + unit?: string; + }; + 99?: { + /** + * @description The 99th percentile latency. + * @example 100 + */ + amount?: number; + /** + * @description The unit of the 99th percentile latency. + * @example ms + */ + unit?: string; + }; + 100?: { + /** + * @description The maximum latency. + * @example 100 + */ + amount?: number; + /** + * @description The unit of the maximum latency. + * @example ms + */ + unit?: string; + }; + }; + }; + GlobalIpUsageMetric: { + /** + * Format: date-time + * @description The timestamp of the metric. + * @example 2020-01-01T00:00:00.000Z + */ + timestamp?: string; + global_ip?: { + /** + * Format: uuid + * @description Global IP ID. + * @example a836125b-20b6-452e-9c03-2653f09c7ed7 + */ + id?: string; + /** + * @description The Global IP address. + * @example 64.1.2.130 + */ + readonly ip_address?: string; + }; + transmitted?: { + /** + * @description The amount of data transmitted. + * @example 100000 + */ + amount?: number; + /** + * @description The unit of the amount of data transmitted. + * @example B + */ + unit?: string; + }; + received?: { + /** + * @description The amount of data received. + * @example 100000 + */ + amount?: number; + /** + * @description The unit of the amount of data received. + * @example B + */ + unit?: string; + }; + }; + /** + * Google transcription engine list of languages + * @description Language to use for speech recognition + * @default en + * @example en + * @enum {string} + */ + GoogleTranscriptionLanguage: + | 'af' + | 'sq' + | 'am' + | 'ar' + | 'hy' + | 'az' + | 'eu' + | 'bn' + | 'bs' + | 'bg' + | 'my' + | 'ca' + | 'yue' + | 'zh' + | 'hr' + | 'cs' + | 'da' + | 'nl' + | 'en' + | 'et' + | 'fil' + | 'fi' + | 'fr' + | 'gl' + | 'ka' + | 'de' + | 'el' + | 'gu' + | 'iw' + | 'hi' + | 'hu' + | 'is' + | 'id' + | 'it' + | 'ja' + | 'jv' + | 'kn' + | 'kk' + | 'km' + | 'ko' + | 'lo' + | 'lv' + | 'lt' + | 'mk' + | 'ms' + | 'ml' + | 'mr' + | 'mn' + | 'ne' + | 'no' + | 'fa' + | 'pl' + | 'pt' + | 'pa' + | 'ro' + | 'ru' + | 'rw' + | 'sr' + | 'si' + | 'sk' + | 'sl' + | 'ss' + | 'st' + | 'es' + | 'su' + | 'sw' + | 'sv' + | 'ta' + | 'te' + | 'th' + | 'tn' + | 'tr' + | 'ts' + | 'uk' + | 'ur' + | 'uz' + | 've' + | 'vi' + | 'xh' + | 'zu'; + /** HTTPValidationError */ + HTTPValidationError: { + /** Detail */ + detail?: components['schemas']['ValidationError'][]; + }; + /** + * Hangup Request + * @example { + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + * "command_id": "891510ac-f3e4-11e8-af5b-de00688a4901" + * } + */ + HangupRequest: { + /** + * @description Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + /** + * @description Use this field to avoid duplicate commands. Telnyx will ignore any command with the same `command_id` for the same `call_control_id`. + * @example 891510ac-f3e4-11e8-af5b-de00688a4901 + */ + command_id?: string; + }; + /** @example [ + * { + * "record_type": "messaging_hosted_number", + * "id": "bf6307bd-884d-4c1f-b6ea-c62b8c495d3c", + * "phone_number": "+18665550001", + * "status": "successful" + * } + * ] */ + HostedNumber: { + /** @example messaging_hosted_number */ + record_type?: string; + /** + * Format: uuid + * @description Identifies the type of resource. + */ + readonly id?: string; + /** + * Format: +E.164 + * @description The messaging hosted phone number (+E.164 format) + */ + phone_number?: string; + /** @enum {string} */ + status?: 'deleted' | 'failed' | 'pending' | 'successful'; + }; + /** + * Format: uuid + * @description Identifies the resource. + * @example 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + */ + Id: string; + /** ImageURL */ + ImageURL: { + /** Url */ + url: string; + /** + * Detail + * @enum {string} + */ + detail?: 'auto' | 'low' | 'high'; + }; + /** @example [1234567890L, 9876543210L] */ + ImmutableSetLong: number[]; + /** ImportExternalVetting */ + ImportExternalVetting: { + /** + * Evpid + * @description External vetting provider ID for the brand. + */ + evpId: string; + /** + * Vettingid + * @description Unique ID that identifies a vetting transaction performed by a vetting provider. This ID is provided by the vetting provider at time of vetting. + */ + vettingId: string; + /** + * Vettingtoken + * @description Required by some providers for vetting record confirmation. + */ + vettingToken?: string; + }; + /** + * Inbound FQDN + * @example { + * "ani_number_format": "+E.164", + * "dnis_number_format": "+e164", + * "codecs": [ + * "G722" + * ], + * "default_routing_method": "sequential", + * "default_primary_fqdn_id": "1293384261075731497", + * "default_secondary_fqdn_id": "1293384261075731498", + * "default_tertiary_fqdn_id": "1293384261075731499", + * "channel_limit": 10, + * "generate_ringback_tone": true, + * "isup_headers_enabled": true, + * "prack_enabled": true, + * "privacy_zone_enabled": true, + * "sip_compact_headers_enabled": true, + * "sip_region": "US", + * "sip_subdomain": "test", + * "sip_subdomain_receive_settings": "only_my_connections", + * "timeout_1xx_secs": 10, + * "timeout_2xx_secs": 20, + * "shaken_stir_enabled": true + * } + */ + InboundFqdn: { + /** + * @description This setting allows you to set the format with which the caller's number (ANI) is sent for inbound phone calls. + * @default E.164-national + * @enum {string} + */ + ani_number_format: + | '+E.164' + | 'E.164' + | '+E.164-national' + | 'E.164-national'; + /** + * @default e164 + * @enum {string} + */ + dnis_number_format: '+e164' | 'e164' | 'national' | 'sip_username'; + /** + * @description Defines the list of codecs that Telnyx will send for inbound calls to a specific number on your portal account, in priority order. This only works when the Connection the number is assigned to uses Media Handling mode: default. OPUS and H.264 codecs are available only when using TCP or TLS transport for SIP. + * @default [ + * "G722", + * "G711U", + * "G711A", + * "G729", + * "OPUS", + * "H.264" + * ] + */ + codecs: string[]; + /** + * @description Default routing method to be used when a number is associated with the connection. Must be one of the routing method types or null, other values are not allowed. + * @default sequential + * @enum {string|null} + */ + default_routing_method: 'sequential' | 'round-robin'; + /** + * Format: int64 + * @description The default primary FQDN to use for the number. Only settable if the connection is + * of FQDN type. Value must be the ID of an FQDN set on the connection. + * @default null + */ + default_primary_fqdn_id: string | null; + /** + * Format: int64 + * @description The default secondary FQDN to use for the number. Only settable if the connection is + * of FQDN type. Value must be the ID of an FQDN set on the connection. + * @default null + */ + default_secondary_fqdn_id: string | null; + /** + * Format: int64 + * @description The default tertiary FQDN to use for the number. Only settable if the connection is + * of FQDN type. Value must be the ID of an FQDN set on the connection. + * @default null + */ + default_tertiary_fqdn_id: string | null; + /** + * @description When set, this will limit the total number of inbound calls to phone numbers associated with this connection. + * @default null + */ + channel_limit: number | null; + /** + * @description Generate ringback tone through 183 session progress message with early media. + * @default false + */ + generate_ringback_tone: boolean; + /** + * @description When set, inbound phone calls will receive ISUP parameters via SIP headers. (Only when available and only when using TCP or TLS transport.) + * @default false + */ + isup_headers_enabled: boolean; + /** + * @description Enable PRACK messages as defined in RFC3262. + * @default false + */ + prack_enabled: boolean; + /** + * @description By default, Telnyx does not send caller-id information when the caller has chosen to hide this information. When this option is enabled, Telnyx will send the SIP header Privacy:id plus the caller-id information so that the receiver side can choose when to hide it. + * @default false + */ + privacy_zone_enabled: boolean; + /** + * @description Defaults to true. + * @default true + */ + sip_compact_headers_enabled: boolean; + /** + * @description Selects which `sip_region` to receive inbound calls from. If null, the default region (US) will be used. + * @default US + * @enum {string} + */ + sip_region: 'US' | 'Europe' | 'Australia'; + /** + * @description Specifies a subdomain that can be used to receive Inbound calls to a Connection, in the same way a phone number is used, from a SIP endpoint. Example: the subdomain "example.sip.telnyx.com" can be called from any SIP endpoint by using the SIP URI "sip:@example.sip.telnyx.com" where the user part can be any alphanumeric value. Please note TLS encrypted calls are not allowed for subdomain calls. + * @default null + */ + sip_subdomain: string | null; + /** + * @description This option can be enabled to receive calls from: "Anyone" (any SIP endpoint in the public Internet) or "Only my connections" (any connection assigned to the same Telnyx user). + * @default from_anyone + * @enum {string} + */ + sip_subdomain_receive_settings: 'only_my_connections' | 'from_anyone'; + /** + * @description Time(sec) before aborting if connection is not made. + * @default 3 + */ + timeout_1xx_secs: number; + /** + * @description Time(sec) before aborting if call is unanswered (min: 1, max: 600). + * @default 90 + */ + timeout_2xx_secs: number; + /** + * @description When enabled the SIP Connection will receive the Identity header with Shaken/Stir data in the SIP INVITE message of inbound calls, even when using UDP transport. + * @default false + */ + shaken_stir_enabled: boolean; + }; + /** + * Inbound Ip + * @example { + * "ani_number_format": "+E.164", + * "dns_number_format": "+e164", + * "codecs": "G722", + * "default_primary_ip_id": "192.168.0.0", + * "default_tertiary_ip_id": "192.168.0.0", + * "default_secondary_ip_id": "192.168.0.0", + * "default_routing_method": "sequential", + * "channel_limit": 10, + * "generate_ringback_tone": true, + * "isup_headers_enabled": true, + * "prack_enabled": true, + * "privacy_zone_enabled": true, + * "sip_compact_headers_enabled": true, + * "sip_region": "US", + * "sip_subdomain": "test", + * "sip_subdomain_receive_settings": "only_my_connections", + * "timeout_1xx_secs": 10, + * "timeout_2xx_secs": 20, + * "shaken_stir_enabled": true + * } + */ + InboundIp: { + /** + * @description This setting allows you to set the format with which the caller's number (ANI) is sent for inbound phone calls. + * @default E.164-national + * @enum {string} + */ + ani_number_format: + | '+E.164' + | 'E.164' + | '+E.164-national' + | 'E.164-national'; + /** + * @default e164 + * @enum {string} + */ + dnis_number_format: '+e164' | 'e164' | 'national' | 'sip_username'; + /** + * @description Defines the list of codecs that Telnyx will send for inbound calls to a specific number on your portal account, in priority order. This only works when the Connection the number is assigned to uses Media Handling mode: default. OPUS and H.264 codecs are available only when using TCP or TLS transport for SIP. + * @default [ + * "G722", + * "G711U", + * "G711A", + * "G729", + * "OPUS", + * "H.264" + * ] + */ + codecs: string[]; + /** + * @description The default primary IP to use for the number. Only settable if the connection is + * of IP authentication type. Value must be the ID of an authorized IP set on the connection. + * @example 192.168.0.0 + */ + default_primary_ip_id?: string; + /** + * @description The default secondary IP to use for the number. Only settable if the connection is + * of IP authentication type. Value must be the ID of an authorized IP set on the connection. + * @example 192.168.0.0 + */ + default_secondary_ip_id?: string; + /** + * @description The default tertiary IP to use for the number. Only settable if the connection is + * of IP authentication type. Value must be the ID of an authorized IP set on the connection. + * @example 192.168.0.0 + */ + default_tertiary_ip_id?: string; + /** + * @description Default routing method to be used when a number is associated with the connection. Must be one of the routing method types or left blank, other values are not allowed. + * @enum {string} + */ + default_routing_method?: 'sequential' | 'round-robin'; + /** + * @description When set, this will limit the total number of inbound calls to phone numbers associated with this connection. + * @default null + * @example 10 + */ + channel_limit: number; + /** + * @description Generate ringback tone through 183 session progress message with early media. + * @default false + */ + generate_ringback_tone: boolean; + /** + * @description When set, inbound phone calls will receive ISUP parameters via SIP headers. (Only when available and only when using TCP or TLS transport.) + * @default false + */ + isup_headers_enabled: boolean; + /** + * @description Enable PRACK messages as defined in RFC3262. + * @default false + */ + prack_enabled: boolean; + /** + * @description By default, Telnyx does not send caller-id information when the caller has chosen to hide this information. When this option is enabled, Telnyx will send the SIP header Privacy:id plus the caller-id information so that the receiver side can choose when to hide it. + * @default false + */ + privacy_zone_enabled: boolean; + /** + * @description Defaults to true. + * @default true + */ + sip_compact_headers_enabled: boolean; + /** + * @description Selects which `sip_region` to receive inbound calls from. If null, the default region (US) will be used. + * @default US + * @enum {string} + */ + sip_region: 'US' | 'Europe' | 'Australia'; + /** @description Specifies a subdomain that can be used to receive Inbound calls to a Connection, in the same way a phone number is used, from a SIP endpoint. Example: the subdomain "example.sip.telnyx.com" can be called from any SIP endpoint by using the SIP URI "sip:@example.sip.telnyx.com" where the user part can be any alphanumeric value. Please note TLS encrypted calls are not allowed for subdomain calls. */ + sip_subdomain?: string; + /** + * @description This option can be enabled to receive calls from: "Anyone" (any SIP endpoint in the public Internet) or "Only my connections" (any connection assigned to the same Telnyx user). + * @enum {string} + */ + sip_subdomain_receive_settings?: 'only_my_connections' | 'from_anyone'; + /** + * @description Time(sec) before aborting if connection is not made. + * @default 3 + */ + timeout_1xx_secs: number; + /** + * @description Time(sec) before aborting if call is unanswered (min: 1, max: 600). + * @default 90 + */ + timeout_2xx_secs: number; + /** + * @description When enabled the SIP Connection will receive the Identity header with Shaken/Stir data in the SIP INVITE message of inbound calls, even when using UDP transport. + * @default false + */ + shaken_stir_enabled: boolean; + }; + /** @example { + * "record_type": "event", + * "id": "bf6307bd-884d-4c1f-b6ea-c62b8c495d3c", + * "event_type": "message.received", + * "occurred_at": "date-time", + * "payload": { + * "record_type": "message", + * "direction": "inbound", + * "id": "7ee4241c-f127-47e5-9c34-3aac291f8058", + * "type": "SMS", + * "messaging_profile_id": "0f512bda-ae1e-4597-8e11-e5f5686b97d3", + * "organization_id": "b448f9cc-a842-4784-98e9-03c1a5872950", + * "from": { + * "phone_number": "+18665550001", + * "carrier": "T-MOBILE USA, INC.", + * "line_type": "Wireless" + * }, + * "to": [ + * { + * "phone_number": "+18445550001", + * "status": "delivered", + * "carrier": "TELNYX LLC", + * "line_type": "VoIP" + * } + * ], + * "text": "Hello, World!", + * "subject": "From Telnyx!", + * "media": [], + * "webhook_url": "https://www.example.com/hooks", + * "webhook_failover_url": "https://backup.example.com/hooks", + * "encoding": "GSM-7", + * "parts": 1, + * "tags": [ + * "Greetings" + * ], + * "cost": null, + * "received_at": "2019-01-23T18:10:02.574Z", + * "sent_at": null, + * "completed_at": null, + * "valid_until": null, + * "errors": [] + * } + * } */ + InboundMessage: { + /** + * @description Identifies the type of the resource. + * @example event + * @enum {string} + */ + record_type?: 'event'; + /** + * Format: uuid + * @description Identifies the type of resource. + */ + id?: string; + /** + * @description The type of event being delivered. + * @example message.received + * @enum {string} + */ + event_type?: 'message.received'; + /** + * Format: date-time + * @description ISO 8601 formatted date indicating when the resource was created. + */ + occurred_at?: string; + payload?: components['schemas']['InboundMessagePayload']; + }; + InboundMessageEvent: { + data?: components['schemas']['InboundMessage']; + }; + /** @example { + * "record_type": "message", + * "direction": "inbound", + * "id": "7ee4241c-f127-47e5-9c34-3aac291f8058", + * "type": "SMS", + * "messaging_profile_id": "0f512bda-ae1e-4597-8e11-e5f5686b97d3", + * "organization_id": "b448f9cc-a842-4784-98e9-03c1a5872950", + * "from": { + * "phone_number": "+18665550001", + * "status": "delivered", + * "carrier": "T-MOBILE USA, INC.", + * "line_type": "Wireless" + * }, + * "to": [ + * { + * "phone_number": "+18445550001", + * "status": "delivered", + * "carrier": "TELNYX LLC", + * "line_type": "VoIP" + * } + * ], + * "text": "Hello, World!", + * "subject": "From Telnyx!", + * "media": [], + * "webhook_url": "https://www.example.com/hooks", + * "webhook_failover_url": "https://backup.example.com/hooks", + * "encoding": "GSM-7", + * "parts": 1, + * "tags": [ + * "Greetings" + * ], + * "cost": null, + * "received_at": "2019-01-23T18:10:02.574Z", + * "sent_at": null, + * "completed_at": null, + * "valid_until": null, + * "errors": [] + * } */ + InboundMessagePayload: { + /** + * @description Identifies the type of the resource. + * @example message + * @enum {string} + */ + record_type?: 'message'; + /** + * @description The direction of the message. Inbound messages are sent to you whereas outbound messages are sent from you. + * @example inbound + * @enum {string} + */ + direction?: 'inbound'; + /** + * Format: uuid + * @description Identifies the type of resource. + */ + id?: string; + /** + * @description The type of message. This value can be either 'sms' or 'mms'. + * @enum {string} + */ + type?: 'SMS' | 'MMS'; + /** @description Unique identifier for a messaging profile. */ + messaging_profile_id?: string; + to?: { + /** + * Format: address + * @description Receiving address (+E.164 formatted phone number or short code). + */ + phone_number?: string; + /** @enum {string} */ + status?: + | 'queued' + | 'sending' + | 'sent' + | 'delivered' + | 'sending_failed' + | 'delivery_failed' + | 'delivery_unconfirmed' + | 'webhook_delivered'; + /** @description The carrier of the receiver. */ + carrier?: string; + /** + * @description The line-type of the receiver. + * @enum {string} + */ + line_type?: + | 'Wireline' + | 'Wireless' + | 'VoWiFi' + | 'VoIP' + | 'Pre-Paid Wireless' + | ''; + }[]; + cc?: { + /** + * Format: address + * @description Receiving address (+E.164 formatted phone number or short code). + */ + phone_number?: string; + /** @enum {string} */ + status?: + | 'queued' + | 'sending' + | 'sent' + | 'delivered' + | 'sending_failed' + | 'delivery_failed' + | 'delivery_unconfirmed'; + /** @description The carrier of the receiver. */ + carrier?: string; + /** + * @description The line-type of the receiver. + * @enum {string} + */ + line_type?: + | 'Wireline' + | 'Wireless' + | 'VoWiFi' + | 'VoIP' + | 'Pre-Paid Wireless' + | ''; + }[]; + from?: { + /** + * Format: address + * @description Sending address (+E.164 formatted phone number, alphanumeric sender ID, or short code). + */ + phone_number?: string; + /** @enum {string} */ + status?: 'received' | 'delivered'; + /** @description The carrier of the sender. */ + carrier?: string; + /** + * @description The line-type of the sender. + * @enum {string} + */ + line_type?: + | 'Wireline' + | 'Wireless' + | 'VoWiFi' + | 'VoIP' + | 'Pre-Paid Wireless' + | ''; + }; + /** @description Message body (i.e., content) as a non-empty string. + * + * **Required for SMS** */ + text?: string; + media?: { + /** + * Format: url + * @description The url of the media requested to be sent. + */ + url?: string; + /** + * Format: mime-type + * @description The MIME type of the requested media. + */ + content_type?: string; + /** @description The size of the requested media. */ + size?: number; + /** @description The SHA256 hash of the requested media. */ + hash_sha256?: string; + }[]; + /** + * Format: url + * @description The URL where webhooks related to this message will be sent. + */ + webhook_url?: string | null; + /** + * Format: url + * @description The failover URL where webhooks related to this message will be sent if sending to the primary URL fails. + */ + webhook_failover_url?: string | null; + /** @description Encoding scheme used for the message body. */ + encoding?: string; + /** @description Number of parts into which the message's body must be split. */ + parts?: number; + /** @description Tags associated with the resource. */ + tags?: string[]; + cost?: { + /** + * Format: decimal + * @description The amount deducted from your account. + */ + amount?: string; + /** + * Format: iso4217 + * @description The ISO 4217 currency identifier. + */ + currency?: string; + } | null; + /** + * Format: date-time + * @description ISO 8601 formatted date indicating when the message request was received. + */ + received_at?: string; + /** + * Format: date-time + * @description Not used for inbound messages. + */ + sent_at?: string | null; + /** + * Format: date-time + * @description Not used for inbound messages. + */ + completed_at?: string | null; + /** + * Format: date-time + * @description Not used for inbound messages. + */ + valid_until?: string | null; + /** @description These errors may point at addressees when referring to unsuccessful/unconfirmed delivery statuses. */ + errors?: components['schemas']['Error'][]; + }; + /** InferenceRequest */ + InferenceRequest: { + /** Text */ + text: string[]; + /** @default mistralai/Mistral-7B-Instruct-v0.1 */ + model: components['schemas']['ModelNamespace']; + /** Bucket */ + bucket?: string; + /** Openai Api Key */ + openai_api_key?: string; + /** + * Max Tokens + * @default 128 + */ + max_tokens: number; + /** + * Temperature + * @default 0.9 + */ + temperature: number; + }; + /** InferenceResponse */ + InferenceResponse: { + /** Answer */ + answer: string[]; + }; + /** InferenceResponseData */ + InferenceResponseData: { + data: components['schemas']['InferenceResponse']; + }; + /** InferenceResponseStreamData */ + InferenceResponseStreamData: { + data: components['schemas']['InferenceStreamResponse']; + }; + /** InferenceStreamResponse */ + InferenceStreamResponse: { + token?: string; + }; + /** + * Initiate Call Request + * @example { + * "To": "+13121230000", + * "From": "+13120001234", + * "Url": "https://www.example.com/texml.xml", + * "StatusCallback": "https://www.example.com/statuscallback-listener" + * } + */ + InitiateCallRequest: { + /** @description The ID of the TeXML Application. */ + ApplicationSid: string; + /** + * @description The phone number of the called party. Phone numbers are formatted with a `+` and country code. + * @example +16175551212 + */ + To: string; + /** + * @description The phone number of the party that initiated the call. Phone numbers are formatted with a `+` and country code. + * @example +16175551212 + */ + From: string; + /** + * @description The URL from which Telnyx will retrieve the TeXML call instructions. + * @example https://www.example.com/instructions.xml + */ + Url?: string; + /** + * @description HTTP request type used for `Url`. The default value is inherited from TeXML Application setting. + * @default POST + * @example GET + * @enum {string} + */ + UrlMethod: 'GET' | 'POST'; + /** + * @description A failover URL for which Telnyx will retrieve the TeXML call instructions if the `Url` is not responding. + * @example https://www.example.com/instructions-fallback.xml + */ + FallbackUrl?: string; + /** + * @description URL destination for Telnyx to send status callback events to for the call. + * @example https://www.example.com/callback + */ + StatusCallback?: string; + /** + * @description HTTP request type used for `StatusCallback`. + * @default POST + * @example GET + * @enum {string} + */ + StatusCallbackMethod: 'GET' | 'POST'; + /** + * @description The call events for which Telnyx should send a webhook. Multiple events can be defined when separated by a space. + * @default completed + * @example iniated ringing + * @enum {string} + */ + StatusCallbackEvent: 'initiated' | 'ringing' | 'answered' | 'completed'; + /** + * @description Enables Answering Machine Detection. + * @default Disable + * @example Enable + * @enum {string} + */ + MachineDetection: 'Enable' | 'Disable' | 'DetectMessageEnd'; + /** + * @description Allows you to chose between Premium and Standard detections. + * @default Regular + * @example Premium + * @enum {string} + */ + DetectionMode: 'Premium' | 'Regular'; + /** + * @description Select whether to perform answering machine detection in the background. By default execution is blocked until Answering Machine Detection is completed. + * @default false + * @example true + */ + AsyncAmd: boolean; + /** + * @description URL destination for Telnyx to send AMD callback events to for the call. + * @example https://www.example.com/callback + */ + AsyncAmdStatusCallback?: string; + /** + * @description HTTP request type used for `AsyncAmdStatusCallback`. The default value is inherited from TeXML Application setting. + * @default POST + * @example GET + * @enum {string} + */ + AsyncAmdStatusCallbackMethod: 'GET' | 'POST'; + /** + * @description Maximum timeout threshold in milliseconds for overall detection. + * @default 30000 + * @example 5000 + */ + MachineDetectionTimeout: number; + /** + * @description Maximum threshold of a human greeting. If greeting longer than this value, considered machine. Ignored when `premium` detection is used. + * @default 3500 + * @example 2000 + */ + MachineDetectionSpeechThreshold: number; + /** + * @description Silence duration threshold after a greeting message or voice for it be considered human. Ignored when `premium` detection is used. + * @default 800 + * @example 2000 + */ + MachineDetectionSpeechEndThreshold: number; + /** + * @description If initial silence duration is greater than this value, consider it a machine. Ignored when `premium` detection is used. + * @default 3500 + * @example 2000 + */ + MachineDetectionSilenceTimeout: number; + /** + * @description Whether to cancel ongoing playback on `machine` detection. Defaults to `true`. + * @default true + * @example false + */ + CancelPlaybackOnMachineDetection: boolean; + /** + * @description Whether to cancel ongoing playback on `greeting ended` detection. Defaults to `true`. + * @default true + * @example false + */ + CancelPlaybackOnDetectMessageEnd: boolean; + /** + * @description The list of comma-separated codecs to be offered on a call. + * @example PCMA,PCMU + */ + PreferredCodecs?: string; + /** + * @description Whether to record the entire participant's call leg. Defaults to `false`. + * @example false + */ + Record?: boolean; + /** + * @description The number of channels in the final recording. Defaults to `mono`. + * @example dual + * @enum {string} + */ + RecordingChannels?: 'mono' | 'dual'; + /** + * @description The URL the recording callbacks will be sent to. + * @example https://example.com/recording_status_callback + */ + RecordingStatusCallback?: string; + /** + * @description HTTP request type used for `RecordingStatusCallback`. Defaults to `POST`. + * @example GET + * @enum {string} + */ + RecordingStatusCallbackMethod?: 'GET' | 'POST'; + /** + * @description The changes to the recording's state that should generate a call to `RecoridngStatusCallback`. Can be: `in-progress`, `completed` and `absent`. Separate multiple values with a space. Defaults to `completed`. + * @example in-progress completed absent + */ + RecordingStatusCallbackEvent?: string; + /** + * @description The number of seconds that Telnyx will wait for the recording to be stopped if silence is detected. The timer only starts when the speech is detected. Please note that the transcription is used to detect silence and the related charge will be applied. The minimum value is 0. The default value is 0 (infinite) + * @default 0 + * @example 5 + */ + RecordingTimeout: number; + /** + * @description The audio track to record for the call. The default is `both`. + * @example inbound + * @enum {string} + */ + RecordingTrack?: 'inbound' | 'outbound' | 'both'; + /** + * @description The password to use for SIP authentication. + * @example 1234 + */ + SipAuthPassword?: string; + /** + * @description The username to use for SIP authentication. + * @example user + */ + SipAuthUsername?: string; + /** + * @description Whether to trim any leading and trailing silence from the recording. Defaults to `trim-silence`. + * @example false + * @enum {string} + */ + Trim?: 'trim-silence' | 'do-not-trim'; + }; + /** + * Initaite TeXML Call Result + * @example { + * "from": "+13120001234", + * "to": "+13121230000", + * "status": "queued" + * } + */ + InitiateCallResult: { + /** @example +13120001234 */ + from?: string; + /** @example +13120000000 */ + to?: string; + /** @example accepted */ + status?: string; + }; + /** + * Int ID + * Format: int64 + * @description Uniquely identifies the resource. + * @example 1293384261075731499 + */ + IntId: string; + Interface: { + /** + * Format: uuid + * @description The id of the network associated with the interface. + * @example 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + */ + network_id?: string; + /** + * @description A user specified name for the interface. + * @example test interface + */ + name?: string; + status?: components['schemas']['InterfaceStatus']; + }; + /** + * @description The current status of the interface deployment. + * @example provisioned + * @enum {string} + */ + InterfaceStatus: 'created' | 'provisioning' | 'provisioned' | 'deleting'; + /** @example { + * "group": "318", + * "group_type": "npa", + * "number_range": 1, + * "number_type": "did", + * "phone_number_type": "local", + * "coverage_type": "number", + * "record_type": "inventory_coverage_group", + * "administrative_area": "NJ", + * "count": 3, + * "advance_requirements": true + * } */ + InventoryCoverage: { + /** @example 318 */ + group?: string; + /** @example npa */ + group_type?: string; + /** @example 1 */ + number_range?: number; + /** + * @example did + * @enum {string} + */ + number_type?: 'did' | 'toll-free'; + /** + * @example local + * @enum {string} + */ + phone_number_type?: + | 'local' + | 'toll_free' + | 'national' + | 'landline' + | 'shared_cost' + | 'mobile'; + /** + * @example number + * @enum {string} + */ + coverage_type?: 'number' | 'block'; + /** @example inventory_coverage_group */ + record_type?: string; + /** @example NJ */ + administrative_area?: string; + /** @example 3 */ + count?: number; + /** + * @description Indicates if the phone number requires advance requirements. + * @example true + */ + advance_requirements?: boolean; + }; + /** @example { + * "total_results": 25 + * } */ + InventoryCoverageMetadata: { + /** @example 25 */ + total_results?: number; + }; + /** + * Ip + * @example { + * "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58", + * "record_type": "ip", + * "connection_id": "3456789987654", + * "ip_address": "192.168.0.0", + * "port": 5060, + * "created_at": "2018-02-02T22:25:27.521Z", + * "updated_at": "2018-02-02T22:25:27.521Z" + * } + */ + Ip: { + /** + * Format: int64 + * @description Identifies the type of resource. + * @example 1293384261075731499 + */ + id?: string; + /** + * @description Identifies the type of the resource. + * @example ip + */ + record_type?: string; + /** @description ID of the IP Connection to which this IP should be attached. */ + connection_id?: string; + /** + * @description IP adddress represented by this resource. + * @example 192.168.0.0 + */ + ip_address?: string; + /** + * @description Port to use when connecting to this IP. + * @default 5060 + * @example 5060 + */ + port: number; + /** + * @description ISO 8601 formatted date indicating when the resource was created. + * @example 2018-02-02T22:25:27.521Z + */ + created_at?: string; + /** + * @description ISO 8601 formatted date indicating when the resource was updated. + * @example 2018-02-02T22:25:27.521Z + */ + updated_at?: string; + }; + /** + * Ip Connection + * @example { + * "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58", + * "record_type": "ip_connection", + * "active": true, + * "anchorsite_override": "Latency", + * "connection_name": "string", + * "transport_protocol": "UDP", + * "default_on_hold_comfort_noise_enabled": true, + * "dtmf_type": "RFC 2833", + * "encode_contact_header_enabled": true, + * "encrypted_media": "SRTP", + * "onnet_t38_passthrough_enabled": true, + * "ios_push_credential_id": "ec0c8e5d-439e-4620-a0c1-9d9c8d02a836", + * "android_push_credential_id": "06b09dfd-7154-4980-8b75-cebf7a9d4f8e", + * "webhook_event_url": "https://example.com", + * "webhook_event_failover_url": "https://failover.example.com", + * "webhook_api_version": "1", + * "webhook_timeout_secs": 25, + * "rtcp_settings": { + * "port": "rtcp-mux", + * "capture_enabled": true, + * "report_frequency_secs": 10 + * }, + * "created_at": "2018-02-02T22:25:27.521Z", + * "updated_at": "2018-02-02T22:25:27.521Z", + * "inbound": { + * "ani_number_format": "+E.164", + * "dnis_number_format": "+e164", + * "codecs": [ + * "G722" + * ], + * "default_primary_ip_id": "192.0.2.1", + * "default_secondary_ip_id": "198.51.100.1", + * "default_tertiary_ip_id": "203.0.113.1", + * "default_routing_method": "sequential", + * "channel_limit": 10, + * "generate_ringback_tone": true, + * "isup_headers_enabled": true, + * "prack_enabled": true, + * "privacy_zone_enabled": true, + * "sip_compact_headers_enabled": true, + * "sip_region": "US", + * "sip_subdomain": "string", + * "sip_subdomain_receive_settings": "only_my_connections", + * "timeout_1xx_secs": 10, + * "timeout_2xx_secs": 10, + * "shaken_stir_enabled": true + * }, + * "outbound": { + * "call_parking_enabled": true, + * "ani_override": "string", + * "ani_override_type": "always", + * "channel_limit": 10, + * "instant_ringback_enabled": true, + * "generate_ringback_tone": true, + * "localization": "string", + * "t38_reinvite_source": "customer", + * "tech_prefix": "string", + * "ip_authentication_method": "token", + * "ip_authentication_token": "string", + * "outbound_voice_profile_id": "1293384261075731499" + * } + * } + */ + IpConnection: { + /** + * Format: int64 + * @description Identifies the type of resource. + * @example 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + */ + id?: string; + /** + * @description Identifies the type of the resource. + * @example ip_connection + */ + record_type?: string; + /** + * @description Defaults to true + * @example true + */ + active?: boolean; + anchorsite_override?: components['schemas']['AnchorsiteOverride']; + /** @example string */ + connection_name?: string; + /** + * @description One of UDP, TLS, or TCP. Applies only to connections with IP authentication or FQDN authentication. + * @default UDP + * @example UDP + * @enum {string} + */ + transport_protocol: 'UDP' | 'TCP' | 'TLS'; + /** + * @description When enabled, Telnyx will generate comfort noise when you place the call on hold. If disabled, you will need to generate comfort noise or on hold music to avoid RTP timeout. + * @default true + * @example true + */ + default_on_hold_comfort_noise_enabled: boolean; + dtmf_type?: components['schemas']['DtmfType']; + /** + * @description Encode the SIP contact header sent by Telnyx to avoid issues for NAT or ALG scenarios. + * @default false + * @example true + */ + encode_contact_header_enabled: boolean; + encrypted_media?: components['schemas']['EncryptedMedia']; + /** + * @description Enable on-net T38 if you prefer the sender and receiver negotiating T38 directly if both are on the Telnyx network. If this is disabled, Telnyx will be able to use T38 on just one leg of the call depending on each leg's settings. + * @default false + * @example false + */ + onnet_t38_passthrough_enabled: boolean; + /** + * Format: url + * @description The URL where webhooks related to this connection will be sent. Must include a scheme, such as 'https'. + * @example https://example.com + */ + webhook_event_url?: string; + /** + * Format: url + * @description The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails. Must include a scheme, such as 'https'. + * @default + * @example https://failover.example.com + */ + webhook_event_failover_url: string | null; + /** + * @description Determines which webhook format will be used, Telnyx API v1 or v2. + * @default 1 + * @example 1 + * @enum {string} + */ + webhook_api_version: '1' | '2'; + /** + * @description Specifies how many seconds to wait before timing out a webhook. + * @default null + * @example 25 + */ + webhook_timeout_secs: number | null; + rtcp_settings?: components['schemas']['ConnectionRtcpSettings']; + /** + * @description ISO 8601 formatted date indicating when the resource was created. + * @example 2018-02-02T22:25:27.521Z + */ + created_at?: string; + /** + * @description ISO 8601 formatted date indicating when the resource was updated. + * @example 2018-02-02T22:25:27.521Z + */ + updated_at?: string; + inbound?: components['schemas']['InboundIp']; + outbound?: components['schemas']['OutboundIp']; + }; + /** + * Join Conference Request + * @example { + * "call_control_id": "v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg", + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + * "command_id": "891510ac-f3e4-11e8-af5b-de00688a4901", + * "end_conference_on_exit": true, + * "hold": true, + * "hold_audio_url": "http://www.example.com/audio.wav", + * "mute": true, + * "start_conference_on_enter": true, + * "supervisor_role": "whisper", + * "whisper_call_control_ids": [ + * "v2:Sg1xxxQ_U3ixxxyXT_VDNI3xxxazZdg6Vxxxs4-GNYxxxVaJPOhFMRQ", + * "v2:qqpb0mmvd-ovhhBr0BUQQn0fld5jIboaaX3-De0DkqXHzbf8d75xkw" + * ], + * "beep_enabled": "always" + * } + */ + JoinConferenceRequest: { + /** + * @description Unique identifier and token for controlling the call + * @example v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQczRrZvZakpWxBlpw48KyZQ== + */ + call_control_id: string; + /** + * @description Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string. Please note that the client_state will be updated for the participient call leg and the change will not affect conferencing webhooks unless the participient is the owner of the conference. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + /** + * @description Use this field to avoid execution of duplicate commands. Telnyx will ignore subsequent commands with the same `command_id` as one that has already been executed. + * @example 891510ac-f3e4-11e8-af5b-de00688a4901 + */ + command_id?: string; + /** + * @description Whether the conference should end and all remaining participants be hung up after the participant leaves the conference. Defaults to "false". + * @example true + */ + end_conference_on_exit?: boolean; + /** + * @description Whether the conference should end after the participant leaves the conference. NOTE this doesn't hang up the other participants. Defaults to "false". + * @example true + */ + soft_end_conference_on_exit?: boolean; + /** + * @description Whether the participant should be put on hold immediately after joining the conference. Defaults to "false". + * @example true + */ + hold?: boolean; + /** + * @description The URL of a file to be played to the participant when they are put on hold after joining the conference. hold_media_name and hold_audio_url cannot be used together in one request. Takes effect only when "start_conference_on_create" is set to "false". This property takes effect only if "hold" is set to "true". + * @example http://example.com/message.wav + */ + hold_audio_url?: string; + /** + * @description The media_name of a file to be played to the participant when they are put on hold after joining the conference. The media_name must point to a file previously uploaded to api.telnyx.com/v2/media by the same user/organization. The file must either be a WAV or MP3 file. Takes effect only when "start_conference_on_create" is set to "false". This property takes effect only if "hold" is set to "true". + * @example my_media_uploaded_to_media_storage_api + */ + hold_media_name?: string; + /** + * @description Whether the participant should be muted immediately after joining the conference. Defaults to "false". + * @example true + */ + mute?: boolean; + /** + * @description Whether the conference should be started after the participant joins the conference. Defaults to "false". + * @example true + */ + start_conference_on_enter?: boolean; + /** + * @description Sets the joining participant as a supervisor for the conference. A conference can have multiple supervisors. "barge" means the supervisor enters the conference as a normal participant. This is the same as "none". "monitor" means the supervisor is muted but can hear all participants. "whisper" means that only the specified "whisper_call_control_ids" can hear the supervisor. Defaults to "none". + * @example whisper + * @enum {string} + */ + supervisor_role?: 'barge' | 'monitor' | 'none' | 'whisper'; + /** + * @description Array of unique call_control_ids the joining supervisor can whisper to. If none provided, the supervisor will join the conference as a monitoring participant only. + * @example [ + * "v2:Sg1xxxQ_U3ixxxyXT_VDNI3xxxazZdg6Vxxxs4-GNYxxxVaJPOhFMRQ", + * "v2:qqpb0mmvd-ovhhBr0BUQQn0fld5jIboaaX3-De0DkqXHzbf8d75xkw" + * ] + */ + whisper_call_control_ids?: string[]; + /** + * @description Whether a beep sound should be played when the participant joins and/or leaves the conference. Can be used to override the conference-level setting. + * @example on_exit + * @enum {string} + */ + beep_enabled?: 'always' | 'never' | 'on_enter' | 'on_exit'; + }; + /** Format: date-time */ + LastModified: string; + /** + * Leave Conference Request + * @example { + * "call_control_id": "c46e06d7-b78f-4b13-96b6-c576af9640ff", + * "beep_enabled": "never" + * } + */ + LeaveConferenceRequest: { + /** + * @description Unique identifier and token for controlling the call + * @example f91269aa-61d1-417f-97b3-10e020e8bc47 + */ + call_control_id: string; + /** + * @description Use this field to avoid execution of duplicate commands. Telnyx will ignore subsequent commands with the same `command_id` as one that has already been executed. + * @example 891510ac-f3e4-11e8-af5b-de00688a4901 + */ + command_id?: string; + /** + * @description Whether a beep sound should be played when the participant leaves the conference. Can be used to override the conference-level setting. + * @example on_exit + * @enum {string} + */ + beep_enabled?: 'always' | 'never' | 'on_enter' | 'on_exit'; + }; + /** + * Leave Queue Request + * @example { + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + * "command_id": "891510ac-f3e4-11e8-af5b-de00688a4901" + * } + */ + LeaveQueueRequest: { + /** + * @description Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + /** + * @description Use this field to avoid duplicate commands. Telnyx will ignore any command with the same `command_id` for the same `call_control_id`. + * @example 891510ac-f3e4-11e8-af5b-de00688a4901 + */ + command_id?: string; + }; + /** @example { + * "record_type": "ledger_billing_group_report", + * "id": "f5586561-8ff0-4291-a0ac-84fe544797bd", + * "organization_id": "f5586561-8ff0-4291-a0ac-84fe544797bd", + * "report_url": "https://example.com", + * "created_at": "2019-10-15T10:07:15.527Z", + * "updated_at": "2019-10-15T10:07:15.527Z" + * } */ + LedgerBillingGroupReport: { + /** + * @description Identifies the type of the resource. + * @example ledger_billing_group_report + * @enum {string} + */ + record_type?: 'ledger_billing_group_report'; + /** + * Format: uuid + * @description Identifies the type of resource. + */ + id?: string; + /** + * Format: uuid + * @description Uniquely identifies the organization that owns the resource. + */ + organization_id?: string; + /** + * Format: string + * @description Status of the ledger billing group report + * @enum {string} + */ + status?: 'pending' | 'complete' | 'failed' | 'deleted'; + /** + * Format: string + * @description External url of the ledger billing group report, if the status is complete + */ + report_url?: string | null; + /** + * Format: date-time + * @description ISO 8601 formatted date indicating when the resource was created. + */ + created_at?: string; + /** + * Format: date-time + * @description ISO 8601 formatted date indicating when the resource was updated. + */ + updated_at?: string; + }; + ListBucketsResponse: { + Buckets?: { + Name?: string; + /** Format: date-time */ + CreationDate?: string; + }[]; + }; + ListObjectsResponse: { + Name?: string; + Contents?: { + Key?: string; + Size?: number; + /** Format: date-time */ + LastModified?: string; + }[]; + }; + /** ListVerificationsResponse */ + ListVerificationsResponse: { + data: components['schemas']['Verification'][]; + meta: components['schemas']['Meta']; + }; + /** + * ListVerifiedNumbersResponse + * @description A paginated list of Verified Numbers + */ + ListVerifiedNumbersResponse: { + data: components['schemas']['VerifiedNumberResponse'][]; + meta: components['schemas']['Meta']; + }; + /** + * ListVerifyProfileMessageTemplateResponse + * @description A list of Verify profile message templates + */ + ListVerifyProfileMessageTemplateResponse: { + data: components['schemas']['VerifyProfileMessageTemplateResponse'][]; + }; + /** + * ListVerifyProfilesResponse + * @description A paginated list of Verify profiles + */ + ListVerifyProfilesResponse: { + data: components['schemas']['VerifyProfileResponse'][]; + meta: components['schemas']['Meta']; + }; + /** Location */ + Location: { + id?: components['schemas']['UUID']; + /** @example Main building, Suite 504 */ + additional_info?: string; + /** @example Chicago Office */ + description?: string; + /** @description Represents whether the location is the default or not. */ + is_default?: boolean; + }; + LocationResponse: { + data?: { + /** Format: uuid */ + location_id?: string; + /** Format: uuid */ + static_emergency_address_id?: string; + accepted_address_suggestions?: boolean; + }; + }; + LogMessage: { + /** + * Format: integer + * @example 10015 + */ + code: string; + /** @example Invalid attribute */ + title: string; + /** @example The value provided for the attribute is not valid. Check the value used and try again. */ + detail?: string; + source?: { + /** + * Format: json-pointer + * @description JSON pointer (RFC6901) to the offending entity. + * @example /attribute + */ + pointer?: string; + }; + meta?: { + /** + * @description The telephone number the log message is associated with, if any. + * @example +12345678 + */ + telephone_number?: string; + /** + * Format: int64 + * @description The external connection the log message is associated with, if any. + * @example 1293384261075731499 + */ + external_connection_id?: string; + /** + * Format: uuid + * @description The ticket ID for an operation that generated the log message, if any. + * @example 542c3bca-d247-42bc-8fe7-e01d16ecd761 + */ + ticket_id?: string; + }; + }; + Loopcount: string | number; + /** ManagedAccount */ + ManagedAccount: { + /** + * @description Identifies the type of the resource. + * @example managed_account + * @enum {string} + */ + record_type: 'managed_account'; + /** + * Format: UUID + * @description Uniquely identifies the managed account. + * @example f65ceda4-6522-4ad6-aede-98de83385123 + */ + id: string; + /** + * Format: email + * @description The managed account's email. + * @example user@example.com + */ + email: string; + /** + * @description The managed account's V2 API access key + * @example KEY01236170692E74656C6E79782E636F6D_YmlnIGlyb24gaXMgZGVhZA + */ + api_key: string; + /** + * @description The manager account's email, which serves as the V1 API user identifier + * @example managed_account@example.com + */ + api_user: string; + /** + * @description The managed account's V1 API token + * @example x6oexQNHTs-fZ7-QsDMOeg + */ + api_token: string; + /** + * @description The organization the managed account is associated with. + * @example Example Company LLC + */ + organization_name?: string; + /** + * @description The ID of the manager account associated with the managed account. + * @example f65ceda4-6522-4ad6-aede-98de83385123 + */ + manager_account_id: string; + balance?: components['schemas']['ManagedAccountBalance']; + /** + * @description ISO 8601 formatted date indicating when the resource was created. + * @example 2018-02-02T22:25:27.521Z + */ + created_at: string; + /** + * @description ISO 8601 formatted date indicating when the resource was updated. + * @example 2018-02-02T22:25:27.521Z + */ + updated_at: string; + /** + * @description Boolean value that indicates if the managed account is able to have custom pricing set for it or not. If false, uses the pricing of the manager account. Defaults to false. There may be time lag between when the value is changed and pricing changes take effect. + * @example true + */ + managed_account_allow_custom_pricing?: boolean; + /** + * @description Boolean value that indicates if the billing information and charges to the managed account "roll up" to the manager account. If true, the managed account will not have its own balance and will use the shared balance with the manager account. This value cannot be changed after account creation without going through Telnyx support as changes require manual updates to the account ledger. Defaults to false. + * @example false + */ + rollup_billing?: boolean; + }; + /** @example { + * "record_type": "balance", + * "balance": "300.00", + * "credit_limit": "100.00", + * "available_credit": "400.00", + * "currency": "USD" + * } */ + ManagedAccountBalance: { + /** + * @description Identifies the type of the resource. + * @example balance + * @enum {string} + */ + record_type?: 'balance'; + /** + * Format: decimal + * @description The account's current balance. + * @example 300.00 + */ + balance?: string; + /** + * Format: decimal + * @description The account's credit limit. + * @example 100.00 + */ + credit_limit?: string; + /** + * Format: decimal + * @description Available amount to spend (balance + credit limit) + * @example 400.00 + */ + available_credit?: string; + /** + * Format: iso4217 + * @description The ISO 4217 currency identifier. + * @example USD + */ + currency?: string; + }; + /** ManagedAccount */ + ManagedAccountMultiListing: { + /** + * @description Identifies the type of the resource. + * @example managed_account + * @enum {string} + */ + record_type: 'managed_account'; + /** + * Format: UUID + * @description Uniquely identifies the managed account. + * @example f65ceda4-6522-4ad6-aede-98de83385123 + */ + id: string; + /** + * Format: email + * @description The managed account's email. + * @example user@example.com + */ + email: string; + /** + * @description The manager account's email, which serves as the V1 API user identifier + * @example managed_account@example.com + */ + api_user: string; + /** + * @description The organization the managed account is associated with. + * @example Example Company LLC + */ + organization_name?: string; + /** + * @description The ID of the manager account associated with the managed account. + * @example f65ceda4-6522-4ad6-aede-98de83385123 + */ + manager_account_id: string; + /** + * @description ISO 8601 formatted date indicating when the resource was created. + * @example 2018-02-02T22:25:27.521Z + */ + created_at: string; + /** + * @description ISO 8601 formatted date indicating when the resource was updated. + * @example 2018-02-02T22:25:27.521Z + */ + updated_at: string; + /** + * @description Boolean value that indicates if the managed account is able to have custom pricing set for it or not. If false, uses the pricing of the manager account. Defaults to false. There may be time lag between when the value is changed and pricing changes take effect. + * @example true + */ + managed_account_allow_custom_pricing?: boolean; + /** + * @description Boolean value that indicates if the billing information and charges to the managed account "roll up" to the manager account. If true, the managed account will not have its own balance and will use the shared balance with the manager account. This value cannot be changed after account creation without going through Telnyx support as changes require manual updates to the account ledger. Defaults to false. + * @example false + */ + rollup_billing?: boolean; + }; + /** + * Managed Accounts Global Outbound Channels + * @example { + * "allocatable_global_outbound_channels": 500, + * "record_type": "allocatable_global_outbound_channels", + * "total_global_channels_allocated": 135 + * } + */ + ManagedAccountsGlobalOutboundChannels: { + /** + * @description Boolean value that indicates if the managed account is able to have custom pricing set for it or not. If false, uses the pricing of the manager account. Defaults to false. This value may be changed, but there may be time lag between when the value is changed and pricing changes take effect. + * @example false + */ + managed_account_allow_custom_pricing?: boolean; + /** + * @description The total amount of allocatable global outbound channels available to the authenticated manager. Will be 0 if the feature is not enabled for their account. + * @example 500 + */ + allocatable_global_outbound_channels?: number; + /** + * @description The type of the data contained in this record. + * @example allocatable_global_outbound_channels + */ + record_type?: string; + /** + * @description The total number of allocatable global outbound channels currently allocated across all managed accounts for the authenticated user. This includes any amount of channels allocated by default at managed account creation time. Will be 0 if the feature is not enabled for their account. + * @example 135 + */ + total_global_channels_allocated?: number; + }; + MdrDeleteDetailReportResponse: { + data?: components['schemas']['MdrDetailReportResponse']; + }; + MdrDeleteUsageReportsResponse: { + data?: components['schemas']['MdrUsageReportResponse']; + }; + MdrDetailReportResponse: { + /** + * Format: uuid + * @description Identifies the resource + */ + id?: string; + /** + * Format: date-time + * @example 2020-07-01T00:00:00-06:00 + */ + start_date?: string; + /** + * Format: date-time + * @example 2020-07-01T00:00:00-06:00 + */ + end_date?: string; + directions?: ('INBOUND' | 'OUTBOUND')[]; + record_types?: ('INCOMPLETE' | 'COMPLETED' | 'ERRORS')[]; + connections?: number[]; + /** @example report_name_8hvb45Gu */ + report_name?: string; + /** @enum {string} */ + status?: 'PENDING' | 'COMPLETE' | 'FAILED' | 'EXPIRED'; + /** @example http://portal.telnyx.com/downloads/report_name_8hvb45Gu.csv */ + report_url?: string; + filters?: components['schemas']['Filter'][]; + /** + * Format: date-time + * @example 2020-07-01T00:00:00-06:00 + */ + created_at?: string; + /** + * Format: date-time + * @example 2020-07-01T00:00:00-06:00 + */ + updated_at?: string; + /** @example My profile */ + profiles?: string; + /** @example mdr_report */ + record_type?: string; + }; + MdrDetailResponse: { + /** + * Format: date-time + * @description Message sent time + * @example 2020-07-01T00:00:00-06:00 + */ + created_at?: string; + /** + * @description Configured profile name. New profiles can be created and configured on Telnyx portal + * @example configured-profile-name + */ + profile_name?: string; + /** + * @description Direction of message - inbound or outbound. + * @example outbound + */ + direction?: string; + /** + * @description Number of parts this message has. Max number of character is 160. If message contains more characters then that it will be broken down in multiple parts + * @example 2 + */ + parts?: number; + /** + * @description Message status + * @example DELIVERED + * @enum {string} + */ + status?: + | 'GW_TIMEOUT' + | 'DELIVERED' + | 'DLR_UNCONFIRMED' + | 'DLR_TIMEOUT' + | 'RECEIVED' + | 'GW_REJECT' + | 'FAILED'; + /** + * @description The destination number for a call, or the callee + * @example +1555123456 + */ + cld?: string; + /** + * @description The number associated with the person initiating the call, or the caller + * @example +1555123456 + */ + cli?: string; + /** + * @description Rate applied to the message + * @example 0.05 + */ + rate?: string; + /** + * @description Final cost. Cost is calculated as rate * parts + * @example 0.1 + */ + cost?: string; + /** + * @description Currency of the rate and cost + * @example USD + * @enum {string} + */ + currency?: 'AUD' | 'CAD' | 'EUR' | 'GBP' | 'USD'; + /** + * @description Id of message detail record + * @example 99b637f3-07fd-45ac-b9ca-b87208c24650 + */ + id?: string; + /** + * @description Type of message + * @example SMS + * @enum {string} + */ + message_type?: 'SMS' | 'MMS'; + /** @example mdr_report */ + record_type?: string; + }; + MdrGetDetailReportByIdResponse: { + data?: components['schemas']['MdrDetailReportResponse']; + }; + MdrGetDetailReportResponse: { + data?: components['schemas']['MdrDetailReportResponse'][]; + meta?: components['schemas']['PaginationMeta']; + }; + MdrGetDetailResponse: { + data?: components['schemas']['MdrDetailResponse'][]; + meta?: components['schemas']['PaginationMeta']; + }; + MdrGetSyncUsageReportResponse: { + data?: components['schemas']['MdrUsageReportResponse']; + }; + MdrGetUsageReportsByIdResponse: { + data?: components['schemas']['MdrUsageReportResponse']; + }; + MdrGetUsageReportsResponse: { + data?: components['schemas']['MdrUsageReportResponse'][]; + meta?: components['schemas']['PaginationMeta']; + }; + MdrPostDetailReportRequest: { + /** + * Format: date-time + * @example 2020-07-01T00:00:00-06:00 + */ + start_date: string; + /** + * Format: date-time + * @example 2020-07-01T00:00:00-06:00 + */ + end_date: string; + directions?: ('INBOUND' | 'OUTBOUND')[]; + record_types?: ('INCOMPLETE' | 'COMPLETED' | 'ERRORS')[]; + connections?: number[]; + report_name?: string; + /** @example true */ + include_message_body?: boolean; + filters?: components['schemas']['Filter'][]; + /** @example My profile */ + profiles?: string; + }; + MdrPostDetailReportResponse: { + data?: components['schemas']['MdrDetailReportResponse']; + }; + MdrPostUsageReportRequest: { + /** + * Format: date-time + * @example 2020-07-01T00:00:00-06:00 + */ + start_date: string; + /** + * Format: date-time + * @example 2020-07-01T00:00:00-06:00 + */ + end_date: string; + /** @enum {string} */ + aggregation_type: 'NO_AGGREGATION' | 'PROFILE' | 'TAGS'; + /** @example My profile */ + profiles?: string; + }; + MdrPostUsageReportsResponse: { + data?: components['schemas']['MdrUsageReportResponse']; + }; + MdrUsageRecord: { + /** @example 0 */ + cost?: string; + /** @example outbound */ + direction?: string; + /** @example outbound */ + product?: string; + /** @example all */ + connection?: string; + /** @example 0 */ + received?: string; + /** @example 0 */ + delivered?: string; + /** @example USD */ + currency?: string; + /** @example 0 */ + parts?: string; + /** @example 0 */ + sent?: string; + /** @example All */ + profile_id?: string; + /** @example All */ + tags?: string; + /** @example SMS */ + message_type?: string; + /** @example TF */ + tn_type?: string; + /** @example 0 */ + carrier_passthrough_fee?: string; + }; + MdrUsageReportResponse: { + /** + * Format: uuid + * @description Identifies the resource + */ + id?: string; + /** + * Format: date-time + * @example 2020-07-01T00:00:00-06:00 + */ + start_date?: string; + /** + * Format: date-time + * @example 2020-07-01T00:00:00-06:00 + */ + end_date?: string; + connections?: number[]; + /** @enum {string} */ + aggregation_type?: 'NO_AGGREGATION' | 'PROFILE' | 'TAGS'; + /** @enum {string} */ + status?: 'PENDING' | 'COMPLETE' | 'FAILED' | 'EXPIRED'; + /** @example http://portal.telnyx.com/downloads/report_name_8hvb45Gu.csv */ + report_url?: string; + result?: components['schemas']['MdrUsageRecord'][]; + /** + * Format: date-time + * @example 2020-07-01T00:00:00-06:00 + */ + created_at?: string; + /** + * Format: date-time + * @example 2020-07-01T00:00:00-06:00 + */ + updated_at?: string; + /** @example My profile */ + profiles?: string; + /** @example mdr_usage_report */ + record_type?: string; + }; + /** + * @description The media features settings for a phone number. + * @example { + * "rtp_auto_adjust_enabled": true, + * "accept_any_rtp_packets_enabled": true, + * "t38_fax_gateway_enabled": true + * } + */ + MediaFeatures: { + /** + * @description When RTP Auto-Adjust is enabled, the destination RTP address port will be automatically changed to match the source of the incoming RTP packets. + * @default true + */ + rtp_auto_adjust_enabled: boolean; + /** + * @description When enabled, Telnyx will accept RTP packets from any customer-side IP address and port, not just those to which Telnyx is sending RTP. + * @default false + */ + accept_any_rtp_packets_enabled: boolean; + /** + * @description Controls whether Telnyx will accept a T.38 re-INVITE for this phone number. Note that Telnyx will not send a T.38 re-INVITE; this option only controls whether one will be accepted. + * @default false + */ + t38_fax_gateway_enabled: boolean; + }; + /** + * @description The media_name used for the fax's media. Must point to a file previously uploaded to api.telnyx.com/v2/media by the same user/organization. media_name and media_url/contents can't be submitted together. + * @example my_media_uploaded_to_media_storage_api + */ + MediaName: string; + /** + * Media Resource + * @example { + * "media_name": "f5586561-8ff0-4291-a0ac-84fe544797bd", + * "expires_at": "2020-01-23T18:10:02.574Z", + * "created_at": "2019-01-23T18:10:02.574Z", + * "updated_at": "2019-01-23T18:10:02.574Z", + * "content_type": "application/xml" + * } + */ + MediaResource: { + /** @description Uniquely identifies a media resource. */ + media_name?: string; + /** + * @description ISO 8601 formatted date of when the media resource will expire and be deleted. + * @example 2020-01-23T18:10:02.574Z + */ + expires_at?: string; + /** + * @description ISO 8601 formatted date of when the media resource was created + * @example 2019-01-23T18:10:02.574Z + */ + created_at?: string; + /** + * @description ISO 8601 formatted date of when the media resource was last updated + * @example 2019-01-23T18:10:02.574Z + */ + updated_at?: string; + /** + * @description Content type of the file + * @example application/xml + */ + content_type?: string; + }; + MediaStorageDetailRecord: { + /** + * @description Unique identifier for the Media Storage Event + * @example 3ca7bd3d-7d82-4e07-9df4-009123068320 + */ + id?: string; + /** + * Format: date-time + * @description Event creation time + * @example 2020-07-01T00:00:00Z + */ + created_at?: string; + /** + * @description Asset id + * @example a46f4764-4ce4-4391-804c-02f00bc4ff9b + */ + asset_id?: string; + /** + * @description User id + * @example 3ca7bd3d-7d82-4e07-9df4-009123068320 + */ + user_id?: string; + /** + * @description Organization owner id + * @example 3ca7bd3d-7d82-4e07-9df4-009123068320 + */ + org_id?: string; + /** + * @description Type of action performed against the Media Storage API + * @example upload + */ + action_type?: string; + /** + * @description Link channel type + * @example message + */ + link_channel_type?: string; + /** + * @description Link channel id + * @example 2065f482-64b9-4680-a3a9-c6d3142efdf7 + */ + link_channel_id?: string; + /** + * @description Request status + * @example failed + */ + status?: string; + /** + * @description Webhook id + * @example b46f4764-4ce4-4391-804c-02f00bc4ff9b + */ + webhook_id?: string; + /** + * @description Currency amount per billing unit used to calculate the Telnyx billing cost + * @example 0.0001 + */ + rate?: string; + /** + * @description Billing unit used to calculate the Telnyx billing cost + * @example events + */ + rate_measured_in?: string; + /** + * @description Currency amount for Telnyx billing cost + * @example 0.004 + */ + cost?: string; + /** + * @description Telnyx account currency used to describe monetary values, including billing cost + * @example USD + */ + currency?: string; + /** + * @description discriminator enum property added by openapi-typescript + * @enum {string} + */ + record_type: 'MediaStorageDetailRecord'; + }; + /** + * @description The URL (or list of URLs) to the PDF used for the fax's media. media_url and media_name/contents can't be submitted together. + * @example https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf + */ + MediaUrl: string; + MessageDetailRecord: { + /** + * @description Unique identifier of the message + * @example 3ca7bd3d-7d82-4e07-9df4-009123068320 + */ + uuid?: string; + /** + * @description Identifier of the Telnyx account who owns the message + * @example 3ca7bd3d-7d82-4e07-9df4-009123068320 + */ + user_id?: string; + /** + * Format: date-time + * @description Message completion time + * @example 2020-07-01T00:00:00Z + */ + completed_at?: string; + /** + * Format: date-time + * @description Message creation time + * @example 2020-07-01T00:00:00Z + */ + created_at?: string; + /** + * Format: date-time + * @description Message updated time + * @example 2020-07-01T00:00:00Z + */ + updated_at?: string; + /** + * Format: date-time + * @description Time when the message was sent + * @example 2020-07-01T00:00:00Z + */ + sent_at?: string; + /** + * @description Country-specific carrier used to send or receive the message + * @example T-Mobile USA + */ + carrier?: string; + /** + * @description Fee charged by certain carriers in order to deliver certain message types. Telnyx passes this fee on to the customer according to our pricing table + * @example 0.003 + */ + carrier_fee?: string; + /** + * @description The recipient of the message (to parameter in the Messaging API) + * @example +1555123456 + */ + cld?: string; + /** + * @description The sender of the message (from parameter in the Messaging API). For Alphanumeric ID messages, this is the sender ID value + * @example +1555123456 + */ + cli?: string; + /** + * @description Two-letter representation of the country of the cld property using the ISO 3166-1 alpha-2 format + * @example US + */ + country_code?: string; + /** + * @description Final webhook delivery status + * @example success: webhook succeeded + */ + delivery_status?: string; + /** + * @description Failover customer-provided URL which Telnyx posts delivery status webhooks to + * @example https://api.example.com/sms/telnyx/inbound + */ + delivery_status_failover_url?: string; + /** + * @description Primary customer-provided URL which Telnyx posts delivery status webhooks to + * @example https://api.example.com/sms/telnyx/inbound + */ + delivery_status_webhook_url?: string; + /** + * @description Logical direction of the message from the Telnyx customer's perspective. It's inbound when the Telnyx customer receives the message, or outbound otherwise + * @example outbound + * @enum {string} + */ + direction?: 'inbound' | 'outbound'; + /** + * @description Indicates whether this is a Free-To-End-User (FTEU) short code message + * @example false + */ + fteu?: boolean; + /** + * @description Mobile country code. Only available for certain products, such as Global Outbound-Only from Alphanumeric Sender ID + * @example 204 + */ + mcc?: string; + /** + * @description Mobile network code. Only available for certain products, such as Global Outbound-Only from Alphanumeric Sender ID + * @example 01 + */ + mnc?: string; + /** + * @description Describes the Messaging service used to send the message. Available services are: Short Message Service (SMS), Multimedia Messaging Service (MMS), and Rich Communication Services (RCS) + * @example SMS + * @enum {string} + */ + message_type?: 'SMS' | 'MMS' | 'RCS'; + /** + * @description Indicates whether both sender and recipient numbers are Telnyx-managed + * @example true + */ + on_net?: boolean; + /** + * @description Unique identifier of the Messaging Profile used to send or receive the message + * @example 30ef55db-c4a2-4c4a-9804-a68077973d07 + */ + profile_id?: string; + /** + * @description Name of the Messaging Profile used to send or receive the message + * @example My Messaging Profile + */ + profile_name?: string; + /** + * @description Two-letter representation of the country of the cli property using the ISO 3166-1 alpha-2 format + * @example US + */ + source_country_code?: string; + /** + * @description Final status of the message after the delivery attempt + * @example delivered + * @enum {string} + */ + status?: + | 'gw_timeout' + | 'delivered' + | 'dlr_unconfirmed' + | 'dlr_timeout' + | 'received' + | 'gw_reject' + | 'failed'; + /** + * @description Comma-separated tags assigned to the Telnyx number associated with the message + * @example tag1,tag2,tag3 + */ + tags?: string; + /** + * @description Currency amount per billing unit used to calculate the Telnyx billing cost + * @example 0.003 + */ + rate?: string; + /** + * @description Telnyx account currency used to describe monetary values, including billing cost + * @example USD + */ + currency?: string; + /** + * @description Amount, in the user currency, for the Telnyx billing cost + * @example 0.003 + */ + cost?: string; + /** @description Telnyx API error codes returned by the Telnyx gateway */ + errors?: string[]; + /** + * @description Number of message parts. The message is broken down in multiple parts when its length surpasses the limit of 160 characters + * @example 2 + */ + parts?: number; + /** + * @description Identifies the record schema (enum property replaced by openapi-typescript) + * @enum {string} + */ + record_type: 'MessageDetailRecord'; + }; + /** + * @description The set of features available for a specific messaging use case (SMS or MMS). Features + * can vary depending on the characteristics the phone number, as well as its current + * product configuration. + * + * @example { + * "domestic_two_way": true, + * "international_inbound": false, + * "international_outbound": true + * } + */ + MessagingFeatureSet: { + /** @description Send messages to and receive messages from numbers in the same country. */ + domestic_two_way: boolean; + /** @description Receive messages from numbers in other countries. */ + international_inbound: boolean; + /** @description Send messages to numbers in other countries. */ + international_outbound: boolean; + } | null; + /** @example { + * "id": "86f58db9-0fe3-4adc-9d1f-46e66e6e9323", + * "record_type": "messaging_hosted_number_order", + * "messaging_profile_id": "dc8f39ac-953d-4520-b93b-786ae87db0da", + * "status": "pending", + * "phone_numbers": [ + * { + * "record_type": "messaging_hosted_number", + * "id": "bf6307bd-884d-4c1f-b6ea-c62b8c495d3c", + * "phone_number": "+18665550001", + * "status": "pending" + * }, + * { + * "record_type": "messaging_hosted_number", + * "id": "464bd54e-a328-4b11-a131-28e6793cb6f2", + * "phone_number": "+18665550002", + * "status": "pending" + * } + * ] + * } */ + MessagingHostedNumberOrder: { + /** + * @description Identifies the type of the resource. + * @example messaging_hosted_number_order + */ + readonly record_type?: string; + /** + * Format: uuid + * @description Resource unique identifier. + */ + readonly id?: string; + /** @description Automatically associate the number with this messaging profile ID when the order is complete. */ + messaging_profile_id?: string | null; + /** @enum {string} */ + status?: 'failed' | 'pending' | 'successful'; + phone_numbers?: components['schemas']['HostedNumber'][]; + }; + /** @example { + * "record_type": "messaging_profile", + * "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + * "name": "Profile for Messages", + * "webhook_url": "https://www.example.com/hooks", + * "webhook_failover_url": "https://backup.example.com/hooks", + * "enabled": true, + * "webhook_api_version": "2", + * "whitelisted_destinations": [ + * "US" + * ], + * "created_at": "2019-01-23T18:10:02.574Z", + * "updated_at": "2019-01-23T18:10:02.574Z", + * "number_pool_settings": { + * "toll_free_weight": 10, + * "long_code_weight": 2, + * "skip_unhealthy": false, + * "sticky_sender": true, + * "geomatch": false + * }, + * "url_shortener_settings": { + * "domain": "example.ex", + * "prefix": "cmpny", + * "replace_blacklist_only": true, + * "send_webhooks": false + * }, + * "v1_secret": "rP1VamejkU2v0qIUxntqLW2c" + * } */ + MessagingProfile: { + /** + * @description Identifies the type of the resource. + * @enum {string} + */ + readonly record_type?: 'messaging_profile'; + /** + * Format: uuid + * @description Identifies the type of resource. + */ + readonly id?: string; + /** @description A user friendly name for the messaging profile. */ + name?: string; + /** @description Specifies whether the messaging profile is enabled or not. */ + enabled?: boolean; + /** + * Format: url + * @description The URL where webhooks related to this messaging profile will be sent. + */ + webhook_url?: string | null; + /** + * Format: url + * @description The failover URL where webhooks related to this messaging profile will be sent if sending to the primary URL fails. + */ + webhook_failover_url?: string | null; + /** + * @description Determines which webhook format will be used, Telnyx API v1, v2, or a legacy 2010-04-01 format. + * @enum {string} + */ + webhook_api_version?: '1' | '2' | '2010-04-01'; + /** @description Destinations to which the messaging profile is allowed to send. The elements in the list must be valid ISO 3166-1 alpha-2 country codes. If set to `["*"]`, all destinations will be allowed. */ + whitelisted_destinations?: string[]; + /** + * Format: date-time + * @description ISO 8601 formatted date indicating when the resource was created. + */ + readonly created_at?: string; + /** + * Format: date-time + * @description ISO 8601 formatted date indicating when the resource was updated. + */ + readonly updated_at?: string; + /** @description Secret used to authenticate with v1 endpoints. */ + v1_secret?: string; + number_pool_settings?: components['schemas']['NumberPoolSettings']; + url_shortener_settings?: components['schemas']['UrlShortenerSettings']; + /** @description The alphanumeric sender ID to use when sending to destinations that require an alphanumeric sender ID. */ + alpha_sender?: string | null; + }; + MessagingProfileDetailedMetric: { + /** + * @description The timestamp of the aggregated data. + * @example 2019-01-23T18:10:02.574Z + */ + readonly timestamp?: string; + metrics?: components['schemas']['MessagingProfileMessageTypeMetrics'][]; + }; + /** @example { + * "detailed": [ + * { + * "metrics": [ + * { + * "label": "longcode", + * "sent": 1000, + * "delivered": 990, + * "errors": 0.01, + * "received": 750 + * } + * ], + * "timestamp": "2019-01-23T18:10:02.574Z" + * } + * ], + * "overview": { + * "record_type": "messaging_profile_metrics", + * "messaging_profile_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + * "phone_numbers": 250, + * "outbound": { + * "sent": 1000, + * "delivered": 990, + * "errors": 0.01 + * }, + * "inbound": { + * "received": 850 + * } + * } + * } */ + MessagingProfileDetailedMetrics: { + overview?: components['schemas']['MessagingProfileHighLevelMetrics']; + detailed?: components['schemas']['MessagingProfileDetailedMetric'][]; + }; + /** @example { + * "record_type": "messaging_profile_metrics", + * "messaging_profile_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + * "phone_numbers": 250, + * "outbound": { + * "sent": 1000, + * "delivered": 990, + * "errors": 0.01 + * }, + * "inbound": { + * "received": 850 + * } + * } */ + MessagingProfileHighLevelMetrics: { + /** + * @description Identifies the type of the resource. + * @example messaging_profile_metrics + * @enum {string} + */ + readonly record_type?: 'messaging_profile_metrics'; + /** + * Format: uuid + * @description Identifies the type of resource. + */ + readonly messaging_profile_id?: string; + /** @description The number of phone numbers associated with the messaging profile. */ + readonly phone_numbers?: number; + outbound?: { + /** @description The number of outbound messages sent. */ + readonly sent?: number; + /** @description The number of outbound messages successfully delivered. */ + readonly delivered?: number; + /** @description The ratio of messages sent that resulted in errors. */ + readonly error_ratio?: number; + }; + inbound?: { + /** @description The number of inbound messages received. */ + readonly received?: number; + }; + }; + /** @example { + * "label": "longcode", + * "sent": 1000, + * "delivered": 990, + * "errors": 0.01, + * "received": 750 + * } */ + MessagingProfileMessageTypeMetrics: { + /** @description The metric type. */ + readonly label?: string; + /** @description The number of outbound messages sent. */ + readonly sent?: number; + /** @description The number of outbound messages successfully delivered. */ + readonly delivered?: number; + /** @description The ratio of outbound messages sent that resulted in errors. */ + readonly outbound_error_ratio?: number; + /** @description The number of inbound messages received. */ + readonly received?: number; + }; + /** @example { + * "record_type": "messaging_url_domain", + * "id": "464bd54e-a328-4b11-a131-28e6793cb6f2", + * "url_domain": "http://example.com", + * "use_case": "test" + * } */ + MessagingUrlDomain: { + record_type?: string; + id?: string; + url_domain?: string; + use_case?: string; + }; + Meta: { + /** @example 3 */ + total_pages?: number; + /** @example 55 */ + total_results?: number; + /** @example 2 */ + page_number?: number; + /** @example 25 */ + page_size?: number; + }; + MetaResponse: { + /** + * @description This should likely be a URL to the relevant documentation + * @example https://developers.telnyx.com/docs/overview/errors/10001 + */ + url?: string; + }; + /** Metadata */ + Metadata: { + /** + * Format: double + * @description Total number of pages based on pagination settings + * @example 13 + */ + total_pages?: number; + /** + * Format: double + * @description Total number of results + * @example 13 + */ + total_results?: number; + /** + * Format: double + * @description Current Page based on pagination settings (included when defaults are used.) + * @example 3 + */ + page_number?: number; + /** + * Format: double + * @description Number of results to return per page based on pagination settings (included when defaults are used.) + * @example 1 + */ + page_size?: number; + }; + MigrationParams: { + /** @description Unique identifier for the data migration. */ + readonly id?: string; + /** @description ID of the Migration Source from which to migrate data. */ + source_id: string; + /** @description Bucket name to migrate the data into. Will default to the same name as the `source_bucket_name`. */ + target_bucket_name: string; + /** @description Telnyx Cloud Storage region to migrate the data to. */ + target_region: string; + /** @description If true, will continue to poll the source bucket to ensure new data is continually migrated over. */ + refresh?: boolean; + /** + * Format: date-time + * @description Time when data migration was last copied from the source. + * @example 2020-01-01T00:00:00Z + */ + readonly last_copy?: string; + /** + * @description Status of the migration. + * @enum {string} + */ + readonly status?: + | 'pending' + | 'checking' + | 'migrating' + | 'complete' + | 'error' + | 'stopped'; + /** @description Total amount of data found in source bucket to migrate. */ + readonly bytes_to_migrate?: number; + /** @description Total amount of data that has been succesfully migrated. */ + readonly bytes_migrated?: number; + /** @description Current speed of the migration. */ + readonly speed?: number; + /** + * Format: date-time + * @description Estimated time the migration will complete. + * @example 2020-01-01T00:00:00Z + */ + readonly eta?: string; + /** + * Format: date-time + * @description Time when data migration was created + * @example 2020-01-01T00:00:00Z + */ + readonly created_at?: string; + }; + MigrationSourceCoverageParams: { + /** + * @description Cloud provider from which to migrate data. + * @enum {string} + */ + provider?: 'aws'; + /** @description Provider region from which to migrate data. */ + source_region?: string; + }; + MigrationSourceParams: { + /** @description Unique identifier for the data migration source. */ + readonly id?: string; + /** + * @description Cloud provider from which to migrate data. + * @enum {string} + */ + provider: 'aws'; + provider_auth: { + /** @description AWS Access Key. */ + access_key?: string; + /** @description AWS Secret Access Key. */ + secret_access_key?: string; + }; + /** @description Bucket name to migrate the data from. */ + bucket_name: string; + }; + /** Mno */ + Mno: { + /** + * Networkid + * @description Unique network identifier assigned to MNO. + */ + networkId: number; + /** + * Displayname + * @description Display name of the mobile network operator. + */ + displayName: string; + /** + * Osrbitmaskindex + * @description NetNumber OSR 'campaign_id' property's 'status' attribute holds individual MNO campaign operation status. The 'status' attribute leverages bitmasking technique to store multiple MNOs' operating status. The campaign operation status is reduced to '1' or '0' value where '1' indicate an 'ACTIVE' status and '0' represents every other non-active statuses, including REVIEW, REJECT and SUSPEND. The 'osrBitmaskIndex' holds the bitmask index of the MNO. For example, T-Mobile's bitmask index is 2, which implies T-Mobile's campaign operation status is stored in bit #2, or 3rd bit when counting from right. + */ + osrBitmaskIndex: number; + }; + /** MnoMetadata */ + MnoMetadata: { + 10999?: components['schemas']['MnoMetadataItem']; + }; + /** MnoMetadataItem */ + MnoMetadataItem: { + qualify: boolean; + mno: string; + noEmbeddedLink: boolean; + reqSubscriberHelp: boolean; + reqSubscriberOptout: boolean; + mnoReview: boolean; + noEmbeddedPhone: boolean; + mnoSupport: boolean; + reqSubscriberOptin: boolean; + /** @example 1 */ + minMsgSamples: number; + }; + /** MobileNetworkOperator */ + MobileNetworkOperator: { + /** + * Format: uuid + * @description Identifies the resource. + * @example 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + */ + readonly id?: string; + /** + * @description Identifies the type of the resource. + * @example mobile_network_operator + */ + readonly record_type?: string; + /** + * @description The network operator name. + * @example AT&T Mobility (USACG) + */ + name?: string; + /** + * @description TADIG stands for Transferred Account Data Interchange Group. The TADIG code is a unique identifier for network operators in GSM mobile networks. + * @example USACG + */ + tadig?: string; + /** + * @description The mobile operator two-character (ISO 3166-1 alpha-2) origin country code. + * @example US + */ + country_code?: string; + /** + * @description MCC stands for Mobile Country Code. It's a three decimal digit that identifies a country.

+ * This code is commonly seen joined with a Mobile Network Code (MNC) in a tuple that allows identifying a carrier known as PLMN (Public Land Mobile Network) code. + * @example 310 + */ + mcc?: string; + /** + * @description MNC stands for Mobile Network Code. It's a two to three decimal digits that identify a network.

+ * This code is commonly seen joined with a Mobile Country Code (MCC) in a tuple that allows identifying a carrier known as PLMN (Public Land Mobile Network) code. + * @example 410 + */ + mnc?: string; + /** + * @description Indicate whether the mobile network operator can be set as preferred in the Network Preferences API. + * @example true + */ + readonly network_preferences_enabled?: boolean; + }; + MobileNetworkOperatorPreferencesRequest: { + /** + * Format: uuid + * @description The mobile network operator resource identification UUID. + * @example 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + */ + mobile_network_operator_id?: string; + /** + * @description It determines what is the priority of a specific network operator that should be assumed by a SIM card when connecting to a network. The highest priority is 0, the second highest is 1 and so on. + * @example 0 + */ + priority?: number; + }; + MobileNetworkOperatorPreferencesResponse: { + /** + * Format: uuid + * @description The mobile network operator resource identification UUID. + * @example 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + */ + mobile_network_operator_id?: string; + /** + * @description The mobile network operator resource name. + * @example AT&T Mobility (USACG) + */ + mobile_network_operator_name?: string; + /** + * @description It determines what is the priority of a specific network operator that should be assumed by a SIM card when connecting to a network. The highest priority is 0, the second highest is 1 and so on. + * @example 0 + */ + priority?: number; + }; + /** @description A list of mobile network operators and the priority that should be applied when the SIM is connecting to the network. */ + MobileNetworkOperatorsPreferencesRequest: components['schemas']['MobileNetworkOperatorPreferencesRequest'][]; + /** @description A list of mobile network operators and the priority that should be applied when the SIM is connecting to the network. */ + MobileNetworkOperatorsPreferencesResponse: components['schemas']['MobileNetworkOperatorPreferencesResponse'][]; + /** ModelMetadata */ + ModelMetadata: { + /** Id */ + id: string; + /** + * Object + * @default model + */ + object: string; + /** Created */ + created: number; + /** Owned By */ + owned_by: string; + }; + /** + * ModelNamespace + * @description Provide a namespace to our supported models. + * @enum {string} + */ + ModelNamespace: + | 'meta-llama/Llama-2-13b-chat-hf' + | 'mistralai/Mistral-7B-Instruct-v0.1' + | 'Trelis/Llama-2-7b-chat-hf-function-calling-v2' + | 'openai/gpt-3.5-turbo' + | 'openai/gpt-3.5-turbo-16k' + | 'openai/gpt-4' + | 'openai/gpt-4-32k'; + /** ModelsResponse */ + ModelsResponse: { + /** + * Object + * @default list + */ + object: string; + /** Data */ + data: components['schemas']['ModelMetadata'][]; + }; + /** + * @description The flag to enable monochrome, true black and white fax results. + * @default false + */ + Monochrome: boolean; + Network: components['schemas']['Record'] & { + /** + * @description Identifies the type of the resource. + * @example network + */ + readonly record_type?: string; + /** + * @description A user specified name for the network. + * @example test network + */ + name?: string; + }; + /** NetworkCoverage */ + NetworkCoverage: { + /** + * @description Identifies the type of the resource. + * @example network_coverage + */ + readonly record_type?: string; + location?: components['schemas']['Location']; + /** @description List of interface types supported in this region. */ + available_services?: components['schemas']['AvailableService'][]; + }; + NetworkCreate: components['schemas']['Network'] & Record; + NetworkInterface: components['schemas']['Record'] & + components['schemas']['Interface'] & + components['schemas']['RegionOut'] & { + /** + * @description Identifies the type of the resource. + * @example network_interface + */ + readonly record_type?: string; + /** + * @description Identifies the type of the interface. + * @example wireguard_interface + */ + readonly type?: string; + }; + /** @example { + * "name": "string" + * } */ + NewBillingGroup: { + /** @description A name for the billing group */ + name?: string; + }; + /** @example { + * "year": 2019, + * "month": 10 + * } */ + NewLedgerBillingGroupReport: { + /** + * @description Year of the ledger billing group report + * @example 2019 + */ + year?: number; + /** + * @description Month of the ledger billing group report + * @example 10 + */ + month?: number; + }; + /** + * New participant resource + * @example { + * "account_sid": "4e71926f-8f13-450e-b91c-23c2ef786aa6", + * "call_sid": "v3:9X2vxPDFY2RHSJ1EdMS0RHRksMTg7ldNxdjWbVr9zBjbGjGsSe-aiQ", + * "coaching": false, + * "coaching_call_sid": null, + * "conference_sid": "cd5a70f4-759b-4d5e-9c06-88c00f16f3c1", + * "end_conference_on_exit": false, + * "hold": false, + * "muted": false, + * "status": "completed", + * "uri": "/v2/texml/Accounts/4e71926f-8f13-450e-b91c-23c2ef786aa6/Conferences/cd5a70f4-759b-4d5e-9c06-88c00f16f3c1/Participants/v3:9X2vxPDFY2RHSJ1EdMS0RHRksMTg7ldNxdjWbVr9zBjbGjGsSe-aiQ.json" + * } + */ + NewParticipantResource: { + /** + * @description The id of the account the resource belongs to. + * @example 61bf923e-5e4d-4595-a110-56190ea18a1b + */ + account_sid?: string; + /** + * @description The identifier of this participant's call. + * @example v3:9X2vxPDFY2RHSJ1EdMS0RHRksMTg7ldNxdjWbVr9zBjbGjGsSe-aiQ + */ + call_sid?: string; + /** + * @description Whether the participant is coaching another call. + * @example false + */ + coaching?: boolean; + /** + * @description The identifier of the coached participant's call. + * @example v3:9X2vxPDFY2RHSJ1EdMS0RHRksMTg7ldNxdjWbVr9zBjbGjGsSe-aiQ + */ + coaching_call_sid?: string; + /** + * @description Whether the conference ends when the participant leaves. + * @example false + */ + end_conference_on_exit?: boolean; + /** + * @description Whether the participant is on hold. + * @example false + */ + hold?: boolean; + /** + * @description Whether the participant is muted. + * @example false + */ + muted?: boolean; + /** + * @description The status of the participant's call in the conference. + * @example in-progress + * @enum {string} + */ + status?: 'connecting' | 'connected' | 'completed'; + /** + * @description The relative URI for this participant. + * @example /v2/texml/Accounts/4e71926f-8f13-450e-b91c-23c2ef786aa6/Conferences/cd5a70f4-759b-4d5e-9c06-88c00f16f3c1/Participants/v3:9X2vxPDFY2RHSJ1EdMS0RHRksMTg7ldNxdjWbVr9zBjbGjGsSe-aiQ.json + */ + uri?: string; + }; + /** + * Noise Suppression Direction + * @description The direction of the audio stream to be noise suppressed. + * @default inbound + * @example outbound + * @enum {string} + */ + NoiseSuppressionDirection: 'inbound' | 'outbound' | 'both'; + /** + * Noise Suppression Start Request + * @example { + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + * "command_id": "891510ac-f3e4-11e8-af5b-de00688a4901", + * "direction": "both" + * } + */ + NoiseSuppressionStart: { + /** + * @description Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + /** + * @description Use this field to avoid duplicate commands. Telnyx will ignore any command with the same `command_id` for the same `call_control_id`. + * @example 891510ac-f3e4-11e8-af5b-de00688a4901 + */ + command_id?: string; + direction?: components['schemas']['NoiseSuppressionDirection']; + }; + /** + * Noise Suppression Stop Request + * @example { + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + * "command_id": "891510ac-f3e4-11e8-af5b-de00688a4901" + * } + */ + NoiseSuppressionStop: { + /** + * @description Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + /** + * @description Use this field to avoid duplicate commands. Telnyx will ignore any command with the same `command_id` for the same `call_control_id`. + * @example 891510ac-f3e4-11e8-af5b-de00688a4901 + */ + command_id?: string; + }; + /** NotFoundError */ + NotFoundError: { + /** Telnyx error code */ + code?: string; + /** Error details */ + detail: string; + /** Error title */ + title?: string; + }; + /** @description A Notification Channel */ + NotificationChannel: { + /** + * @description A UUID. + * @example 12455643-3cf1-4683-ad23-1cd32f7d5e0a + */ + readonly id?: string; + /** + * @description A UUID reference to the associated Notification Profile. + * @example 12455643-3cf1-4683-ad23-1cd32f7d5e0a + */ + notification_profile_id?: string; + /** + * @description A Channel Type ID + * @enum {string} + */ + channel_type_id?: 'sms' | 'voice' | 'email' | 'webhook'; + /** + * @description The destination associated with the channel type. + * @example +13125550000 + */ + channel_destination?: string; + /** + * Format: date-time + * @description ISO 8601 formatted date indicating when the resource was created. + * @example 2019-10-15T10:07:15.527Z + */ + readonly created_at?: string; + /** + * Format: date-time + * @description ISO 8601 formatted date indicating when the resource was updated. + * @example 2019-10-15T10:07:15.527Z + */ + readonly updated_at?: string; + }; + /** @description An object representing the available notifications. */ + NotificationEvent: { + /** + * @description A UUID. + * @example d5c395cd-9864-4609-b5e2-3f9fd4ce201a + */ + readonly id?: string; + /** + * @description A human readable name. + * @example Emergency Number Dialed + */ + name?: string; + /** @example Calls */ + notification_category?: string; + /** @example true */ + enabled?: boolean; + /** + * Format: date-time + * @description ISO 8601 formatted date indicating when the resource was created. + * @example 2019-10-15T10:07:15.527Z + */ + created_at?: string; + /** + * Format: date-time + * @description ISO 8601 formatted date indicating when the resource was updated. + * @example 2019-10-15T10:07:15.527Z + */ + updated_at?: string; + }; + NotificationEventCondition: { + /** + * @description A UUID. + * @example 70c7c5cb-dce2-4124-accb-870d39dbe852 + */ + readonly id?: string; + /** @example from phone number */ + name?: string; + /** @example When emergency number dialed from phone number X */ + description?: string; + /** @example d5c395cd-9864-4609-b5e2-3f9fd4ce201a */ + notification_event_id?: string; + /** + * @example phone_number + * @enum {string} + */ + associated_record_type?: 'account' | 'phone_number'; + parameters?: { + /** @example phone_number */ + name?: string; + /** @example false */ + optional?: boolean; + /** @example string */ + data_type?: string; + }[]; + /** @example true */ + enabled?: boolean; + /** + * @description Dictates whether a notification channel id needs to be provided when creating a notficiation setting. + * @example false + */ + allow_multiple_channels?: boolean; + /** + * @description Dictates whether a notification setting will take effect immediately. + * @example true + */ + asynchronous?: boolean; + /** + * @description Dictates the supported notification channel types that can be emitted. + * @example [ + * "webhook", + * "sms", + * "email", + * "voice" + * ] + */ + supported_channels?: string[]; + /** + * Format: date-time + * @description ISO 8601 formatted date indicating when the resource was created. + * @example 2019-10-15T10:07:15.527Z + */ + created_at?: string; + /** + * Format: date-time + * @description ISO 8601 formatted date indicating when the resource was updated. + * @example 2019-10-15T10:07:15.527Z + */ + updated_at?: string; + }; + /** @description A Collection of Notification Channels */ + NotificationProfile: { + /** + * @description A UUID. + * @example 12455643-3cf1-4683-ad23-1cd32f7d5e0a + */ + readonly id?: string; + /** @description A human readable name. */ + name?: string; + /** + * Format: date-time + * @description ISO 8601 formatted date indicating when the resource was created. + * @example 2019-10-15T10:07:15.527Z + */ + readonly created_at?: string; + /** + * Format: date-time + * @description ISO 8601 formatted date indicating when the resource was updated. + * @example 2019-10-15T10:07:15.527Z + */ + readonly updated_at?: string; + }; + NotificationSetting: { + /** + * @description A UUID. + * @example 8eb5b5f9-5893-423c-9f15-b487713d44d4 + */ + readonly id?: string; + /** + * @description A UUID reference to the associated Notification Event Condition. + * @example 70c7c5cb-dce2-4124-accb-870d39dbe852 + */ + notification_event_condition_id?: string; + /** + * @description A UUID reference to the associated Notification Profile. + * @example 12455643-3cf1-4683-ad23-1cd32f7d5e0a + */ + notification_profile_id?: string; + /** @example phone_number */ + readonly associated_record_type?: string; + /** @example +13125550000 */ + readonly associated_record_type_value?: string; + /** + * @description Most preferences apply immediately; however, other may needs to propagate. + * @example enable-received + * @enum {string} + */ + readonly status?: + | 'enabled' + | 'enable-received' + | 'enable-pending' + | 'enable-submtited' + | 'delete-received' + | 'delete-pending' + | 'delete-submitted' + | 'deleted'; + /** + * @description A UUID reference to the associated Notification Channel. + * @example 12455643-3cf1-4683-ad23-1cd32f7d5e0a + */ + notification_channel_id?: string; + parameters?: { + /** @example phone_number */ + name?: string; + /** @example +13125550000 */ + value?: string; + }[]; + /** + * Format: date-time + * @description ISO 8601 formatted date indicating when the resource was created. + * @example 2019-10-15T10:07:15.527Z + */ + readonly created_at?: string; + /** + * Format: date-time + * @description ISO 8601 formatted date indicating when the resource was updated. + * @example 2019-10-15T10:07:15.527Z + */ + readonly updated_at?: string; + }; + /** @example { + * "id": "12ade33a-21c0-473b-b055-b3c836e1c292", + * "starting_number": "+19705555000", + * "range": 10, + * "record_type": "number_block_order", + * "connection_id": "346789098765567", + * "messaging_profile_id": "abc85f64-5717-4562-b3fc-2c9600", + * "phone_numbers_count": 10, + * "status": "pending", + * "customer_reference": "MY REF 001", + * "created_at": "2018-01-01T00:00:00.000000Z", + * "updated_at": "2018-01-01T00:00:00.000000Z", + * "requirements_met": true + * } */ + NumberBlockOrder: { + /** + * Format: uuid + * @example 12ade33a-21c0-473b-b055-b3c836e1c292 + */ + readonly id?: string; + /** @example number_block_order */ + readonly record_type?: string; + /** + * Format: e164_phone_number + * @description Starting phone number block + * @example +19705555000 + */ + starting_number?: string; + /** + * @description The phone number range included in the block. + * @example 10 + */ + range?: number; + /** + * @description The count of phone numbers in the number order. + * @example 1 + */ + readonly phone_numbers_count?: number; + /** + * @description Identifies the connection associated to all numbers in the phone number block. + * @example 346789098765567 + */ + connection_id?: string; + /** + * @description Identifies the messaging profile associated to all numbers in the phone number block. + * @example abc85f64-5717-4562-b3fc-2c9600 + */ + messaging_profile_id?: string; + /** + * @description The status of the order. + * @example success + * @enum {string} + */ + readonly status?: 'pending' | 'success' | 'failure'; + /** + * @description A customer reference string for customer look ups. + * @example MY REF 001 + */ + customer_reference?: string; + /** + * Format: datetime + * @description An ISO 8901 datetime string denoting when the number order was created. + * @example 2018-01-01T00:00:00.000000Z + */ + readonly created_at?: string; + /** + * Format: datetime + * @description An ISO 8901 datetime string for when the number order was updated. + * @example 2018-01-01T00:00:00.000000Z + */ + readonly updated_at?: string; + /** + * @description True if all requirements are met for every phone number, false otherwise. + * @example true + */ + readonly requirements_met?: boolean; + }; + /** + * @description High level health metrics about the number and it's messaging sending patterns. + * + * @example { + * "message_count": 10, + * "inbound_outbound_ratio": 1, + * "success_ratio": 2, + * "spam_ratio": 10 + * } + */ + NumberHealthMetrics: { + /** @description The number of messages analyzed for the health metrics. */ + message_count: number; + /** + * Format: float + * @description The ratio of messages received to the number of messages sent. + */ + inbound_outbound_ratio: number; + /** + * Format: float + * @description The ratio of messages sucessfully delivered to the number of messages attempted. + */ + success_ratio: number; + /** + * Format: float + * @description The ratio of messages blocked for spam to the number of messages attempted. + */ + spam_ratio: number; + }; + /** NumberLookup */ + NumberLookupRecord: { + /** + * @description Identifies the type of record + * @example number_lookup + */ + record_type?: string; + /** + * @description Region code that matches the specific country calling code + * @example US + */ + country_code?: string; + /** + * @description Hyphen-separated national number, preceded by the national destination code (NDC), with a 0 prefix, if an NDC is found + * @example (0312) 945-7420 + */ + national_format?: string; + /** + * @description E164-formatted phone number + * @example +13129457420 + */ + phone_number?: string; + /** + * @description Unused + * @example null + */ + fraud?: string; + carrier?: components['schemas']['Carrier']; + caller_name?: components['schemas']['CallerName']; + portability?: components['schemas']['Portability']; + }; + /** Number Order With Phone Numbers */ + NumberOrder: { + /** + * Format: uuid + * @example 12ade33a-21c0-473b-b055-b3c836e1c292 + */ + readonly id?: string; + /** @example number_order */ + readonly record_type?: string; + /** + * @description The count of phone numbers in the number order. + * @example 1 + */ + readonly phone_numbers_count?: number; + /** + * @description Identifies the connection associated with this phone number. + * @example 346789098765567 + */ + connection_id?: string; + /** + * @description Identifies the messaging profile associated with the phone number. + * @example abc85f64-5717-4562-b3fc-2c9600 + */ + messaging_profile_id?: string; + /** + * @description Identifies the messaging profile associated with the phone number. + * @example abc85f64-5717-4562-b3fc-2c9600 + */ + billing_group_id?: string; + phone_numbers?: components['schemas']['PhoneNumbersJobPhoneNumber'][]; + sub_number_orders_ids?: string[]; + /** + * @description The status of the order. + * @enum {string} + */ + readonly status?: 'pending' | 'success' | 'failure'; + /** + * @description A customer reference string for customer look ups. + * @example MY REF 001 + */ + customer_reference?: string; + /** + * Format: datetime + * @description An ISO 8901 datetime string denoting when the number order was created. + * @example 2018-01-01T00:00:00.000000Z + */ + readonly created_at?: string; + /** + * Format: datetime + * @description An ISO 8901 datetime string for when the number order was updated. + * @example 2018-01-01T00:00:00.000000Z + */ + readonly updated_at?: string; + /** + * @description True if all requirements are met for every phone number, false otherwise. + * @example true + */ + readonly requirements_met?: boolean; + }; + /** Number Order Event */ + NumberOrderBlockEvent: { + data?: components['schemas']['NumberBlockOrder']; + }; + /** @example { + * "id": "387d1e31-a218-4375-8151-103f2d5e2d2c", + * "record_type": "number_order_document", + * "file_id": "1e3c5822-0362-4702-8e46-5a129f0d3976", + * "requirements_id": "36aaf27d-986b-493c-bd1b-de16af2e4292", + * "customer_reference": "MY REF 001", + * "requirement_type": "address_proof", + * "created_at": "2018-01-01T00:00:00.000000Z" + * } */ + NumberOrderDocument: { + /** + * Format: uuid + * @example 387d1e31-a218-4375-8151-103f2d5e2d2c + */ + readonly id?: string; + /** @example number_order_document */ + readonly record_type?: string; + /** + * @description The id of the file to associate as a number order document. + * @example 1e3c5822-0362-4702-8e46-5a129f0d3976 + */ + file_id?: string; + /** + * @description Unique id for a requirement. + * @example 36aaf27d-986b-493c-bd1b-de16af2e4292 + */ + requirements_id?: string; + /** + * @description A customer reference string for customer look ups. + * @example MY REF 001 + */ + customer_reference?: string; + /** @enum {string} */ + readonly requirement_type?: + | 'address_proof' + | 'identification' + | 'reg_form'; + /** + * Format: datetime + * @description An ISO 8901 datetime string denoting when the number order document was uploaded. + * @example 2018-01-01T00:00:00.000000Z + */ + readonly created_at?: string; + }; + NumberOrderPhoneNumber: { + /** + * Format: uuid + * @example dc8e4d67-33a0-4cbb-af74-7b58f05bd494 + */ + readonly id?: string; + /** @example number_order_phone_number */ + readonly record_type?: string; + /** + * Format: e164_phone_number + * @example +19705555098 + */ + phone_number?: string; + /** + * Format: uuid + * @example dc8e4d67-33a0-4cbb-af74-7b58f05bd495 + */ + order_request_id?: string; + /** + * Format: uuid + * @example dc8e4d67-33a0-4cbb-af74-7b58f05bd496 + */ + sub_number_order_id?: string; + /** @example US */ + country_code?: string; + /** + * @example local + * @enum {string} + */ + phone_number_type?: + | 'local' + | 'toll_free' + | 'mobile' + | 'national' + | 'shared_cost' + | 'landline'; + regulatory_requirements?: components['schemas']['SubNumberOrderRegulatoryRequirementWithValue'][]; + /** + * @description True if all requirements are met for a phone number, false otherwise. + * @example true + */ + readonly requirements_met?: boolean; + /** + * @description The status of the phone number in the order. + * @enum {string} + */ + readonly status?: 'pending' | 'success' | 'failure'; + /** + * Format: uuid + * @example null + */ + readonly bundle_id?: string; + /** @example San Francisco */ + locality?: string; + /** + * Format: datetime + * @example 024-05-31T11:14:00+00:00 + */ + deadline?: string; + /** + * @description Status of requirements (if applicable) + * @enum {string} + */ + readonly requirements_status?: + | 'pending' + | 'approved' + | 'cancelled' + | 'deleted' + | 'requirement-info-exception' + | 'requirement-info-pending' + | 'requirement-info-under-review'; + /** @example false */ + is_block_number?: boolean; + }; + /** NumberOrder */ + NumberOrderWithPhoneNumbers: { + /** + * Format: uuid + * @example 12ade33a-21c0-473b-b055-b3c836e1c292 + */ + readonly id?: string; + /** @example number_order */ + readonly record_type?: string; + /** + * @description The count of phone numbers in the number order. + * @example 1 + */ + readonly phone_numbers_count?: number; + /** + * @description Identifies the connection associated with this phone number. + * @example 346789098765567 + */ + connection_id?: string; + /** + * @description Identifies the messaging profile associated with the phone number. + * @example abc85f64-5717-4562-b3fc-2c9600 + */ + messaging_profile_id?: string; + /** + * @description Identifies the messaging profile associated with the phone number. + * @example abc85f64-5717-4562-b3fc-2c9600 + */ + billing_group_id?: string; + phone_numbers?: components['schemas']['PhoneNumber'][]; + sub_number_orders_ids?: string[]; + /** + * @description The status of the order. + * @enum {string} + */ + readonly status?: 'pending' | 'success' | 'failure'; + /** + * @description A customer reference string for customer look ups. + * @example MY REF 001 + */ + customer_reference?: string; + /** + * Format: datetime + * @description An ISO 8901 datetime string denoting when the number order was created. + * @example 2018-01-01T00:00:00.000000Z + */ + readonly created_at?: string; + /** + * Format: datetime + * @description An ISO 8901 datetime string for when the number order was updated. + * @example 2018-01-01T00:00:00.000000Z + */ + readonly updated_at?: string; + /** + * @description True if all requirements are met for every phone number, false otherwise. + * @example true + */ + readonly requirements_met?: boolean; + }; + /** Number Order Event Data */ + NumberOrdered: { + /** + * @description Identifies the type of the resource. + * @example event + * @enum {string} + */ + record_type?: 'event'; + /** + * Format: uuid + * @description Identifies the type of resource. + */ + id?: string; + /** + * @description The type of event being delivered. + * @example number_order.complete + */ + event_type?: string; + /** + * Format: date-time + * @description ISO 8601 formatted date indicating when the resource was created. + */ + occurred_at?: string; + payload?: components['schemas']['NumberOrder']; + }; + /** Number Order Event */ + NumberOrderedEvent: { + data?: components['schemas']['NumberOrdered']; + }; + /** + * @description Number Pool allows you to send messages from a pool of numbers of different types, assigning + * weights to each type. The pool consists of all the long code and toll free numbers + * assigned to the messaging profile. + * + * To disable this feature, set the object field to `null`. + * + * @example { + * "toll_free_weight": 10, + * "long_code_weight": 1, + * "skip_unhealthy": true, + * "sticky_sender": false, + * "geomatch": false + * } + */ + NumberPoolSettings: { + /** + * @description Defines the probability weight for a Toll Free number to be selected when sending a message. + * The higher the weight the higher the probability. The sum of the weights for all number types + * does not necessarily need to add to 100. Weight must be a non-negative number, and when equal + * to zero it will remove the number type from the pool. + * + * @example 10 + */ + toll_free_weight: number; + /** + * @description Defines the probability weight for a Long Code number to be selected when sending a message. + * The higher the weight the higher the probability. The sum of the weights for all number types + * does not necessarily need to add to 100. Weight must be a non-negative number, and when equal + * to zero it will remove the number type from the pool. + * + * @example 1 + */ + long_code_weight: number; + /** + * @description If set to true all unhealthy numbers will be automatically excluded from the pool. + * Health metrics per number are calculated on a regular basis, taking into account the deliverability + * rate and the amount of messages marked as spam by upstream carriers. + * Numbers with a deliverability rate below 25% or spam ratio over 75% will be considered unhealthy. + * + * @example true + */ + skip_unhealthy: boolean; + /** + * @description If set to true, Number Pool will try to choose the same sending number for all messages to a particular + * recipient. If the sending number becomes unhealthy and `skip_unhealthy` is set to true, a new + * number will be chosen. + * + * @default false + */ + sticky_sender: boolean; + /** + * @description If set to true, Number Pool will try to choose a sending number with the same area code as the destination + * number. If there are no such numbers available, a nunber with a different area code will be chosen. Currently + * only NANP numbers are supported. + * + * @default false + */ + geomatch: boolean; + } | null; + /** @example { + * "id": "12ade33a-21c0-473b-b055-b3c836e1c292", + * "record_type": "number_reservation", + * "phone_numbers": [ + * { + * "id": "12ade33a-21c0-473b-b055-b3c836e1c292", + * "record_type": "reserved_phone_number", + * "phone_number": "+19705555098", + * "status": "pending", + * "created_at": "2018-01-01T00:00:00.000000Z", + * "updated_at": "2018-01-01T00:00:00.000000Z", + * "expired_at": "2018-01-01T00:00:00.000000Z", + * "errors": "" + * } + * ], + * "status": "pending", + * "customer_reference": "MY REF 001", + * "created_at": "2018-01-01T00:00:00.000000Z", + * "updated_at": "2018-01-01T00:00:00.000000Z" + * } */ + NumberReservation: { + /** + * Format: uuid + * @example 12ade33a-21c0-473b-b055-b3c836e1c292 + */ + readonly id?: string; + /** @example number_reservation */ + readonly record_type?: string; + phone_numbers?: components['schemas']['ReservedPhoneNumber'][]; + /** + * @description The status of the entire reservation. + * @enum {string} + */ + readonly status?: 'pending' | 'success' | 'failure'; + /** + * @description A customer reference string for customer look ups. + * @example MY REF 001 + */ + customer_reference?: string; + /** + * Format: datetime + * @description An ISO 8901 datetime string denoting when the numbers reservation was created. + * @example 2018-01-01T00:00:00.000000Z + */ + readonly created_at?: string; + /** + * Format: datetime + * @description An ISO 8901 datetime string for when the number reservation was updated. + * @example 2018-01-01T00:00:00.000000Z + */ + readonly updated_at?: string; + }; + /** OrderExternalVetting */ + OrderExternalVetting: { + /** + * Evpid + * @description External vetting provider ID for the brand. + */ + evpId: string; + /** + * Vettingclass + * @description Identifies the vetting classification. + */ + vettingClass: string; + }; + /** + * @description The original URL to the PDF used for the fax's media. If media_name was supplied, this is omitted + * @example https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf + */ + OriginalMediaUrl: string; + /** @example { + * "call_recording_type": "by_caller_phone_number", + * "call_recording_caller_phone_numbers": [ + * "+19705555098" + * ], + * "call_recording_channels": "dual", + * "call_recording_format": "mp3" + * } */ + OutboundCallRecording: { + /** + * @description Specifies which calls are recorded. + * @enum {string} + */ + call_recording_type?: 'all' | 'none' | 'by_caller_phone_number'; + /** + * @description When call_recording_type is 'by_caller_phone_number', only outbound calls using one of these numbers will be recorded. Numbers must be specified in E164 format. + * @example [ + * "+19705555098" + * ] + */ + call_recording_caller_phone_numbers?: string[]; + /** + * @description When using 'dual' channels, the final audio file will be a stereo recording with the first leg on channel A, and the rest on channel B. + * @default single + * @example dual + * @enum {string} + */ + call_recording_channels: 'single' | 'dual'; + /** + * @description The audio file format for calls being recorded. + * @default wav + * @example mp3 + * @enum {string} + */ + call_recording_format: 'wav' | 'mp3'; + }; + /** Connection Outbound Settings */ + OutboundFqdn: { + /** + * ANI override type + * Format: E.164 + * @description Set a phone number as the ani_override value to override caller id number on outbound calls. + */ + ani_override?: string; + /** + * ANI override type + * @description Specifies when we should apply your ani_override setting. Only applies when ani_override is not blank. + * @default always + * @example normal + * @enum {string} + */ + ani_override_type: 'always' | 'normal' | 'emergency'; + /** + * @description Forces all SIP calls originated on this connection to be \"parked\" instead of \"bridged\" to the destination specified on the URI. Parked calls will return ringback to the caller and will await for a Call Control command to define which action will be taken next. + * @default false + */ + call_parking_enabled: boolean | null; + /** @description When set, this will limit the total number of inbound calls to phone numbers associated with this connection. */ + channel_limit?: number; + /** + * @description Generate ringback tone through 183 session progress message with early media. + * @default false + */ + generate_ringback_tone: boolean; + /** + * @description When set, ringback will not wait for indication before sending ringback tone to calling party. + * @default false + */ + instant_ringback_enabled: boolean; + /** + * @default ip-authentication + * @example credential-authentication + * @enum {string} + */ + ip_authentication_method: + | 'credential-authentication' + | 'ip-authentication'; + ip_authentication_token?: string; + /** + * @description A 2-character country code specifying the country whose national dialing rules should be used. For example, if set to `US` then any US number can be dialed without preprending +1 to the number. When left blank, Telnyx will try US and GB dialing rules, in that order, by default.", + * @default US + * @example US + */ + localization: string; + outbound_voice_profile_id?: components['schemas']['OutboundVoiceProfileId']; + /** + * @description This setting only affects connections with Fax-type Outbound Voice Profiles. The setting dictates whether or not Telnyx sends a t.38 reinvite. By default, Telnyx will send the re-invite. If set to `customer`, the caller is expected to send the t.38 reinvite. + * @default customer + * @enum {string} + */ + t38_reinvite_source: + | 'telnyx' + | 'customer' + | 'disabled' + | 'passthru' + | 'caller-passthru' + | 'callee-passthru'; + /** @description Numerical chars only, exactly 4 characters. */ + tech_prefix?: string; + encrypted_media?: components['schemas']['EncryptedMedia']; + /** + * @description Time(sec) before aborting if connection is not made. + * @default 3 + */ + timeout_1xx_secs: number; + /** + * @description Time(sec) before aborting if call is unanswered (min: 1, max: 600). + * @default 90 + */ + timeout_2xx_secs: number; + }; + /** + * Outbound Ip + * @example { + * "call_parking_enabled": true, + * "ani_override": "string", + * "ani_override_type": "always", + * "channel_limit": 10, + * "instant_ringback_enabled": true, + * "generate_ringback_tone": true, + * "localization": "string", + * "t38_reinvite_source": "customer", + * "tech_prefix": "string", + * "ip_authentication_method": "token", + * "ip_authentication_token": "string", + * "outbound_voice_profile_id": "1293384261075731499" + * } + */ + OutboundIp: { + /** + * @description Forces all SIP calls originated on this connection to be "parked" instead of "bridged" to the destination specified on the URI. Parked calls will return ringback to the caller and will await for a Call Control command to define which action will be taken next. + * @default false + */ + call_parking_enabled: boolean | null; + /** + * @description Set a phone number as the ani_override value to override caller id number on outbound calls. + * @default + */ + ani_override: string; + /** + * @description Specifies when we apply your ani_override setting. Only applies when ani_override is not blank. + * @default always + * @enum {string} + */ + ani_override_type: 'always' | 'normal' | 'emergency'; + /** + * @description When set, this will limit the total number of outbound calls to phone numbers associated with this connection. + * @default null + */ + channel_limit: number; + /** + * @description When set, ringback will not wait for indication before sending ringback tone to calling party. + * @default true + */ + instant_ringback_enabled: boolean; + /** + * @description Generate ringback tone through 183 session progress message with early media. + * @default false + */ + generate_ringback_tone: boolean; + /** + * @description A 2-character country code specifying the country whose national dialing rules should be used. For example, if set to `US` then any US number can be dialed without preprending +1 to the number. When left blank, Telnyx will try US and GB dialing rules, in that order, by default. + * @default null + */ + localization: string; + /** + * @description This setting only affects connections with Fax-type Outbound Voice Profiles. The setting dictates whether or not Telnyx sends a t.38 reinvite.

By default, Telnyx will send the re-invite. If set to `customer`, the caller is expected to send the t.38 reinvite. + * @default customer + * @enum {string} + */ + t38_reinvite_source: + | 'telnyx' + | 'customer' + | 'disabled' + | 'passthru' + | 'caller-passthru' + | 'callee-passthru'; + /** + * @description Numerical chars only, exactly 4 characters. + * @default + */ + tech_prefix: string; + /** + * @default tech-prefixp-charge-info + * @example tech-prefixp-charge-info + * @enum {string} + */ + ip_authentication_method: 'tech-prefixp-charge-info' | 'token'; + /** @default null */ + ip_authentication_token: string; + outbound_voice_profile_id?: components['schemas']['OutboundVoiceProfileId']; + }; + /** @example { + * "record_type": "event", + * "id": "86f58db9-0fe3-4adc-9d1f-46e66e6e9323", + * "event_type": "message.sent", + * "occurred_at": "date-time", + * "payload": { + * "record_type": "message", + * "direction": "outbound", + * "id": "40385f64-5717-4562-b3fc-2c963f66afa6", + * "type": "MMS", + * "messaging_profile_id": "4000eba1-a0c0-4563-9925-b25e842a7cb6", + * "organization_id": "b448f9cc-a842-4784-98e9-03c1a5872950", + * "from": { + * "phone_number": "+18445550001", + * "carrier": "TELNYX LLC", + * "line_type": "VoIP" + * }, + * "to": [ + * { + * "phone_number": "+18665550001", + * "status": "queued", + * "carrier": "T-MOBILE USA, INC.", + * "line_type": "Wireless" + * } + * ], + * "text": "Hello, World!", + * "subject": "From Telnyx!", + * "media": [ + * { + * "url": "https://pbs.twimg.com/profile_images/1142168442042118144/AW3F4fFD_400x400.png", + * "content_type": null, + * "sha256": null, + * "size": null + * } + * ], + * "webhook_url": "https://www.example.com/hooks", + * "webhook_failover_url": "https://backup.example.com/hooks", + * "encoding": "GSM-7", + * "parts": 1, + * "tags": [ + * "Greetings" + * ], + * "cost": null, + * "received_at": "2019-01-23T18:10:02.574Z", + * "sent_at": null, + * "completed_at": null, + * "valid_until": null, + * "errors": [] + * } + * } */ + OutboundMessage: { + /** + * @description Identifies the type of the resource. + * @example event + * @enum {string} + */ + record_type?: 'event'; + /** + * Format: uuid + * @description Identifies the type of resource. + */ + id?: string; + /** + * @description The type of event being delivered. + * @example message.sent + * @enum {string} + */ + event_type?: 'message.sent' | 'message.finalized'; + /** + * Format: date-time + * @description ISO 8601 formatted date indicating when the resource was created. + */ + occurred_at?: string; + payload?: components['schemas']['OutboundMessagePayload']; + }; + OutboundMessageEvent: { + data?: components['schemas']['OutboundMessage']; + meta?: { + /** + * @description Number of attempts to deliver the webhook event. + * @example 1 + */ + attempt?: number; + /** + * Format: url + * @description The webhook URL the event was delivered to. + * @example https://www.example.com/hooks + */ + delivered_to?: string; + }; + }; + /** @example { + * "record_type": "message", + * "direction": "outbound", + * "id": "40385f64-5717-4562-b3fc-2c963f66afa6", + * "type": "MMS", + * "messaging_profile_id": "4000eba1-a0c0-4563-9925-b25e842a7cb6", + * "organization_id": "b448f9cc-a842-4784-98e9-03c1a5872950", + * "from": { + * "phone_number": "+18445550001", + * "carrier": "TELNYX LLC", + * "line_type": "VoIP" + * }, + * "to": [ + * { + * "phone_number": "+18665550001", + * "status": "queued", + * "carrier": "T-MOBILE USA, INC.", + * "line_type": "Wireless" + * } + * ], + * "text": "Hello, World!", + * "subject": "From Telnyx!", + * "media": [ + * { + * "url": "https://pbs.twimg.com/profile_images/1142168442042118144/AW3F4fFD_400x400.png", + * "content_type": null, + * "sha256": null, + * "size": null + * } + * ], + * "webhook_url": "https://www.example.com/hooks", + * "webhook_failover_url": "https://backup.example.com/hooks", + * "encoding": "GSM-7", + * "parts": 1, + * "tags": [ + * "Greetings" + * ], + * "cost": null, + * "received_at": "2019-01-23T18:10:02.574Z", + * "sent_at": null, + * "completed_at": null, + * "valid_until": null, + * "errors": [] + * } */ + OutboundMessagePayload: { + /** + * @description Identifies the type of the resource. + * @example message + * @enum {string} + */ + record_type?: 'message'; + /** + * @description The direction of the message. Inbound messages are sent to you whereas outbound messages are sent from you. + * @example outbound + * @enum {string} + */ + direction?: 'outbound'; + /** + * Format: uuid + * @description Identifies the type of resource. + */ + id?: string; + /** + * @description The type of message. + * @enum {string} + */ + type?: 'SMS' | 'MMS'; + /** @description Unique identifier for a messaging profile. */ + messaging_profile_id?: string; + /** + * Format: uuid + * @description The id of the organization the messaging profile belongs to. + */ + organization_id?: string; + from?: { + /** + * Format: address + * @description Sending address (+E.164 formatted phone number, alphanumeric sender ID, or short code). + */ + phone_number?: string; + /** @description The carrier of the receiver. */ + carrier?: string; + /** + * @description The line-type of the receiver. + * @enum {string} + */ + line_type?: + | 'Wireline' + | 'Wireless' + | 'VoWiFi' + | 'VoIP' + | 'Pre-Paid Wireless' + | ''; + }; + to?: { + /** + * Format: address + * @description Receiving address (+E.164 formatted phone number or short code). + */ + phone_number?: string; + /** + * @description The delivery status of the message. + * @enum {string} + */ + status?: + | 'queued' + | 'sending' + | 'sent' + | 'expired' + | 'sending_failed' + | 'delivery_unconfirmed' + | 'delivered' + | 'delivery_failed'; + /** @description The carrier of the receiver. */ + carrier?: string; + /** + * @description The line-type of the receiver. + * @enum {string} + */ + line_type?: + | 'Wireline' + | 'Wireless' + | 'VoWiFi' + | 'VoIP' + | 'Pre-Paid Wireless' + | ''; + }[]; + /** @description Message body (i.e., content) as a non-empty string. + * + * **Required for SMS** */ + text?: string; + /** @description Subject of multimedia message */ + subject?: string | null; + media?: { + /** + * Format: url + * @description The url of the media requested to be sent. + */ + url?: string; + /** + * Format: mime-type + * @description The MIME type of the requested media. + */ + content_type?: string | null; + /** @description The SHA256 hash of the requested media. */ + sha256?: string | null; + /** @description The size of the requested media. */ + size?: number | null; + }[]; + /** + * Format: url + * @description The URL where webhooks related to this message will be sent. + */ + webhook_url?: string | null; + /** + * Format: url + * @description The failover URL where webhooks related to this message will be sent if sending to the primary URL fails. + */ + webhook_failover_url?: string | null; + /** @description Encoding scheme used for the message body. */ + encoding?: string; + /** @description Number of parts into which the message's body must be split. */ + parts?: number; + /** @description Tags associated with the resource. */ + tags?: string[]; + cost?: { + /** + * Format: decimal + * @description The amount deducted from your account. + */ + amount?: string; + /** + * Format: iso4217 + * @description The ISO 4217 currency identifier. + */ + currency?: string; + } | null; + /** + * Format: date-time + * @description ISO 8601 formatted date indicating when the message request was received. + */ + received_at?: string; + /** + * Format: date-time + * @description ISO 8601 formatted date indicating when the message was sent. + */ + sent_at?: string; + /** + * Format: date-time + * @description ISO 8601 formatted date indicating when the message was finalized. + */ + completed_at?: string; + /** + * Format: date-time + * @description Message must be out of the queue by this time or else it will be discarded and marked as 'sending_failed'. Once the message moves out of the queue, this field will be nulled + */ + valid_until?: string | null; + /** @description These errors may point at addressees when referring to unsuccessful/unconfirmed delivery statuses. */ + errors?: components['schemas']['Error'][]; + }; + /** + * Outbound Voice Profile + * @example { + * "id": "1293384261075731499", + * "record_type": "outbound_voice_profile", + * "name": "office", + * "connections_count": 12, + * "traffic_type": "conversational", + * "service_plan": "global", + * "concurrent_call_limit": 10, + * "enabled": true, + * "tags": [ + * "office-profile" + * ], + * "usage_payment_method": "rate-deck", + * "whitelisted_destinations": [ + * "US", + * "BR", + * "AU" + * ], + * "max_destination_rate": 10, + * "daily_spend_limit": "100.00", + * "daily_spend_limit_enabled": true, + * "call_recording": { + * "call_recording_type": "by_caller_phone_number", + * "call_recording_caller_phone_numbers": [ + * "+19705555098" + * ], + * "call_recording_channels": "dual", + * "call_recording_format": "mp3" + * }, + * "billing_group_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58", + * "created_at": "2018-02-02T22:25:27.521Z", + * "updated_at": "2018-02-02T22:25:27.521Z" + * } + */ + OutboundVoiceProfile: { + /** + * Format: int64 + * @description Identifies the resource. + * @example 1293384261075731499 + */ + id?: string; + /** + * @description Identifies the type of the resource. + * @example outbound_voice_profile + */ + record_type?: string; + /** + * @description A user-supplied name to help with organization. + * @example office + */ + name: string; + /** + * @description Amount of connections associated with this outbound voice profile. + * @example 12 + */ + connections_count?: number; + traffic_type?: components['schemas']['TrafficType']; + service_plan?: components['schemas']['ServicePlan']; + /** + * @description Must be no more than your global concurrent call limit. Null means no limit. + * @example 10 + */ + concurrent_call_limit?: number | null; + /** + * @description Specifies whether the outbound voice profile can be used. Disabled profiles will result in outbound calls being blocked for the associated Connections. + * @default true + * @example true + */ + enabled: boolean; + /** @example [ + * "office-profile" + * ] */ + tags?: string[]; + usage_payment_method?: components['schemas']['UsagePaymentMethod']; + /** + * @description The list of destinations you want to be able to call using this outbound voice profile formatted in alpha2. + * @default [ + * "US", + * "CA" + * ] + * @example [ + * "US", + * "BR", + * "AU" + * ] + */ + whitelisted_destinations: string[]; + /** @description Maximum rate (price per minute) for a Destination to be allowed when making outbound calls. */ + max_destination_rate?: number; + /** + * @description The maximum amount of usage charges, in USD, you want Telnyx to allow on this outbound voice profile in a day before disallowing new calls. + * @example 100.00 + */ + daily_spend_limit?: string; + /** + * @description Specifies whether to enforce the daily_spend_limit on this outbound voice profile. + * @default false + * @example true + */ + daily_spend_limit_enabled: boolean; + call_recording?: components['schemas']['OutboundCallRecording']; + /** + * Format: uuid + * @description The ID of the billing group associated with the outbound proflile. Defaults to null (for no group assigned). + * @default null + * @example 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + */ + billing_group_id: string | null; + /** + * @description ISO 8601 formatted date-time indicating when the resource was created. + * @example 2018-02-02T22:25:27.521Z + */ + created_at?: string; + /** + * @description ISO 8601 formatted date-time indicating when the resource was updated. + * @example 2018-02-02T22:25:27.521Z + */ + updated_at?: string; + }; + /** + * Outbound Voice Profile ID + * Format: int64 + * @description Identifies the associated outbound voice profile. + * @example 1293384261075731499 + */ + OutboundVoiceProfileId: string; + /** @description The summary of the resource that have been assigned to the Private Wireless Gateway. */ + PWGAssignedResourcesSummary: { + /** + * @description The type of the resource assigned to the Private Wireless Gateway. + * @example sim_card_group + */ + readonly record_type?: string; + /** + * @description The current count of a resource type assigned to the Private Wireless Gateway. + * @example 1 + */ + readonly count?: number; + }; + /** + * Paginated[VerificationRequestStatus] + * @description A paginated response + */ + Paginated_VerificationRequestStatus_: { + /** + * Records + * @description The records yielded by this request + * @default [] + */ + records: components['schemas']['VerificationRequestStatus'][]; + /** + * Total Records + * @description The total amount of records for these query parameters + * @default 0 + */ + total_records: number; + }; + PaginationData: { + /** + * @description Total number of pages. + * @example 5 + */ + total_pages?: number; + /** + * @description Total number of results. + * @example 100 + */ + total_results?: number; + /** + * @description Selected page number. + * @example 1 + */ + page_number?: number; + /** + * @description Records per single page + * @example 20 + */ + page_size?: number; + }; + PaginationMeta: { + /** @example 3 */ + total_pages?: number; + /** @example 55 */ + total_results?: number; + /** @example 2 */ + page_number?: number; + /** @example 25 */ + page_size?: number; + }; + PaginationMetaSimple: { + /** @example 2 */ + page_number?: number; + /** @example 25 */ + page_size?: number; + /** @example 3 */ + total_pages?: number; + /** @example 55 */ + total_results?: number; + }; + /** ParameterProperties */ + ParameterProperties: { + /** Type */ + type: string; + /** + * Description + * @default + */ + description: string; + /** Enum */ + enum?: string[]; + }; + /** + * Participant + * @example { + * "record_type": "participant", + * "created_at": "2019-01-23T18:10:02.574Z", + * "updated_at": "2019-01-23T18:10:02.574Z", + * "end_conference_on_exit": true, + * "soft_end_conference_on_exit": true, + * "status": "joining", + * "muted": false, + * "on_hold": true, + * "call_control_id": "v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg", + * "whisper_call_control_ids": [ + * "v2:Sg1xxxQ_U3ixxxyXT_VDNI3xxxazZdg6Vxxxs4-GNYxxxVaJPOhFMRQ", + * "v2:qqpb0mmvd-ovhhBr0BUQQn0fld5jIboaaX3-De0DkqXHzbf8d75xkw" + * ], + * "id": "dfadada7-af74-47bc-83a4-554275f55f5c", + * "call_leg_id": "3a15df2d-c801-4729-adf5-b56dd42e2abb", + * "conference": { + * "id": "41b9acd4-f4da-4ff5-a85c-e07e90b53f46", + * "name": "1" + * } + * } + */ + Participant: { + /** + * @example participant + * @enum {string} + */ + record_type: 'participant'; + /** + * @description Uniquely identifies the participant + * @example 3fa85f64-5717-4562-b3fc-2c963f66afa6 + */ + id: string; + /** + * @description Uniquely identifies the call leg associated with the participant + * @example 3fa85f64-5717-4562-b3fc-2c963f66afa6 + */ + call_leg_id: string; + /** + * @description Call Control ID associated with the partiipant of the conference + * @example v2:v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQczRrZvZakpWxBlpw48KyZQ + */ + call_control_id: string; + /** @description Info about the conference that the participant is in */ + conference: { + /** + * @description Uniquely identifies the conference + * @example 3fa85f64-5717-4562-b3fc-2c963f66afa6 + */ + id?: string; + /** + * @description Name of the conference + * @example All hands meeting + */ + name?: string; + }; + /** + * @description Array of unique call_control_ids the participant can whisper to.. + * @example [ + * "v2:Sg1xxxQ_U3ixxxyXT_VDNI3xxxazZdg6Vxxxs4-GNYxxxVaJPOhFMRQ", + * "v2:qqpb0mmvd-ovhhBr0BUQQn0fld5jIboaaX3-De0DkqXHzbf8d75xkw" + * ] + */ + whisper_call_control_ids: string[]; + /** + * @description ISO 8601 formatted date of when the participant was created + * @example 2019-01-23T18:10:02.574Z + */ + created_at: string; + /** + * @description ISO 8601 formatted date of when the participant was last updated + * @example 2019-01-23T18:10:02.574Z + */ + updated_at: string; + /** + * @description Whether the conference will end and all remaining participants be hung up after the participant leaves the conference. + * @example true + */ + end_conference_on_exit: boolean; + /** + * @description Whether the conference will end after the participant leaves the conference. + * @example true + */ + soft_end_conference_on_exit: boolean; + /** + * @description The status of the participant with respect to the lifecycle within the conference + * @example joining + * @enum {string} + */ + status: 'joining' | 'joined' | 'left'; + /** + * @description Whether the participant is muted. + * @example true + */ + muted: boolean; + /** + * @description Whether the participant is put on_hold. + * @example true + */ + on_hold: boolean; + }; + /** + * Participant Joined + * @example { + * "record_type": "event", + * "event_type": "video.room.session.started", + * "id": "6b61621f-62e0-4aad-ab11-9fd19e272e73", + * "occurred_at": "2018-02-02T22:25:27.521992Z", + * "payload": { + * "session_id": "7b61621f-62e0-4aad-ab11-9fd19e272e73", + * "room_id": "0ccc7b54-4df3-4bca-a65a-35a1ecc777f0", + * "participant_id": "5ccc7b54-4df3-4bca-a65a-35a1ecc777f0", + * "context": "Alice" + * } + * } + */ + ParticipantJoined: { + /** + * @description An identifier for the type of the resource. + * @example event + * @enum {string} + */ + record_type?: 'event'; + /** + * @description The type of event being delivered. + * @example video.room.participant.joined + * @enum {string} + */ + event_type?: 'video.room.participant.joined'; + /** + * Format: uuid + * @description Uniquely identify the event. + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + */ + id?: string; + /** + * Format: date-time + * @description ISO 8601 datetime of when the event occurred. + * @example 2018-02-02T22:25:27.521992Z + */ + occurred_at?: string; + payload?: { + /** + * Format: uuid + * @description Session ID that identifies the session where the participant joined. + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + */ + session_id?: string; + /** + * Format: uuid + * @description Room ID that identifies the room where the participant joined. + * @example 0ccc7b54-4df3-4bca-a65a-35a1ecc777f0 + */ + room_id?: string; + /** + * @description Context provided to the given participant through the client SDK + * @example Alice + */ + context?: string; + /** + * Format: uuid + * @description Participant ID that identifies the participant that joined. + * @example 0ccc7b54-4df3-4bca-a65a-35a1ecc777f0 + */ + participant_id?: string; + }; + }; + /** Participant Joined Event */ + ParticipantJoinedEvent: { + data?: components['schemas']['ParticipantJoined']; + }; + /** + * Participant Left + * @example { + * "record_type": "event", + * "event_type": "video.room.session.started", + * "id": "6b61621f-62e0-4aad-ab11-9fd19e272e73", + * "occurred_at": "2018-02-02T22:25:27.521992Z", + * "payload": { + * "session_id": "7b61621f-62e0-4aad-ab11-9fd19e272e73", + * "room_id": "0ccc7b54-4df3-4bca-a65a-35a1ecc777f0", + * "participant_id": "5ccc7b54-4df3-4bca-a65a-35a1ecc777f0", + * "context": "Alice", + * "duration_secs": 34, + * "left_reason": "kick" + * } + * } + */ + ParticipantLeft: { + /** + * @description An identifier for the type of the resource. + * @example event + * @enum {string} + */ + record_type?: 'event'; + /** + * @description The type of event being delivered. + * @example video.room.participant.left + * @enum {string} + */ + event_type?: 'video.room.participant.left'; + /** + * Format: uuid + * @description Uniquely identify the event. + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + */ + id?: string; + /** + * Format: date-time + * @description ISO 8601 datetime of when the event occurred. + * @example 2018-02-02T22:25:27.521992Z + */ + occurred_at?: string; + payload?: { + /** + * Format: uuid + * @description Session ID that identifies the session where the participant left. + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + */ + session_id?: string; + /** + * Format: uuid + * @description Room ID that identifies the room where the participant left. + * @example 0ccc7b54-4df3-4bca-a65a-35a1ecc777f0 + */ + room_id?: string; + /** + * @description Context provided to the given participant through the client SDK + * @example Alice + */ + context?: string; + /** + * Format: uuid + * @description Participant ID that identifies the participant that left. + * @example 0ccc7b54-4df3-4bca-a65a-35a1ecc777f0 + */ + participant_id?: string; + /** + * @description The duration in seconds of the participant in the session + * @example 245 + */ + duration_secs?: number; + /** + * @description The reason why the participant left + * @example kicked + */ + left_reason?: string; + }; + }; + /** Participant Left Event */ + ParticipantLeftEvent: { + data?: components['schemas']['ParticipantLeft']; + }; + /** + * Participant resource + * @example { + * "account_sid": "4e71926f-8f13-450e-b91c-23c2ef786aa6", + * "api_version": "v2/texml", + * "call_sid": "v3:9X2vxPDFY2RHSJ1EdMS0RHRksMTg7ldNxdjWbVr9zBjbGjGsSe-aiQ", + * "call_sid_legacy": "v3:9X2vxPDFY2RHSJ1EdMS0RHRksMTg7ldNxdjWbVr9zBjbGjGsSe-aiQ", + * "coaching": false, + * "coaching_call_sid": null, + * "coaching_call_sid_legacy": null, + * "conference_sid": "cd5a70f4-759b-4d5e-9c06-88c00f16f3c1", + * "date_created": "Fri, 27 Oct 2023 07:41:58 +0000", + * "date_updated": "Fri, 27 Oct 2023 07:41:58 +0000", + * "end_conference_on_exit": false, + * "hold": false, + * "muted": false, + * "status": "completed", + * "uri": "/v2/texml/Accounts/4e71926f-8f13-450e-b91c-23c2ef786aa6/Conferences/cd5a70f4-759b-4d5e-9c06-88c00f16f3c1/Participants/v3:9X2vxPDFY2RHSJ1EdMS0RHRksMTg7ldNxdjWbVr9zBjbGjGsSe-aiQ.json" + * } + */ + ParticipantResource: { + /** + * @description The id of the account the resource belongs to. + * @example 61bf923e-5e4d-4595-a110-56190ea18a1b + */ + account_sid?: string; + /** + * @description The version of the API that was used to make the request. + * @example v2/texml + */ + api_version?: string; + /** + * @description The identifier of this participant's call. + * @example v3:9X2vxPDFY2RHSJ1EdMS0RHRksMTg7ldNxdjWbVr9zBjbGjGsSe-aiQ + */ + call_sid?: string; + /** + * @description The identifier of this participant's call. + * @example v3:9X2vxPDFY2RHSJ1EdMS0RHRksMTg7ldNxdjWbVr9zBjbGjGsSe-aiQ + */ + call_sid_legacy?: string; + /** + * @description Whether the participant is coaching another call. + * @example false + */ + coaching?: boolean; + /** + * @description The identifier of the coached participant's call. + * @example v3:9X2vxPDFY2RHSJ1EdMS0RHRksMTg7ldNxdjWbVr9zBjbGjGsSe-aiQ + */ + coaching_call_sid?: string; + /** + * @description The identifier of the coached participant's call. + * @example v3:9X2vxPDFY2RHSJ1EdMS0RHRksMTg7ldNxdjWbVr9zBjbGjGsSe-aiQ + */ + coaching_call_sid_legacy?: string; + /** + * @description The timestamp of when the resource was created. + * @example Thu, 15 Jun 2023 09:56:45 +0000 + */ + date_created?: string; + /** + * @description The timestamp of when the resource was last updated. + * @example Thu, 15 Jun 2023 09:56:45 +0000 + */ + date_updated?: string; + /** + * @description Whether the conference ends when the participant leaves. + * @example false + */ + end_conference_on_exit?: boolean; + /** + * @description Whether the participant is on hold. + * @example false + */ + hold?: boolean; + /** + * @description Whether the participant is muted. + * @example false + */ + muted?: boolean; + /** + * @description The status of the participant's call in the conference. + * @example in-progress + * @enum {string} + */ + status?: 'connecting' | 'connected' | 'completed'; + /** + * @description The relative URI for this participant. + * @example /v2/texml/Accounts/4e71926f-8f13-450e-b91c-23c2ef786aa6/Conferences/cd5a70f4-759b-4d5e-9c06-88c00f16f3c1/Participants/v3:9X2vxPDFY2RHSJ1EdMS0RHRksMTg7ldNxdjWbVr9zBjbGjGsSe-aiQ.json + */ + uri?: string; + }; + /** + * Multiple participant resources + * @example { + * "participants": [], + * "end": 0, + * "first_page_uri": "/v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Conferences/6dc6cc1a-1ba1-4351-86b8-4c22c95cd98f/Participants.json?page=0&pagesize=20", + * "next_page_uri": null, + * "page": 0, + * "page_size": 20, + * "start": 0, + * "uri": "/v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Conferences/6dc6cc1a-1ba1-4351-86b8-4c22c95cd98f/Participants.json?page=0&pagesize=20" + * } + */ + ParticipantResourceIndex: { + participants?: components['schemas']['ParticipantResource'][]; + /** + * @description The number of the last element on the page, zero-indexed. + * @example 19 + */ + end?: number; + /** + * @description /v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Conferences/6dc6cc1a-1ba1-4351-86b8-4c22c95cd98f/Participants.json?page=0&pagesize=20 + * @example accepted + */ + first_page_uri?: string; + /** + * @description /v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Conferences/6dc6cc1a-1ba1-4351-86b8-4c22c95cd98f/Participants.json?Page=1&PageSize=1&PageToken=MTY4AjgyNDkwNzIxMQ + * @example accepted + */ + next_page_uri?: string; + /** + * @description Current page number, zero-indexed. + * @example 0 + */ + page?: number; + /** + * @description The number of items on the page + * @example 20 + */ + page_size?: number; + /** + * @description The number of the first element on the page, zero-indexed. + * @example 0 + */ + start?: number; + /** + * @description The URI of the current page. + * @example /v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Conferences/6dc6cc1a-1ba1-4351-86b8-4c22c95cd98f/Participants.json?Page=0&PageSize=1 + */ + uri?: string; + }; + PatchRoomRequest: { + /** + * @description The unique (within the Telnyx account scope) name of the room. + * @example My room + */ + unique_name?: string; + /** + * @description The maximum amount of participants allowed in a room. If new participants try to join after that limit is reached, their request will be rejected. + * @default 10 + * @example 10 + */ + max_participants: number; + /** + * @description Enable or disable recording for that room. + * @default false + * @example true + */ + enable_recording: boolean; + /** + * Format: url + * @description The URL where webhooks related to this room will be sent. Must include a scheme, such as 'https'. + * @example https://example.com + */ + webhook_event_url?: string; + /** + * Format: url + * @description The failover URL where webhooks related to this room will be sent if sending to the primary URL fails. Must include a scheme, such as 'https'. + * @default + * @example https://failover.example.com + */ + webhook_event_failover_url: string | null; + /** + * @description Specifies how many seconds to wait before timing out a webhook. + * @default null + * @example 25 + */ + webhook_timeout_secs: number | null; + }; + /** Pause Recording Request */ + PauseConferenceRecordingRequest: { + /** + * @description Use this field to avoid duplicate commands. Telnyx will ignore any command with the same `command_id` for the same `call_control_id`. + * @example 891510ac-f3e4-11e8-af5b-de00688a4901 + */ + command_id?: string; + /** + * @description Use this field to pause specific recording. + * @example 891510ac-f3e4-11e8-af5b-de00688a4901 + */ + recording_id?: string; + }; + /** Pause Recording Request */ + PauseRecordingRequest: { + /** + * @description Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + /** + * @description Use this field to avoid duplicate commands. Telnyx will ignore any command with the same `command_id` for the same `call_control_id`. + * @example 891510ac-f3e4-11e8-af5b-de00688a4901 + */ + command_id?: string; + }; + /** @example { + * "id": "dc8e4d67-33a0-4cbb-af74-7b58f05bd494", + * "record_type": "number_order_phone_number", + * "phone_number": "+19705555098", + * "bundle_id": "bc8e4d67-33a0-4cbb-af74-7b58f05bd474", + * "regulatory_requirements": [ + * { + * "record_type": "phone_number_regulatory_requirement", + * "requirement_id": "8ffb3622-7c6b-4ccc-b65f-7a3dc0099576", + * "field_value": "45f45a04-b4be-4592-95b1-9306b9db2b21", + * "field_type": "address" + * } + * ], + * "requirements_met": true, + * "status": "success" + * } */ + PhoneNumber: { + /** + * Format: uuid + * @example dc8e4d67-33a0-4cbb-af74-7b58f05bd494 + */ + readonly id?: string; + /** @example number_order_phone_number */ + readonly record_type?: string; + /** + * Format: e164_phone_number + * @example +19705555098 + */ + phone_number?: string; + regulatory_requirements?: components['schemas']['SubNumberOrderRegulatoryRequirementWithValue'][]; + /** + * @description True if all requirements are met for a phone number, false otherwise. + * @example true + */ + readonly requirements_met?: boolean; + /** + * @description Status of document requirements (if applicable) + * @enum {string} + */ + readonly requirements_status?: + | 'pending' + | 'approved' + | 'cancelled' + | 'deleted' + | 'requirement-info-exception' + | 'requirement-info-pending' + | 'requirement-info-under-review'; + /** + * @description The status of the phone number in the order. + * @enum {string} + */ + readonly status?: 'pending' | 'success' | 'failure'; + /** + * Format: uuid + * @example bc8e4d67-33a0-4cbb-af74-7b58f05bd494 + */ + readonly bundle_id?: string; + /** + * @description Phone number type + * @enum {string} + */ + readonly phone_number_type?: + | 'local' + | 'mobile' + | 'national' + | 'shared_cost' + | 'toll_free'; + /** + * @description Country code of the phone number + * @example US + */ + readonly country_code?: string; + }; + /** @example { + * "id": "42587e44-3a3e-46de-9255-0c9a7a1d1ec7", + * "record_type": "phone_numbers_job", + * "status": "pending", + * "type": "delete_phone_number_block", + * "etc": "2020-10-30T18:10:00.000Z", + * "created_at": "2020-10-23T18:10:00.000Z", + * "updated_at": "2020-10-23T18:10:01.000Z", + * "successful_operations": [], + * "failed_operations": [] + * } */ + PhoneNumberBlocksJob: { + /** + * Format: uuid + * @description Identifies the resource. + * @example 42587e44-3a3e-46de-9255-0c9a7a1d1ec7 + */ + readonly id?: string; + /** + * @description Identifies the type of the resource. + * @example phone_number_block_job + */ + readonly record_type?: string; + /** + * @description Indicates the completion status of the background operation. + * @default pending + * @example pending + * @enum {string} + */ + readonly status: 'pending' | 'in_progress' | 'completed' | 'failed'; + /** + * @description Identifies the type of the background job. + * @example delete_phone_number_block + * @enum {string} + */ + readonly type?: 'delete_phone_number_block'; + /** + * Format: date-time + * @description ISO 8601 formatted date indicating when the estimated time of completion of the background job. + */ + readonly etc?: string; + /** @description ISO 8601 formatted date indicating when the resource was created. */ + readonly created_at?: string; + /** @description ISO 8601 formatted date indicating when the resource was updated. */ + readonly updated_at?: string; + readonly successful_operations?: components['schemas']['PhoneNumberBlocksJobSuccessfulOperation'][]; + readonly failed_operations?: components['schemas']['PhoneNumberBlocksJobFailedOperation'][]; + }; + /** @example { + * "phone_number_block_id": "f3946371-7199-4261-9c3d-81a0d7935146" + * } */ + PhoneNumberBlocksJobDeletePhoneNumberBlockRequest: { + phone_number_block_id: string; + }; + PhoneNumberBlocksJobFailedOperation: { + /** + * Format: e164 + * @description The phone number in e164 format. + */ + phone_number?: string; + /** + * Format: int64 + * @description The phone number's ID + */ + id?: string; + errors?: components['schemas']['Error'][]; + }; + PhoneNumberBlocksJobSuccessfulOperation: { + /** + * Format: e164 + * @description The phone number in e164 format. + */ + phone_number?: string; + /** + * Format: int64 + * @description The phone number's ID + */ + id?: string; + }; + /** PhoneNumberCampaign */ + PhoneNumberCampaign: { + /** + * Phonenumber + * @example +18005550199 + */ + phoneNumber: string; + /** + * BrandId + * @description Brand ID. Empty if the number is associated to a shared campaign. + * @example 7ba705b7-22af-493f-addc-ac04b7ca071c + */ + brandId?: string; + /** + * TcrBrandId + * @description TCR's alphanumeric ID for the brand. + * @example BBRAND1 + */ + tcrBrandId?: string; + /** + * Campaignid + * @description For shared campaigns, this is the TCR campaign ID, otherwise it is the campaign ID + */ + campaignId: string; + /** + * TcrCampaignid + * @description TCR's alphanumeric ID for the campaign. + * @example CCAMPA1 + */ + tcrCampaignId?: string; + /** + * Telnyxcampaignid + * @description Campaign ID. Empty if the number is associated to a shared campaign. + * @example 3008dd9f-66d7-40e0-bf23-bf2d8d1a96ba + */ + telnyxCampaignId?: string; + /** + * AssignmentStatus + * @description The assignment status of the number. + * @example ASSIGNED + * @enum {unknown} + */ + assignmentStatus?: + | 'FAILED_ASSIGNMENT' + | 'PENDING_ASSIGNMENT' + | 'ASSIGNED' + | 'PENDING_UNASSIGNMENT' + | 'FAILED_UNASSIGNMENT'; + /** @description Extra info about a failure to assign/unassign a number. Relevant only if the assignmentStatus is either FAILED_ASSIGNMENT or FAILED_UNASSIGNMENT */ + failureReasons?: unknown; + /** + * Createdat + * Format: date-time + */ + createdAt: string; + /** + * Updatedat + * Format: date-time + */ + updatedAt: string; + }; + /** PhoneNumberCampaignCreate */ + PhoneNumberCampaignCreate: { + /** + * Phonenumber + * @description The phone number you want to link to a specified campaign. + * @example +18005550199 + */ + phoneNumber: string; + /** + * Campaignid + * @description The ID of the campaign you want to link to the specified phone number. + * @example 4b300178-131c-d902-d54e-72d90ba1620j + */ + campaignId: string; + }; + /** PhoneNumberCampaignPaginated */ + PhoneNumberCampaignPaginated: { + /** Records */ + records: components['schemas']['PhoneNumberCampaign'][]; + /** Page */ + page: number; + /** Totalrecords */ + totalRecords: number; + }; + /** PhoneNumberCampaignUpdate */ + PhoneNumberCampaignUpdate: { + /** + * Campaignid + * @example 4b300178-131c-d902-d54e-72d90ba1620j + */ + campaignId: string; + }; + /** @example { + * "id": "1293384261075731499", + * "record_type": "phone_number", + * "phone_number": "+19705555098", + * "status": "deleted", + * "tags": [ + * "tag_1", + * "tag_2" + * ], + * "external_pin": "1234", + * "connection_id": "1293384261075731499", + * "connection_name": "connection-name", + * "customer_reference": "customer-reference", + * "messaging_profile_id": "abc85f64-5717-4562-b3fc-2c9600000000", + * "messaging_profile_name": "regional-customers", + * "billing_group_id": "86f58db9-0fe3-4adc-9d1f-46e66e6e9323", + * "emergency_enabled": true, + * "emergency_address_id": "1315261609962112019", + * "call_forwarding_enabled": true, + * "cnam_listing_enabled": true, + * "caller_id_name_enabled": true, + * "call_recording_enabled": true, + * "t38_fax_gateway_enabled": true, + * "number_level_routing": "disabled", + * "phone_number_type": "local", + * "purchased_at": "2019-10-23T18:10:00.000Z", + * "created_at": "2019-10-23T18:10:00.000Z", + * "updated_at": "2019-10-24T18:10:00.000Z", + * "hd_voice_enabled": true + * } */ + PhoneNumberDeletedDetailed: { + id?: components['schemas']['IntId']; + /** + * @description Identifies the type of the resource. + * @example phone_number + */ + readonly record_type?: string; + /** @description The +E.164-formatted phone number associated with this record. */ + readonly phone_number?: string; + /** + * @description The phone number's current status. + * @enum {string} + */ + readonly status?: + | 'purchase-pending' + | 'purchase-failed' + | 'port-pending' + | 'port-failed' + | 'active' + | 'deleted' + | 'emergency-only' + | 'ported-out' + | 'port-out-pending'; + /** @description A list of user-assigned tags to help manage the phone number. */ + tags?: string[]; + /** @description If someone attempts to port your phone number away from Telnyx and your phone number has an external PIN set, Telnyx will attempt to verify that you provided the correct external PIN to the winning carrier. Note that not all carriers cooperate with this security mechanism. */ + external_pin?: string; + /** @description The user-assigned name of the connection to be associated with this phone number. */ + readonly connection_name?: string; + /** @description Identifies the connection associated with the phone number. */ + connection_id?: string; + /** + * @description A customer reference string for customer look ups. + * @example MY REF 001 + */ + customer_reference?: string; + /** @description Identifies the messaging profile associated with the phone number. */ + messaging_profile_id?: string; + /** + * @description The name of the messaging profile associated with the phone number. + * @example regional-customers + */ + messaging_profile_name?: string; + /** @description Identifies the billing group associated with the phone number. */ + billing_group_id?: string; + /** @description Indicates whether emergency services are enabled for this number. */ + readonly emergency_enabled?: boolean; + /** + * Format: int64 + * @description Identifies the emergency address associated with the phone number. + */ + readonly emergency_address_id?: string; + /** + * @description Indicates if call forwarding will be enabled for this number if forwards_to and forwarding_type are filled in. Defaults to true for backwards compatibility with APIV1 use of numbers endpoints. + * @default true + */ + readonly call_forwarding_enabled: boolean; + /** @description Indicates whether a CNAM listing is enabled for this number. */ + readonly cnam_listing_enabled?: boolean; + /** @description Indicates whether caller ID is enabled for this number. */ + readonly caller_id_name_enabled?: boolean; + /** @description Indicates whether call recording is enabled for this number. */ + readonly call_recording_enabled?: boolean; + /** @description Indicates whether T38 Fax Gateway for inbound calls to this number. */ + readonly t38_fax_gateway_enabled?: boolean; + /** @description ISO 8601 formatted date indicating the time the request was made to purchase the number. */ + readonly purchased_at?: string; + /** @description ISO 8601 formatted date indicating when the time it took to activate after the purchase. */ + readonly created_at?: string; + /** @description ISO 8601 formatted date indicating when the resource was updated. */ + readonly updated_at?: string; + /** + * @description Deprecated field, the only value for this is 'disabled'. All routing for numbers should be configured via connection settings. + * @default disabled + * @enum {string} + */ + number_level_routing: 'disabled'; + /** + * @description The phone number's type. + * @enum {string} + */ + readonly phone_number_type?: + | 'local' + | 'toll_free' + | 'mobile' + | 'national' + | 'shared_cost' + | 'landline'; + }; + /** @example { + * "id": "1293384261075731499", + * "record_type": "phone_number", + * "phone_number": "+19705555098", + * "status": "active", + * "tags": [ + * "tag_1", + * "tag_2" + * ], + * "external_pin": "1234", + * "connection_id": "1293384261075731499", + * "connection_name": "connection-name", + * "customer_reference": "customer-reference", + * "messaging_profile_id": "abc85f64-5717-4562-b3fc-2c9600000000", + * "messaging_profile_name": "regional-customers", + * "billing_group_id": "86f58db9-0fe3-4adc-9d1f-46e66e6e9323", + * "emergency_enabled": true, + * "emergency_address_id": "1315261609962112019", + * "call_forwarding_enabled": true, + * "cnam_listing_enabled": true, + * "caller_id_name_enabled": true, + * "call_recording_enabled": true, + * "t38_fax_gateway_enabled": true, + * "number_level_routing": "disabled", + * "phone_number_type": "local", + * "inbound_call_screening": "disabled", + * "purchased_at": "2019-10-23T18:10:00.000Z", + * "created_at": "2019-10-23T18:10:00.000Z", + * "updated_at": "2019-10-24T18:10:00.000Z", + * "hd_voice_enabled": true + * } */ + PhoneNumberDetailed: { + id?: components['schemas']['IntId']; + /** + * @description Identifies the type of the resource. + * @example phone_number + */ + readonly record_type?: string; + /** @description The +E.164-formatted phone number associated with this record. */ + readonly phone_number?: string; + /** + * @description The phone number's current status. + * @enum {string} + */ + readonly status?: + | 'purchase-pending' + | 'purchase-failed' + | 'port-pending' + | 'port-failed' + | 'active' + | 'deleted' + | 'emergency-only' + | 'ported-out' + | 'port-out-pending' + | 'requirement-info-pending' + | 'requirement-info-under-review' + | 'requirement-info-exception' + | 'provision-pending'; + /** @description A list of user-assigned tags to help manage the phone number. */ + tags?: string[]; + /** @description If someone attempts to port your phone number away from Telnyx and your phone number has an external PIN set, Telnyx will attempt to verify that you provided the correct external PIN to the winning carrier. Note that not all carriers cooperate with this security mechanism. */ + external_pin?: string; + /** @description The user-assigned name of the connection to be associated with this phone number. */ + readonly connection_name?: string; + /** @description Identifies the connection associated with the phone number. */ + connection_id?: string; + /** + * @description A customer reference string for customer look ups. + * @example MY REF 001 + */ + customer_reference?: string; + /** @description Identifies the messaging profile associated with the phone number. */ + messaging_profile_id?: string; + /** + * @description The name of the messaging profile associated with the phone number. + * @example regional-customers + */ + messaging_profile_name?: string; + /** @description Identifies the billing group associated with the phone number. */ + billing_group_id?: string; + /** @description Indicates whether emergency services are enabled for this number. */ + readonly emergency_enabled?: boolean; + /** + * Format: int64 + * @description Identifies the emergency address associated with the phone number. + */ + readonly emergency_address_id?: string; + /** + * @description Indicates if call forwarding will be enabled for this number if forwards_to and forwarding_type are filled in. Defaults to true for backwards compatibility with APIV1 use of numbers endpoints. + * @default true + */ + readonly call_forwarding_enabled: boolean; + /** @description Indicates whether a CNAM listing is enabled for this number. */ + readonly cnam_listing_enabled?: boolean; + /** @description Indicates whether caller ID is enabled for this number. */ + readonly caller_id_name_enabled?: boolean; + /** @description Indicates whether call recording is enabled for this number. */ + readonly call_recording_enabled?: boolean; + /** @description Indicates whether T38 Fax Gateway for inbound calls to this number. */ + readonly t38_fax_gateway_enabled?: boolean; + /** @description ISO 8601 formatted date indicating when the resource was purchased. */ + readonly purchased_at?: string; + /** @description ISO 8601 formatted date indicating when the resource was created. */ + readonly created_at?: string; + /** + * @description Deprecated field, the only value for this is 'disabled'. All routing for numbers should be configured via connection settings. + * @default disabled + * @enum {string} + */ + number_level_routing: 'disabled'; + /** + * @description The phone number's type. + * Note: For numbers purchased prior to July 2023 or when fetching a number's details immediately after a purchase completes, the legacy values `tollfree`, `shortcode` or `longcode` may be returned instead. + * @enum {string} + */ + readonly phone_number_type?: + | 'local' + | 'toll_free' + | 'mobile' + | 'national' + | 'shared_cost' + | 'landline' + | 'tollfree' + | 'shortcode' + | 'longcode'; + /** + * @description The inbound_call_screening setting is a phone number configuration option variable that allows users to configure their settings to block or flag fraudulent calls. It can be set to disabled, reject_calls, or flag_calls. This feature has an additional per-number monthly cost associated with it. + * @default disabled + * @enum {string} + */ + inbound_call_screening: 'disabled' | 'reject_calls' | 'flag_calls'; + }; + /** @example { + * "emergency_enabled": true, + * "emergency_address_id": "53829456729313" + * } */ + PhoneNumberEnableEmergencyRequest: { + /** @description Indicates whether to enable emergency services on this number. */ + emergency_enabled: boolean; + /** + * Format: int64 + * @description Identifies the address to be used with emergency services. + */ + emergency_address_id: string; + }; + /** PhoneNumberStatus */ + PhoneNumberStatus: { + /** + * Phonenumber + * @description A phone number that is intended to be linked to a campaign. + * @example +12193849584 + */ + phoneNumber: string; + /** + * @description The current status of the phone number. + * @example pending + */ + status: components['schemas']['AssignmentStatus']; + /** + * Assigned At + * Format: date-time + * @description The date and time that the this phone number was assigned. + * @example 2021-06-30T10:49:04-07:00 + */ + assigned_at?: string; + /** + * Error + * @description Errors related to an individual phone number assignment. + * @example Detailed error description here. + */ + error?: string; + }; + /** PhoneNumberStatusResponsePaginated */ + PhoneNumberStatusResponsePaginated: { + /** Records */ + records: components['schemas']['ProfileAssignmentPhoneNumbers'][]; + }; + /** @example { + * "record_type": "messaging_settings", + * "id": "1293384261075731499", + * "phone_number": "+18005550001", + * "messaging_profile_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + * "created_at": "2019-01-23T18:10:02.574Z", + * "updated_at": "2019-01-23T18:10:02.574Z", + * "country_code": "US", + * "type": "toll-free", + * "health": { + * "message_count": 122, + * "inbound_outbound_ratio": 0.43, + * "success_ratio": 0.94, + * "spam_ratio": 0.06 + * }, + * "eligible_messaging_products": [ + * "A2P" + * ], + * "traffic_type": "A2P", + * "messaging_product": "A2P", + * "features": { + * "sms": { + * "domestic_two_way": true, + * "international_inbound": true, + * "international_outbound": true + * }, + * "mms": null + * } + * } */ + PhoneNumberWithMessagingSettings: { + /** + * @description Identifies the type of the resource. + * @example messaging_settings + * @enum {string} + */ + readonly record_type?: 'messaging_phone_number' | 'messaging_settings'; + /** @description Identifies the type of resource. */ + readonly id?: string; + /** + * Format: e164 + * @description +E.164 formatted phone number. + */ + readonly phone_number?: string; + /** @description Unique identifier for a messaging profile. */ + messaging_profile_id?: string | null; + /** + * Format: date-time + * @description ISO 8601 formatted date indicating when the resource was created. + */ + readonly created_at?: string; + /** + * Format: date-time + * @description ISO 8601 formatted date indicating when the resource was updated. + */ + readonly updated_at?: string; + /** + * @description ISO 3166-1 alpha-2 country code. + * @example US + */ + readonly country_code?: string; + /** + * @description The type of the phone number + * @enum {string} + */ + readonly type?: + | 'long-code' + | 'toll-free' + | 'short-code' + | 'longcode' + | 'tollfree' + | 'shortcode'; + health?: components['schemas']['NumberHealthMetrics']; + /** @description The messaging products that this number can be registered to use */ + readonly eligible_messaging_products?: string[]; + /** + * @description The messaging traffic or use case for which the number is currently configured. + * @example P2P + */ + readonly traffic_type?: string; + /** + * @description The messaging product that the number is registered to use + * @example P2P + */ + messaging_product?: string; + readonly features?: { + sms?: components['schemas']['MessagingFeatureSet']; + mms?: components['schemas']['MessagingFeatureSet']; + }; + }; + /** @example { + * "id": "1293384261075731499", + * "record_type": "voice_settings", + * "connection_id": "1d0e6cb8-8668-462e-94c6-49ae0f0ed48b", + * "customer_reference": "customer-reference", + * "tech_prefix_enabled": false, + * "translated_number": "+13035559999", + * "call_forwarding": { + * "call_forwarding_enabled": true, + * "forwards_to": "+13035559123", + * "forwarding_type": "always" + * }, + * "cnam_listing": { + * "cnam_listing_enabled": true, + * "cnam_listing_details": "example" + * }, + * "emergency": { + * "emergency_enabled": true, + * "emergency_address_id": "1315261609962112019" + * }, + * "usage_payment_method": "pay-per-minute", + * "media_features": { + * "rtp_auto_adjust_enabled": true, + * "accept_any_rtp_packets_enabled": true, + * "t38_fax_gateway_enabled": true + * }, + * "call_recording": { + * "inbound_call_recording_enabled": true, + * "inbound_call_recording_format": "wav", + * "inbound_call_recording_channels": "single" + * }, + * "inbound_call_screening": "disabled" + * } */ + PhoneNumberWithVoiceSettings: { + /** + * @description Identifies the type of resource. + * @example 1293384261075731499 + */ + readonly id?: string; + /** + * @description Identifies the type of the resource. + * @example voice_settings + */ + readonly record_type?: string; + /** + * @description The phone number in +E164 format. + * @example +13035551234 + */ + readonly phone_number?: string; + /** + * @description Identifies the connection associated with this phone number. + * @example 1d0e6cb8-8668-462e-94c6-49ae0f0ed48b + */ + connection_id?: string; + /** + * @description A customer reference string for customer look ups. + * @example MY REF 001 + */ + customer_reference?: string; + /** + * @description Controls whether a tech prefix is enabled for this phone number. + * @default false + * @example false + */ + tech_prefix_enabled: boolean; + /** + * @description This field allows you to rewrite the destination number of an inbound call before the call is routed to you. The value of this field may be any alphanumeric value, and the value will replace the number originally dialed. + * @default + * @example +13035559999 + */ + translated_number: string; + call_forwarding?: components['schemas']['CallForwarding']; + cnam_listing?: components['schemas']['CnamListing']; + emergency?: components['schemas']['EmergencySettings']; + /** + * @description Controls whether a number is billed per minute or uses your concurrent channels. + * @default pay-per-minute + * @example pay-per-minute + * @enum {string} + */ + usage_payment_method: 'pay-per-minute' | 'channel'; + media_features?: components['schemas']['MediaFeatures']; + call_recording?: components['schemas']['CallRecording']; + /** + * @description The inbound_call_screening setting is a phone number configuration option variable that allows users to configure their settings to block or flag fraudulent calls. It can be set to disabled, reject_calls, or flag_calls. This feature has an additional per-number monthly cost associated with it. + * @default disabled + * @enum {string} + */ + inbound_call_screening: 'disabled' | 'reject_calls' | 'flag_calls'; + }; + PhoneNumbersBulkUpdateError: { + /** + * Format: e164 + * @description The phone number in e164 format. + */ + phone_number?: string; + errors?: components['schemas']['Error'][]; + }; + /** @example { + * "id": "42587e44-3a3e-46de-9255-0c9a7a1d1ec7", + * "record_type": "phone_numbers_job", + * "status": "pending", + * "type": "update_emergency_settings", + * "etc": "2020-10-30T18:10:00.000Z", + * "created_at": "2020-10-23T18:10:00.000Z", + * "updated_at": "2020-10-23T18:10:01.000Z", + * "phone_numbers": [ + * { + * "id": "2637816387126861836" + * }, + * { + * "phone_number": "+19715555098" + * }, + * { + * "phone_number": "+19705555099" + * }, + * { + * "id": "3388768018273" + * } + * ], + * "successful_operations": [ + * { + * "id": "2637816387126861836", + * "phone_number": "+19705555098" + * }, + * { + * "id": "33081887126861836", + * "phone_number": "+19715555098" + * } + * ], + * "pending_operations": [ + * { + * "id": "2637816387126861837", + * "phone_number": "+19705555099" + * } + * ], + * "failed_operations": [ + * { + * "id": "3388768018273", + * "phone_number": "+19705551234", + * "errors": [ + * { + * "code": "10015", + * "title": "Bad Request", + * "detail": "The field is invalid.", + * "source": "/emergency_address_id" + * } + * ] + * } + * ] + * } */ + PhoneNumbersJob: { + /** + * Format: uuid + * @description Identifies the resource. + * @example 42587e44-3a3e-46de-9255-0c9a7a1d1ec7 + */ + readonly id?: string; + /** + * @description Identifies the type of the resource. + * @example phone_numbers_job + */ + readonly record_type?: string; + /** + * @description Indicates the completion status of the background update. + * @default pending + * @example pending + * @enum {string} + */ + readonly status: + | 'pending' + | 'in_progress' + | 'completed' + | 'failed' + | 'expired'; + /** + * @description Identifies the type of the background job. + * @example update_emergency_settings + * @enum {string} + */ + readonly type?: + | 'update_emergency_settings' + | 'delete_phone_numbers' + | 'update_phone_numbers'; + /** + * Format: date-time + * @description ISO 8601 formatted date indicating when the estimated time of completion of the background job. + */ + readonly etc?: string; + /** @description ISO 8601 formatted date indicating when the resource was created. */ + readonly created_at?: string; + /** @description ISO 8601 formatted date indicating when the resource was updated. */ + readonly updated_at?: string; + phone_numbers?: components['schemas']['PhoneNumbersJobPhoneNumber'][]; + readonly successful_operations?: components['schemas']['PhoneNumbersJobSuccessfulOperation'][]; + readonly pending_operations?: components['schemas']['PhoneNumbersJobPendingOperation'][]; + readonly failed_operations?: components['schemas']['PhoneNumbersJobFailedOperation'][]; + }; + /** @example { + * "phone_numbers": [ + * "+19705555098", + * "+19715555098", + * "32873127836" + * ] + * } */ + PhoneNumbersJobDeletePhoneNumbersRequest: { + phone_numbers: string[]; + }; + PhoneNumbersJobFailedOperation: { + /** + * Format: e164 + * @description The phone number in e164 format. + */ + phone_number?: string; + /** + * Format: int64 + * @description The phone number's ID + */ + id?: string; + errors?: components['schemas']['Error'][]; + }; + PhoneNumbersJobPendingOperation: { + /** + * Format: e164 + * @description The phone number in e164 format. + */ + phone_number?: string; + /** + * Format: int64 + * @description The phone number's ID + */ + id?: string; + }; + PhoneNumbersJobPhoneNumber: { + /** + * Format: e164 + * @description The phone number in e164 format. + * @example +19705555000 + */ + phone_number?: string; + /** + * Format: int64 + * @description The phone number's ID + */ + id?: string; + }; + PhoneNumbersJobSuccessfulOperation: { + /** + * Format: e164 + * @description The phone number in e164 format. + */ + phone_number?: string; + /** + * Format: int64 + * @description The phone number's ID + */ + id?: string; + }; + /** @example { + * "emergency_enabled": true, + * "emergency_address_id": "53829456729313", + * "phone_numbers": [ + * "+19705555098", + * "+19715555098", + * "32873127836" + * ] + * } */ + PhoneNumbersJobUpdateEmergencySettingsRequest: { + phone_numbers: string[]; + /** @description Indicates whether to enable emergency services on this number. */ + emergency_enabled: boolean; + /** + * Format: int64 + * @description Identifies the address to be used with emergency services. + */ + emergency_address_id: string; + }; + /** @example { + * "phone_numbers": [ + * "1583466971586889004", + * "+13127367254" + * ], + * "tags": [ + * "tag" + * ], + * "external_pin": "123456", + * "customer_reference": "customer-reference", + * "connection_id": "dc8e4d67-33a0-4cbb-af74-7b58f05bd494", + * "billing_group_id": "dc8e4d67-33a0-4cbb-af74-7b58f05bd494", + * "voice": { + * "call_forwarding": { + * "call_forwarding_enabled": true, + * "forwards_to": "+13035559123", + * "forwarding_type": "always" + * } + * } + * } */ + PhoneNumbersJobUpdatePhoneNumbersRequest: { + /** @description Array of phone number ids and/or phone numbers in E164 format to update */ + phone_numbers: string[]; + /** @description A list of user-assigned tags to help organize phone numbers. */ + tags?: string[]; + /** @description If someone attempts to port your phone number away from Telnyx and your phone number has an external PIN set, we will attempt to verify that you provided the correct external PIN to the winning carrier. Note that not all carriers cooperate with this security mechanism. */ + external_pin?: string; + /** + * @description A customer reference string for customer look ups. + * @example MY REF 001 + */ + customer_reference?: string; + /** @description Identifies the connection associated with the phone number. */ + connection_id?: string; + /** @description Identifies the billing group associated with the phone number. */ + billing_group_id?: string; + voice?: components['schemas']['UpdatePhoneNumberVoiceSettingsRequest']; + }; + /** + * Play Audio URL Request + * @example { + * "audio_url": "http://www.example.com/sounds/greeting.wav", + * "loop": "infinity", + * "overlay": true, + * "stop": "current", + * "target_legs": "self", + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + * "command_id": "891510ac-f3e4-11e8-af5b-de00688a4901" + * } + */ + PlayAudioUrlRequest: { + /** + * @description The URL of a file to be played back on the call. The URL can point to either a WAV or MP3 file. media_name and audio_url cannot be used together in one request. + * @example http://example.com/message.wav + */ + audio_url?: string; + /** + * @description The media_name of a file to be played back on the call. The media_name must point to a file previously uploaded to api.telnyx.com/v2/media by the same user/organization. The file must either be a WAV or MP3 file. + * @example my_media_uploaded_to_media_storage_api + */ + media_name?: string; + /** + * @description The number of times the audio file should be played. If supplied, the value must be an integer between 1 and 100, or the special string `infinity` for an endless loop. + * @default 1 + * @example infinity + */ + loop: components['schemas']['Loopcount']; + /** + * @description When enabled, audio will be mixed on top of any other audio that is actively being played back. Note that `overlay: true` will only work if there is another audio file already being played on the call. + * @default false + * @example true + */ + overlay: boolean; + /** + * @description When specified, it stops the current audio being played. Specify `current` to stop the current audio being played, and to play the next file in the queue. Specify `all` to stop the current audio file being played and to also clear all audio files from the queue. + * @example current + */ + stop?: string; + /** + * @description Specifies the leg or legs on which audio will be played. If supplied, the value must be either `self`, `opposite` or `both`. + * @default self + * @example self + */ + target_legs: string; + /** + * @description Caches the audio file. Useful when playing the same audio file multiple times during the call. + * @default true + * @example true + */ + cache_audio: boolean; + /** + * @description Specifies the type of audio provided in `audio_url` or `playback_content`. + * @default mp3 + * @example wav + * @enum {string} + */ + audio_type: 'mp3' | 'wav'; + /** + * @description Allows a user to provide base64 encoded mp3 or wav. Note: when using this parameter, `media_url` and `media_name` in the `playback_started` and `playback_ended` webhooks will be empty + * @example SUQzAwAAAAADf1... + */ + playback_content?: string; + /** + * @description Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + /** + * @description Use this field to avoid duplicate commands. Telnyx will ignore any command with the same `command_id` for the same `call_control_id`. + * @example 891510ac-f3e4-11e8-af5b-de00688a4901 + */ + command_id?: string; + }; + /** + * @description Whether to play a beep when recording is started. + * @default true + * @example false + */ + PlayBeep: boolean; + /** + * Playback Stop Request + * @example { + * "overlay": false, + * "stop": "all", + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + * "command_id": "891510ac-f3e4-11e8-af5b-de00688a4901" + * } + */ + PlaybackStopRequest: { + /** + * @description When enabled, it stops the audio being played in the overlay queue. + * @default false + * @example true + */ + overlay: boolean; + /** + * @description Use `current` to stop the current audio being played. Use `all` to stop the current audio file being played and clear all audio files from the queue. + * @default all + * @example current + */ + stop: string; + /** + * @description Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + /** + * @description Use this field to avoid duplicate commands. Telnyx will ignore any command with the same `command_id` for the same `call_control_id`. + * @example 891510ac-f3e4-11e8-af5b-de00688a4901 + */ + command_id?: string; + }; + /** @example { + * "id": "5a16902a-2ee9-4882-a247-420fc6627b62", + * "record_type": "supporting_document", + * "type": "loa", + * "portout_id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + * "document_id": "f1c5e079-9d82-4f50-95bc-ae2f6b8d84d7", + * "created_at": "2018-02-02T22:25:27.521Z", + * "updated_at": "2018-02-02T22:25:27.521Z" + * } */ + PortOutSupportingDocument: { + /** + * Format: uuid + * @example 5a16902a-2ee9-4882-a247-420fc6627b62 + */ + id: string; + /** + * @description Identifies the type of the resource. + * @example supporting_document + */ + readonly record_type: string; + /** + * @description Identifies the type of the document + * @example loa + * @enum {string} + */ + readonly type: 'loa' | 'invoice'; + /** + * Format: uuid + * @description Identifies the associated port request + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + */ + readonly portout_id: string; + /** + * Format: uuid + * @description Identifies the associated document + * @example f1c5e079-9d82-4f50-95bc-ae2f6b8d84d7 + */ + document_id: string; + /** + * @description Supporting document creation timestamp in ISO 8601 format + * @example 2018-02-02T22:25:27.521Z + */ + created_at: string; + /** + * @description Supporting document last changed timestamp in ISO 8601 format + * @example 2018-02-02T22:25:27.521Z + */ + updated_at: string; + }; + Portability: { + /** + * @description Local Routing Number, if assigned to the requested phone number + * @example 2245701999 + */ + lrn?: string; + /** + * @description Indicates whether or not the requested phone number has been ported + * @example Y + * @enum {string} + */ + ported_status?: 'Y' | 'N' | ''; + /** + * @description ISO-formatted date when the requested phone number has been ported + * @example 2017-10-20 + */ + ported_date?: string; + /** + * @description Operating Company Name (OCN) as per the Local Exchange Routing Guide (LERG) database + * @example 073H + */ + ocn?: string; + /** + * @description Type of number + * @example voip + */ + line_type?: string; + /** + * @description SPID (Service Provider ID) + * @example 073H + */ + spid?: string; + /** + * @description Service provider name + * @example Telnyx/4 + */ + spid_carrier_name?: string; + /** + * @description Service provider type + * @example 3 + */ + spid_carrier_type?: string; + /** + * @description Alternative SPID (Service Provider ID). Often used when a carrier is using a number from another carrier + * @example 073H + */ + altspid?: string; + /** + * @description Alternative service provider name + * @example Telnyx/4 + */ + altspid_carrier_name?: string; + /** + * @description Alternative service provider type + * @example 3 + */ + altspid_carrier_type?: string; + /** + * @description City name extracted from the locality in the Local Exchange Routing Guide (LERG) database + * @example WAUKEGAN + */ + city?: string; + /** @example Illinois */ + state?: string; + }; + PortabilityCheckDetails: { + /** + * @description Identifies the type of the resource. + * @example portability_check_result + */ + readonly record_type?: string; + /** + * @description Indicates whether this phone number is FastPort eligible + * @example true + */ + readonly fast_portable?: boolean; + /** + * @description If this phone number is not portable, explains why. Empty string if the number is portable. + * @example No coverage + */ + readonly not_portable_reason?: string; + /** + * @description The +E.164 formatted phone number this result is about + * @example +13125550123 + */ + readonly phone_number?: string; + /** + * @description Indicates whether this phone number is portable + * @example true + */ + readonly portable?: boolean; + }; + /** + * @description Specifies whether Telnyx is able to confirm portability this number in the United States & Canada. International phone numbers are provisional by default. + * @example confirmed + * @enum {string} + */ + PortabilityStatus: 'pending' | 'confirmed' | 'provisional'; + PortingAdditionalDocument: { + /** + * Format: uuid + * @description Uniquely identifies this additional document + * @example eef3340b-8903-4466-b445-89b697315a3a + */ + id?: string; + /** + * @description Identifies the type of additional document + * @example loa + * @enum {string} + */ + document_type?: 'loa' | 'invoice' | 'csr' | 'other'; + /** + * Format: uuid + * @description Identifies the associated document + * @example f1486bae-f067-460c-ad43-73a92848f902 + */ + document_id?: string; + /** + * @description The filename of the related document. + * @example file.txt + */ + filename?: string; + /** + * @description The content type of the related document. + * @example text/plain + */ + content_type?: string; + /** + * Format: uuid + * @description Identifies the associated porting order + * @example f1486bae-f067-460c-ad43-73a92848f902 + */ + porting_order_id?: string; + /** + * @description Identifies the type of the resource. + * @example porting_additional_document + */ + readonly record_type?: string; + /** + * Format: date-time + * @description ISO 8601 formatted date indicating when the resource was created. + * @example 2021-03-19T10:07:15.527000Z + */ + created_at?: string; + /** + * Format: date-time + * @description ISO 8601 formatted date indicating when the resource was updated. + * @example 2021-03-19T10:07:15.527000Z + */ + updated_at?: string; + }; + PortingEvent: { + /** + * Format: uuid + * @description Uniquely identifies the event. + * @example eef3340b-8903-4466-b445-89b697315a3a + */ + id?: string; + /** + * @description Identifies the event type + * @example porting_order.deleted + * @enum {string} + */ + event_type?: + | 'porting_order.deleted' + | 'porting_order.loa_updated' + | 'porting_order.messaging_changed' + | 'porting_order.status_changed' + | 'porting_order.sharing_token_expired' + | 'porting_order.new_comment' + | 'porting_order.split'; + /** + * Format: uuid + * @description Identifies the porting order associated with the event. + * @example 9471c873-e3eb-4ca1-957d-f9a451334d52 + */ + porting_order_id?: string; + /** @description Indicates the notification methods used. */ + available_notification_methods?: ('email' | 'webhook' | 'webhook_v1')[]; + /** + * @description The status of the payload generation. + * @example created + * @enum {string} + */ + payload_status?: 'created' | 'completed'; + payload?: + | components['schemas']['WebhookPortingOrderDeletedPayload'] + | components['schemas']['WebhookPortingOrderMessagingChangedPayload'] + | components['schemas']['WebhookPortingOrderStatusChangedPayload'] + | components['schemas']['WebhookPortingOrderNewCommentPayload'] + | components['schemas']['WebhookPortingOrderSplitPayload']; + /** + * @description Identifies the type of the resource. + * @example porting_event + */ + readonly record_type?: string; + /** + * Format: date-time + * @description ISO 8601 formatted date indicating when the resource was created. + * @example 2021-03-19T10:07:15.527000Z + */ + created_at?: string; + /** + * Format: date-time + * @description ISO 8601 formatted date indicating when the resource was updated. + * @example 2021-03-19T10:07:15.527000Z + */ + updated_at?: string; + }; + PortingLOAConfiguration: { + /** + * Format: uuid + * @description Uniquely identifies the LOA configuration. + * @example eef3340b-8903-4466-b445-89b697315a3a + */ + id?: string; + /** + * @description The name of the company + * @example Telnyx + */ + company_name?: string; + /** + * @description The organization that owns the LOA configuration + * @example f1486bae-f067-460c-ad43-73a92848f902 + */ + organization_id?: string; + /** + * @description The name of the LOA configuration + * @example My LOA Configuration + */ + name?: string; + /** @description The logo to be used in the LOA. */ + logo?: { + /** + * Format: uuid + * @description Identifies the document that contains the logo. + * @example f1486bae-f067-460c-ad43-73a92848f902 + */ + document_id?: string; + /** + * @description The content type of the logo. + * @example image/png + * @enum {string} + */ + content_type?: 'image/png'; + }; + /** @description The address of the company. */ + address?: { + /** + * @description The street address of the company + * @example 311 W. Superior St + */ + street_address?: string; + /** + * @description The extended address of the company + * @example Suite 504 + */ + extended_address?: string; + /** + * @description The locality of the company + * @example Chicago + */ + city?: string; + /** + * @description The administrative area of the company + * @example IL + */ + state?: string; + /** + * @description The postal code of the company + * @example 60654 + */ + zip_code?: string; + /** + * @description The country code of the company + * @example US + */ + country_code?: string; + }; + /** @description The contact information of the company. */ + contact?: { + /** + * Format: email + * @description The email address of the contact + * @example testing@telnyx.com + */ + email?: string; + /** + * @description The phone number of the contact + * @example +12003270001 + */ + phone_number?: string; + }; + /** + * @description Identifies the type of the resource. + * @example porting_loa_configuration + */ + readonly record_type?: string; + /** + * Format: date-time + * @description ISO 8601 formatted date indicating when the resource was created. + * @example 2021-03-19T10:07:15.527000Z + */ + created_at?: string; + /** + * Format: date-time + * @description ISO 8601 formatted date indicating when the resource was updated. + * @example 2021-03-19T10:07:15.527000Z + */ + updated_at?: string; + }; + PortingOrder: { + /** + * Format: uuid + * @description Uniquely identifies this porting order + * @example f1486bae-f067-460c-ad43-73a92848f902 + */ + readonly id?: string; + /** + * @description A customer-specified reference number for customer bookkeeping purposes + * @example Acct 123abc + */ + customer_reference?: string; + /** + * Format: date-time + * @description ISO 8601 formatted date indicating when the resource was created. + * @example 2021-03-19T10:07:15.527Z + */ + readonly created_at?: string; + /** + * Format: date-time + * @description ISO 8601 formatted date indicating when the resource was created. + * @example 2021-03-19T10:07:15.527Z + */ + readonly updated_at?: string; + status?: components['schemas']['PortingOrderStatus']; + /** + * @description A key to reference this porting order when contacting Telnyx customer support. This information is not available in draft porting orders. + * @example sr_123abc + */ + readonly support_key?: string; + /** + * @description A key to reference for the porting order group when contacting Telnyx customer support. This information is not available for porting orders in `draft` state + * @example pr_123abc + */ + readonly parent_support_key?: string; + /** + * @description Count of phone numbers associated with this porting order + * @example 1 + */ + readonly porting_phone_numbers_count?: number; + /** + * @description Identifies the old service provider + * @example Unreal Communications + */ + readonly old_service_provider_ocn?: string; + documents?: components['schemas']['PortingOrderDocuments']; + misc?: components['schemas']['PortingOrderMisc']; + end_user?: components['schemas']['PortingOrderEndUser']; + activation_settings?: components['schemas']['PortingOrderActivationSettings']; + phone_number_configuration?: components['schemas']['PortingOrderPhoneNumberConfiguration']; + /** + * @description The type of the phone number + * @example local + * @enum {string} + */ + phone_number_type?: + | 'landline' + | 'local' + | 'mobile' + | 'national' + | 'shared_cost' + | 'toll_free'; + /** + * @description A description of the porting order + * @example FP Telnyx + */ + readonly description?: string; + /** @description List of documentation requirements for porting numbers. Can be set directly or via the `requirement_group_id` parameter. */ + requirements?: components['schemas']['PortingOrderRequirement'][]; + /** + * @description Is true when the required documentation is met + * @example false + */ + requirements_met?: boolean; + user_feedback?: components['schemas']['PortingOrderUserFeedback']; + /** + * Format: uuid + * @description Identifies the user (or organization) who requested the porting order + * @example 40d68ba2-0847-4df2-be9c-b0e0cb673e75 + */ + user_id?: string; + /** + * Format: uri + * @example https://example.com/porting_webhooks + */ + webhook_url?: string; + /** + * @description Identifies the type of the resource. + * @example porting_order + */ + readonly record_type?: string; + messaging?: components['schemas']['PortingOrderMessaging']; + }; + PortingOrderActivationSettings: { + /** + * Format: date-time + * @description ISO 8601 formatted Date/Time requested for the FOC date + * @example 2021-03-19T10:07:15.527Z + */ + foc_datetime_requested?: string; + /** + * Format: date-time + * @description ISO 8601 formatted Date/Time of the FOC date + * @example 2021-03-19T10:07:15.527Z + */ + foc_datetime_actual?: string; + /** + * @description Indicates whether this porting order is eligible for FastPort + * @example true + */ + readonly fast_port_eligible?: boolean; + activation_status?: components['schemas']['PortingOrderActivationStatus']; + }; + /** + * @description Activation status + * @example Active + * @enum {string} + */ + PortingOrderActivationStatus: + | 'New' + | 'Pending' + | 'Conflict' + | 'Cancel Pending' + | 'Failed' + | 'Concurred' + | 'Activate RDY' + | 'Disconnect Pending' + | 'Concurrence Sent' + | 'Old' + | 'Sending' + | 'Active' + | 'Cancelled'; + /** @description Can be specified directly or via the `requirement_group_id` parameter. */ + PortingOrderDocuments: { + /** + * Format: uuid + * @description Returned ID of the submitted LOA via the Documents endpoint + * @example 64ffb720-04c7-455b-92d6-20fcca92e935 + */ + loa?: string; + /** + * Format: uuid + * @description Returned ID of the submitted Invoice via the Documents endpoint + * @example ce74b771-d23d-4960-81ec-8741b3862146 + */ + invoice?: string; + }; + PortingOrderEndUser: { + admin?: components['schemas']['PortingOrderEndUserAdmin']; + location?: components['schemas']['PortingOrderEndUserLocation']; + }; + PortingOrderEndUserAdmin: { + /** + * @description Person Name or Company name requesting the port + * @example Porter McPortersen + */ + entity_name?: string; + /** + * @description Name of person authorizing the porting order + * @example Porter McPortersen II + */ + auth_person_name?: string; + /** + * @description Billing phone number associated with these phone numbers + * @example 13035551234 + */ + billing_phone_number?: string; + /** + * @description The authorized person's account number with the current service provider + * @example 123abc + */ + account_number?: string; + /** + * @description European tax identification number. Applicable only in the European Union + * @example 1234abcd + */ + tax_identifier?: string; + /** + * @description PIN/passcode possibly required by the old service provider for extra verification + * @example 1234 + */ + pin_passcode?: string; + /** + * @description European business identification number. Applicable only in the European Union + * @example abc123 + */ + business_identifier?: string; + }; + PortingOrderEndUserLocation: { + /** + * @description First line of billing address + * @example 311 W. Superior St + */ + street_address?: string; + /** + * @description Second line of billing address + * @example Suite 504 + */ + extended_address?: string; + /** + * @description City or municipality of billing address + * @example Chicago + */ + locality?: string; + /** + * @description State, province, or similar of billing address + * @example IL + */ + administrative_area?: string; + /** + * @description Postal Code of billing address + * @example 60654 + */ + postal_code?: string; + /** + * @description ISO3166-1 alpha-2 country code of billing address + * @example US + */ + country_code?: string; + }; + /** @description Information about messaging porting process. */ + PortingOrderMessaging: { + /** + * @description Indicates whether the porting order can also port messaging capabilities. + * @example true + */ + messaging_capable?: boolean; + /** + * @description Indicates whether Telnyx will port messaging capabilities from the losing carrier. If false, any messaging capabilities will stay with their current provider. + * @example true + */ + enable_messaging?: boolean; + /** + * @description The current status of the messaging porting. + * @example pending + * @enum {string} + */ + messaging_port_status?: + | 'not_applicable' + | 'pending' + | 'activating' + | 'exception' + | 'canceled' + | 'partial_port_complete' + | 'ported'; + /** + * @description Indicates whether the messaging porting has been completed. + * @example false + */ + messaging_port_completed?: boolean; + }; + PortingOrderMisc: { + type?: components['schemas']['PortingOrderType']; + /** + * @description Remaining numbers can be either kept with their current service provider or disconnected. 'new_billing_telephone_number' is required when 'remaining_numbers_action' is 'keep'. + * @example disconnect + * @enum {string} + */ + remaining_numbers_action?: 'keep' | 'disconnect'; + /** @description New billing phone number for the remaining numbers. Used in case the current billing phone number is being ported to Telnyx. This will be set on your account with your current service provider and should be one of the numbers remaining on that account. */ + new_billing_phone_number?: string; + }; + PortingOrderPhoneNumberConfiguration: { + /** + * @description identifies the billing group to set on the numbers when ported + * @example f1486bae-f067-460c-ad43-73a92848f902 + */ + billing_group_id?: string; + /** + * @description identifies the connection to set on the numbers when ported + * @example f1486bae-f067-460c-ad43-73a92848f902 + */ + connection_id?: string; + /** + * @description identifies the messaging profile to set on the numbers when ported + * @example f1486bae-f067-460c-ad43-73a92848f901 + */ + messaging_profile_id?: string; + /** + * @description identifies the emergency address to set on the numbers when ported + * @example f1486bae-f067-460c-ad43-73a92848f902 + */ + emergency_address_id?: string; + /** @example [ + * "abc", + * "123" + * ] */ + tags?: string[]; + }; + PortingOrderRequirement: { + /** + * @description Type of value expected on field_value field + * @example document + * @enum {string} + */ + field_type?: 'document'; + /** + * @description identifies the document that satisfies this requirement + * @example 9787fb5f-cbe5-4de4-b765-3303774ee9fe + */ + field_value?: string; + /** + * @description Identifies the requirement type that meets this requirement + * @example 59b0762a-b274-4f76-ac32-4d5cf0272e66 + */ + requirement_type_id?: string; + /** + * @description Identifies the type of the resource. + * @example porting_requirement + */ + record_type?: string; + }; + PortingOrderRequirementDetail: { + /** + * @description Type of value expected on field_value field + * @example document + * @enum {string} + */ + field_type?: 'document' | 'textual'; + /** + * @description Identifies the document that satisfies this requirement + * @example 9787fb5f-cbe5-4de4-b765-3303774ee9fe + */ + field_value?: string; + /** @description Identifies the requirement type that meets this requirement */ + requirement_type?: { + /** + * @description The acceptance criteria for the requirement type + * @example { + * "acceptable_values": [] + * } + */ + acceptance_criteria?: Record; + /** + * @description A description of the requirement type + * @example A copy of the latest phone bill from the current provider + */ + description?: string; + /** + * @description An example of the requirement type + * @example Most recent phone bill + */ + example?: string; + /** + * @description Identifies the requirement type + * @example 53970723-fbff-4f46-a975-f62be6c1a585 + */ + id?: string; + /** + * @description The name of the requirement type + * @example Latest Invoice + */ + name?: string; + /** + * @description The type of the requirement type + * @example document + */ + type?: string; + }; + /** + * @description Status of the requirement + * @example approved + */ + requirement_status?: string; + /** + * @description Identifies the type of the resource. + * @example porting_requirement + */ + record_type?: string; + }; + PortingOrderSharingToken: { + /** + * Format: uuid + * @description Uniquely identifies this sharing token + * @example 0a4b78a0-d416-4761-94f7-46c72ec56547 + */ + id?: string; + /** + * Format: uuid + * @description Identifies the porting order resource being shared + * @example f1486bae-f067-460c-ad43-73a92848f902 + */ + porting_order_id?: string; + /** + * @description The number of seconds until the sharing token expires + * @example 3600 + */ + expires_in_seconds?: number; + /** + * @description The permissions granted to the sharing token + * @example [ + * "porting_order.document.read", + * "porting_order.document.update" + * ] + */ + permissions?: ( + | 'porting_order.document.read' + | 'porting_order.document.update' + )[]; + /** + * @description A signed JWT token that can be used to access the shared resource + * @example eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2ODk4OTQ2NzcsImlzdCI6MTY4OTg5MTA3NywicGVybWlzc2lvbnMiOlsicG9ydGluZ19vcmRlci5kb2N1bWVudC5yZWFkIl0sInBvcnRpbmdfb3JkZXJfaWQiOiJmZDRiODZjOC00OTdkLTRjNmQtOTYwOS1hNzg5ZTRlMTRjZmUifQ.CT0HRF6OLj7VPZ8p5Y_0S8rOL8SEUznwJJkR-YReKwc + */ + token?: string; + /** + * Format: date-time + * @description ISO 8601 formatted date indicating when the sharing token expires. + * @example 2021-03-19T10:07:15.527000Z + */ + expires_at?: string; + /** + * @description Identifies the type of the resource. + * @example porting_order_sharing_token + */ + readonly record_type?: string; + /** + * Format: date-time + * @description ISO 8601 formatted date indicating when the resource was created. + * @example 2021-03-19T10:07:15.527000Z + */ + created_at?: string; + }; + /** @description Porting order status */ + PortingOrderStatus: { + /** @description A list of 0 or more details about this porting order's status */ + details?: components['schemas']['PortingOrdersExceptionType'][]; + /** + * @description The current status of the porting order + * @example ported + * @enum {string} + */ + value?: + | 'draft' + | 'in-process' + | 'submitted' + | 'exception' + | 'foc-date-confirmed' + | 'ported' + | 'cancelled' + | 'cancel-pending'; + }; + /** + * @description A port can be either 'full' or 'partial'. When type is 'full' the other attributes should be omitted. + * @example full + * @enum {string} + */ + PortingOrderType: 'full' | 'partial'; + PortingOrderUserFeedback: { + /** + * @description Once an order is ported, cancellation is requested or the request is cancelled, the user may rate their experience + * @example 5 + */ + user_rating?: number; + /** + * @description A comment related to the customer rating. + * @example I loved my experience porting numbers with Telnyx + */ + user_comment?: string; + }; + PortingOrdersActivationJob: { + /** + * Format: uuid + * @description Uniquely identifies this activation job + * @example f1486bae-f067-460c-ad43-73a92848f902 + */ + readonly id?: string; + /** + * @description Specifies the status of this activation job + * @enum {string} + */ + status?: 'created' | 'in-process' | 'completed' | 'failed'; + /** + * @description Specifies the type of this activation job + * @enum {string} + */ + activation_type?: 'scheduled' | 'on-demand'; + /** + * Format: date-time + * @description ISO 8601 formatted date indicating when the activation job should be executed. This time should be between some activation window. + * @example 2021-03-19T10:07:15.527Z + */ + activate_at?: string; + /** @description List of allowed activation windows for this activation job */ + activation_windows?: { + /** + * Format: date-time + * @description ISO 8601 formatted date indicating when the activation window starts + * @example 2021-03-19T10:07:15.527Z + */ + start_at?: string; + /** + * Format: date-time + * @description ISO 8601 formatted date indicating when the activation window ends + * @example 2021-03-19T10:07:15.527Z + */ + end_at?: string; + }[]; + /** + * @description Identifies the type of the resource. + * @example porting_activation_job + */ + readonly record_type?: string; + /** + * Format: date-time + * @description ISO 8601 formatted date indicating when the resource was created. + * @example 2021-03-19T10:07:15.527Z + */ + readonly created_at?: string; + /** + * Format: date-time + * @description ISO 8601 formatted date indicating when the resource was created. + * @example 2021-03-19T10:07:15.527Z + */ + readonly updated_at?: string; + }; + /** PortingOrdersAllowedFocWindow */ + PortingOrdersAllowedFocWindow: { + /** + * Format: date-time + * @description ISO 8601 formatted date indicating the start of the range of foc window. + * @example 2021-03-19T10:07:15.527Z + */ + readonly started_at?: string; + /** + * Format: date-time + * @description ISO 8601 formatted date indicating the end of the range of foc window + * @example 2021-03-19T10:07:15.527Z + */ + readonly ended_at?: string; + /** + * @description Identifies the type of the resource. + * @example porting_order + */ + readonly record_type?: string; + }; + PortingOrdersComment: { + /** + * Format: uuid + * @example f1486bae-f067-460c-ad43-73a92848f902 + */ + id?: string; + /** + * @description Body of comment + * @example Great experience so far + */ + body?: string; + /** + * Format: uuid + * @example f1486bae-f067-460c-ad43-73a92848f902 + */ + porting_order_id?: string; + /** + * @description Indicates whether this comment was created by a Telnyx Admin, user, or system + * @example user + * @enum {string} + */ + user_type?: 'admin' | 'user' | 'system'; + /** + * @description Identifies the type of the resource. + * @example porting_comment + */ + record_type?: string; + /** + * Format: date-time + * @description ISO 8601 formatted date indicating when the resource was created. + * @example 2021-03-19T10:07:15.527Z + */ + created_at?: string; + }; + PortingOrdersExceptionType: { + /** + * @description Identifier of an exception type + * @example ENTITY_NAME_MISMATCH + * @enum {string} + */ + code?: + | 'ACCOUNT_NUMBER_MISMATCH' + | 'AUTH_PERSON_MISMATCH' + | 'BTN_ATN_MISMATCH' + | 'ENTITY_NAME_MISMATCH' + | 'FOC_EXPIRED' + | 'FOC_REJECTED' + | 'LOCATION_MISMATCH' + | 'LSR_PENDING' + | 'MAIN_BTN_PORTING' + | 'OSP_IRRESPONSIVE' + | 'OTHER' + | 'PASSCODE_PIN_INVALID' + | 'PHONE_NUMBER_HAS_SPECIAL_FEATURE' + | 'PHONE_NUMBER_MISMATCH' + | 'PHONE_NUMBER_NOT_PORTABLE' + | 'PORT_TYPE_INCORRECT' + | 'PORTING_ORDER_SPLIT_REQUIRED' + | 'POSTAL_CODE_MISMATCH' + | 'RATE_CENTER_NOT_PORTABLE' + | 'SV_CONFLICT' + | 'SV_UNKNOWN_FAILURE'; + /** + * @description Description of an exception type + * @example Entity name does not match that on the CSR + */ + description?: string; + }; + PortingPhoneNumber: { + /** + * @description The current status of the porting order + * @example in-process + * @enum {string} + */ + porting_order_status?: + | 'draft' + | 'in-process' + | 'submitted' + | 'exception' + | 'foc-date-confirmed' + | 'cancel-pending' + | 'ported' + | 'cancelled'; + /** + * @description The type of the phone number + * @example local + * @enum {string} + */ + phone_number_type?: + | 'landline' + | 'local' + | 'mobile' + | 'national' + | 'shared_cost' + | 'toll_free'; + /** + * @description E164 formatted phone number + * @example 13035550987 + */ + phone_number?: string; + /** + * Format: uuid + * @description Identifies the associated port request + * @example f1486bae-f067-460c-ad43-73a92848f902 + */ + porting_order_id?: string; + /** + * @description A key to reference this porting order when contacting Telnyx customer support + * @example sr_a12345 + */ + support_key?: string; + activation_status?: components['schemas']['PortingOrderActivationStatus']; + portability_status?: components['schemas']['PortabilityStatus']; + /** + * @description The current status of the requirements in a INTL porting order + * @example approved + * @enum {string} + */ + requirements_status?: + | 'requirement-info-pending' + | 'requirement-info-under-review' + | 'requirement-info-exception' + | 'approved'; + /** + * @description Identifies the type of the resource. + * @example porting_phone_number + */ + readonly record_type?: string; + }; + PortingPhoneNumberBlock: { + /** + * Format: uuid + * @description Uniquely identifies this porting phone number block. + * @example f24151b6-3389-41d3-8747-7dd8c681e5e2 + */ + readonly id?: string; + /** + * @description Specifies the country code for this porting phone number block. It is a two-letter ISO 3166-1 alpha-2 country code. + * @example DE + */ + country_code?: string; + /** + * @description Specifies the phone number type for this porting phone number block. + * @example local + * @enum {string} + */ + phone_number_type?: + | 'landline' + | 'local' + | 'mobile' + | 'national' + | 'shared_cost' + | 'toll_free'; + /** @description Specifies the phone number range for this porting phone number block. */ + phone_number_range?: { + /** + * @description Specifies the start of the phone number range for this porting phone number block. + * @example +4930244999901 + */ + start_at?: string; + /** + * @description Specifies the end of the phone number range for this porting phone number block. + * @example +4930244999910 + */ + end_at?: string; + }; + /** @description Specifies the activation ranges for this porting phone number block. The activation range must be within the phone number range and should not overlap with other activation ranges. */ + activation_ranges?: { + /** + * @description Specifies the start of the activation range. Must be greater or equal the start of the phone number range. + * @example +4930244999901 + */ + start_at?: string; + /** + * @description Specifies the end of the activation range. It must be no more than the end of the phone number range. + * @example +4930244999910 + */ + end_at?: string; + }[]; + /** + * @description Identifies the type of the resource. + * @example porting_phone_number_block + */ + readonly record_type?: string; + /** + * Format: date-time + * @description ISO 8601 formatted date indicating when the resource was created. + * @example 2021-03-19T10:07:15.527Z + */ + readonly created_at?: string; + /** + * Format: date-time + * @description ISO 8601 formatted date indicating when the resource was last updated. + * @example 2021-03-19T10:07:15.527Z + */ + readonly updated_at?: string; + }; + PortingPhoneNumberConfiguration: { + /** + * Format: uuid + * @description Uniquely identifies this phone number configuration + * @example eef3340b-8903-4466-b445-89b697315a3a + */ + id?: string; + /** + * Format: uuid + * @description Identifies the associated user bundle + * @example daa4308e-742f-4867-97f2-3073db13319a + */ + user_bundle_id?: string; + /** + * Format: uuid + * @description Identifies the associated porting phone number + * @example f1486bae-f067-460c-ad43-73a92848f902 + */ + porting_phone_number_id?: string; + /** + * @description Identifies the type of the resource. + * @example porting_phone_number_configuration + */ + readonly record_type?: string; + /** + * Format: date-time + * @description ISO 8601 formatted date indicating when the resource was created. + * @example 2021-03-19T10:07:15.527000Z + */ + created_at?: string; + /** + * Format: date-time + * @description ISO 8601 formatted date indicating when the resource was updated. + * @example 2021-03-19T10:07:15.527000Z + */ + updated_at?: string; + }; + PortingPhoneNumberExtension: { + /** + * Format: uuid + * @description Uniquely identifies this porting phone number extension. + * @example f24151b6-3389-41d3-8747-7dd8c681e5e2 + */ + readonly id?: string; + /** + * Format: uuid + * @description Identifies the porting phone number associated with this porting phone number extension. + * @example f24151b6-3389-41d3-8747-7dd8c681e5e2 + */ + porting_phone_number_id?: string; + /** @description Specifies the extension range for this porting phone number extension. */ + extension_range?: { + /** + * @description Specifies the start of the extension range for this porting phone number extension. + * @example 1 + */ + start_at?: number; + /** + * @description Specifies the end of the extension range for this porting phone number extension. + * @example 10 + */ + end_at?: number; + }; + /** @description Specifies the activation ranges for this porting phone number extension. The activation range must be within the extension range and should not overlap with other activation ranges. */ + activation_ranges?: { + /** + * @description Specifies the start of the activation range. Must be greater or equal the start of the extension range. + * @example 1 + */ + start_at?: number; + /** + * @description Specifies the end of the activation range. It must be no more than the end of the extension range. + * @example 10 + */ + end_at?: number; + }[]; + /** + * @description Identifies the type of the resource. + * @example porting_phone_number_extension + */ + readonly record_type?: string; + /** + * Format: date-time + * @description ISO 8601 formatted date indicating when the resource was created. + * @example 2021-03-19T10:07:15.527Z + */ + readonly created_at?: string; + /** + * Format: date-time + * @description ISO 8601 formatted date indicating when the resource was last updated. + * @example 2021-03-19T10:07:15.527Z + */ + readonly updated_at?: string; + }; + PortingReport: { + /** + * Format: uuid + * @description Uniquely identifies the report. + * @example eef3340b-8903-4466-b445-89b697315a3a + */ + id?: string; + /** + * @description Identifies the type of report + * @example export_porting_orders_csv + * @enum {string} + */ + report_type?: 'export_porting_orders_csv'; + /** + * @description The current status of the report generation. + * @example completed + * @enum {string} + */ + status?: 'pending' | 'completed'; + params?: components['schemas']['ExportPortingOrdersCSVReport']; + /** + * Format: uuid + * @description Identifies the document that was uploaded when report was generated. This field is only populated when the report is under completed status. + * @example f1486bae-f067-460c-ad43-73a92848f902 + */ + document_id?: string; + /** + * @description Identifies the type of the resource. + * @example porting_report + */ + readonly record_type?: string; + /** + * Format: date-time + * @description ISO 8601 formatted date indicating when the resource was created. + * @example 2021-03-19T10:07:15.527000Z + */ + created_at?: string; + /** + * Format: date-time + * @description ISO 8601 formatted date indicating when the resource was updated. + * @example 2021-03-19T10:07:15.527000Z + */ + updated_at?: string; + }; + PortingVerificationCode: { + /** + * Format: uuid + * @description Uniquely identifies this porting verification code + * @example f1486bae-f067-460c-ad43-73a92848f902 + */ + id?: string; + /** + * @description E164 formatted phone number + * @example +13035550987 + */ + phone_number?: string; + /** + * @description Indicates whether the verification code has been verified + * @example true + */ + verified?: boolean; + /** + * Format: uuid + * @description Identifies the associated porting order + * @example f1486bae-f067-460c-ad43-73a92848f902 + */ + porting_order_id?: string; + /** + * @description Identifies the type of the resource. + * @example porting_verification_code + */ + readonly record_type?: string; + /** + * Format: date-time + * @description ISO 8601 formatted date indicating when the resource was created. + * @example 2021-03-19T10:07:15.527000Z + */ + created_at?: string; + /** + * Format: date-time + * @description ISO 8601 formatted date indicating when the resource was updated. + * @example 2021-03-19T10:07:15.527000Z + */ + updated_at?: string; + }; + /** @example { + * "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + * "record_type": "portout", + * "body": "This is a comment", + * "portout_id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + * "user_id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + * "created_at": "2018-02-02T22:25:27.521Z" + * } */ + PortoutComment: { + /** @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 */ + id: string; + /** + * @description Identifies the type of the resource. + * @example portout + */ + readonly record_type?: string; + /** + * @description Comment body + * @example This is a comment + */ + body: string; + /** + * @description Identifies the associated port request + * @default null + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + */ + portout_id: string; + /** + * @description Identifies the user who created the comment. Will be null if created by Telnyx Admin + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + */ + user_id: string; + /** + * @description Comment creation timestamp in ISO 8601 format + * @example 2018-02-02T22:25:27.521Z + */ + created_at: string; + }; + PortoutDetails: { + /** @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 */ + id?: string; + /** + * @description Identifies the type of the resource. + * @example portout + */ + readonly record_type?: string; + /** + * @description Phone numbers associated with this portout + * @example [ + * "+35312345678" + * ] + */ + phone_numbers?: string[]; + /** + * @description Name of person authorizing the porting order + * @example McPortersen + */ + authorized_name?: string; + /** + * @description Carrier the number will be ported out to + * @example test + */ + carrier_name?: string; + /** + * @description The current carrier + * @example telnyx + */ + current_carrier?: string; + /** + * @description Person name or company name requesting the port + * @example McPortersen + */ + end_user_name?: string; + /** + * @description City or municipality of billing address + * @example Chicago + */ + city?: string; + /** + * @description State, province, or similar of billing address + * @example IL + */ + state?: string; + /** + * @description Postal Code of billing address + * @example 00000 + */ + zip?: string; + /** + * @description The Local Service Request + * @example [ + * "https://example.com/files/lsr.pdf" + * ] + */ + lsr?: string[]; + /** + * @description Port order number assigned by the carrier the number will be ported out to + * @example 00000000 + */ + pon?: string; + /** + * @description The reason why the order is being rejected by the user. If the order is authorized, this field can be left null + * @example null + */ + reason?: string; + /** + * @description First line of billing address (street address) + * @example 000 Example Street + */ + service_address?: string; + /** + * @description ISO 8601 formatted Date/Time of the FOC date + * @example 2018-02-02T22:25:27.521Z + */ + foc_date?: string; + /** + * @description ISO 8601 formatted Date/Time of the user requested FOC date + * @example 2018-02-02T22:25:27.521Z + */ + requested_foc_date?: string; + /** + * @description New service provider spid + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + */ + spid?: string; + /** + * @description A key to reference this port out request when contacting Telnyx customer support + * @example PO_764725 + */ + support_key?: string; + /** + * @description Status of portout request + * @example rejected + * @enum {string} + */ + status?: + | 'pending' + | 'authorized' + | 'ported' + | 'rejected' + | 'rejected-pending' + | 'canceled'; + /** + * @description Is true when the number is already ported + * @example false + */ + already_ported?: boolean; + /** + * Format: uuid + * @description Identifies the user (or organization) who requested the port out + * @example 7865816a-ee85-4e50-b19e-52983dcc6d4a + */ + user_id?: string; + /** + * Format: uuid + * @description Telnyx partner providing network coverage + * @example 0e66ed3b-37e6-4fed-93d6-a30ce2493661 + */ + vendor?: string; + /** + * @description ISO 8601 formatted date of when the portout was created + * @example 2018-02-02T22:25:27.521Z + */ + created_at?: string; + /** + * @description ISO 8601 formatted date of when the portout was created + * @example 2018-02-02T22:25:27.521Z + */ + inserted_at?: string; + /** + * @description ISO 8601 formatted date of when the portout was last updated + * @example 2018-02-02T22:25:27.521Z + */ + updated_at?: string; + }; + PortoutEvent: { + /** + * Format: uuid + * @description Uniquely identifies the event. + * @example eef3340b-8903-4466-b445-89b697315a3a + */ + id?: string; + /** + * @description Identifies the event type + * @example portout.status_changed + * @enum {string} + */ + event_type?: + | 'portout.status_changed' + | 'portout.foc_date_changed' + | 'portout.new_comment'; + /** + * Format: uuid + * @description Identifies the port-out order associated with the event. + * @example 9471c873-e3eb-4ca1-957d-f9a451334d52 + */ + portout_id?: string; + /** @description Indicates the notification methods used. */ + available_notification_methods?: ('email' | 'webhook')[]; + /** + * @description The status of the payload generation. + * @example created + * @enum {string} + */ + payload_status?: 'created' | 'completed'; + payload?: + | components['schemas']['WebhookPortoutStatusChangedPayload'] + | components['schemas']['WebhookPortoutNewCommentPayload'] + | components['schemas']['WebhookPortoutFocDateChangedPayload']; + /** + * @description Identifies the type of the resource. + * @example portout_event + */ + readonly record_type?: string; + /** + * Format: date-time + * @description ISO 8601 formatted date indicating when the resource was created. + * @example 2021-03-19T10:07:15.527000Z + */ + created_at?: string; + /** + * Format: date-time + * @description ISO 8601 formatted date indicating when the resource was updated. + * @example 2021-03-19T10:07:15.527000Z + */ + updated_at?: string; + }; + PortoutReport: { + /** + * Format: uuid + * @description Uniquely identifies the report. + * @example eef3340b-8903-4466-b445-89b697315a3a + */ + id?: string; + /** + * @description Identifies the type of report + * @example export_portouts_csv + * @enum {string} + */ + report_type?: 'export_portouts_csv'; + /** + * @description The current status of the report generation. + * @example completed + * @enum {string} + */ + status?: 'pending' | 'completed'; + params?: components['schemas']['ExportPortoutsCSVReport']; + /** + * Format: uuid + * @description Identifies the document that was uploaded when report was generated. This field is only populated when the report is under completed status. + * @example f1486bae-f067-460c-ad43-73a92848f902 + */ + document_id?: string; + /** + * @description Identifies the type of the resource. + * @example portout_report + */ + readonly record_type?: string; + /** + * Format: date-time + * @description ISO 8601 formatted date indicating when the resource was created. + * @example 2021-03-19T10:07:15.527000Z + */ + created_at?: string; + /** + * Format: date-time + * @description ISO 8601 formatted date indicating when the resource was updated. + * @example 2021-03-19T10:07:15.527000Z + */ + updated_at?: string; + }; + PresignedObjectUrl: { + content?: { + /** @description The token for the object */ + token?: string; + /** @description The presigned URL for the object */ + presigned_url?: string; + /** + * Format: date-time + * @description The expiration time of the token + */ + expires_at?: string; + }; + }; + PresignedObjectUrlParams: { + /** + * @description The time to live of the token in seconds + * @example 60 + */ + ttl?: number; + }; + PrivateWirelessGateway: { + /** + * Format: uuid + * @description Identifies the resource. + * @example 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + */ + readonly id?: string; + /** + * Format: uuid + * @description The identification of the related network resource. + * @example 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + */ + network_id?: string; + /** @example private_wireless_gateway */ + readonly record_type?: string; + /** + * @description ISO 8601 formatted date-time indicating when the resource was created. + * @example 2018-02-02T22:25:27.521Z + */ + readonly created_at?: string; + /** + * @description ISO 8601 formatted date-time indicating when the resource was updated. + * @example 2018-02-02T22:25:27.521Z + */ + readonly updated_at?: string; + /** + * @description The private wireless gateway name. + * @example My private wireless gateway + */ + name?: string; + /** + * @description The geographical region where the Private Wireless Gateway is deployed to. + * @default ashburn-va + * @example ashburn-va + */ + region_code: string; + status?: components['schemas']['PrivateWirelessGatewayStatus']; + /** + * @description IP block used to assign IPs to the SIM cards in the Private Wireless Gateway. + * @default null + * @example 100.64.1.0/24 + */ + readonly ip_range: string; + /** @description A list of the resources that have been assigned to the Private Wireless Gateway. */ + assigned_resources?: components['schemas']['PWGAssignedResourcesSummary'][]; + }; + /** @example { + * "network_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58", + * "name": "My private wireless gateway" + * } */ + PrivateWirelessGatewayRequest: { + /** + * Format: uuid + * @description The identification of the related network resource. + * @example 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + */ + network_id?: string; + /** + * @description The private wireless gateway name. + * @example My private wireless gateway + */ + name?: string; + }; + /** @description The current status or failure details of the Private Wireless Gateway. */ + PrivateWirelessGatewayStatus: { + /** + * @description The current status or failure details of the Private Wireless Gateway.
    + *
  • provisioning - the Private Wireless Gateway is being provisioned.
  • + *
  • provisioned - the Private Wireless Gateway was provisioned and able to receive connections.
  • + *
  • failed - the provisioning had failed for a reason and it requires an intervention.
  • + *
  • decommissioning - the Private Wireless Gateway is being removed from the network.
  • + *
+ * Transitioning between the provisioning and provisioned states may take some time. + * @default provisioning + * @example provisioned + * @enum {string} + */ + readonly value: + | 'provisioning' + | 'provisioned' + | 'failed' + | 'decommissioning'; + /** + * @description This attribute provides a human-readable explanation of why a failure happened. + * @default null + * @example null + */ + readonly error_description: string; + /** + * @description This attribute is an [error code](https://developers.telnyx.com/api/errors) related to the failure reason. + * @default null + * @example null + */ + readonly error_code: string; + }; + /** ProfileAssignmentPhoneNumbers */ + ProfileAssignmentPhoneNumbers: { + /** + * Taskid + * @description The ID of the task associated with the phone number. + * @example 667a80f8-b0a9-49d0-b9ab-a7a1bcc45086 + */ + taskId: string; + /** + * Phonenumber + * @description The phone number that the status is being checked for. + * @example +12024567890 + */ + phoneNumber: string; + /** + * Status + * @description The status of the associated phone number assignment. + * @example pending + */ + status: string; + }; + /** PublicCompany */ + PublicCompany: { + /** Symbol */ + symbol?: string; + exchange?: components['schemas']['Exchange']; + /** Iso2 */ + iso2?: string; + /** Isin */ + isin?: string; + /** Displayname */ + displayName?: string; + }; + /** PublicCompanyRecordSet */ + PublicCompanyRecordSet: { + /** Records */ + records?: components['schemas']['PublicCompany'][]; + /** Page */ + page?: number; + /** Totalrecords */ + totalRecords?: number; + }; + PublicInternetGateway: components['schemas']['Record'] & + components['schemas']['Interface'] & { + /** + * @description Identifies the type of the resource. + * @example public_internet_gateway + */ + readonly record_type?: string; + /** + * @description The publically accessible ip for this interface. + * @example 127.0.0.1 + */ + readonly public_ip?: string; + }; + PublicInternetGatewayCreate: components['schemas']['PublicInternetGateway'] & + components['schemas']['RegionIn'] & + Record; + PublicInternetGatewayRead: components['schemas']['PublicInternetGateway'] & + components['schemas']['RegionOut']; + /** Successful response with details about a push credential */ + PushCredential: { + /** + * @description Unique identifier of a push credential + * @example 0ccc7b54-4df3-4bcb-a65a-3da1ecc997d7 + */ + id: string; + /** + * @description Apple certificate for sending push notifications. For iOS only + * @example -----BEGIN CERTIFICATE----- MIIGVDCCBTKCAQEAsNlRJVZn9ZvXcECQm65czs... -----END CERTIFICATE----- + */ + certificate: string; + /** + * @description Apple private key for a given certificate for sending push notifications. For iOS only + * @example -----BEGIN RSA PRIVATE KEY----- MIIEpQIBAAKCAQEAsNlRJVZn9ZvXcECQm65czs... -----END RSA PRIVATE KEY----- + */ + private_key: string; + /** + * @description Google server key for sending push notifications. For Android only + * @example { + * "private_key": "BBBB0J56jd8kda:APA91vjb11BCjvxx3Jxja...", + * "client_email": "account@customer.org" + * } + */ + project_account_json_file: Record; + /** + * @description Alias to uniquely identify a credential + * @example LucyCredential + */ + alias: string; + /** + * @description Type of mobile push credential. Either ios or android + * @example ios + */ + type: string; + /** @example push_credential */ + readonly record_type: string; + /** + * Format: datetime + * @description ISO 8601 timestamp when the room was created + * @example 2021-03-26T17:51:59.588408Z + */ + created_at: string; + /** + * Format: datetime + * @description ISO 8601 timestamp when the room was updated. + * @example 2021-03-26T17:51:59.588408Z + */ + updated_at: string; + }; + /** + * @description The quality of the fax. The `ultra` settings provides the highest quality available, but also present longer fax processing times. `ultra_light` is best suited for images, wihle `ultra_dark` is best suited for text. + * @default high + * @example high + * @enum {string} + */ + Quality: 'normal' | 'high' | 'very_high' | 'ultra_light' | 'ultra_dark'; + /** + * Queue + * @example { + * "record_type": "queue", + * "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + * "name": "support", + * "created_at": "2019-01-23T18:10:02.574Z", + * "updated_at": "2019-01-23T18:10:02.574Z", + * "current_size": 20, + * "max_size": 50, + * "average_wait_time_secs": 175 + * } + */ + Queue: { + /** + * @example queue + * @enum {string} + */ + record_type: 'queue'; + /** + * @description Uniquely identifies the queue + * @example 3fa85f64-5717-4562-b3fc-2c963f66afa6 + */ + id: string; + /** + * @description Name of the queue + * @example support + */ + name: string; + /** + * @description ISO 8601 formatted date of when the queue was created + * @example 2019-01-23T18:10:02.574Z + */ + created_at: string; + /** + * @description ISO 8601 formatted date of when the queue was last updated + * @example 2019-01-23T18:10:02.574Z + */ + updated_at: string; + /** + * @description The number of calls currently in the queue + * @example 20 + */ + current_size: number; + /** + * @description The maximum number of calls allowed in the queue + * @example 50 + */ + max_size: number; + /** + * @description The average time that the calls currently in the queue have spent waiting, given in seconds. + * @example 175 + */ + average_wait_time_secs: number; + }; + /** + * QueueCall + * @example { + * "call_control_id": "v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg", + * "call_leg_id": "2dc6fc34-f9e0-11ea-b68e-02420a0f7768", + * "call_session_id": "2dc1b3c8-f9e0-11ea-bc5a-02420a0f7768", + * "record_type": "queue_call", + * "connection_id": "7267xxxxxxxxxxxxxx", + * "from": "+18005550101", + * "to": "+18005550102", + * "enqueued_at": "2019-01-23T18:10:02.574Z", + * "wait_time_secs": 145, + * "queue_position": 3, + * "queue_id": "ae1626cc-6f42-11ea-becd-02420a0f8b69" + * } + */ + QueueCall: { + /** + * @example queue_call + * @enum {string} + */ + record_type: 'queue_call'; + /** + * @description ID that is unique to the call session and can be used to correlate webhook events. Call session is a group of related call legs that logically belong to the same phone call, e.g. an inbound and outbound leg of a transferred call + * @example 428c31b6-7af4-4bcb-b68e-5013ef9657c1 + */ + call_session_id: string; + /** + * @description ID that is unique to the call and can be used to correlate webhook events + * @example 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + */ + call_leg_id: string; + /** + * @description Unique identifier and token for controlling the call. + * @example v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg + */ + call_control_id: string; + /** + * @description Call Control App ID (formerly Telnyx connection ID) used in the call. + * @example 7267xxxxxxxxxxxxxx + */ + connection_id: string; + /** + * @description Number or SIP URI placing the call. + * @example +35319605860 + */ + from: string; + /** + * @description Destination number or SIP URI of the call. + * @example +13129457420 + */ + to: string; + /** + * @description ISO 8601 formatted date of when the call was put in the queue + * @example 2019-01-23T18:10:02.574Z + */ + enqueued_at: string; + /** + * @description The time the call has been waiting in the queue, given in seconds + * @example 272 + */ + wait_time_secs: number; + /** + * @description Current position of the call in the queue + * @example 3 + */ + queue_position: number; + /** + * @description Unique identifier of the queue the call is in. + * @example ae1626cc-6f42-11ea-becd-02420a0f8b69 + */ + queue_id: string; + }; + ReadComment: components['schemas']['Comment']; + Record: { + /** + * Format: uuid + * @description Identifies the resource. + * @example 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + */ + readonly id?: string; + /** + * @description Identifies the type of the resource. + * @example sample_record_type + */ + readonly record_type?: string; + /** + * @description ISO 8601 formatted date-time indicating when the resource was created. + * @example 2018-02-02T22:25:27.521Z + */ + readonly created_at?: string; + /** + * @description ISO 8601 formatted date-time indicating when the resource was updated. + * @example 2018-02-02T22:25:27.521Z + */ + readonly updated_at?: string; + }; + /** @description An object following one of the schemas published in https://developers.telnyx.com/docs/api/v2/detail-records */ + RecordType: { + /** + * @description Telnyx Product type + * @example conversation_event + */ + record_type?: string; + /** + * @description Telnyx Product Dimensions + * @example ['direction', 'currency', 'message_type'] + */ + product_dimensions?: string[]; + /** + * @description Telnyx Product Metrics + * @example ['cost', 'billed_sec'] + */ + product_metrics?: string[]; + }; + /** + * Recording Completed + * @example { + * "record_type": "event", + * "event_type": "video.room.recording.started", + * "id": "6b61621f-62e0-4aad-ab11-9fd19e272e73", + * "occurred_at": "2018-02-02T22:25:27.521992Z", + * "payload": { + * "session_id": "7b61621f-62e0-4aad-ab11-9fd19e272e73", + * "room_id": "0ccc7b54-4df3-4bca-a65a-35a1ecc777f0", + * "participant_id": "5ccc7b54-4df3-4bca-a65a-35a1ecc777f0", + * "recording_id": "1ccc7b54-4df3-4bca-a65a-35a1ecc777f0", + * "type": "audio", + * "download_url": "https://www.example.com", + * "duration_secs": 3660, + * "size_mb": 5.6, + * "codec": "opus" + * } + * } + */ + RecordingCompleted: { + /** + * @description An identifier for the type of the resource. + * @example event + * @enum {string} + */ + record_type?: 'event'; + /** + * @description The type of event being delivered. + * @example video.room.recording.completed + * @enum {string} + */ + event_type?: 'video.room.recording.completed'; + /** + * Format: uuid + * @description Uniquely identify the event. + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + */ + id?: string; + /** + * Format: date-time + * @description ISO 8601 datetime of when the event occurred. + * @example 2018-02-02T22:25:27.521992Z + */ + occurred_at?: string; + payload?: { + /** + * Format: uuid + * @description Session ID associated with the recording. + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + */ + session_id?: string; + /** + * Format: uuid + * @description Room ID associated with the recording. + * @example 0ccc7b54-4df3-4bca-a65a-35a1ecc777f0 + */ + room_id?: string; + /** + * Format: uuid + * @description Participant ID associated with the recording. + * @example 0ccc7b54-4df3-4bca-a65a-35a1ecc777f0 + */ + participant_id?: string; + /** + * Format: uuid + * @description Recording ID that identifies the recording. + * @example 0ccc7b54-4df3-4bca-a65a-35a1ecc777f0 + */ + recording_id?: string; + /** + * @description Type of the recording. + * @example audio + * @enum {string} + */ + type?: 'audio' | 'video'; + /** + * Format: float + * @description Recording size in MB. + * @example 10.5 + */ + size_mb?: number; + /** + * @description Url to download the recording. + * @example https://www.example.com + */ + download_url?: string; + /** + * @description Codec used for the recording. + * @example opus + */ + codec?: string; + /** + * @description Recording duration in seconds. + * @example 67 + */ + duration_secs?: number; + }; + }; + /** Recording Completed Event */ + RecordingCompletedEvent: { + data?: components['schemas']['RecordingCompleted']; + }; + /** RecordingResponse */ + RecordingResponse: { + data?: components['schemas']['RecordingResponseData']; + }; + /** RecordingResponseData */ + RecordingResponseData: { + /** + * @description Unique identifier and token for controlling the call. + * @example v3:e-31OnvjEM7Y4wvxr3TKNk8M3QyLcGZPiUIzCGtwQtOtEjY-B0urkw + */ + call_control_id?: string; + /** + * @description ID that is unique to the call and can be used to correlate webhook events. + * @example 84a97d76-e40f-11ed-9074-02420a0daa69 + */ + call_leg_id?: string; + /** + * @description ID that is unique to the call session and can be used to correlate webhook events. Call session is a group of related call legs that logically belong to the same phone call, e.g. an inbound and outbound leg of a transferred call. + * @example 84a97d76-e40f-11ed-9074-02420a0daa69 + */ + call_session_id?: string; + /** + * @description When `dual`, final audio file has the first leg on channel A, and the rest on channel B. + * @example dual + * @enum {string} + */ + channels?: 'single' | 'dual'; + /** + * @description Uniquely identifies the conference. + * @example 84a97d76-e40f-11ed-9074-02420a0daa69 + */ + conference_id?: string; + /** + * @description ISO 8601 formatted date indicating when the resource was created. + * @example 2018-02-02T22:25:27.521Z + */ + created_at?: string; + /** @description The links to download the recording files. */ + download_urls?: { + /** @description Link to download the recording in mp3 format. */ + mp3?: string; + /** @description Link to download the recording in wav format. */ + wav?: string; + }; + /** + * Format: int32 + * @description The duration of the recording in milliseconds. + * @example 60000 + */ + duration_millis?: number; + /** + * @description Uniquely identifies the recording. + * @example 3fa85f64-5717-4562-b3fc-2c963f66afa6 + */ + id?: string; + /** + * @example recording + * @enum {string} + */ + record_type?: 'recording'; + /** + * @description ISO 8601 formatted date of when the recording started. + * @example 2019-01-23T18:10:02.574Z + */ + recording_started_at?: string; + /** + * @description ISO 8601 formatted date of when the recording ended. + * @example 2019-01-23T18:10:02.574Z + */ + recording_ended_at?: string; + /** + * @description The kind of event that led to this recording being created. + * @example conference + * @enum {string} + */ + source?: 'conference' | 'call'; + /** + * @description The status of the recording. Only resources for `completed` recordings are currently supported. + * @example completed + * @enum {string} + */ + status?: 'completed'; + /** + * @description ISO 8601 formatted date indicating when the resource was updated. + * @example 2018-02-02T22:25:27.521Z + */ + updated_at?: string; + }; + /** + * @description Defines how the recording was created. + * @enum {string} + */ + RecordingSource: + | 'StartCallRecordingAPI' + | 'StartConferenceRecordingAPI' + | 'OutboundAPI' + | 'DialVerb' + | 'Conference' + | 'RecordVerb' + | 'Trunking'; + /** + * Recording Started + * @example { + * "record_type": "event", + * "event_type": "video.room.recording.started", + * "id": "6b61621f-62e0-4aad-ab11-9fd19e272e73", + * "occurred_at": "2018-02-02T22:25:27.521992Z", + * "payload": { + * "session_id": "7b61621f-62e0-4aad-ab11-9fd19e272e73", + * "room_id": "0ccc7b54-4df3-4bca-a65a-35a1ecc777f0", + * "participant_id": "5ccc7b54-4df3-4bca-a65a-35a1ecc777f0", + * "recording_id": "1ccc7b54-4df3-4bca-a65a-35a1ecc777f0", + * "type": "audio" + * } + * } + */ + RecordingStarted: { + /** + * @description An identifier for the type of the resource. + * @example event + * @enum {string} + */ + record_type?: 'event'; + /** + * @description The type of event being delivered. + * @example video.room.recording.started + * @enum {string} + */ + event_type?: 'video.room.recording.started'; + /** + * Format: uuid + * @description Uniquely identify the event. + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + */ + id?: string; + /** + * Format: date-time + * @description ISO 8601 datetime of when the event occurred. + * @example 2018-02-02T22:25:27.521992Z + */ + occurred_at?: string; + payload?: { + /** + * Format: uuid + * @description Session ID associated with the recording. + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + */ + session_id?: string; + /** + * Format: uuid + * @description Room ID associated with the recording. + * @example 0ccc7b54-4df3-4bca-a65a-35a1ecc777f0 + */ + room_id?: string; + /** + * Format: uuid + * @description Participant ID associated with the recording. + * @example 0ccc7b54-4df3-4bca-a65a-35a1ecc777f0 + */ + participant_id?: string; + /** + * Format: uuid + * @description Recording ID associated with the recording. + * @example 0ccc7b54-4df3-4bca-a65a-35a1ecc777f0 + */ + recording_id?: string; + /** + * @description Type of the recording. + * @example audio + * @enum {string} + */ + type?: 'audio' | 'video'; + }; + }; + /** Recording Started Event */ + RecordingStartedEvent: { + data?: components['schemas']['RecordingStarted']; + }; + /** + * @description The changes to the recording's state that should generate a call to `RecoridngStatusCallback`. Can be: `in-progress`, `completed` and `absent`. Separate multiple values with a space. Defaults to `completed`. + * @example in-progress completed absent + */ + RecordingStatusCallbackEvent: string; + /** + * @description The audio track to record for the call. The default is `both`. + * @example inbound + * @enum {string} + */ + RecordingTrack: 'inbound' | 'outbound' | 'both'; + /** RecordingTranscriptionsResponseData */ + RecordingTranscription: { + /** + * @description ISO 8601 formatted date indicating when the resource was created. + * @example 2018-02-02T22:25:27.521Z + */ + created_at?: string; + /** + * Format: int32 + * @description The duration of the recording transcription in milliseconds. + * @example 60000 + */ + duration_millis?: number; + /** + * @description Uniquely identifies the recording transcription. + * @example 3fa85f64-5717-4562-b3fc-2c963f66afa6 + */ + id?: string; + /** + * @description Uniquely identifies the recording associated with this transcription. + * @example 3fa85f64-5717-4562-b3fc-2c963f66afa6 + */ + recording_id?: string; + /** + * @example recording_transcription + * @enum {string} + */ + record_type?: 'recording_transcription'; + /** + * @description The status of the recording transcriptions. The transcription text will be available only when the status is completed. + * @example completed + * @enum {string} + */ + status?: 'in-progress' | 'completed'; + /** + * @description The recording's transcribed text + * @example Good morning, how may I help you? + */ + transcription_text?: string; + /** + * @description ISO 8601 formatted date indicating when the resource was updated. + * @example 2018-02-02T22:25:27.521Z + */ + updated_at?: string; + }; + /** + * Refer request + * @example { + * "sip_address": "sip:username@sip.non-telnyx-address.com" + * } + */ + ReferRequest: { + /** + * @description The SIP URI to which the call will be referred to. + * @example sip:username@sip.non-telnyx-address.com + */ + sip_address: string; + /** + * @description Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + /** + * @description Use this field to avoid execution of duplicate commands. Telnyx will ignore subsequent commands with the same `command_id` as one that has already been executed. + * @example 891510ac-f3e4-11e8-af5b-de00688a4901 + */ + command_id?: string; + /** + * @description Custom headers to be added to the SIP INVITE. + * @example [ + * { + * "name": "head_1", + * "value": "val_1" + * }, + * { + * "name": "head_2", + * "value": "val_2" + * } + * ] + */ + custom_headers?: components['schemas']['CustomSipHeader'][]; + /** @description SIP Authentication username used for SIP challenges. */ + sip_auth_username?: string; + /** @description SIP Authentication password used for SIP challenges. */ + sip_auth_password?: string; + /** + * @description SIP headers to be added to the request. Currently only User-to-User header is supported. + * @example [ + * { + * "name": "User-to-User", + * "value": "value" + * } + * ] + */ + sip_headers?: components['schemas']['SipHeader'][]; + }; + RefreshRoomClientTokenRequest: { + /** + * @description The time to live in seconds of the Client Token, after that time the Client Token is invalid and can't be used to join a Room. + * @default 600 + * @example 600 + */ + token_ttl_secs: number; + /** + * Format: jwt + * @example eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJ0ZWxueXhfdGVsZXBob255IiwiZXhwIjoxNTkwMDEwMTQzLCJpYXQiOjE1ODc1OTA5NDMsImlzcyI6InRlbG55eF90ZWxlcGhvbnkiLCJqdGkiOiJiOGM3NDgzNy1kODllLTRhNjUtOWNmMi0zNGM3YTZmYTYwYzgiLCJuYmYiOjE1ODc1OTA5NDIsInN1YiI6IjVjN2FjN2QwLWRiNjUtNGYxMS05OGUxLWVlYzBkMWQ1YzZhZSIsInRlbF90b2tlbiI6InJqX1pra1pVT1pNeFpPZk9tTHBFVUIzc2lVN3U2UmpaRmVNOXMtZ2JfeENSNTZXRktGQUppTXlGMlQ2Q0JSbWxoX1N5MGlfbGZ5VDlBSThzRWlmOE1USUlzenl6U2xfYURuRzQ4YU81MHlhSEd1UlNZYlViU1ltOVdJaVEwZz09IiwidHlwIjoiYWNjZXNzIn0.gNEwzTow5MLLPLQENytca7pUN79PmPj6FyqZWW06ZeEmesxYpwKh0xRtA0TzLh6CDYIRHrI8seofOO0YFGDhpQ + */ + refresh_token: string; + }; + /** + * @description Region where the bucket is located. + * @example us-east-1 + */ + Region: string; + RegionIn: { + /** + * @description The region the interface should be deployed to. + * @example ashburn-va + */ + region_code?: string; + }; + /** @example { + * "region_type": "country_code", + * "region_name": "US" + * } */ + RegionInformation: { + /** + * @example country_code + * @enum {string} + */ + region_type?: 'country_code' | 'rate_center' | 'state' | 'location'; + /** @example US */ + region_name?: string; + }; + RegionOut: { + /** + * @description The region interface is deployed to. + * @example ashburn-va + */ + region_code?: string; + region?: { + /** + * @description Region code of the interface. + * @example ashburn-va + */ + code?: string; + /** + * @description Region name of the interface. + * @example Ashburn + */ + name?: string; + /** + * @description Identifies the type of the resource. + * @example region + */ + readonly record_type?: string; + }; + }; + RegulatoryRequirements: { + /** @example DE */ + readonly country_code?: string; + /** @example local */ + readonly phone_number_type?: string; + /** @example ordering */ + readonly action?: string; + regulatory_requirements?: { + /** @example Address matching the DID area code (street, building number, postal code, city and country) */ + readonly description?: string; + /** + * Format: uuid + * @example 12ade33a-21c0-473b-b055-b3c836e1c292 + */ + readonly id?: string; + /** @example 311 W Superior St, Chicago, IL 60654 */ + readonly example?: string; + /** @example Address matching the DID area code */ + name?: string; + /** @example address_id */ + field_type?: string; + acceptance_criteria?: { + /** @example Identical locality as the numbers desired */ + locality_limit?: string; + /** @example Less than 5 months old */ + time_limit?: string; + /** @example regex field value must match */ + regex?: string; + /** @example Whether field value is case sensitive */ + case_sensitive?: string; + /** @example Characters that can be included in field value */ + acceptable_characters?: string; + acceptable_values?: unknown[]; + /** @example 10 */ + max_length?: string; + /** @example 5 */ + min_length?: string; + }; + }[]; + }; + RegulatoryRequirementsPhoneNumbers: { + /** @example +41215471644 */ + readonly phone_number?: string; + /** @example local */ + readonly phone_number_type?: string; + region_information?: { + /** @example CH */ + region_name?: string; + /** @example country_code */ + region_type?: string; + }[]; + /** @example phone_number_regulatory_requirements */ + readonly record_type?: string; + regulatory_requirements?: { + /** @example Address matching the DID area code (street, building number, postal code, city and country) */ + readonly description?: string; + /** + * Format: uuid + * @example 12ade33a-21c0-473b-b055-b3c836e1c292 + */ + readonly id?: string; + /** @example 311 W Superior St, Chicago, IL 60654 */ + readonly example?: string; + /** @example Address matching the DID area code */ + label?: string; + /** @example address_id */ + field_type?: string; + acceptance_criteria?: { + /** @example Identical locality as the numbers desired */ + locality_limit?: string; + /** @example 45f45a04-b4be-4592-95b1-9306b9db2b21 */ + field_value?: string; + /** @example address */ + field_type?: string; + }; + /** @example regulatory_requirement */ + readonly record_type?: string; + }[]; + }; + /** + * Reject Request + * @example { + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + * "command_id": "891510ac-f3e4-11e8-af5b-de00688a4901", + * "cause": "USER_BUSY" + * } + */ + RejectRequest: { + /** + * @description Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + /** + * @description Use this field to avoid duplicate commands. Telnyx will ignore any command with the same `command_id` for the same `call_control_id`. + * @example 891510ac-f3e4-11e8-af5b-de00688a4901 + */ + command_id?: string; + /** + * @description Cause for call rejection. + * @example USER_BUSY + * @enum {string} + */ + cause: 'CALL_REJECTED' | 'USER_BUSY'; + }; + /** Phone Number Release */ + Release: { + ticket_id?: components['schemas']['UUID']; + /** + * Format: uuid + * @example ea175aba-f47c-4702-9400-efaa42688048 + */ + tenant_id?: string; + /** + * @description Represents the status of the release on Microsoft Teams. + * @default pending_upload + * @example pending + * @enum {string} + */ + status: + | 'pending_upload' + | 'pending' + | 'in_progress' + | 'complete' + | 'failed' + | 'expired' + | 'unknown'; + /** @description A message set if there is an error with the upload process. */ + error_message?: string; + telephone_numbers?: components['schemas']['TnReleaseEntry'][]; + /** + * @description ISO 8601 formatted date indicating when the resource was created. + * @example 2018-02-02T22:25:27.521Z + */ + created_at?: string; + }; + /** @example { + * "record_type": "link_clicked", + * "url": "https://telnyx.com", + * "to": "18445550001", + * "message_id": "7ee4241c-f127-47e5-9c34-3aac291f8058", + * "time_clicked": "2019-04-01T14:45:45.450Z" + * } */ + ReplacedLinkClick: { + /** + * @description Identifies the type of the resource. + * @example link_clicked + */ + record_type?: string; + /** + * @description The original link that was sent in the message. + * @example link_clicked + */ + url?: string; + /** + * Format: address + * @description Sending address (+E.164 formatted phone number, alphanumeric sender ID, or short code). + */ + to?: string; + /** + * Format: uuid + * @description The message ID associated with the clicked link. + */ + message_id?: string; + /** + * Format: date-time + * @description ISO 8601 formatted date indicating when the message request was received. + */ + time_clicked?: string; + }; + ReplacedLinkClickEvent: { + data?: components['schemas']['ReplacedLinkClick']; + }; + RequirementGroup: { + id?: string; + country_code?: string; + phone_number_type?: string; + /** @enum {string} */ + status?: 'approved' | 'unapproved' | 'pending-approval' | 'declined'; + action?: string; + customer_reference?: string; + /** Format: date-time */ + created_at?: string; + /** Format: date-time */ + updated_at?: string; + /** @example requirement_group */ + record_type?: string; + regulatory_requirements?: components['schemas']['UserRequirement'][]; + }; + /** @example { + * "id": "12ade33a-21c0-473b-b055-b3c836e1c292", + * "record_type": "reserved_phone_number", + * "phone_number": "+19705555098", + * "status": "pending", + * "created_at": "2018-01-01T00:00:00.000000Z", + * "updated_at": "2018-01-01T00:00:00.000000Z", + * "expired_at": "2018-01-01T00:00:00.000000Z" + * } */ + ReservedPhoneNumber: { + /** + * Format: uuid + * @example 12ade33a-21c0-473b-b055-b3c836e1c292 + */ + readonly id?: string; + /** @example reserved_phone_number */ + readonly record_type?: string; + /** + * Format: e164_phone_number + * @example +19705555098 + */ + phone_number?: string; + /** + * @description The status of the phone number's reservation. + * @example success + * @enum {string} + */ + readonly status?: 'pending' | 'success' | 'failure'; + /** + * Format: datetime + * @description An ISO 8901 datetime string denoting when the individual number reservation was created. + * @example 2018-01-01T00:00:00.000000Z + */ + readonly created_at?: string; + /** + * Format: datetime + * @description An ISO 8901 datetime string for when the the individual number reservation was updated. + * @example 2018-01-01T00:00:00.000000Z + */ + readonly updated_at?: string; + /** + * Format: datetime + * @description An ISO 8901 datetime string for when the individual number reservation is going to expire + * @example 2018-01-01T00:00:00.000000Z + */ + readonly expired_at?: string; + }; + ResourceNotFoundError: { + errors?: { + /** @description Error code identifying the error type. */ + code?: string; + /** @description A human-readable explanation of the error. */ + detail?: string; + meta?: { + /** + * Format: uri + * @description A URL to the detailed documentation for the error. + */ + url?: string; + }; + /** @description A short, human-readable summary of the problem. */ + title?: string; + }[]; + }; + /** Pause Recording Request */ + ResumeConferenceRecordingRequest: { + /** + * @description Use this field to avoid duplicate commands. Telnyx will ignore any command with the same `command_id` for the same `call_control_id`. + * @example 891510ac-f3e4-11e8-af5b-de00688a4901 + */ + command_id?: string; + /** + * @description Use this field to resume specific recording. + * @example 891510ac-f3e4-11e8-af5b-de00688a4901 + */ + recording_id?: string; + }; + /** Pause Recording Request */ + ResumeRecordingRequest: { + /** + * @description Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + /** + * @description Use this field to avoid duplicate commands. Telnyx will ignore any command with the same `command_id` for the same `call_control_id`. + * @example 891510ac-f3e4-11e8-af5b-de00688a4901 + */ + command_id?: string; + }; + /** Retrieval */ + Retrieval: { + /** @enum {string} */ + type: 'retrieval'; + retrieval: components['schemas']['BucketIds']; + }; + /** RetrievalDetail */ + RetrievalDetail: { + /** Bucket Ids */ + bucket_ids: string[]; + }; + /** RetrieveVerificationResponse */ + RetrieveVerificationResponse: { + data: components['schemas']['Verification']; + }; + /** @example { + * "id": "7b61621f-62e0-4aad-ab11-9fd19e272e73", + * "max_participants": 50, + * "unique_name": "My Room", + * "created_at": "2021-04-16T09:46:20.954863Z", + * "updated_at": "2021-04-16T10:24:55.962200Z", + * "active_session_id": "7b61621f-62e0-4aad-ab11-9fd19e272e74", + * "enable_recording": true, + * "webhook_event_failover_url": "https://failover.example.com", + * "webhook_timeout_secs": 25, + * "webhook_event_url": "https://www.example.com", + * "sessions": [ + * { + * "id": "7b61621f-62e0-4aad-ab11-9fd19e272e74", + * "room_id": "7b61621f-62e0-4aad-ab11-9fd19e272e73", + * "active": true, + * "created_at": "2021-04-16T09:46:20.954863Z", + * "updated_at": "2021-04-16T10:24:55.962200Z", + * "participants": [], + * "record_type": "room_session" + * } + * ], + * "record_type": "room" + * } */ + Room: { + /** + * Format: uuid + * @description A unique identifier for the room. + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + */ + id?: string; + /** + * @description Maximum participants allowed in the room. + * @example 50 + */ + max_participants?: number; + /** + * @description The unique (within the Telnyx account scope) name of the room. + * @example My room + */ + unique_name?: string; + /** + * Format: datetime + * @description ISO 8601 timestamp when the room was created. + * @example 2021-03-26T17:51:59.588408Z + */ + created_at?: string; + /** + * Format: datetime + * @description ISO 8601 timestamp when the room was updated. + * @example 2021-03-26T17:51:59.588408Z + */ + updated_at?: string; + /** + * Format: uuid + * @description The identifier of the active room session if any. + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + */ + active_session_id?: string; + sessions?: components['schemas']['RoomSession'][]; + /** + * @description Enable or disable recording for that room. + * @default false + * @example true + */ + enable_recording: boolean; + /** + * Format: url + * @description The URL where webhooks related to this room will be sent. Must include a scheme, such as 'https'. + * @example https://example.com + */ + webhook_event_url?: string; + /** + * Format: url + * @description The failover URL where webhooks related to this room will be sent if sending to the primary URL fails. Must include a scheme, such as 'https'. + * @default + * @example https://failover.example.com + */ + webhook_event_failover_url: string | null; + /** + * @description Specifies how many seconds to wait before timing out a webhook. + * @default null + * @example 25 + */ + webhook_timeout_secs: number | null; + /** @example room */ + readonly record_type?: string; + }; + /** @example { + * "completed_at": "2022-02-25T05:39:56.377426Z", + * "download_url": null, + * "duration_secs": 84, + * "ended_at": "2022-02-24T23:22:24.577677Z", + * "format": "mp4", + * "id": "7103dc53-ee59-4b54-a58b-c77d99ceb037", + * "record_type": "composition", + * "resolution": "1280x720", + * "room_id": "f981dbb3-228a-44e9-ac54-e87f0e2658b0", + * "session_id": "8f728d7b-00e2-4c59-8c27-f564b828df87", + * "size_mb": 6, + * "started_at": "2022-02-24T23:21:00.077209Z", + * "status": "enqueued", + * "user_id": "12a04ec9-0f91-4a91-9f3a-a19d9931182e", + * "video_layout": { + * "first": { + * "height": 720, + * "video_sources": [ + * "*" + * ], + * "width": 1280, + * "x_pos": 0, + * "y_pos": 0, + * "z_pos": 0 + * } + * }, + * "webhook_event_url": "https://webhook.site/544663ce-b692-4f9c-80ed-e5ad97cd5c02" + * } */ + RoomComposition: { + /** + * Format: uuid + * @description A unique identifier for the room composition. + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + */ + id?: string; + /** + * Format: uuid + * @description Identify the room associated with the room composition. + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777b0 + */ + room_id?: string; + /** + * Format: uuid + * @description Identify the room session associated with the room composition. + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777b0 + */ + session_id?: string; + /** + * Format: uuid + * @description Identify the user associated with the room composition. + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777b0 + */ + user_id?: string; + /** + * @description Shows the room composition status. + * @example completed + * @enum {string} + */ + status?: 'completed' | 'enqueued' | 'processing'; + /** + * Format: float + * @description Shows the room composition size in MB. + * @example 10.5 + */ + size_mb?: number; + /** + * @description Url to download the composition. + * @example https://www.example.com + */ + download_url?: string; + /** + * @description Shows the room composition duration in seconds. + * @example 67 + */ + duration_secs?: number; + /** + * @description Shows format of the room composition. + * @example mp4 + * @enum {string} + */ + format?: 'mp4'; + /** + * Format: datetime + * @description ISO 8601 timestamp when the room composition was created. + * @example 2021-03-26T17:51:59.588408Z + */ + created_at?: string; + /** + * Format: datetime + * @description ISO 8601 timestamp when the room composition was updated. + * @example 2021-03-26T17:51:59.588408Z + */ + updated_at?: string; + /** + * Format: datetime + * @description ISO 8601 timestamp when the room composition has ended. + * @example 2021-03-26T17:51:59.588408Z + */ + ended_at?: string; + /** + * Format: datetime + * @description ISO 8601 timestamp when the room composition has stated. + * @example 2021-03-26T17:51:59.588408Z + */ + started_at?: string; + /** + * Format: datetime + * @description ISO 8601 timestamp when the room composition has completed. + * @example 2021-03-26T17:51:59.588408Z + */ + completed_at?: string; + /** @description Describes the video layout of the room composition in terms of regions. Limited to 2 regions. */ + video_layout?: { + [key: string]: components['schemas']['VideoRegion']; + }; + /** + * Format: url + * @description The URL where webhooks related to this room composition will be sent. Must include a scheme, such as 'https'. + * @example https://example.com + */ + webhook_event_url?: string; + /** + * Format: url + * @description The failover URL where webhooks related to this room composition will be sent if sending to the primary URL fails. Must include a scheme, such as 'https'. + * @default + * @example https://failover.example.com + */ + webhook_event_failover_url: string | null; + /** + * @description Specifies how many seconds to wait before timing out a webhook. + * @default null + * @example 25 + */ + webhook_timeout_secs: number | null; + /** @example room_composition */ + readonly record_type?: string; + }; + /** @example { + * "id": "7b61621f-62e0-4aad-ab11-9fd19e272e73", + * "session_id": "7b61621f-5fe4-4aad-ab11-9fd19e272e73", + * "context": "Alice", + * "joined_at": "2021-04-16T09:46:20.954863Z", + * "updated_at": "2021-04-16T10:24:55.962200Z", + * "left_at": "2021-04-16T10:24:55.962200Z", + * "record_type": "room_participant" + * } */ + RoomParticipant: { + /** + * Format: uuid + * @description A unique identifier for the room participant. + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + */ + id?: string; + /** + * Format: uuid + * @description Identify the room session that participant is part of. + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777b0 + */ + session_id?: string; + /** + * @description Context provided to the given participant through the client SDK + * @example Alice + */ + context?: string; + /** + * Format: datetime + * @description ISO 8601 timestamp when the participant joined the session. + * @example 2021-03-26T17:51:59.588408Z + */ + joined_at?: string; + /** + * Format: datetime + * @description ISO 8601 timestamp when the participant was updated. + * @example 2021-03-26T17:51:59.588408Z + */ + updated_at?: string; + /** + * Format: datetime + * @description ISO 8601 timestamp when the participant left the session. + * @example 2021-03-26T17:51:59.588408Z + */ + left_at?: string; + /** @example room_participant */ + readonly record_type?: string; + }; + /** @example { + * "id": "6b61621f-62e0-4aad-ab11-9fd19e272e73", + * "room_id": "7b61621f-5fe4-4aad-ab11-9fd19e272e73", + * "session_id": "8b61621f-5fe4-4aad-ab11-9fd19e272e73", + * "participant_id": "9b61621f-5fe4-4aad-ab11-9fd19e272e73", + * "status": "completed", + * "download_url": "https://www.example.com", + * "type": "audio", + * "duration_secs": 3660, + * "size_mb": 5.6, + * "codec": "opus", + * "created_at": "2021-04-16T09:46:20.954863Z", + * "updated_at": "2021-04-16T10:24:55.962200Z", + * "started_at": "2021-04-16T09:24:55.962200Z", + * "ended_at": "2021-04-16T10:24:55.962200Z", + * "completed_at": "2021-04-16T10:25:55.962200Z", + * "record_type": "room_session" + * } */ + RoomRecording: { + /** + * Format: uuid + * @description A unique identifier for the room recording. + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + */ + id?: string; + /** + * Format: uuid + * @description Identify the room associated with the room recording. + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777b0 + */ + room_id?: string; + /** + * Format: uuid + * @description Identify the room session associated with the room recording. + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777b0 + */ + session_id?: string; + /** + * Format: uuid + * @description Identify the room participant associated with the room recording. + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777b0 + */ + participant_id?: string; + /** + * @description Shows the room recording status. + * @example completed + * @enum {string} + */ + status?: 'completed' | 'processing'; + /** + * @description Shows the room recording type. + * @example audio + * @enum {string} + */ + type?: 'audio' | 'video'; + /** + * Format: float + * @description Shows the room recording size in MB. + * @example 10.5 + */ + size_mb?: number; + /** + * @description Url to download the recording. + * @example https://www.example.com + */ + download_url?: string; + /** + * @description Shows the codec used for the room recording. + * @example opus + */ + codec?: string; + /** + * @description Shows the room recording duration in seconds. + * @example 67 + */ + duration_secs?: number; + /** + * Format: datetime + * @description ISO 8601 timestamp when the room recording was created. + * @example 2021-03-26T17:51:59.588408Z + */ + created_at?: string; + /** + * Format: datetime + * @description ISO 8601 timestamp when the room recording was updated. + * @example 2021-03-26T17:51:59.588408Z + */ + updated_at?: string; + /** + * Format: datetime + * @description ISO 8601 timestamp when the room recording has ended. + * @example 2021-03-26T17:51:59.588408Z + */ + ended_at?: string; + /** + * Format: datetime + * @description ISO 8601 timestamp when the room recording has stated. + * @example 2021-03-26T17:51:59.588408Z + */ + started_at?: string; + /** + * Format: datetime + * @description ISO 8601 timestamp when the room recording has completed. + * @example 2021-03-26T17:51:59.588408Z + */ + completed_at?: string; + /** @example room_recording */ + readonly record_type?: string; + }; + /** @example { + * "id": "7b61621f-62e0-4aad-ab11-9fd19e272e73", + * "room_id": "7b61621f-5fe4-4aad-ab11-9fd19e272e73", + * "active": false, + * "created_at": "2021-04-16T09:46:20.954863Z", + * "updated_at": "2021-04-16T10:24:55.962200Z", + * "ended_at": "2021-04-16T10:24:55.962200Z", + * "participants": [], + * "record_type": "room_session" + * } */ + RoomSession: { + /** + * Format: uuid + * @description A unique identifier for the room session. + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + */ + id?: string; + /** + * Format: uuid + * @description Identify the room hosting that room session. + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777b0 + */ + room_id?: string; + /** + * @description Shows if the room session is active or not. + * @example false + */ + active?: boolean; + /** + * Format: datetime + * @description ISO 8601 timestamp when the room session was created. + * @example 2021-03-26T17:51:59.588408Z + */ + created_at?: string; + /** + * Format: datetime + * @description ISO 8601 timestamp when the room session was updated. + * @example 2021-03-26T17:51:59.588408Z + */ + updated_at?: string; + /** + * Format: datetime + * @description ISO 8601 timestamp when the room session has ended. + * @example 2021-03-26T17:51:59.588408Z + */ + ended_at?: string; + participants?: components['schemas']['RoomParticipant'][]; + /** @example room_session */ + readonly record_type?: string; + }; + /** AWS S3 Storage Configuration Data */ + S3ConfigurationData: { + bucket?: components['schemas']['Bucket']; + region?: components['schemas']['Region']; + aws_access_key_id?: components['schemas']['AwsAccessKeyId']; + aws_secret_access_key?: components['schemas']['AwsSecretAccessKey']; + }; + /** SIMCard */ + SIMCard: { + /** + * Format: uuid + * @description Identifies the resource. + * @example 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + */ + readonly id?: string; + /** @example sim_card */ + readonly record_type?: string; + status?: components['schemas']['SIMCardStatus']; + /** + * @description The type of SIM card + * @example physical + * @enum {string} + */ + readonly type?: 'physical' | 'esim'; + /** + * @description The ICCID is the identifier of the specific SIM card/chip. Each SIM is internationally identified by its integrated circuit card identifier (ICCID). ICCIDs are stored in the SIM card's memory and are also engraved or printed on the SIM card body during a process called personalization. + * + * @example 89310410106543789301 + */ + readonly iccid?: string; + /** + * @description SIM cards are identified on their individual network operators by a unique International Mobile Subscriber Identity (IMSI).
+ * Mobile network operators connect mobile phone calls and communicate with their market SIM cards using their IMSIs. The IMSI is stored in the Subscriber Identity Module (SIM) inside the device and is sent by the device to the appropriate network. It is used to acquire the details of the device in the Home Location Register (HLR) or the Visitor Location Register (VLR). + * + * @example 081932214823362973 + */ + readonly imsi?: string; + /** + * @description Mobile Station International Subscriber Directory Number (MSISDN) is a number used to identify a mobile phone number internationally.
+ * MSISDN is defined by the E.164 numbering plan. It includes a country code and a National Destination Code which identifies the subscriber's operator. + * + * @example +13109976224 + */ + readonly msisdn?: string; + /** + * Format: uuid + * @description The group SIMCardGroup identification. This attribute can be null when it's present in an associated resource. + * @example 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + */ + sim_card_group_id?: string; + /** + * @description Searchable tags associated with the SIM card + * @example [ + * "personal", + * "customers", + * "active-customers" + * ] + */ + tags?: string[]; + /** + * @description List of IMEIs authorized to use a given SIM card. + * @example [ + * "106516771852751", + * "534051870479563", + * "508821468377961" + * ] + */ + authorized_imeis?: string[]; + /** + * Format: int64 + * @description IMEI of the device where a given SIM card is currently being used. + * @example 457032284023794 + */ + readonly current_imei?: string; + /** @description The SIM card individual data limit configuration. */ + data_limit?: { + /** + * Format: decimal + * @example 2048.1 + */ + amount?: string; + /** + * @example MB + * @enum {string} + */ + unit?: 'MB' | 'GB'; + }; + /** @description The SIM card consumption so far in the current billing cycle. */ + readonly current_billing_period_consumed_data?: { + /** + * Format: decimal + * @example 2049.0 + */ + amount?: string; + /** + * @default MB + * @example MB + */ + unit: string; + }; + /** + * @description Indicate whether the SIM card has any pending (in-progress) actions. + * @default false + * @example true + */ + readonly actions_in_progress: boolean; + /** + * @description ISO 8601 formatted date-time indicating when the resource was created. + * @example 2018-02-02T22:25:27.521Z + */ + readonly created_at?: string; + /** + * @description ISO 8601 formatted date-time indicating when the resource was updated. + * @example 2018-02-02T22:25:27.521Z + */ + readonly updated_at?: string; + /** + * @description The SIM's address in the currently connected network. This IPv4 address is usually obtained dynamically, so it may vary according to the location or new connections. + * + * @example 192.168.0.0 + */ + readonly ipv4?: string; + /** + * @description The SIM's address in the currently connected network. This IPv6 address is usually obtained dynamically, so it may vary according to the location or new connections. + * + * @example 2001:cdba:0000:0000:0000:0000:3257:9652 + */ + readonly ipv6?: string; + /** @description Current physical location data of a given SIM card. Accuracy is given in meters. */ + readonly current_device_location?: { + /** + * Format: float + * @example 41.143 + */ + latitude?: string; + /** + * Format: float + * @example -8.605 + */ + longitude?: string; + /** @example 1250 */ + accuracy?: number; + /** + * @default m + * @example m + */ + accuracy_unit: string; + }; + /** + * @description Mobile Network Code of the current network to which the SIM card is connected. It's a two to three decimal digits that identify a network.

+ * This code is commonly seen joined with a Mobile Country Code (MCC) in a tuple that allows identifying a carrier known as PLMN (Public Land Mobile Network) code. + * @example 260 + */ + readonly current_mnc?: string; + /** + * @description Mobile Country Code of the current network to which the SIM card is connected. It's a three decimal digit that identifies a country.

+ * This code is commonly seen joined with a Mobile Network Code (MNC) in a tuple that allows identifying a carrier known as PLMN (Public Land Mobile Network) code. + * @example 410 + */ + readonly current_mcc?: string; + /** + * @description Indicates whether the device is actively connected to a network and able to run data. + * @example connected + * @enum {string} + */ + readonly live_data_session?: 'connected' | 'disconnected' | 'unknown'; + }; + /** + * SIMCardAction + * @description This object represents a SIM card action. It allows tracking the current status of an operation that impacts the SIM card. + */ + SIMCardAction: { + id?: components['schemas']['Id']; + /** @example sim_card_action */ + readonly record_type?: string; + /** + * Format: uuid + * @description The related SIM card identifier. + * @example 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + */ + readonly sim_card_id?: string; + /** + * @description The operation type. It can be one of the following:
+ *
    + *
  • enable - move the SIM card to the enabled status
  • + *
  • enable_standby_sim_card - move a SIM card previously on the standby status to the enabled status after it consumes data.
  • + *
  • disable - move the SIM card to the disabled status
  • + *
  • set_standby - move the SIM card to the standby status
  • + *
+ * @example enable + * @enum {string} + */ + readonly action_type?: + | 'enable' + | 'enable_standby_sim_card' + | 'disable' + | 'set_standby'; + status?: { + /** + * @description The current status of the SIM card action. + * @example completed + * @enum {string} + */ + readonly value?: 'in-progress' | 'completed' | 'failed' | 'interrupted'; + /** + * @description It describes why the SIM card action is in the current status. This will be null for self-explanatory statuses, such as in-progress and completed but will include further information on statuses like interrupted and failed. + * @example The data limit was exceeded. + */ + readonly reason?: string; + }; + /** + * @description A JSON object representation of the action params. + * @example {} + */ + readonly settings?: Record; + created_at?: components['schemas']['CreatedAt']; + updated_at?: components['schemas']['UpdatedAt']; + }; + SIMCardActionsSummary: { + /** + * @example in-progress + * @enum {string} + */ + status?: 'in-progress' | 'completed' | 'failed' | 'interrupted'; + count?: number; + }; + /** SIMCardActivationCode */ + SIMCardActivationCode: { + /** @example sim_card_activation_code */ + readonly record_type?: string; + /** + * @description Contents of the eSIM activation QR code. + * @example LPA:1$.... + */ + readonly activation_code?: string; + }; + /** SIMCardDeviceDetails */ + SIMCardDeviceDetails: { + /** @example device_details */ + readonly record_type?: string; + /** + * Format: int64 + * @description IMEI of the device where the SIM card is being used in. + * @example 457032284023794 + */ + readonly imei?: string; + /** + * @description Brand of the device where the SIM card is being used in. + * @example iPad Pro 11 2020 Cellular + */ + readonly model_name?: string; + /** + * @description Brand of the device where the SIM card is being used in. + * @example Apple + */ + readonly brand_name?: string; + /** + * @description Type of the device where the SIM card is being used in. + * @example Tablet + */ + readonly device_type?: string; + /** + * @description Operating system of the device where the SIM card is being used in. + * @example iOS 12 + */ + readonly operating_system?: string; + }; + /** SIMCardGroup */ + SIMCardGroup: { + /** + * Format: uuid + * @description Identifies the resource. + * @example 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + */ + readonly id?: string; + /** + * @description Identifies the type of the resource. + * @example sim_card_group + */ + readonly record_type?: string; + /** + * @description Indicates whether the SIM card group is the users default group.
The default group is created for the user and can not be removed. + * @example true + */ + readonly default?: boolean; + /** + * @description A user friendly name for the SIM card group. + * @example My Test Group + */ + name?: string; + /** @description Upper limit on the amount of data the SIM cards, within the group, can use. */ + data_limit?: { + /** + * Format: decimal + * @example 2048.1 + */ + amount?: string; + /** @example MB */ + unit?: string; + }; + consumed_data?: components['schemas']['ConsumedData']; + /** + * Format: uuid + * @description The identification of the related Private Wireless Gateway resource. + * @default null + * @example 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + */ + private_wireless_gateway_id: string; + /** + * @description ISO 8601 formatted date-time indicating when the resource was created. + * @example 2018-02-02T22:25:27.521Z + */ + readonly created_at?: string; + /** + * @description ISO 8601 formatted date-time indicating when the resource was updated. + * @example 2018-02-02T22:25:27.521Z + */ + readonly updated_at?: string; + }; + /** + * SIMCardGroupAction + * @description This object represents a SIM card group action request. It allows tracking the current status of an operation that impacts the SIM card group and SIM card in it. + */ + SIMCardGroupAction: { + /** + * Format: uuid + * @description Identifies the resource. + * @example 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + */ + readonly id?: string; + /** @example sim_card_group_action */ + readonly record_type?: string; + /** + * Format: uuid + * @description The SIM card group identification. + * @example 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + */ + sim_card_group_id?: string; + /** + * @description Represents the type of the operation requested. + * @example set_private_wireless_gateway + * @enum {string} + */ + type?: 'set_private_wireless_gateway' | 'remove_private_wireless_gateway'; + /** + * @example in-progress + * @enum {string} + */ + status?: 'in-progress' | 'completed' | 'failed'; + /** @description A JSON object representation of the action params. */ + settings?: { + /** + * Format: uuid + * @description The identification of the related Private Wireless Gateway resource. + * @example 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + */ + private_wireless_gateway_id?: string; + }; + /** + * @description ISO 8601 formatted date-time indicating when the resource was created. + * @example 2018-02-02T22:25:27.521Z + */ + readonly created_at?: string; + /** + * @description ISO 8601 formatted date-time indicating when the resource was updated. + * @example 2018-02-02T22:25:27.521Z + */ + readonly updated_at?: string; + }; + /** SIMCardGroupCreate */ + SIMCardGroupCreate: { + /** + * @description A user friendly name for the SIM card group. + * @example My Test Group + */ + name: string; + /** @description Upper limit on the amount of data the SIM cards, within the group, can use. */ + data_limit?: { + /** + * Format: decimal + * @example 2048.1 + */ + amount?: string; + /** @example MB */ + unit?: string; + }; + }; + /** SIMCardGroupPatch */ + SIMCardGroupPatch: { + /** + * @description A user friendly name for the SIM card group. + * @example My Test Group + */ + name?: string; + /** @description Upper limit on the amount of data the SIM cards, within the group, can use. */ + data_limit?: { + /** + * Format: decimal + * @example 2048.1 + */ + amount?: string; + /** @example MB */ + unit?: string; + }; + }; + /** SIMCardNetworkPreference */ + SIMCardNetworkPreference: { + /** @example sim_card_network_preferences */ + readonly record_type?: string; + /** + * Format: uuid + * @example 6b14e151-8493-4fa1-8664-1cc4e6d14158 + */ + sim_card_id?: string; + mobile_network_operators_preferences?: components['schemas']['MobileNetworkOperatorsPreferencesResponse']; + /** + * @description ISO 8601 formatted date-time indicating when the resource was created. + * @example 2018-02-02T22:25:27.521Z + */ + readonly created_at?: string; + /** + * @description ISO 8601 formatted date-time indicating when the resource was updated. + * @example 2018-02-02T22:25:27.521Z + */ + readonly updated_at?: string; + }; + /** SIMCardNetworkPreferenceWithOTAUpdates */ + SIMCardNetworkPreferenceWithOTAUpdates: { + /** @example sim_card_network_preferences */ + readonly record_type?: string; + /** + * Format: uuid + * @example 6b14e151-8493-4fa1-8664-1cc4e6d14158 + */ + sim_card_id?: string; + mobile_network_operators_preferences?: components['schemas']['MobileNetworkOperatorsPreferencesResponse']; + ota_updates?: components['schemas']['CompleteOTAUpdate'][]; + /** + * @description ISO 8601 formatted date-time indicating when the resource was created. + * @example 2018-02-02T22:25:27.521Z + */ + readonly created_at?: string; + /** + * @description ISO 8601 formatted date-time indicating when the resource was updated. + * @example 2018-02-02T22:25:27.521Z + */ + readonly updated_at?: string; + }; + /** SIMCardOrder */ + SIMCardOrder: { + /** + * Format: uuid + * @description Identifies the resource. + * @example 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + */ + readonly id?: string; + /** + * @description Identifies the type of the resource. + * @example sim_card_order + */ + readonly record_type?: string; + /** + * @description The amount of SIM cards requested in the SIM card order. + * @example 21 + */ + quantity?: number; + /** + * @description An object representing the total cost of the order. + * @example { + * "amount": "2.52", + * "currency": "USD" + * } + */ + cost?: { + /** + * @description A string representing the cost amount. + * @example 2.32 + */ + amount?: string; + /** + * Format: currency + * @description Filter by ISO 4217 currency string. + * @example USD + */ + currency?: string; + }; + /** + * @description An object representing the address information from when the order was submitted. + * @example { + * "id": "1293384261075731499", + * "street_address": "311 W Superior St", + * "extended_address": "Suite 504", + * "locality": "Chicago", + * "administrative_area": "IL", + * "country_code": "US", + * "postal_code": "60654" + * } + */ + readonly order_address?: { + /** + * Format: int64 + * @description Uniquely identifies the address for the order. + * @example 1293384261075731499 + */ + id?: string; + /** + * @description The first name of the shipping recipient. + * @example John + */ + first_name?: string; + /** + * @description The last name of the shipping recipient. + * @example Smith + */ + last_name?: string; + /** + * @description The name of the business where the address is located. + * @example Telnyx LLC + */ + business_name?: string; + /** + * @description The name of the street where the address is located. + * @example 311 W Superior St + */ + street_address?: string; + /** + * @description Supplemental field for address information. + * @example Suite 504 + */ + extended_address?: string; + /** + * @description The name of the city where the address is located. + * @example Chicago + */ + locality?: string; + /** + * @description State or province where the address is located. + * @example IL + */ + administrative_area?: string; + /** + * @description The mobile operator two-character (ISO 3166-1 alpha-2) origin country code. + * @example US + */ + country_code?: string; + /** + * @description Postal code for the address. + * @example 60654 + */ + postal_code?: string; + }; + /** + * Format: url + * @description The URL used to get tracking information about the order. + * @example http://www.example.com/ + */ + tracking_url?: string; + /** + * @description The current status of the SIM Card order.
  • pending - the order is waiting to be processed.
  • processing - the order is currently being processed.
  • ready_to_ship - the order is ready to be shipped to the specified address.
  • shipped - the order was shipped and is on its way to be delivered to the specified address.
  • delivered - the order was delivered to the specified address.
  • canceled - the order was canceled.
+ * @example pending + * @enum {string} + */ + status?: + | 'pending' + | 'processing' + | 'ready_to_ship' + | 'shipped' + | 'delivered' + | 'canceled'; + /** + * @description ISO 8601 formatted date-time indicating when the resource was last created. + * @example 2018-02-02T22:25:27.521Z + */ + readonly created_at?: string; + /** + * @description ISO 8601 formatted date-time indicating when the resource was last updated. + * @example 2018-02-02T22:25:27.521Z + */ + readonly updated_at?: string; + }; + /** SIMCardOrderPreview */ + SIMCardOrderPreview: { + total_cost?: { + /** + * @description A string representing the cost amount. + * @example 2.32 + */ + amount?: string; + /** + * Format: currency + * @description ISO 4217 currency string. + * @example USD + */ + currency?: string; + }; + shipping_cost?: { + /** + * @description A string representing the cost amount. + * @example 2.32 + */ + amount?: string; + /** + * Format: currency + * @description ISO 4217 currency string. + * @example USD + */ + currency?: string; + }; + sim_cards_cost?: { + /** + * @description A string representing the cost amount. + * @example 2.32 + */ + amount?: string; + /** + * Format: currency + * @description ISO 4217 currency string. + * @example USD + */ + currency?: string; + }; + /** + * @description Identifies the type of the resource. + * @example sim_card_order_preview + */ + readonly record_type?: string; + /** + * @description The amount of SIM cards requested in the SIM card order. + * @example 21 + */ + quantity?: number; + }; + /** SIMCardPublicIP */ + SIMCardPublicIP: { + /** @example sim_card_public_ip */ + readonly record_type?: string; + /** + * Format: uuid + * @example 6b14e151-8493-4fa1-8664-1cc4e6d14158 + */ + sim_card_id?: string; + /** + * @default ipv4 + * @example ipv4 + * @enum {string} + */ + readonly type: 'ipv4'; + /** + * @description The provisioned IP address. This attribute will only be available when underlying resource status is in a "provisioned" status. + * @default null + * @example 192.168.0.0 + */ + readonly ip: string; + /** + * @description ISO 8601 formatted date-time indicating when the resource was created. + * @example 2018-02-02T22:25:27.521Z + */ + readonly created_at?: string; + /** + * @description ISO 8601 formatted date-time indicating when the resource was updated. + * @example 2018-02-02T22:25:27.521Z + */ + readonly updated_at?: string; + }; + /** SIMCardRegistration */ + SIMCardRegistration: { + /** + * Format: uuid + * @description The group SIMCardGroup identification. This attribute can be null when it's present in an associated resource. + * @example 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + */ + sim_card_group_id?: string; + /** + * @description Searchable tags associated with the SIM card + * @example [ + * "personal", + * "customers", + * "active-customers" + * ] + */ + tags?: string[]; + /** @example [ + * "0000000001", + * "0000000002", + * "0000000003" + * ] */ + registration_codes: string[]; + /** + * @description Status on which the SIM card will be set after being successful registered. + * @default enabled + * @example standby + * @enum {string} + */ + status: 'enabled' | 'disabled' | 'standby'; + }; + SIMCardRegistrationCodeValidation: { + /** @example sim_card_registration_code_validation */ + record_type?: string; + /** + * @description The 10-digit SIM card registration code + * @example 0123456789 + */ + registration_code?: string; + /** + * @description The attribute that denotes whether the code is valid or not + * @example false + */ + valid?: boolean; + /** + * @description The validation message + * @example This code has already been used. + */ + invalid_detail?: string | null; + }; + SIMCardRegistrationCodeValidations: { + data?: components['schemas']['SIMCardRegistrationCodeValidation'][]; + }; + SIMCardStatus: { + /** + * @description The current status of the SIM card. It will be one of the following:
+ *
    + *
  • registering - the card is being registered
  • + *
  • enabling - the card is being enabled
  • + *
  • enabled - the card is enabled and ready for use
  • + *
  • disabling - the card is being disabled
  • + *
  • disabled - the card has been disabled and cannot be used
  • + *
  • data_limit_exceeded - the card has exceeded its data consumption limit
  • + *
  • setting_standby - the process to set the card in stand by is in progress
  • + *
  • standby - the card is in stand by
  • + *
+ * Transitioning between the enabled and disabled states may take a period of time. + * + * @example enabled + * @enum {string} + */ + readonly value?: + | 'registering' + | 'enabling' + | 'enabled' + | 'disabling' + | 'disabled' + | 'data_limit_exceeded' + | 'setting_standby' + | 'standby'; + /** + * @description It describes why the SIM card is in the current status. + * @example The SIM card is active, ready to connect to networks and consume data. + */ + readonly reason?: string; + }; + SSLCertificate: { + /** @description Unique identifier for the SSL certificate */ + id?: string; + issued_to?: { + /** @description The common name of the entity the certificate was issued to */ + common_name?: string; + /** @description The organization the certificate was issued to */ + organization?: string; + /** @description The organizational unit the certificate was issued to */ + organization_unit?: string; + }; + issued_by?: { + /** @description The common name of the entity the certificate was issued by */ + common_name?: string; + /** @description The organization the certificate was issued by */ + organization?: string; + /** @description The organizational unit the certificate was issued by */ + organization_unit?: string; + }; + /** + * Format: date-time + * @description The time the certificate is valid from + * @example 2020-01-01T00:00:00Z + */ + valid_from?: string; + /** + * Format: date-time + * @description The time the certificate is valid to + * @example 2020-01-01T00:00:00Z + */ + valid_to?: string; + /** + * Format: date-time + * @description Time when SSL certificate was uploaded + * @example 2020-01-01T00:00:00Z + */ + created_at?: string; + }; + /** SIMCardGroup */ + SearchedSIMCardGroup: { + /** + * Format: uuid + * @description Identifies the resource. + * @example 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + */ + readonly id?: string; + /** + * @description Identifies the type of the resource. + * @example sim_card_group + */ + readonly record_type?: string; + /** + * @description Indicates whether the SIM card group is the users default group.
The default group is created for the user and can not be removed. + * @example true + */ + readonly default?: boolean; + /** + * @description A user friendly name for the SIM card group. + * @example My Test Group + */ + name?: string; + /** @description Upper limit on the amount of data the SIM cards, within the group, can use. */ + data_limit?: { + /** + * Format: decimal + * @example 2048.1 + */ + amount?: string; + /** @example MB */ + unit?: string; + }; + consumed_data?: components['schemas']['ConsumedData']; + /** + * @description The number of SIM cards associated with the group. + * @default 0 + * @example 10 + */ + sim_card_count: number; + /** + * Format: uuid + * @description The identification of the related Private Wireless Gateway resource. + * @default null + * @example 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + */ + private_wireless_gateway_id: string; + /** + * @description ISO 8601 formatted date-time indicating when the resource was created. + * @example 2018-02-02T22:25:27.521Z + */ + readonly created_at?: string; + /** + * @description ISO 8601 formatted date-time indicating when the resource was updated. + * @example 2018-02-02T22:25:27.521Z + */ + readonly updated_at?: string; + }; + /** + * Send DTMF Request + * @example { + * "digits": "1www2WABCDw9", + * "duration_millis": 500, + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + * "command_id": "891510ac-f3e4-11e8-af5b-de00688a4901" + * } + */ + SendDTMFRequest: { + /** + * @description DTMF digits to send. Valid digits are 0-9, A-D, *, and #. Pauses can be added using w (0.5s) and W (1s). + * @example 1www2WABCDw9 + */ + digits: string; + /** + * Format: int32 + * @description Specifies for how many milliseconds each digit will be played in the audio stream. Ranges from 100 to 500ms + * @default 250 + * @example 500 + */ + duration_millis: number; + /** + * @description Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + /** + * @description Use this field to avoid duplicate commands. Telnyx will ignore any command with the same `command_id` for the same `call_control_id`. + * @example 891510ac-f3e4-11e8-af5b-de00688a4901 + */ + command_id?: string; + }; + /** Send fax multipart request */ + SendFaxMultipartRequest: { + connection_id: components['schemas']['ConnectionId']; + /** + * Format: binary + * @description The file you want to upload. The maximum allowed size is 20 MB. contents and media_name/media_url can't be submitted together. + */ + contents: string; + to: components['schemas']['To']; + from: components['schemas']['From']; + quality?: components['schemas']['Quality']; + t38_enabled?: components['schemas']['T38Enabled']; + monochrome?: components['schemas']['Monochrome']; + store_media?: components['schemas']['StoreMedia']; + store_preview?: components['schemas']['StorePreview']; + }; + /** Send fax request */ + SendFaxRequest: { + /** + * @description The connection ID to send the fax with. + * @example 234423 + */ + connection_id: string; + media_url?: components['schemas']['MediaUrl']; + media_name?: components['schemas']['MediaName']; + to: components['schemas']['To']; + from: components['schemas']['From']; + /** + * @description The `from_display_name` string to be used as the caller id name (SIP From Display Name) presented to the destination (`to` number). The string should have a maximum of 128 characters, containing only letters, numbers, spaces, and -_~!.+ special characters. If ommited, the display name will be the same as the number in the `from` field. + * @example Company Name + */ + from_display_name?: string; + quality?: components['schemas']['Quality']; + /** + * @description The flag to disable the T.38 protocol. + * @default true + */ + t38_enabled: boolean; + /** + * @description The flag to enable monochrome, true black and white fax results. + * @default false + */ + monochrome: boolean; + /** + * @description Should fax media be stored on temporary URL. It does not support media_name, they can't be submitted together. + * @default false + */ + store_media: boolean; + /** + * @description Should fax preview be stored on temporary URL. + * @default false + */ + store_preview: boolean; + /** + * @description Use this field to override the URL to which Telnyx will send subsequent webhooks for this fax. + * @example https://www.example.com/server-b/ + */ + webhook_url?: string; + /** + * @description Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + }; + /** + * Send SIP Info Request + * @example { + * "content_type": "application/json", + * "body": "{\"key\": \"value\", \"numValue\": 100}", + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + * "command_id": "891510ac-f3e4-11e8-af5b-de00688a4901" + * } + */ + SendSIPInfoRequest: { + /** + * @description Content type of the INFO body. Must be MIME type compliant. There is a 1,400 bytes limit + * @example application/json + */ + content_type: string; + /** + * @description Content of the SIP INFO + * @example {"key": "value", "numValue": 100} + */ + body: string; + /** + * @description Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + /** + * @description Use this field to avoid duplicate commands. Telnyx will ignore any command with the same `command_id` for the same `call_control_id`. + * @example 891510ac-f3e4-11e8-af5b-de00688a4901 + */ + command_id?: string; + }; + /** + * @description Indicates the coverage of the termination regions. + * @default global + * @example global + * @enum {string} + */ + ServicePlan: 'global'; + /** + * Session Ended + * @example { + * "record_type": "event", + * "event_type": "video.room.session.ended", + * "id": "6b61621f-62e0-4aad-ab11-9fd19e272e73", + * "occurred_at": "2018-02-02T22:25:27.521992Z", + * "payload": { + * "session_id": "7b61621f-62e0-4aad-ab11-9fd19e272e73", + * "room_id": "0ccc7b54-4df3-4bca-a65a-35a1ecc777f0", + * "duration_secs": 235, + * "ended_reason": "stale" + * } + * } + */ + SessionEnded: { + /** + * @description An identifier for the type of the resource. + * @example event + * @enum {string} + */ + record_type?: 'event'; + /** + * @description The type of event being delivered. + * @example video.room.session.ended + * @enum {string} + */ + event_type?: 'video.room.session.ended'; + /** + * Format: uuid + * @description Uniquely identify the event. + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + */ + id?: string; + /** + * Format: date-time + * @description ISO 8601 datetime of when the event occurred. + * @example 2018-02-02T22:25:27.521992Z + */ + occurred_at?: string; + payload?: { + /** + * Format: uuid + * @description Session ID that identifies the session that ended. + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + */ + session_id?: string; + /** + * Format: uuid + * @description Room ID that identifies the room where the session ended. + * @example 0ccc7b54-4df3-4bca-a65a-35a1ecc777f0 + */ + room_id?: string; + /** + * @description The duration in seconds of the session + * @example 245 + */ + duration_secs?: number; + /** + * @description The reason why the session ended + * @example stale + */ + ended_reason?: string; + }; + }; + /** Session Ended Event */ + SessionEndedEvent: { + data?: components['schemas']['SessionEnded']; + }; + /** + * Session Started + * @example { + * "record_type": "event", + * "event_type": "video.room.session.started", + * "id": "6b61621f-62e0-4aad-ab11-9fd19e272e73", + * "occurred_at": "2018-02-02T22:25:27.521992Z", + * "payload": { + * "session_id": "7b61621f-62e0-4aad-ab11-9fd19e272e73", + * "room_id": "0ccc7b54-4df3-4bca-a65a-35a1ecc777f0" + * } + * } + */ + SessionStarted: { + /** + * @description An identifier for the type of the resource. + * @example event + * @enum {string} + */ + record_type?: 'event'; + /** + * @description The type of event being delivered. + * @example video.room.session.started + * @enum {string} + */ + event_type?: 'video.room.session.started'; + /** + * Format: uuid + * @description Uniquely identify the event. + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + */ + id?: string; + /** + * Format: date-time + * @description ISO 8601 datetime of when the event occurred. + * @example 2018-02-02T22:25:27.521992Z + */ + occurred_at?: string; + payload?: { + /** + * Format: uuid + * @description Session ID that identifies the session that started. + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + */ + session_id?: string; + /** + * Format: uuid + * @description Room ID that identifies the room where the session started. + * @example 0ccc7b54-4df3-4bca-a65a-35a1ecc777f0 + */ + room_id?: string; + }; + }; + /** Session Started Event */ + SessionStartedEvent: { + data?: components['schemas']['SessionStarted']; + }; + /** SettingsDataErrorMessage */ + SettingsDataErrorMessage: { + /** Message */ + message: string; + }; + /** + * SharedCampaign + * @description Campaign is generated by the 10DLC registry once the corresponding campaign request is approved. Each campaign is assigned a unique identifier - **campaignId**. Once a campaign is activated, limited information is published to the NetNumber OSR service for consumption by members of the ecosystem. When a campaign is suspended(reversible) or expired(non-reversible), campaign data is deleted from the OSR service. Most attributes of campaignare immutable, including **usecase**, **vertical**, **brandId** and **cspId**. + */ + SharedCampaign: { + /** + * Brandid + * @description Alphanumeric identifier of the brand associated with this campaign. + */ + brandId: string; + /** + * Campaignid + * @description Alphanumeric identifier assigned by the registry for a campaign. This identifier is required by the NetNumber OSR SMS enabling process of 10DLC. + */ + campaignId: string; + /** + * Createdate + * @description Unix timestamp when campaign was created. + */ + createDate?: string; + /** + * Status + * @description Current campaign status. Possible values: ACTIVE, EXPIRED. A newly created campaign defaults to ACTIVE status. + */ + status?: string; + /** + * Usecase + * @description Campaign usecase. Must be of defined valid types. Use `/registry/enum/usecase` operation to retrieve usecases available for given brand. + */ + usecase: string; + }; + /** SharedCampaignRecordSet */ + SharedCampaignRecordSet: { + /** Page */ + page?: number; + /** Records */ + records?: components['schemas']['SharedCampaign'][]; + /** Totalrecords */ + totalRecords?: number; + }; + /** @example { + * "record_type": "short_code", + * "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + * "short_code": "12345", + * "country_code": "US", + * "messaging_profile_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + * "created_at": "2019-01-23T18:10:02.574Z", + * "updated_at": "2019-01-23T18:10:02.574Z" + * } */ + ShortCode: { + /** + * @description Identifies the type of the resource. + * @example short_code + * @enum {string} + */ + readonly record_type?: 'short_code'; + /** + * Format: uuid + * @description Identifies the type of resource. + */ + readonly id?: string; + /** @description Short digit sequence used to address messages. */ + readonly short_code?: string; + /** + * @description ISO 3166-1 alpha-2 country code. + * @example US + */ + readonly country_code?: string; + /** @description Unique identifier for a messaging profile. */ + messaging_profile_id: string | null; + /** + * Format: date-time + * @description ISO 8601 formatted date indicating when the resource was created. + */ + readonly created_at?: string; + /** + * Format: date-time + * @description ISO 8601 formatted date indicating when the resource was updated. + */ + readonly updated_at?: string; + }; + /** + * @description The SIM card individual data usage notification information. + * @example { + * "id": "79228acc-3f08-4e70-ac68-cb5aae8b537a", + * "sim_card_id": "b34c1683-cd85-4493-b9a5-315eb4bc5e19", + * "threshold": { + * "amount": "2048.0", + * "unit": "MB" + * }, + * "created_at": "2018-02-02T22:25:27.521Z", + * "updated_at": "2018-02-02T22:25:27.521Z" + * } + */ + SimCardDataUsageNotification: { + /** + * Format: uuid + * @description Identifies the resource. + * @example 79228acc-3f08-4e70-ac68-cb5aae8b537a + */ + readonly id?: string; + /** + * Format: uuid + * @description The identification UUID of the related SIM card resource. + * @example b34c1683-cd85-4493-b9a5-315eb4bc5e19 + */ + sim_card_id?: string; + /** @example sim_card_data_usage_notification */ + readonly record_type?: string; + /** @description Data usage threshold that will trigger the notification. */ + threshold?: { + /** + * Format: decimal + * @example 2048.1 + */ + amount?: string; + /** + * @example MB + * @enum {string} + */ + unit?: 'MB' | 'GB'; + }; + /** + * @description ISO 8601 formatted date-time indicating when the resource was created. + * @example 2018-02-02T22:25:27.521Z + */ + readonly created_at?: string; + /** + * @description ISO 8601 formatted date-time indicating when the resource was updated. + * @example 2018-02-02T22:25:27.521Z + */ + readonly updated_at?: string; + }; + /** SimCardOrderCreate */ + SimCardOrderCreate: { + /** + * Format: int64 + * @description Uniquely identifies the address for the order. + * @example 1293384261075731499 + */ + address_id: string; + /** + * @description The amount of SIM cards to order. + * @example 23 + */ + quantity: number; + }; + SimCardUsageDetailRecord: { + /** + * Format: uuid + * @description Unique identifier for this SIM Card Usage + * @example 3ca7bd3d-7d82-4e07-9df4-009123068320 + */ + id?: string; + /** + * Format: date-time + * @description Event creation time + * @example 2020-07-01T00:00:00Z + */ + created_at?: string; + /** + * Format: date-time + * @description Event close time + * @example 2020-07-01T00:00:00Z + */ + closed_at?: string; + /** + * @description Ip address that generated the event + * @example 100.64.1.2 + */ + ip_address?: string; + /** + * @description Number of megabytes downloaded + * @example 0.1240 + */ + downlink_data?: number; + /** + * @description International Mobile Subscriber Identity + * @example 311210393720093 + */ + imsi?: string; + /** + * @description Mobile country code + * @example 204 + */ + mcc?: string; + /** + * @description Mobile network code + * @example 69 + */ + mnc?: string; + /** + * @description Telnyx account currency used to describe monetary values, including billing cost + * @example USD + */ + currency?: string; + /** + * @description Unit of wireless link consumption + * @example MB + */ + data_unit?: string; + /** + * Format: monetary_value + * @description Currency amount per billing unit used to calculate the Telnyx billing cost + * @example 0.06000 + */ + data_rate?: string; + /** + * @description Sim group name for sim card + * @example SIMBillingInfo test - otheraccount + */ + sim_group_name?: string; + /** + * @description Unique identifier for SIM card + * @example 7aa66686-b39f-456d-8edc-5b6cffb1432a + */ + sim_card_id?: string; + /** + * @description Unique identifier for SIM group + * @example 6c07e2e9-cbc0-49ba-ac0d-c59b59646bb1 + */ + sim_group_id?: string; + /** + * @description User-provided tags + * @example mytag + */ + sim_card_tags?: string; + /** + * @description Telephone number associated to SIM card + * @example +15188490209 + */ + phone_number?: string; + /** + * @description Number of megabytes uploaded + * @example 0.7653 + */ + uplink_data?: number; + /** + * @description Data cost + * @example 0.0292830 + */ + data_cost?: number; + /** + * @description discriminator enum property added by openapi-typescript + * @enum {string} + */ + record_type: 'SimCardUsageDetailRecord'; + }; + /** SIMCard */ + SimpleSIMCard: { + /** + * Format: uuid + * @description Identifies the resource. + * @example 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + */ + readonly id?: string; + /** @example sim_card */ + readonly record_type?: string; + status?: components['schemas']['SIMCardStatus']; + /** + * @description The type of SIM card + * @example physical + * @enum {string} + */ + readonly type?: 'physical' | 'esim'; + /** + * @description The ICCID is the identifier of the specific SIM card/chip. Each SIM is internationally identified by its integrated circuit card identifier (ICCID). ICCIDs are stored in the SIM card's memory and are also engraved or printed on the SIM card body during a process called personalization. + * + * @example 89310410106543789301 + */ + readonly iccid?: string; + /** + * @description SIM cards are identified on their individual network operators by a unique International Mobile Subscriber Identity (IMSI).
+ * Mobile network operators connect mobile phone calls and communicate with their market SIM cards using their IMSIs. The IMSI is stored in the Subscriber Identity Module (SIM) inside the device and is sent by the device to the appropriate network. It is used to acquire the details of the device in the Home Location Register (HLR) or the Visitor Location Register (VLR). + * + * @example 081932214823362973 + */ + readonly imsi?: string; + /** + * @description Mobile Station International Subscriber Directory Number (MSISDN) is a number used to identify a mobile phone number internationally.
+ * MSISDN is defined by the E.164 numbering plan. It includes a country code and a National Destination Code which identifies the subscriber's operator. + * + * @example +13109976224 + */ + readonly msisdn?: string; + /** + * Format: uuid + * @description The group SIMCardGroup identification. This attribute can be null when it's present in an associated resource. + * @example 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + */ + sim_card_group_id?: string; + /** + * @description Searchable tags associated with the SIM card + * @example [ + * "personal", + * "customers", + * "active-customers" + * ] + */ + tags?: string[]; + /** @description The SIM card individual data limit configuration. */ + readonly data_limit?: { + /** + * Format: decimal + * @example 2048.0 + */ + amount?: string; + /** + * @example MB + * @enum {string} + */ + unit?: 'MB' | 'GB'; + }; + /** @description The SIM card consumption so far in the current billing cycle. */ + readonly current_billing_period_consumed_data?: { + /** + * Format: decimal + * @example 2049.0 + */ + amount?: string; + /** + * @default MB + * @example MB + */ + unit: string; + }; + /** + * @description Indicate whether the SIM card has any pending (in-progress) actions. + * @default false + * @example true + */ + readonly actions_in_progress: boolean; + /** + * @description ISO 8601 formatted date-time indicating when the resource was created. + * @example 2018-02-02T22:25:27.521Z + */ + readonly created_at?: string; + /** + * @description ISO 8601 formatted date-time indicating when the resource was updated. + * @example 2018-02-02T22:25:27.521Z + */ + readonly updated_at?: string; + }; + /** + * OTAUpdate + * @description This object represents an Over the Air (OTA) update request. It allows tracking the current status of a operation that apply settings in a particular SIM card.

+ */ + SimplifiedOTAUpdate: { + /** + * Format: uuid + * @description Identifies the resource. + * @example 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + */ + readonly id?: string; + /** @example ota_update */ + readonly record_type?: string; + /** + * Format: uuid + * @description The identification UUID of the related SIM card resource. + * @example 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + */ + sim_card_id?: string; + /** + * @description Represents the type of the operation requested. This will relate directly to the source of the request. + * @example sim_card_network_preferences + * @enum {string} + */ + type?: 'sim_card_network_preferences'; + /** + * @example in-progress + * @enum {string} + */ + status?: 'in-progress' | 'completed' | 'failed'; + /** + * @description ISO 8601 formatted date-time indicating when the resource was created. + * @example 2018-02-02T22:25:27.521Z + */ + readonly created_at?: string; + /** + * @description ISO 8601 formatted date-time indicating when the resource was updated. + * @example 2018-02-02T22:25:27.521Z + */ + readonly updated_at?: string; + }; + /** + * Global Outbound Channels Details for a Managed Account + * @example { + * "channel_limit": 30, + * "email": "allocate_demo@customer.com", + * "id": "096abcde-1122-3344-ab77-ff0123456789", + * "manager_account_id": "beeabcde-1122-3344-ab77-ff0123456789", + * "record_type": "managed_account_global_outbound_settings" + * } + */ + SingleManagedAccountGlobalOutboundChannels: { + /** + * @description Integer value that indicates the number of allocatable global outbound channels that are allocated to the managed account. If the value is 0 then the account will have no usable channels and will not be able to perform outbound calling. + * @example 30 + */ + channel_limit?: number; + /** + * @description The email of the managed account. + * @example customer@example.org + */ + email?: string; + /** + * @description The user ID of the managed account. + * @example 096abcde-1122-3344-ab77-ff0123456789 + */ + id?: string; + /** + * @description The user ID of the manager of the account. + * @example beeabcde-1122-3344-ab77-ff0123456789 + */ + manager_account_id?: string; + /** + * @description The name of the type of data in the response. + * @example managed_account_global_outbound_settings + */ + record_type?: string; + }; + /** + * SIP Header + * @example { + * "name": "User-to-User", + * "value": "value" + * } + */ + SipHeader: { + /** + * @description The name of the header to add. + * @example User-to-User + * @enum {string} + */ + name: 'User-to-User'; + /** + * @description The value of the header. + * @example value + */ + value: string; + }; + /** @example { + * "id": "1293384261075731499", + * "record_type": "phone_number", + * "phone_number": "+19705555098", + * "status": "active", + * "external_pin": "1234", + * "connection_id": "1293384261075731499", + * "customer_reference": "customer-reference", + * "billing_group_id": "86f58db9-0fe3-4adc-9d1f-46e66e6e9323", + * "emergency_enabled": true, + * "emergency_address_id": "1315261609962112019", + * "call_forwarding_enabled": true, + * "cnam_listing_enabled": true, + * "caller_id_name_enabled": true, + * "call_recording_enabled": true, + * "t38_fax_gateway_enabled": true, + * "number_level_routing": "disabled", + * "phone_number_type": "local", + * "inbound_call_screening": "disabled", + * "purchased_at": "2019-10-23T18:10:00.000Z", + * "created_at": "2019-10-23T18:10:00.000Z", + * "updated_at": "2019-10-24T18:10:00.000Z", + * "hd_voice_enabled": true + * } */ + SlimPhoneNumberDetailed: { + id?: components['schemas']['IntId']; + /** + * @description Identifies the type of the resource. + * @example phone_number_slim + */ + readonly record_type?: string; + /** @description The +E.164-formatted phone number associated with this record. */ + readonly phone_number?: string; + /** + * @description The phone number's current status. + * @enum {string} + */ + readonly status?: + | 'purchase-pending' + | 'purchase-failed' + | 'port-pending' + | 'port-failed' + | 'active' + | 'deleted' + | 'emergency-only' + | 'ported-out' + | 'port-out-pending' + | 'requirement-info-pending' + | 'requirement-info-under-review' + | 'requirement-info-exception' + | 'provision-pending'; + /** @description If someone attempts to port your phone number away from Telnyx and your phone number has an external PIN set, Telnyx will attempt to verify that you provided the correct external PIN to the winning carrier. Note that not all carriers cooperate with this security mechanism. */ + external_pin?: string; + /** @description Identifies the connection associated with the phone number. */ + connection_id?: string; + /** + * @description A customer reference string for customer look ups. + * @example MY REF 001 + */ + customer_reference?: string; + /** @description Identifies the billing group associated with the phone number. */ + billing_group_id?: string; + /** @description Indicates whether emergency services are enabled for this number. */ + readonly emergency_enabled?: boolean; + /** + * Format: int64 + * @description Identifies the emergency address associated with the phone number. + */ + readonly emergency_address_id?: string; + /** + * @description Indicates if call forwarding will be enabled for this number if forwards_to and forwarding_type are filled in. Defaults to true for backwards compatibility with APIV1 use of numbers endpoints. + * @default true + */ + readonly call_forwarding_enabled: boolean; + /** @description Indicates whether a CNAM listing is enabled for this number. */ + readonly cnam_listing_enabled?: boolean; + /** @description Indicates whether caller ID is enabled for this number. */ + readonly caller_id_name_enabled?: boolean; + /** @description Indicates whether call recording is enabled for this number. */ + readonly call_recording_enabled?: boolean; + /** @description Indicates whether T38 Fax Gateway for inbound calls to this number. */ + readonly t38_fax_gateway_enabled?: boolean; + /** @description ISO 8601 formatted date indicating when the resource was purchased. */ + readonly purchased_at?: string; + /** @description ISO 8601 formatted date indicating when the resource was created. */ + readonly created_at?: string; + /** + * @description Deprecated field, the only value for this is 'disabled'. All routing for numbers should be configured via connection settings. + * @default disabled + * @enum {string} + */ + number_level_routing: 'disabled'; + /** + * @description The phone number's type. + * Note: For numbers purchased prior to July 2023 or when fetching a number's details immediately after a purchase completes, the legacy values `tollfree`, `shortcode` or `longcode` may be returned instead. + * @enum {string} + */ + readonly phone_number_type?: + | 'local' + | 'toll_free' + | 'mobile' + | 'national' + | 'shared_cost' + | 'landline' + | 'tollfree' + | 'shortcode' + | 'longcode'; + /** + * @description The inbound_call_screening setting is a phone number configuration option variable that allows users to configure their settings to block or flag fraudulent calls. It can be set to disabled, reject_calls, or flag_calls. This feature has an additional per-number monthly cost associated with it. + * @default disabled + * @enum {string} + */ + inbound_call_screening: 'disabled' | 'reject_calls' | 'flag_calls'; + }; + /** + * Sound modifications + * @description Use this field to modify sound effects, for example adjust the pitch. + * @example { + * "pitch": "0.8", + * "semitone": -2, + * "octaves": 0.1, + * "track": "both" + * } + */ + SoundModifications: { + /** + * Format: double + * @description Set the pitch directly, value should be > 0, default 1 (lower = lower tone) + * @example 0.8 + */ + pitch?: number; + /** + * Format: double + * @description Adjust the pitch in semitones, values should be between -14 and 14, default 0 + * @example -10 + */ + semitone?: number; + /** + * Format: double + * @description Adjust the pitch in octaves, values should be between -1 and 1, default 0 + * @example -0.5 + */ + octaves?: number; + /** + * @description The track to which the sound modifications will be applied. Accepted values are `inbound` or `outbound` + * @default outbound + * @example inbound + */ + track: string; + }; + SourceResponse: { + /** + * @description A JSON Pointer [RFC6901] to the associated entity in the request document + * @example /title + */ + pointer?: string; + /** + * @description a string indicating which URI query parameter caused the error + * @example metrics + */ + parameter?: string; + }; + /** + * Speak Request + * @example { + * "payload": "Say this on the call", + * "payload_type": "text", + * "service_level": "basic", + * "stop": "current", + * "voice": "female", + * "language": "arb", + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + * "command_id": "891510ac-f3e4-11e8-af5b-de00688a4901" + * } + */ + SpeakRequest: { + /** + * @description The text or SSML to be converted into speech. There is a 3,000 character limit. + * @example Say this on the call + */ + payload: string; + /** + * @description The type of the provided payload. The payload can either be plain text, or Speech Synthesis Markup Language (SSML). + * @default text + * @example ssml + * @enum {string} + */ + payload_type: 'text' | 'ssml'; + /** + * @description This parameter impacts speech quality, language options and payload types. When using `basic`, only the `en-US` language and payload type `text` are allowed. + * @default premium + * @example premium + * @enum {string} + */ + service_level: 'basic' | 'premium'; + /** + * @description When specified, it stops the current audio being played. Specify `current` to stop the current audio being played, and to play the next file in the queue. Specify `all` to stop the current audio file being played and to also clear all audio files from the queue. + * @example current + */ + stop?: string; + /** + * @description The gender of the voice used to speak back the text or the specific Amazon Polly voice to be used in the form of `Polly.`, e.g. `Polly.Brian`. All standard Amazon Polly voices are supported. + * @example female + * @enum {string} + */ + voice: 'male' | 'female'; + /** + * @description The language you want spoken. This parameter is ignored when a `Polly.*` voice is specified. + * @example en-US + * @enum {string} + */ + language?: + | 'arb' + | 'cmn-CN' + | 'cy-GB' + | 'da-DK' + | 'de-DE' + | 'en-AU' + | 'en-GB' + | 'en-GB-WLS' + | 'en-IN' + | 'en-US' + | 'es-ES' + | 'es-MX' + | 'es-US' + | 'fr-CA' + | 'fr-FR' + | 'hi-IN' + | 'is-IS' + | 'it-IT' + | 'ja-JP' + | 'ko-KR' + | 'nb-NO' + | 'nl-NL' + | 'pl-PL' + | 'pt-BR' + | 'pt-PT' + | 'ro-RO' + | 'ru-RU' + | 'sv-SE' + | 'tr-TR'; + /** + * @description Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + /** + * @description Use this field to avoid duplicate commands. Telnyx will ignore any command with the same `command_id` for the same `call_control_id`. + * @example 891510ac-f3e4-11e8-af5b-de00688a4901 + */ + command_id?: string; + }; + /** + * Start Conference Recording Request + * @example { + * "format": "wav", + * "command_id": "891510ac-f3e4-11e8-af5b-de00688a4901", + * "play_beep": true + * } + */ + StartConferenceRecordingRequest: { + /** + * @description The audio file format used when storing the conference recording. Can be either `mp3` or `wav`. + * @example mp3 + * @enum {string} + */ + format: 'wav' | 'mp3'; + /** + * @description Use this field to avoid duplicate commands. Telnyx will ignore any command with the same `command_id` for the same `conference_id`. + * @example 891510ac-f3e4-11e8-af5b-de00688a4901 + */ + command_id?: string; + /** + * @description If enabled, a beep sound will be played at the start of a recording. + * @example true + */ + play_beep?: boolean; + /** + * @description When set to `trim-silence`, silence will be removed from the beginning and end of the recording. + * @example trim-silence + * @enum {string} + */ + trim?: 'trim-silence'; + /** + * @description The custom recording file name to be used instead of the default `call_leg_id`. Telnyx will still add a Unix timestamp suffix. + * @example my_recording_file_name + */ + custom_file_name?: string; + }; + /** + * Start Forking Request + * @example { + * "target": "udp:192.0.2.1:9000", + * "rx": "udp:192.0.2.1:9000", + * "tx": "udp:192.0.2.1:9001", + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + * "command_id": "891510ac-f3e4-11e8-af5b-de00688a4901" + * } + */ + StartForkingRequest: { + /** + * @description The network target, , where the call's RTP media packets should be forwarded. Both incoming and outgoing media packets will be delivered to the specified target, and information about the stream will be included in the encapsulation protocol header, including the direction (0 = inbound; 1 = outbound), leg (0 = A-leg; 1 = B-leg), and call_leg_id. + * @example udp:192.0.2.1:9000 + */ + target?: string; + /** + * @description The network target, , where the call's incoming RTP media packets should be forwarded. + * @example udp:192.0.2.1:9000 + */ + rx?: string; + /** + * @description Optionally specify a media type to stream. If `decrypted` selected, Telnyx will decrypt incoming SIP media before forking to the target. `rx` and `tx` are required fields if `decrypted` selected. + * @default raw + * @example decrypted + * @enum {string} + */ + stream_type: 'raw' | 'decrypted'; + /** + * @description The network target, , where the call's outgoing RTP media packets should be forwarded. + * @example udp:192.0.2.1:9001 + */ + tx?: string; + /** + * @description Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + /** + * @description Use this field to avoid duplicate commands. Telnyx will ignore any command with the same `command_id` for the same `call_control_id`. + * @example 891510ac-f3e4-11e8-af5b-de00688a4901 + */ + command_id?: string; + }; + /** + * Start Recording Request + * @example { + * "format": "wav", + * "channels": "single", + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + * "command_id": "891510ac-f3e4-11e8-af5b-de00688a4901", + * "play_beep": true, + * "max_length": 0, + * "timeout_secs": 0 + * } + */ + StartRecordingRequest: { + /** + * @description The audio file format used when storing the call recording. Can be either `mp3` or `wav`. + * @example mp3 + * @enum {string} + */ + format: 'wav' | 'mp3'; + /** + * @description When `dual`, final audio file will be stereo recorded with the first leg on channel A, and the rest on channel B. + * @example single + * @enum {string} + */ + channels: 'single' | 'dual'; + /** + * @description Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + /** + * @description Use this field to avoid duplicate commands. Telnyx will ignore any command with the same `command_id` for the same `call_control_id`. + * @example 891510ac-f3e4-11e8-af5b-de00688a4901 + */ + command_id?: string; + /** + * @description If enabled, a beep sound will be played at the start of a recording. + * @example true + */ + play_beep?: boolean; + /** + * Format: int32 + * @description Defines the maximum length for the recording in seconds. The minimum value is 0. The maximum value is 14400. The default value is 0 (infinite) + * @default 0 + * @example 100 + */ + max_length: number; + /** + * Format: int32 + * @description The number of seconds that Telnyx will wait for the recording to be stopped if silence is detected. The timer only starts when the speech is detected. Please note that call transcription is used to detect silence and the related charge will be applied. The minimum value is 0. The default value is 0 (infinite) + * @default 0 + * @example 100 + */ + timeout_secs: number; + /** + * @description The audio track to be recorded. Can be either `both`, `inbound` or `outbound`. If only single track is specified (`inbound`, `outbound`), `channels` configuration is ignored and it will be recorded as mono (single channel). + * @default both + * @example outbound + * @enum {string} + */ + recording_track: 'both' | 'inbound' | 'outbound'; + /** + * @description When set to `trim-silence`, silence will be removed from the beginning and end of the recording. + * @example trim-silence + * @enum {string} + */ + trim?: 'trim-silence'; + /** + * @description The custom recording file name to be used instead of the default `call_leg_id`. Telnyx will still add a Unix timestamp suffix. + * @example my_recording_file_name + */ + custom_file_name?: string; + }; + /** + * Start Streaming Request + * @example { + * "stream_url": "wss://www.example.com/websocket", + * "stream_track": "both_tracks", + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + * "command_id": "891510ac-f3e4-11e8-af5b-de00688a4901", + * "enable_dialogflow": false, + * "dialogflow_config": { + * "analyze_sentiment": false, + * "partial_automated_agent_reply": false + * } + * } + */ + StartStreamingRequest: { + /** + * @description The destination WebSocket address where the stream is going to be delivered. + * @example wss://www.example.com/websocket + */ + stream_url?: string; + /** + * @description Specifies which track should be streamed. + * @default inbound_track + * @example both_tracks + * @enum {string} + */ + stream_track: 'inbound_track' | 'outbound_track' | 'both_tracks'; + stream_bidirectional_mode?: components['schemas']['StreamBidirectionalMode']; + stream_bidirectional_codec?: components['schemas']['StreamBidirectionalCodec']; + /** + * @description Enables Dialogflow for the current call. The default value is false. + * @default false + * @example true + */ + enable_dialogflow: boolean; + dialogflow_config?: components['schemas']['DialogflowConfig']; + /** + * @description Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + /** + * @description Use this field to avoid duplicate commands. Telnyx will ignore any command with the same `command_id` for the same `call_control_id`. + * @example 891510ac-f3e4-11e8-af5b-de00688a4901 + */ + command_id?: string; + }; + /** + * Status + * @description An enumeration. + * @enum {unknown} + */ + Status: 'ACTIVE' | 'EXPIRED'; + /** + * StockExchange + * @description (Required for public company) stock exchange. + * @example NASDAQ + * @enum {unknown} + */ + StockExchange: + | 'NONE' + | 'NASDAQ' + | 'NYSE' + | 'AMEX' + | 'AMX' + | 'ASX' + | 'B3' + | 'BME' + | 'BSE' + | 'FRA' + | 'ICEX' + | 'JPX' + | 'JSE' + | 'KRX' + | 'LON' + | 'NSE' + | 'OMX' + | 'SEHK' + | 'SSE' + | 'STO' + | 'SWX' + | 'SZSE' + | 'TSX' + | 'TWSE' + | 'VSE'; + /** + * Stop Forking Request + * @example { + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + * "command_id": "891510ac-f3e4-11e8-af5b-de00688a4901" + * } + */ + StopForkingRequest: { + /** + * @description Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + /** + * @description Use this field to avoid duplicate commands. Telnyx will ignore any command with the same `command_id` for the same `call_control_id`. + * @example 891510ac-f3e4-11e8-af5b-de00688a4901 + */ + command_id?: string; + /** + * @description Optionally specify a `stream_type`. This should match the `stream_type` that was used in `fork_start` command to properly stop the fork. + * @default raw + * @example decrypted + * @enum {string} + */ + stream_type: 'raw' | 'decrypted'; + }; + /** + * Stop Gather Request + * @example { + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + * "command_id": "891510ac-f3e4-11e8-af5b-de00688a4901" + * } + */ + StopGatherRequest: { + /** + * @description Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + /** + * @description Use this field to avoid duplicate commands. Telnyx will ignore any command with the same `command_id` for the same `call_control_id`. + * @example 891510ac-f3e4-11e8-af5b-de00688a4901 + */ + command_id?: string; + }; + /** + * Stop Recording Request + * @example { + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + * "command_id": "891510ac-f3e4-11e8-af5b-de00688a4901" + * } + */ + StopRecordingRequest: { + /** + * @description Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + /** + * @description Use this field to avoid duplicate commands. Telnyx will ignore any command with the same `command_id` for the same `call_control_id`. + * @example 891510ac-f3e4-11e8-af5b-de00688a4901 + */ + command_id?: string; + }; + /** + * Stop Streaming Request + * @example { + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + * "command_id": "891510ac-f3e4-11e8-af5b-de00688a4901", + * "stream_id": "1edb94f9-7ef0-4150-b502-e0ebadfd9491" + * } + */ + StopStreamingRequest: { + /** + * @description Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + /** + * @description Use this field to avoid duplicate commands. Telnyx will ignore any command with the same `command_id` for the same `call_control_id`. + * @example 891510ac-f3e4-11e8-af5b-de00688a4901 + */ + command_id?: string; + /** + * Format: uuid + * @description Identifies the stream. If the `stream_id` is not provided the command stops all streams associated with a given `call_control_id`. + * @example 1edb94f9-7ef0-4150-b502-e0ebadfd9491 + */ + stream_id?: string; + }; + /** + * @description Should fax media be stored on temporary URL. It does not support media_name, they can't be submitted together. + * @default false + */ + StoreMedia: boolean; + /** + * @description Should fax preview be stored on temporary URL. + * @default false + */ + StorePreview: boolean; + /** + * @description Should fax media be stored on temporary URL. It does not support media_name, they can't be submitted together. + * @default false + */ + StoredMedia: boolean; + /** + * Stream Bidirectional Codec + * @description Indicates codec for bidirectional streaming RTP payloads. Used only with stream_bidirectional_mode=rtp. Case sensitive. + * @default PCMU + * @example G722 + * @enum {string} + */ + StreamBidirectionalCodec: 'PCMU' | 'PCMA' | 'G722'; + /** + * Stream Bidirectional Mode + * @description Configures method of bidirectional streaming (mp3, rtp). + * @default mp3 + * @example rtp + * @enum {string} + */ + StreamBidirectionalMode: 'mp3' | 'rtp'; + /** + * @description The user specified name of Stream. + * @example My stream + */ + StreamName: string; + /** + * @description The status of the Stream you wish to update. + * @default stopped + * @example stopped + * @enum {string} + */ + StreamStatus: 'stopped'; + /** + * @description Tracks to be included in the stream + * @default inbound_track + * @example both_tracks + * @enum {string} + */ + StreamTrack: 'inbound_track' | 'outbound_track' | 'both_tracks'; + SubNumberOrder: { + /** + * Format: uuid + * @example 12ade33a-21c0-473b-b055-b3c836e1c292 + */ + readonly id?: string; + /** + * Format: uuid + * @example 12ade33a-21c0-473b-b055-b3c836e1c293 + */ + readonly order_request_id?: string; + /** @example US */ + readonly country_code?: string; + /** + * @example local + * @enum {string} + */ + phone_number_type?: + | 'local' + | 'toll_free' + | 'mobile' + | 'national' + | 'shared_cost' + | 'landline'; + /** + * Format: uuid + * @example d70873cd-7c98-401a-81b6-b1ae08246995 + */ + user_id?: string; + regulatory_requirements?: components['schemas']['SubNumberOrderRegulatoryRequirement'][]; + /** @example sub_number_order */ + readonly record_type?: string; + /** + * @description The count of phone numbers in the number order. + * @example 1 + */ + readonly phone_numbers_count?: number; + /** + * Format: datetime + * @description An ISO 8901 datetime string denoting when the number order was created. + * @example 2018-01-01T00:00:00.000000Z + */ + readonly created_at?: string; + /** + * Format: datetime + * @description An ISO 8901 datetime string for when the number order was updated. + * @example 2018-01-01T00:00:00.000000Z + */ + readonly updated_at?: string; + /** + * @description True if all requirements are met for every phone number, false otherwise. + * @example true + */ + readonly requirements_met?: boolean; + /** + * @description The status of the order. + * @enum {string} + */ + readonly status?: 'pending' | 'success' | 'failure'; + /** + * @description A customer reference string for customer look ups. + * @example MY REF 001 + */ + customer_reference?: string; + /** + * @description True if the sub number order is a block sub number order + * @example false + */ + readonly is_block_sub_number_order?: boolean; + }; + SubNumberOrderRegulatoryRequirement: { + /** @example phone_number_regulatory_requirement */ + readonly record_type?: string; + /** + * Format: uuid + * @description Unique id for a requirement. + * @example 8ffb3622-7c6b-4ccc-b65f-7a3dc0099576 + */ + requirement_id?: string; + /** + * @example address + * @enum {string} + */ + readonly field_type?: 'textual' | 'datetime' | 'address' | 'document'; + }; + SubNumberOrderRegulatoryRequirementWithValue: { + /** @example phone_number_regulatory_requirement */ + readonly record_type?: string; + /** + * Format: uuid + * @description Unique id for a requirement. + * @example 8ffb3622-7c6b-4ccc-b65f-7a3dc0099576 + */ + requirement_id?: string; + /** + * @example address + * @enum {string} + */ + readonly field_type?: 'textual' | 'datetime' | 'address' | 'document'; + /** + * @description The value of the requirement, this could be an id to a resource or a string value. + * @example 45f45a04-b4be-4592-95b1-9306b9db2b21 + */ + field_value?: string; + }; + /** SummaryRequest */ + SummaryRequest: { + bucket: string; + filename: string; + }; + /** SummaryResponse */ + SummaryResponse: { + /** Summary */ + summary: string; + }; + /** SummaryResponseData */ + SummaryResponseData: { + data: components['schemas']['SummaryResponse']; + }; + /** + * SupportedEmbeddingLoaders + * @description Supported types of custom document loaders for embeddings. + * @enum {string} + */ + SupportedEmbeddingLoaders: 'default' | 'intercom'; + /** + * SupportedEmbeddingModels + * @description Supported models to vectorize and embed documents. + * @enum {string} + */ + SupportedEmbeddingModels: + | 'thenlper/gte-large' + | 'intfloat/multilingual-e5-large' + | 'sentence-transformers/all-mpnet-base-v2'; + /** + * @description The flag to disable the T.38 protocol. + * @default true + */ + T38Enabled: boolean; + /** + * PhoneNumber + * @description A phone number + */ + TFPhoneNumber: { + /** Phonenumber */ + phoneNumber: string; + }; + /** + * VerificationRequest + * @description The body of a tollfree verification request + */ + TFVerificationRequest: { + /** + * Businessname + * @example Telnyx LLC + */ + businessName: string; + /** + * Corporatewebsite + * @example http://example.com + */ + corporateWebsite: string; + /** + * Businessaddr1 + * @example 311 W Superior St + */ + businessAddr1: string; + /** + * Businessaddr2 + * @example 121 W Superior St + */ + businessAddr2?: string; + /** + * Businesscity + * @example Chicago + */ + businessCity: string; + /** + * Businessstate + * @example Illinois + */ + businessState: string; + /** + * Businesszip + * @example 60654 + */ + businessZip: string; + /** + * Businesscontactfirstname + * @example John + */ + businessContactFirstName: string; + /** + * Businesscontactlastname + * @example Doe + */ + businessContactLastName: string; + /** + * Businesscontactemail + * @example email@example.com + */ + businessContactEmail: string; + /** + * Businesscontactphone + * @example +18005550100 + */ + businessContactPhone: string; + /** + * @description One of the following exact values: 10; 100; 1,000; 10,000; 100,000; 250,000; 500,000; 750,000; 1,000,000; 5,000,000; 10,000,000+ + * @example 100,000 + */ + messageVolume: components['schemas']['Volume']; + /** + * Phonenumbers + * @example [ + * { + * "phoneNumber": "+18773554398" + * }, + * { + * "phoneNumber": "+18773554399" + * } + * ] + */ + phoneNumbers: components['schemas']['TFPhoneNumber'][]; + /** @example 2FA */ + useCase: components['schemas']['UseCaseCategories']; + /** + * Usecasesummary + * @example This is a use case where Telnyx sends out 2FA codes to portal users to verify their identity in order to sign into the portal + */ + useCaseSummary: string; + /** + * Productionmessagecontent + * @example Your Telnyx OTP is XXXX + */ + productionMessageContent: string; + /** + * Optinworkflow + * @example User signs into the Telnyx portal, enters a number and is prompted to select whether they want to use 2FA verification for security purposes. If they've opted in a confirmation message is sent out to the handset + */ + optInWorkflow: string; + /** + * Optinworkflowimageurls + * @example [ + * { + * "url": "https://telnyx.com/sign-up" + * }, + * { + * "url": "https://telnyx.com/company/data-privacy" + * } + * ] + */ + optInWorkflowImageURLs: components['schemas']['Url'][]; + /** + * Additionalinformation + * @example This is for security purposes, blah blah blah + */ + additionalInformation: string; + /** + * Isvreseller + * @example Yes + */ + isvReseller: string; + /** + * Webhookurl + * @example http://example-webhook.com + */ + webhookUrl?: string; + }; + /** + * VerificationStatus + * @description Tollfree verification status + * @enum {string} + */ + TFVerificationStatus: + | 'Verified' + | 'Rejected' + | 'Waiting For Vendor' + | 'Waiting For Customer' + | 'In Progress'; + /** + * TaskStatus + * @description An enumeration. + * @enum {string} + */ + TaskStatus: 'pending' | 'processing' | 'completed' | 'failed'; + /** TaskStatusResponse */ + TaskStatusResponse: { + data: { + /** + * Task ID + * Format: uuid + */ + task_id?: string; + /** Task Name */ + task_name?: string; + status?: components['schemas']['BackgroundTaskStatus']; + /** Created At */ + created_at?: string; + /** Finished At */ + finished_at?: string; + }; + }; + /** + * On-demand Credential + * @example { + * "id": "c215ade3-0d39-418e-94be-c5f780760199", + * "record_type": "credential", + * "name": "2020-06-18 21:32:38.917732Z", + * "expired": "false", + * "user_id": "user-id", + * "resource_id": "connection:804252963366242252", + * "sip_password": "a92dbcfb60184a8cb330b0acb2f7617b", + * "sip_username": "gencrednCvHU5IYpSBPPsXI2iQsDX", + * "created_at": "2020-06-18T21:32:38", + * "expires_at": "2042-06-18T21:32:38", + * "updated_at": "2020-06-18T21:32:38.000Z" + * } + */ + TelephonyCredential: { + /** + * Format: string + * @description Identifies the resource. + * @example c215ade3-0d39-418e-94be-c5f780760199 + */ + id?: string; + /** + * @description Identifies the type of the resource. + * @example credential + */ + record_type?: string; + name?: string; + /** + * @description Identifies the resource this credential is associated with. + * @example connection:1234567890 + */ + resource_id?: string; + /** @description Defaults to false */ + expired?: boolean; + /** + * @description The randomly generated SIP username for the credential. + * @example gencrednCvHU5IYpSBPPsXI2iQsDX + */ + sip_username?: string; + /** + * @description The randomly generated SIP password for the credential. + * @example a92dbcfb60184a8cb330b0acb2f7617b + */ + sip_password?: string; + /** + * @description ISO-8601 formatted date indicating when the resource was created. + * @example 2018-02-02T22:25:27.521Z + */ + created_at?: string; + /** + * @description ISO-8601 formatted date indicating when the resource was updated. + * @example 2018-02-02T22:25:27.521Z + */ + updated_at?: string; + /** + * @description ISO-8601 formatted date indicating when the resource will expire. + * @example 2018-02-02T22:25:27.521Z + */ + expires_at?: string; + }; + /** + * TelephonyCredentialCreateRequest + * @example { + * "name": "My-new-credential", + * "connection_id": "1234567890" + * } + */ + TelephonyCredentialCreateRequest: { + name?: string; + /** + * @description Tags a credential to filter for bulk operations. A single tag can hold at maximum 1000 credentials. + * @example some_tag + */ + tag?: string; + /** + * @description Identifies the Credential Connection this credential is associated with. + * @example 1234567890 + */ + connection_id: string; + /** + * @description ISO-8601 formatted date indicating when the credential will expire. + * @example 2018-02-02T22:25:27.521Z + */ + expires_at?: string; + }; + /** + * TelephonyCredentialUpdateRequest + * @example { + * "name": "My-new-updated-credential", + * "connection_id": "987654321" + * } + */ + TelephonyCredentialUpdateRequest: { + name?: string; + /** + * @description Tags a credential to filter for bulk operations. A single tag can hold at maximum 1000 credentials. + * @example some_tag + */ + tag?: string; + /** + * @description Identifies the Credential Connection this credential is associated with. + * @example 987654321 + */ + connection_id?: string; + /** + * @description ISO-8601 formatted date indicating when the credential will expire. + * @example 2018-02-02T22:25:27.521Z + */ + expires_at?: string; + }; + /** + * TelnyxBrand + * @description Telnyx-specific extensions to The Campaign Registry's `Brand` type + */ + TelnyxBrand: { + /** @description Entity type behind the brand. This is the form of business establishment. */ + entityType: components['schemas']['EntityType']; + /** + * Cspid + * @description Unique identifier assigned to the csp by the registry. + */ + cspId?: string; + /** + * Brandid + * @description Unique identifier assigned to the brand. + * @example 4b20017f-8da9-a992-a6c0-683072fb7729 + */ + brandId?: string; + /** + * TcrBrandid + * @description Unique identifier assigned to the brand by the registry. + * @example BBRAND1 + */ + tcrBrandId?: string; + /** + * Displayname + * @description Display or marketing name of the brand. + * @example ABC Mobile + */ + displayName: string; + /** + * Companyname + * @description (Required for Non-profit/private/public) Legal company name. + * @example ABC Inc. + */ + companyName?: string; + /** + * Firstname + * @description First name of business contact. + * @example John + */ + firstName?: string; + /** + * Lastname + * @description Last name of business contact. + * @example Smith + */ + lastName?: string; + /** + * Ein + * @description (Required for Non-profit) Government assigned corporate tax ID. EIN is 9-digits in U.S. + * @example 111111111 + */ + ein?: string; + /** + * Phone + * @description Valid phone number in e.164 international format. + * @example +12024567890 + */ + phone?: string; + /** + * Street + * @description Street number and name. + * @example 123 + */ + street?: string; + /** + * City + * @description City name + * @example New York + */ + city?: string; + /** + * State + * @description State. Must be 2 letters code for United States. + * @example NY + */ + state?: string; + /** + * Postalcode + * @description Postal codes. Use 5 digit zipcode for United States + * @example 10001 + */ + postalCode?: string; + /** + * Country + * @description ISO2 2 characters country code. Example: US - United States + * @example US + */ + country: string; + /** + * Email + * @description Valid email address of brand support contact. + */ + email: string; + /** + * Stocksymbol + * @description (Required for public company) stock symbol. + * @example ABC + */ + stockSymbol?: string; + /** + * @description (Required for public company) stock exchange. + * @example NASDAQ + */ + stockExchange?: components['schemas']['StockExchange']; + /** + * Ipaddress + * @description IP address of the browser requesting to create brand identity. + */ + ipAddress?: string; + /** + * Website + * @description Brand website URL. + * @example http://www.abcmobile.com + */ + website?: string; + /** @description Brand relationship to the CSP */ + brandRelationship: components['schemas']['BrandRelationship']; + /** + * Vertical + * @description Vertical or industry segment of the brand. + */ + vertical: string; + /** + * Altbusinessid + * @description Alternate business identifier such as DUNS, LEI, or GIIN + */ + altBusinessId?: string; + altBusinessIdType?: components['schemas']['AltBusinessIdType']; + /** + * Universalein + * @description Universal EIN of Brand, Read Only. + */ + universalEin?: string; + /** + * Referenceid + * @description Unique identifier Telnyx assigned to the brand - the brandId + */ + referenceId?: string; + identityStatus?: components['schemas']['BrandIdentityStatus']; + optionalAttributes?: components['schemas']['BrandOptionalAttributes']; + /** + * Mock + * @description Mock brand for testing purposes + * @default false + */ + mock: boolean; + /** + * Mobilephone + * @description Valid mobile phone number in e.164 international format. + * @example +12024567890 + */ + mobilePhone?: string; + /** + * Isreseller + * @description Indicates whether this brand is known to be a reseller + * @default false + */ + isReseller: boolean; + /** + * WebhookURL + * @description Webhook to which brand status updates are sent. + * @example https://webhook.com/67ea78a8-9f32-4d04-b62d-f9502e8e5f93 + */ + webhookURL?: string; + /** + * BusinessContactEmail + * @description Business contact email. + * + * Required if `entityType` is `PUBLIC_PROFIT`. + * @example name@example.com + */ + businessContactEmail?: string; + /** + * WebhookFailoverURL + * @description Failover webhook to which brand status updates are sent. + */ + webhookFailoverURL?: string; + /** + * status + * @description Status of the brand + * @enum {unknown} + */ + status?: 'OK' | 'REGISTRATION_PENDING' | 'REGISTRATION_FAILED'; + /** + * failureReasons + * @description Failure reasons for brand + */ + failureReasons?: unknown; + }; + TelnyxBrandWithCampaignsCount: components['schemas']['TelnyxBrand'] & { + /** + * AssignedCampaignsCount + * @description Number of campaigns associated with the brand + * @example 3 + */ + assignedCampaignsCount?: number; + }; + TelnyxCampaignWithAssignedCount_CSP: components['schemas']['TelnyxCampaign_CSP'] & { + /** + * AssignedPhoneNumbersCount + * @description Number of phone numbers associated with the campaign + * @example 3 + */ + assignedPhoneNumbersCount?: number; + }; + /** + * TelnyxCampaign_CSP + * @description Campaign is generated by the 10DLC registry once the corresponding campaign request is approved. Each campaign is assigned a unique identifier - **campaignId**. Once a campaign is activated, limited information is published to the NetNumber OSR service for consumption by members of the ecosystem. When a campaign is suspended(reversible) or expired(non-reversible), campaign data is deleted from the OSR service. Most attributes of campaignare immutable, including **usecase**, **vertical**, **brandId** and **cspId**. + */ + TelnyxCampaign_CSP: { + /** + * Affiliatemarketing + * @deprecated + * @description Does message content controlled by affiliate marketing other than the brand? + * + * This field is deprecated. + */ + affiliateMarketing?: boolean; + /** + * Agegated + * @description Age gated content in campaign. + */ + ageGated?: boolean; + /** + * Autorenewal + * @description Campaign subscription auto-renewal status. + */ + autoRenewal?: boolean; + /** + * Billeddate + * @description Campaign recent billed date. + */ + billedDate?: string; + /** + * Brandid + * @description Unique identifier assigned to the brand. + * @example d2ca9d69-641b-4131-83fa-5d0744f4c8a9 + */ + brandId: string; + /** + * Campaignid + * @description Unique identifier for a campaign. + * @example 823d6b1a-6ed6-41a3-9c50-c8ff41b682ba + */ + campaignId: string; + /** + * TcrBrandid + * @description Unique identifier assigned to the brand by the registry. + * @example BBRAND1 + */ + tcrBrandId?: string; + /** + * TcrCampaignid + * @description Unique identifier assigned to the campaign by the registry. + * @example CCAMP1 + */ + tcrCampaignId?: string; + /** + * Createdate + * @description Unix timestamp when campaign was created. + */ + createDate?: string; + /** + * Cspid + * @description Alphanumeric identifier of the CSP associated with this campaign. + */ + cspId: string; + /** + * Description + * @description Summary description of this campaign. + */ + description: string; + /** Directlending */ + directLending?: boolean; + /** + * Embeddedlink + * @description Does message generated by the campaign include URL link in SMS? + */ + embeddedLink?: boolean; + /** + * Embeddedphone + * @description Does message generated by the campaign include phone number in SMS? + */ + embeddedPhone?: boolean; + /** + * Helpkeywords + * @description Subscriber help keywords. Multiple keywords are comma separated without space. + */ + helpKeywords?: string; + /** + * Helpmessage + * @description Help message of the campaign. + */ + helpMessage?: string; + /** + * Messageflow + * @description Message flow description. + */ + messageFlow?: string; + /** + * Mock + * @description Campaign created from mock brand. Mocked campaign cannot be shared with an upstream CNP. + */ + mock: boolean; + /** + * Nextrenewalorexpirationdate + * @description When the campaign would be due for its next renew/bill date. + */ + nextRenewalOrExpirationDate?: string; + /** + * Numberpool + * @description Does campaign utilize pool of phone numbers? + */ + numberPool?: boolean; + /** + * Optinkeywords + * @description Subscriber opt-in keywords. Multiple keywords are comma separated without space. + */ + optinKeywords?: string; + /** + * Optinmessage + * @description Subscriber opt-in message. + */ + optinMessage?: string; + /** + * Optoutkeywords + * @description Subscriber opt-out keywords. Multiple keywords are comma separated without space. + */ + optoutKeywords?: string; + /** + * Optoutmessage + * @description Subscriber opt-out message. + */ + optoutMessage?: string; + /** + * Referenceid + * @description Caller supplied campaign reference ID. If supplied, the value must be unique across all submitted campaigns. Can be used to prevent duplicate campaign registrations. + */ + referenceId?: string; + /** + * Resellerid + * @description Alphanumeric identifier of the reseller that you want to associate with this campaign. + */ + resellerId?: string; + /** + * Sample1 + * @description Message sample. Some campaign tiers require 1 or more message samples. + */ + sample1?: string; + /** + * Sample2 + * @description Message sample. Some campaign tiers require 2 or more message samples. + */ + sample2?: string; + /** + * Sample3 + * @description Message sample. Some campaign tiers require 3 or more message samples. + */ + sample3?: string; + /** + * Sample4 + * @description Message sample. Some campaign tiers require 4 or more message samples. + */ + sample4?: string; + /** + * Sample5 + * @description Message sample. Some campaign tiers require 5 or more message samples. + */ + sample5?: string; + /** + * Status + * @description Current campaign status. Possible values: ACTIVE, EXPIRED. A newly created campaign defaults to ACTIVE status. + */ + status?: string; + /** + * Subusecases + * @description Campaign sub-usecases. Must be of defined valid sub-usecase types. Use `/registry/enum/usecase` operation to retrieve list of valid sub-usecases + */ + subUsecases: string[]; + /** + * Subscriberhelp + * @description Does campaign responds to help keyword(s)? + */ + subscriberHelp?: boolean; + /** + * Subscriberoptin + * @description Does campaign require subscriber to opt-in before SMS is sent to subscriber? + */ + subscriberOptin?: boolean; + /** + * Subscriberoptout + * @description Does campaign support subscriber opt-out keyword(s)? + */ + subscriberOptout?: boolean; + /** + * Termsandconditions + * @description Is terms & conditions accepted? + */ + termsAndConditions: boolean; + /** + * Usecase + * @description Campaign usecase. Must be of defined valid types. Use `/registry/enum/usecase` operation to retrieve usecases available for given brand. + */ + usecase: string; + /** + * Vertical + * @deprecated + * @description Business/industry segment of this campaign (Deprecated). Must be of defined valid types. Use `/registry/enum/vertical` operation to retrieve verticals available for given brand, vertical combination. + * + * This field is deprecated. + */ + vertical?: string; + /** + * WebhookURL + * @description Webhook to which campaign status updates are sent. + * @example https://example.com/webhook + */ + webhookURL?: string; + /** + * WebhookFailoverURL + * @description Failover webhook to which campaign status updates are sent. + * @example https://example.com/failover-webhook + */ + webhookFailoverURL?: string; + /** + * IsTMobileRegistered + * @description Indicates whether the campaign is registered with T-Mobile. + */ + isTMobileRegistered?: boolean; + /** + * isTMobileSuspended + * @description Indicates whether the campaign is suspended with T-Mobile. + */ + isTMobileSuspended?: boolean; + /** + * isTMobileNumberPoolingEnabled + * @description Indicates whether the campaign has a T-Mobile number pool ID associated with it. + */ + isTMobileNumberPoolingEnabled?: boolean; + /** + * failureReasons + * @description Failure reasons if campaign submission failed + */ + failureReasons?: unknown; + /** + * submissionStatus + * @description Campaign submission status + * @enum {unknown} + */ + submissionStatus?: 'CREATED' | 'FAILED' | 'PENDING'; + }; + /** + * Telnyx transcription engine list of languages + * @description Language to use for speech recognition + * @default en + * @example en + * @enum {string} + */ + TelnyxTranscriptionLanguage: + | 'en' + | 'zh' + | 'de' + | 'es' + | 'ru' + | 'ko' + | 'fr' + | 'ja' + | 'pt' + | 'tr' + | 'pl' + | 'ca' + | 'nl' + | 'ar' + | 'sv' + | 'it' + | 'id' + | 'hi' + | 'fi' + | 'vi' + | 'he' + | 'uk' + | 'el' + | 'ms' + | 'cs' + | 'ro' + | 'da' + | 'hu' + | 'ta' + | 'no' + | 'th' + | 'ur' + | 'hr' + | 'bg' + | 'lt' + | 'la' + | 'mi' + | 'ml' + | 'cy' + | 'sk' + | 'te' + | 'fa' + | 'lv' + | 'bn' + | 'sr' + | 'az' + | 'sl' + | 'kn' + | 'et' + | 'mk' + | 'br' + | 'eu' + | 'is' + | 'hy' + | 'ne' + | 'mn' + | 'bs' + | 'kk' + | 'sq' + | 'sw' + | 'gl' + | 'mr' + | 'pa' + | 'si' + | 'km' + | 'sn' + | 'yo' + | 'so' + | 'af' + | 'oc' + | 'ka' + | 'be' + | 'tg' + | 'sd' + | 'gu' + | 'am' + | 'yi' + | 'lo' + | 'uz' + | 'fo' + | 'ht' + | 'ps' + | 'tk' + | 'nn' + | 'mt' + | 'sa' + | 'lb' + | 'my' + | 'bo' + | 'tl' + | 'mg' + | 'as' + | 'tt' + | 'haw' + | 'ln' + | 'ha' + | 'ba' + | 'jw' + | 'su' + | 'auto_detect'; + /** Telnyx Voice Settings */ + TelnyxVoiceSettings: { + /** + * Format: float + * @description The voice speed to be used for the voice. The voice speed must be between 0.1 and 2.0. Default value is 1.0. + * @default 1 + * @example 1 + */ + voice_speed: number; + }; + /** + * Texml Application + * @example { + * "id": "1293384261075731499", + * "record_type": "texml_application", + * "active": false, + * "friendly_name": "call-router", + * "anchorsite_override": "Amsterdam, Netherlands", + * "dtmf_type": "Inband", + * "first_command_timeout": true, + * "first_command_timeout_secs": 10, + * "voice_url": "https://example.com", + * "voice_fallback_url": "https://fallback.example.com", + * "voice_method": "get", + * "status_callback": "https://example.com", + * "status_callback_method": "get", + * "inbound": { + * "channel_limit": 10, + * "shaken_stir_enabled": true, + * "sip_subdomain": "example", + * "sip_subdomain_receive_settings": "only_my_connections" + * }, + * "outbound": { + * "channel_limit": 10, + * "outbound_voice_profile_id": "1293384261075731499" + * }, + * "created_at": "2020-02-02T22:25:27.521Z", + * "updated_at": "2020-02-03T22:25:27.521Z" + * } + */ + TexmlApplication: { + id?: components['schemas']['IntId']; + /** + * @description Identifies the type of the resource. + * @example texml_application + */ + record_type?: string; + friendly_name?: components['schemas']['ApplicationName']; + active?: components['schemas']['ConnectionActive']; + anchorsite_override?: components['schemas']['AnchorsiteOverride']; + dtmf_type?: components['schemas']['DtmfType']; + first_command_timeout?: components['schemas']['FirstCommandTimeout']; + first_command_timeout_secs?: components['schemas']['FirstCommandTimeoutSecs']; + /** + * Format: url + * @description URL to which Telnyx will deliver your XML Translator webhooks. + * @example https://example.com + */ + voice_url?: string; + /** + * Format: url + * @description URL to which Telnyx will deliver your XML Translator webhooks if we get an error response from your voice_url. + * @default null + * @example https://fallback.example.com + */ + voice_fallback_url: string; + /** + * @description HTTP request method Telnyx will use to interact with your XML Translator webhooks. Either 'get' or 'post'. + * @default post + * @example get + * @enum {string} + */ + voice_method: 'get' | 'post'; + /** + * Format: url + * @description URL for Telnyx to send requests to containing information about call progress events. + * @default null + * @example https://example.com + */ + status_callback: string; + /** + * @description HTTP request method Telnyx should use when requesting the status_callback URL. + * @default post + * @example get + * @enum {string} + */ + status_callback_method: 'get' | 'post'; + inbound?: { + /** + * @description When set, this will limit the total number of inbound calls to phone numbers associated with this connection. + * @default null + * @example 10 + */ + channel_limit: number; + /** + * @description When enabled Telnyx will include Shaken/Stir data in the Webhook for new inbound calls. + * @default false + * @example false + */ + shaken_stir_enabled: boolean; + /** + * @description Specifies a subdomain that can be used to receive Inbound calls to a Connection, in the same way a phone number is used, from a SIP endpoint. Example: the subdomain "example.sip.telnyx.com" can be called from any SIP endpoint by using the SIP URI "sip:@example.sip.telnyx.com" where the user part can be any alphanumeric value. Please note TLS encrypted calls are not allowed for subdomain calls. + * @default null + * @example example + */ + sip_subdomain: string; + /** + * @description This option can be enabled to receive calls from: "Anyone" (any SIP endpoint in the public Internet) or "Only my connections" (any connection assigned to the same Telnyx user). + * @default from_anyone + * @example only_my_connections + * @enum {string} + */ + sip_subdomain_receive_settings: 'only_my_connections' | 'from_anyone'; + }; + outbound?: { + /** + * @description When set, this will limit the total number of outbound calls to phone numbers associated with this connection. + * @default null + * @example 10 + */ + channel_limit: number; + outbound_voice_profile_id?: components['schemas']['OutboundVoiceProfileId']; + }; + created_at?: components['schemas']['CreatedAt']; + updated_at?: components['schemas']['UpdatedAt']; + }; + /** Texml Create Call Recording Request Body */ + TexmlCreateCallRecordingRequestBody: { + PlayBeep?: components['schemas']['PlayBeep']; + RecordingStatusCallbackEvent?: components['schemas']['RecordingStatusCallbackEvent']; + RecordingStatusCallback?: components['schemas']['TexmlStatusCallback']; + RecordingStatusCallbackMethod?: components['schemas']['TexmlStatusCallbackMethod']; + RecordingChannels?: components['schemas']['TexmlRecordingChannels']; + RecordingTrack?: components['schemas']['RecordingTrack']; + }; + /** Texml Create Call Recording Response Body */ + TexmlCreateCallRecordingResponseBody: { + account_sid?: components['schemas']['AccountSid']; + call_sid?: components['schemas']['CallControlId']; + conference_sid?: components['schemas']['ConferenceSid']; + channels?: components['schemas']['TwimlRecordingChannels']; + date_created?: components['schemas']['DateTimeRFC2822']; + date_updated?: components['schemas']['DateTimeRFC2822']; + start_time?: components['schemas']['DateTimeRFC2822']; + price?: components['schemas']['TexmlRecordingPrice']; + price_unit?: components['schemas']['TexmlPriceUnit']; + duration?: components['schemas']['TexmlRecordingDuration']; + sid?: components['schemas']['TexmlSid']; + source?: components['schemas']['RecordingSource']; + error_code?: components['schemas']['TexmlErrorCode']; + track?: components['schemas']['RecordingTrack']; + /** + * @description The relative URI for this recording resource. + * @example /v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Calls/v3:KBnLO0ZK3DhKM5s7bE9VluaSmKsOchKht_fUYvxcp8ysbmzCCtpkmA/Recordings/b08f0fa1-a32c-4218-b3b5-9cf78941ccac.json + */ + uri?: string; + }; + /** Texml Create Call Streaming Request Body */ + TexmlCreateCallStreamingRequestBody: { + StatusCallback?: components['schemas']['TexmlStatusCallback']; + StatusCallbackMethod?: components['schemas']['TexmlStatusCallbackMethod']; + Track?: components['schemas']['StreamTrack']; + Name?: components['schemas']['StreamName']; + }; + /** Texml Create Call Streaming Response Body */ + TexmlCreateCallStreamingResponseBody: { + account_sid?: components['schemas']['AccountSid']; + call_sid?: components['schemas']['CallControlId']; + sid?: components['schemas']['TexmlSid']; + /** + * @description The user specified name of Stream. + * @example My stream + */ + name?: string; + /** + * @description The status of the streaming. + * @example in-progress + * @enum {string} + */ + status?: 'in-progress'; + date_updated?: components['schemas']['DateTimeRFC2822']; + /** + * @description The relative URI for this streaming resource. + * @example /v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Calls/v3:KBnLO0ZK3DhKM5s7bE9VluaSmKsOchKht_fUYvxcp8ysbmzCCtpkmA/Streams/b08f0fa1-a32c-4218-b3b5-9cf78941ccac.json + */ + uri?: string; + }; + /** @example null */ + TexmlErrorCode: string | null; + /** Texml Get Call Recording Response Body */ + TexmlGetCallRecordingResponseBody: { + account_sid?: components['schemas']['AccountSid']; + call_sid?: components['schemas']['CallControlId']; + conference_sid?: components['schemas']['ConferenceSid']; + channels?: components['schemas']['TwimlRecordingChannels']; + date_created?: components['schemas']['DateTimeRFC2822']; + date_updated?: components['schemas']['DateTimeRFC2822']; + start_time?: components['schemas']['DateTimeRFC2822']; + duration?: components['schemas']['TexmlRecordingDuration']; + sid?: components['schemas']['TexmlSid']; + source?: components['schemas']['RecordingSource']; + status?: components['schemas']['TexmlRecordingStatus']; + error_code?: components['schemas']['TexmlErrorCode']; + subresources_uris?: components['schemas']['TexmlRecordingSubresourcesUris']; + /** + * @description The relative URI for this recording resource. + * @example /v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Recordings/b08f0fa1-a32c-4218-b3b5-9cf78941ccac.json + */ + uri?: string; + media_url?: components['schemas']['TexmlRecordingMediaUrl']; + }; + /** Multiple recording resources */ + TexmlGetCallRecordingsResponseBody: { + recordings?: components['schemas']['TexmlGetCallRecordingResponseBody'][]; + /** + * @description The number of the last element on the page, zero-indexed. + * @example 19 + */ + end?: number; + /** + * Format: uri + * @description Relative uri to the first page of the query results + * @example /v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Recordings.json?Page=0&PageSize=1 + */ + first_page_uri?: string; + /** + * Format: uri + * @description Relative uri to the previous page of the query results + * @example /v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Recordings.json?Page=0&PageSize=1 + */ + previous_page_uri?: string; + /** + * @description Relative uri to the next page of the query results + * @example /v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Calls.json?Page=1&PageSize=1 + */ + next_page_uri?: string; + /** + * @description Current page number, zero-indexed. + * @example 0 + */ + page?: number; + /** + * @description The number of items on the page + * @example 20 + */ + page_size?: number; + /** + * @description The number of the first element on the page, zero-indexed. + * @example 0 + */ + start?: number; + /** + * @description The URI of the current page. + * @example /v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Recordings.json?Page=0&PageSize=1 + */ + uri?: string; + }; + /** + * @description The unit in which the price is given. + * @example USD + */ + TexmlPriceUnit: string | null; + /** + * @description When `dual`, final audio file has the first leg on channel A, and the rest on channel B. `single` mixes both tracks into a single channel. + * @default dual + * @example single + * @enum {string} + */ + TexmlRecordingChannels: 'single' | 'dual'; + /** + * @description The duration of this recording, given in seconds. + * @example 12 + */ + TexmlRecordingDuration: string | null; + /** + * Format: uri + * @example http://recordings.com/mp3/filename.mp3 + */ + TexmlRecordingMediaUrl: string; + /** + * @description The price of this recording, the currency is specified in the price_unit field. + * @example 0.10 + */ + TexmlRecordingPrice: string | null; + /** + * @example paused + * @enum {string} + */ + TexmlRecordingStatus: 'in-progress' | 'completed' | 'paused' | 'stopped'; + /** + * Texml recording subresources uris + * @description Subresources details for a recording if available. + */ + TexmlRecordingSubresourcesUris: { + /** + * Format: uri + * @example /v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Recordings/b08f0fa1-a32c-4218-b3b5-9cf78941ccac/Transcriptions.json + */ + transcriptions?: string | null; + }; + /** Texml Get Call Recording Transcription Response Body */ + TexmlRecordingTranscription: { + account_sid?: components['schemas']['AccountSid']; + call_sid?: components['schemas']['CallControlId']; + /** + * @description The version of the API that was used to make the request. + * @example 2010-04-01 + */ + api_version?: string; + date_created?: components['schemas']['DateTimeRFC2822']; + date_updated?: components['schemas']['DateTimeRFC2822']; + duration?: components['schemas']['TexmlRecordingDuration']; + sid?: components['schemas']['TexmlSid']; + recording_sid?: components['schemas']['TexmlSid']; + /** + * @description The status of the recording transcriptions. The transcription text will be available only when the status is completed. + * @example completed + * @enum {string} + */ + status?: 'in-progress' | 'completed'; + /** + * @description The recording's transcribed text + * @example Good morning, how may I help you? + */ + transcription_text?: string; + /** + * @description The relative URI for the recording transcription resource. + * @example /v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Transcriptions/b08f0fa1-a32c-4218-b3b5-9cf78941ccac.json + */ + uri?: string; + }; + /** + * @description Identifier of a resource. + * @example e9cea0be-7dbd-4b98-98b1-c0089d9d43b0 + */ + TexmlSid: string; + /** + * Format: uri + * @description Url where status callbacks will be sent. + * @example http://webhook.com/callback + */ + TexmlStatusCallback: string; + /** + * @description HTTP method used to send status callbacks. + * @default POST + * @example GET + * @enum {string} + */ + TexmlStatusCallbackMethod: 'GET' | 'POST'; + /** Texml Create Call Recording Request Body */ + TexmlUpdateCallRecordingRequestBody: { + /** + * @example paused + * @enum {string} + */ + Status?: 'in-progress' | 'paused' | 'stopped'; + }; + /** Texml Update Call Streaming Request Body */ + TexmlUpdateCallStreamingRequestBody: { + Status?: components['schemas']['StreamStatus']; + }; + /** Texml Update Call Streaming Response Body */ + TexmlUpdateCallStreamingResponseBody: { + account_sid?: components['schemas']['AccountSid']; + call_sid?: components['schemas']['CallControlId']; + sid?: components['schemas']['TexmlSid']; + /** + * @description The status of the streaming. + * @example stopped + * @enum {string} + */ + status?: 'stopped'; + date_updated?: components['schemas']['DateTimeRFC2822']; + /** + * @description The relative URI for this streaming resource. + * @example /v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Calls/v3:KBnLO0ZK3DhKM5s7bE9VluaSmKsOchKht_fUYvxcp8ysbmzCCtpkmA/Streams/b08f0fa1-a32c-4218-b3b5-9cf78941ccac.json + */ + uri?: string; + }; + /** TnReleaseEntry */ + TnReleaseEntry: { + /** @description Phone number in E164 format. */ + phone_number?: string; + /** @description Phone number ID from the Telnyx API. */ + number_id?: string; + }; + /** TnUploadEntry */ + TnUploadEntry: { + number_id?: components['schemas']['UUID']; + /** @description Phone number in E164 format. */ + phone_number?: string; + /** + * @description Represents the status of the phone number entry upload on Microsoft Teams. + * @default pending_upload + * @example error + * @enum {string} + */ + status: + | 'pending_upload' + | 'pending' + | 'in_progress' + | 'success' + | 'error'; + /** + * @description A code returned by Microsoft Teams if there is an error with the phone number entry upload. + * @example internal_error + * @enum {string} + */ + error_code?: + | 'internal_error' + | 'unable_to_retrieve_default_location' + | 'unknown_country_code' + | 'unable_to_retrieve_location' + | 'unable_to_retrieve_partner_info' + | 'unable_to_match_geography_entry'; + /** @description A message returned by Microsoft Teams if there is an error with the upload process. */ + error_message?: string; + /** + * Format: uuid + * @description Identifies the civic address assigned to the phone number entry. + */ + civic_address_id?: string; + /** + * Format: uuid + * @description Identifies the location assigned to the phone number entry. + */ + location_id?: string; + /** + * @description Represents the status of the phone number entry upload on Telnyx. + * @default pending_assignment + * @example error + * @enum {string} + */ + internal_status: + | 'pending_assignment' + | 'in_progress' + | 'all_internal_jobs_completed' + | 'release_requested' + | 'release_completed' + | 'error'; + }; + /** + * @description The phone number, in E.164 format, the fax will be sent to or SIP URI + * @example +13127367276 + */ + To: string; + /** + * Format: address + * @description Receiving address (+E.164 formatted phone number or short code). + * @example +E.164 + */ + ToNumber: string; + /** Tool */ + Tool: { + /** Tool Id */ + tool_id: string; + /** + * Type + * @enum {string} + */ + type: 'retrieval' | 'function'; + /** Name */ + name?: string; + /** Description */ + description?: string; + function?: components['schemas']['FunctionDetail-Output']; + retrieval?: components['schemas']['RetrievalDetail']; + }; + /** + * @description Specifies the type of traffic allowed in this profile. + * @default conversational + * @example conversational + * @enum {string} + */ + TrafficType: 'conversational'; + /** + * Transcription + * @example { + * "record_type": "event", + * "event_type": "call.transcription", + * "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + * "occurred_at": "2018-02-02T22:25:27.521992Z", + * "payload": { + * "call_control_id": "v2:7subYr8fLrXmaAXm8egeAMpoSJ72J3SGPUuome81-hQuaKRf9b7hKA", + * "call_leg_id": "5ca81340-5beb-11eb-ae45-02420a0f8b69", + * "call_session_id": "5ca81eee-5beb-11eb-ba6c-02420a0f8b69", + * "client_state": null, + * "connection_id": "1240401930086254526", + * "transcription_data": { + * "confidence": 0.977219, + * "is_final": true, + * "transcript": "hello this is a test speech" + * } + * } + * } + */ + Transcription: { + /** + * @description Identifies the type of the resource. + * @example event + * @enum {string} + */ + record_type?: 'event'; + /** + * @description The type of event being delivered. + * @example call.transcription + * @enum {string} + */ + event_type?: 'call.transcription'; + /** + * Format: uuid + * @description Identifies the type of resource. + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + */ + id?: string; + /** + * Format: date-time + * @description ISO 8601 datetime of when the event occurred. + * @example 2018-02-02T22:25:27.521992Z + */ + occurred_at?: string; + payload?: { + /** + * @description Unique identifier and token for controlling the call. + * @example v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg + */ + call_control_id?: string; + /** + * @description ID that is unique to the call and can be used to correlate webhook events. + * @example 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + */ + call_leg_id?: string; + /** + * @description ID that is unique to the call session and can be used to correlate webhook events. Call session is a group of related call legs that logically belong to the same phone call, e.g. an inbound and outbound leg of a transferred call. + * @example 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + */ + call_session_id?: string; + /** + * @description Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + /** + * @description Call Control App ID (formerly Telnyx connection ID) used in the call. + * @example 7267xxxxxxxxxxxxxx + */ + connection_id?: string; + transcription_data?: { + /** + * Format: double + * @description Speech recognition confidence level. + * @example 0.977219 + */ + confidence?: number; + /** + * @description When false, it means that this is an interim result. + * @example true + */ + is_final?: boolean; + /** + * @description Recognized text. + * @example hello this is a test speech + */ + transcript?: string; + }; + }; + }; + /** Transcription Event */ + TranscriptionEvent: { + data?: components['schemas']['Transcription']; + }; + /** + * Transcription start request + * @example { + * "language": "en", + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + * "command_id": "891510ac-f3e4-11e8-af5b-de00688a4901" + * } + */ + TranscriptionStartRequest: { + /** + * @description Engine to use for speech recognition. `A` - `google`, `B` - `telnyx`. + * @default A + * @example A + * @enum {string} + */ + transcription_engine: 'A' | 'B'; + language?: + | components['schemas']['GoogleTranscriptionLanguage'] + | components['schemas']['TelnyxTranscriptionLanguage']; + /** + * @description Whether to send also interim results. If set to false, only final results will be sent. Applies to `google` engine only. + * @default false + * @example true + */ + interim_results: boolean; + /** + * @description Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + /** + * @description Indicates which leg of the call will be transcribed. Use `inbound` for the leg that requested the transcription, `outbound` for the other leg, and `both` for both legs of the call. Will default to `inbound`. + * @default inbound + * @example both + */ + transcription_tracks: string; + /** + * @description Use this field to avoid duplicate commands. Telnyx will ignore any command with the same `command_id` for the same `call_control_id`. + * @example 891510ac-f3e4-11e8-af5b-de00688a4901 + */ + command_id?: string; + }; + /** + * Transcription stop request + * @example { + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + * "command_id": "891510ac-f3e4-11e8-af5b-de00688a4901" + * } + */ + TranscriptionStopRequest: { + /** + * @description Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + /** + * @description Use this field to avoid duplicate commands. Telnyx will ignore any command with the same `command_id` for the same `call_control_id`. + * @example 891510ac-f3e4-11e8-af5b-de00688a4901 + */ + command_id?: string; + }; + /** + * Transfer Call Request + * @example { + * "to": "+18005550100 or sip:username@sip.telnyx.com", + * "from": "+18005550101", + * "from_display_name": "Company Name", + * "audio_url": "http://www.example.com/sounds/greeting.wav", + * "timeout_secs": 60, + * "timeout_limit_secs": 60, + * "webhook_url": "https://www.example.com/server-b/", + * "webhook_url_method": "POST", + * "answering_machine_detection": "detect", + * "answering_machine_detection_config": { + * "total_analysis_time_millis": 5000, + * "after_greeting_silence_millis": 1000, + * "between_words_silence_millis": 1000, + * "greeting_duration_millis": 1000, + * "initial_silence_millis": 1000, + * "maximum_number_of_words": 1000, + * "maximum_word_length_millis": 2000, + * "silence_threshold": 512, + * "greeting_total_analysis_time_millis": 50000, + * "greeting_silence_duration_millis": 2000 + * }, + * "custom_headers": [ + * { + * "name": "head_1", + * "value": "val_1" + * }, + * { + * "name": "head_2", + * "value": "val_2" + * } + * ], + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + * "command_id": "891510ac-f3e4-11e8-af5b-de00688a4901", + * "media_encryption": "SRTP", + * "sip_auth_username": "username", + * "sip_auth_password": "password", + * "sip_headers": [ + * { + * "name": "User-to-User", + * "value": "value" + * } + * ], + * "sip_transport_protocol": "TLS", + * "stream_url": "wss://www.example.com/websocket", + * "stream_track": "both_tracks" + * } + */ + TransferCallRequest: { + /** + * @description The DID or SIP URI to dial out to. + * @example +18005550100 or sip:username@sip.telnyx.com + */ + to: string; + /** + * @description The `from` number to be used as the caller id presented to the destination (`to` number). The number should be in +E164 format. This attribute will default to the `to` number of the original call if omitted. + * @example +18005550101 + */ + from?: string; + /** + * @description The `from_display_name` string to be used as the caller id name (SIP From Display Name) presented to the destination (`to` number). The string should have a maximum of 128 characters, containing only letters, numbers, spaces, and -_~!.+ special characters. If ommited, the display name will be the same as the number in the `from` field. + * @example Company Name + */ + from_display_name?: string; + /** + * @description The URL of a file to be played back when the transfer destination answers before bridging the call. The URL can point to either a WAV or MP3 file. media_name and audio_url cannot be used together in one request. + * @example http://example.com/message.wav + */ + audio_url?: string; + /** + * @description The media_name of a file to be played back when the transfer destination answers before bridging the call. The media_name must point to a file previously uploaded to api.telnyx.com/v2/media by the same user/organization. The file must either be a WAV or MP3 file. + * @example my_media_uploaded_to_media_storage_api + */ + media_name?: string; + /** + * Format: int32 + * @description The number of seconds that Telnyx will wait for the call to be answered by the destination to which it is being transferred. If the timeout is reached before an answer is received, the call will hangup and a `call.hangup` webhook with a `hangup_cause` of `timeout` will be sent. Minimum value is 5 seconds. Maximum value is 120 seconds. + * @default 30 + * @example 60 + */ + timeout_secs: number; + /** + * Format: int32 + * @description Sets the maximum duration of a Call Control Leg in seconds. If the time limit is reached, the call will hangup and a `call.hangup` webhook with a `hangup_cause` of `time_limit` will be sent. For example, by setting a time limit of 120 seconds, a Call Leg will be automatically terminated two minutes after being answered. The default time limit is 14400 seconds or 4 hours and this is also the maximum allowed call length. + * @default 14400 + * @example 600 + */ + time_limit_secs: number; + /** + * @description Enables Answering Machine Detection. When a call is answered, Telnyx runs real-time detection to determine if it was picked up by a human or a machine and sends an `call.machine.detection.ended` webhook with the analysis result. If 'greeting_end' or 'detect_words' is used and a 'machine' is detected, you will receive another 'call.machine.greeting.ended' webhook when the answering machine greeting ends with a beep or silence. If `detect_beep` is used, you will only receive 'call.machine.greeting.ended' if a beep is detected. + * @default disabled + * @enum {string} + */ + answering_machine_detection: + | 'premium' + | 'detect' + | 'detect_beep' + | 'detect_words' + | 'greeting_end' + | 'disabled'; + /** @description Optional configuration parameters to modify 'answering_machine_detection' performance. */ + answering_machine_detection_config?: { + /** + * Format: int32 + * @description Maximum timeout threshold for overall detection. + * @default 3500 + * @example 5000 + */ + total_analysis_time_millis: number; + /** + * Format: int32 + * @description Silence duration threshold after a greeting message or voice for it be considered human. + * @default 800 + * @example 1000 + */ + after_greeting_silence_millis: number; + /** + * Format: int32 + * @description Maximum threshold for silence between words. + * @default 50 + * @example 100 + */ + between_words_silence_millis: number; + /** + * Format: int32 + * @description Maximum threshold of a human greeting. If greeting longer than this value, considered machine. + * @default 3500 + * @example 1500 + */ + greeting_duration_millis: number; + /** + * Format: int32 + * @description If initial silence duration is greater than this value, consider it a machine. + * @default 3500 + * @example 1800 + */ + initial_silence_millis: number; + /** + * Format: int32 + * @description If number of detected words is greater than this value, consder it a machine. + * @default 5 + * @example 3 + */ + maximum_number_of_words: number; + /** + * Format: int32 + * @description If a single word lasts longer than this threshold, consider it a machine. + * @default 3500 + * @example 2000 + */ + maximum_word_length_millis: number; + /** + * Format: int32 + * @description Minimum noise threshold for any analysis. + * @default 256 + * @example 512 + */ + silence_threshold: number; + /** + * Format: int32 + * @description If machine already detected, maximum timeout threshold to determine the end of the machine greeting. + * @default 5000 + * @example 7500 + */ + greeting_total_analysis_time_millis: number; + /** + * Format: int32 + * @description If machine already detected, maximum threshold for silence between words. If exceeded, the greeting is considered ended. + * @default 1500 + * @example 2000 + */ + greeting_silence_duration_millis: number; + }; + /** + * @description Custom headers to be added to the SIP INVITE. + * @example [ + * { + * "name": "head_1", + * "value": "val_1" + * }, + * { + * "name": "head_2", + * "value": "val_2" + * } + * ] + */ + custom_headers?: components['schemas']['CustomSipHeader'][]; + /** + * @description Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + /** + * @description Use this field to add state to every subsequent webhook for the new leg. It must be a valid Base-64 encoded string. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + target_leg_client_state?: string; + /** + * @description Use this field to avoid duplicate commands. Telnyx will ignore any command with the same `command_id` for the same `call_control_id`. + * @example 891510ac-f3e4-11e8-af5b-de00688a4901 + */ + command_id?: string; + /** + * @description Defines whether media should be encrypted on the new call leg. + * @default disabled + * @enum {string} + */ + media_encryption: 'disabled' | 'SRTP'; + /** + * @description SIP Authentication username used for SIP challenges. + * @example username + */ + sip_auth_username?: string; + /** + * @description SIP Authentication password used for SIP challenges. + * @example password + */ + sip_auth_password?: string; + /** + * @description SIP headers to be added to the SIP INVITE. Currently only User-to-User header is supported. + * @example [ + * { + * "name": "User-to-User", + * "value": "value" + * } + * ] + */ + sip_headers?: components['schemas']['SipHeader'][]; + /** + * @description Defines SIP transport protocol to be used on the call. + * @default UDP + * @enum {string} + */ + sip_transport_protocol: 'UDP' | 'TCP' | 'TLS'; + sound_modifications?: components['schemas']['SoundModifications']; + /** + * @description Use this field to override the URL for which Telnyx will send subsequent webhooks to for this call. + * @example https://www.example.com/server-b/ + */ + webhook_url?: string; + /** + * @description HTTP request type used for `webhook_url`. + * @default POST + * @example GET + * @enum {string} + */ + webhook_url_method: 'POST' | 'GET'; + }; + /** + * @default 2 + * @example 1 + * @enum {integer} + */ + TwimlRecordingChannels: 1 | 2; + /** + * UUID + * Format: uuid + * @description Uniquely identifies the resource. + * @example 542c3bca-d247-42bc-8fe7-e01d16ecd761 + */ + UUID: string; + UnauthorizedError: components['schemas']['GenericError'] & { + /** @example 10009 */ + code?: unknown; + /** @example Authentication failed */ + title?: unknown; + /** @example The required authentication headers were either invalid or not included in the request. */ + detail?: unknown; + meta?: { + /** @example https://developers.telnyx.com/docs/overview/errors/10009 */ + url?: string; + }; + }; + UnexpectedError: components['schemas']['GenericError'] & { + /** @example 10007 */ + code?: unknown; + /** @example Unexpected error */ + title?: unknown; + /** @example An unexpected error occurred. */ + detail?: unknown; + meta?: { + /** @example https://developers.telnyx.com/docs/overview/errors/10007 */ + url?: string; + }; + }; + UnprocessableEntityError: components['schemas']['GenericError'] & { + /** @example 10002 */ + code?: unknown; + /** @example Invalid phone number */ + title?: unknown; + /** @example The phone number is invalid. */ + detail?: unknown; + source?: { + /** @example /phone_numbers */ + pointer?: string; + }; + meta?: { + /** @example https://developers.telnyx.com/docs/overview/errors/10002 */ + url?: string; + }; + }; + /** UpdateAssistantRequest */ + UpdateAssistantRequest: { + /** Name */ + name?: string; + /** Model */ + model?: string; + /** Description */ + description?: string; + /** Instructions */ + instructions?: string; + /** @description The `function` tool type follows the same schema as the [OpenAI Assistants API](https://platform.openai.com/docs/api-reference/assistants/modifyAssistant). The `retrieval` tool type is unique to Telnyx. You may pass a list of [embedded storage buckets](https://developers.telnyx.com/api/inference/inference-embedding/post-embedding) for retrieval-augmented generation. */ + tools?: ( + | components['schemas']['ChatCompletionToolParam'] + | components['schemas']['Retrieval'] + )[]; + }; + /** + * Update Authentication Provider Request + * @example { + * "name": "Okta", + * "short_name": "myorg", + * "active": true, + * "settings": { + * "idp_entity_id": "https://myorg.myidp.com/saml/metadata", + * "idp_sso_target_url": "https://myorg.myidp.com/trust/saml2/http-post/sso", + * "idp_cert_fingerprint": "13:38:C7:BB:C9:FF:4A:70:38:3A:E3:D9:5C:CD:DB:2E:50:1E:80:A7", + * "idp_cert_fingerprint_algorithm": "sha1" + * } + * } + */ + UpdateAuthenticationProviderRequest: { + name?: components['schemas']['name']; + short_name?: components['schemas']['short_name']; + active?: components['schemas']['active']; + settings?: components['schemas']['settings']; + settings_url?: components['schemas']['settings_url']; + }; + /** @example { + * "name": "string" + * } */ + UpdateBillingGroup: { + /** @description A name for the billing group */ + name?: string; + }; + /** UpdateBrand */ + UpdateBrand: { + /** @description Entity type behind the brand. This is the form of business establishment. */ + entityType: components['schemas']['EntityType']; + /** + * Displayname + * @description Display or marketing name of the brand. + * @example ABC Mobile + */ + displayName: string; + /** + * Companyname + * @description (Required for Non-profit/private/public) Legal company name. + * @example ABC Inc. + */ + companyName?: string; + /** + * Firstname + * @description First name of business contact. + * @example John + */ + firstName?: string; + /** + * Lastname + * @description Last name of business contact. + * @example Smith + */ + lastName?: string; + /** + * Ein + * @description (Required for Non-profit) Government assigned corporate tax ID. EIN is 9-digits in U.S. + * @example 111111111 + */ + ein?: string; + /** + * Phone + * @description Valid phone number in e.164 international format. + * @example +12024567890 + */ + phone?: string; + /** + * Street + * @description Street number and name. + * @example 123 + */ + street?: string; + /** + * City + * @description City name + * @example New York + */ + city?: string; + /** + * State + * @description State. Must be 2 letters code for United States. + * @example NY + */ + state?: string; + /** + * Postalcode + * @description Postal codes. Use 5 digit zipcode for United States + * @example 10001 + */ + postalCode?: string; + /** + * Country + * @description ISO2 2 characters country code. Example: US - United States + * @example US + */ + country: string; + /** + * Email + * @description Valid email address of brand support contact. + */ + email: string; + /** + * Stocksymbol + * @description (Required for public company) stock symbol. + * @example ABC + */ + stockSymbol?: string; + /** + * @description (Required for public company) stock exchange. + * @example NASDAQ + */ + stockExchange?: components['schemas']['StockExchange']; + /** + * Ipaddress + * @description IP address of the browser requesting to create brand identity. + */ + ipAddress?: string; + /** + * Website + * @description Brand website URL. + * @example http://www.abcmobile.com + */ + website?: string; + /** @description Vertical or industry segment of the brand. */ + vertical: components['schemas']['Vertical']; + /** + * Altbusiness Id + * @description Alternate business identifier such as DUNS, LEI, or GIIN + */ + altBusiness_id?: string; + altBusinessIdType?: components['schemas']['AltBusinessIdType']; + /** Isreseller */ + isReseller?: boolean; + identityStatus?: components['schemas']['BrandIdentityStatus']; + /** + * BusinessContactEmail + * @description Business contact email. + * + * Required if `entityType` will be changed to `PUBLIC_PROFIT`. + * @example name@example.com + */ + businessContactEmail?: string; + /** + * WebhookURL + * @description Webhook URL for brand status updates. + * @example https://webhook.com/67ea78a8-9f32-4d04-b62d-f9502e8e5f93 + */ + webhookURL?: string; + /** + * WebhookFailoverURL + * @description Webhook failover URL for brand status updates. + * @example https://webhook.com/9010a453-4df8-4be6-a551-1070892888d6 + */ + webhookFailoverURL?: string; + }; + /** UpdateBrand */ + UpdateBrandRequest: { + entityType: components['schemas']['EntityType']; + /** + * Displayname + * @description Display or marketing name of the brand. + * @example Example Company Updated + */ + displayName: string; + /** + * Companyname + * @description (Required for Non-profit/private/public) Legal company name. + * @example Example Company Inc. + */ + companyName?: string; + /** + * Ein + * @description (Required for Non-profit/private/public) Government assigned corporate tax ID. EIN is 9-digits in U.S. The only entity type which does not require an EIN is a Sole Proprietor. + * @example 142536893 + */ + ein?: string; + /** + * Phone + * @description Valid phone number in e.164 international format. + * @example +13259390512 + */ + phone?: string; + /** + * Street + * @description Street number and name. + * @example 123 Example St. + */ + street?: string; + /** + * City + * @description City name + * @example San Francisco + */ + city?: string; + /** + * State + * @description State. Must be 2 letters code for United States. + * @example CA + */ + state?: string; + /** + * Postalcode + * @description Postal codes. Use 5 digit zipcode for United States + * @example 94016 + */ + postalCode?: string; + /** + * Country + * @description ISO2 2 characters country code. Example: US - United States + * @example US + */ + country: string; + /** + * Email + * @description Valid email address of brand support contact. + * @example examplename@examplecompanyupdated.com + */ + email: string; + /** + * Stocksymbol + * @description (Required for public company) stock symbol. + * @example EXCOUP + */ + stockSymbol?: string; + stockExchange?: components['schemas']['StockExchange']; + /** + * Ipaddress + * @description IP address of the browser requesting to create brand identity. + */ + ipAddress?: string; + /** + * Website + * @description Brand website URL. + * @example www.examplecompanyupdated.com + */ + website?: string; + vertical: components['schemas']['Vertical']; + /** + * Altbusinessid + * @description Alternate business identifier such as DUNS, LEI, or GIIN + */ + altBusinessId?: string; + altBusinessIdType?: components['schemas']['AltBusinessIdType']; + }; + /** UpdateBrand */ + UpdateBrandResponse: { + entityType: components['schemas']['EntityType']; + /** + * Displayname + * @description Display or marketing name of the brand. + * @example Example Company Updated + */ + displayName: string; + /** + * Companyname + * @description (Required for Non-profit/private/public) Legal company name. + * @example Example Company Inc. + */ + companyName?: string; + /** + * Ein + * @description (Required for Non-profit/private/public) Government assigned corporate tax ID. EIN is 9-digits in U.S. The only entity type which does not require an EIN is a Sole Proprietor. + * @example 142536893 + */ + ein?: string; + /** + * Phone + * @description Valid phone number in e.164 international format. + * @example +13259390512 + */ + phone?: string; + /** + * Street + * @description Street number and name. + * @example 123 Example St. + */ + street?: string; + /** + * City + * @description City name + * @example San Francisco + */ + city?: string; + /** + * State + * @description State. Must be 2 letters code for United States. + * @example CA + */ + state?: string; + /** + * Postalcode + * @description Postal codes. Use 5 digit zipcode for United States + * @example 94016 + */ + postalCode?: string; + /** + * Country + * @description ISO2 2 characters country code. Example: US - United States + * @example US + */ + country: string; + /** + * Email + * @description Valid email address of brand support contact. + * @example examplename@examplecompanyupdated.com + */ + email: string; + /** + * Stocksymbol + * @description (Required for public company) stock symbol. + * @example EXCOUP + */ + stockSymbol?: string; + stockExchange?: components['schemas']['StockExchange']; + /** + * Ipaddress + * @description IP address of the browser requesting to create brand identity. + */ + ipAddress?: string; + /** + * Website + * @description Brand website URL. + * @example www.examplecompanyupdated.com + */ + website?: string; + brandRelationship: components['schemas']['BrandRelationship']; + vertical: components['schemas']['Vertical']; + /** + * Altbusinessid + * @description Alternate business identifier such as DUNS, LEI, or GIIN + */ + altBusinessId?: string; + altBusinessIdType?: components['schemas']['AltBusinessIdType']; + identityStatus?: components['schemas']['BrandIdentityStatus']; + }; + /** + * Update Call Control Application Request + * @example { + * "application_name": "call-router", + * "webhook_event_url": "https://example.com", + * "active": false, + * "anchorsite_override": "\"Latency\"", + * "dtmf_type": "Inband", + * "first_command_timeout": true, + * "first_command_timeout_secs": 10, + * "inbound": { + * "channel_limit": 10, + * "shaken_stir_enabled": true, + * "sip_subdomain": "example", + * "sip_subdomain_receive_settings": "only_my_connections" + * }, + * "outbound": { + * "channel_limit": 10, + * "outbound_voice_profile_id": "1293384261075731499" + * }, + * "webhook_api_version": "1", + * "webhook_event_failover_url": "https://failover.example.com", + * "webhook_timeout_secs": 25 + * } + */ + UpdateCallControlApplicationRequest: { + /** + * @description A user-assigned name to help manage the application. + * @example call-router + */ + application_name: string; + /** + * Format: url + * @description The URL where webhooks related to this connection will be sent. Must include a scheme, such as 'https'. + * @example https://example.com + */ + webhook_event_url: string; + /** + * @description Specifies whether the connection can be used. + * @default true + */ + active: boolean; + /** + * @description Latency directs Telnyx to route media through the site with the lowest round-trip time to the user's connection. Telnyx calculates this time using ICMP ping messages. This can be disabled by specifying a site to handle all media. + * + * @default "Latency" + * @example "Amsterdam, Netherlands" + * @enum {string} + */ + anchorsite_override: + | '"Latency"' + | '"Chicago, IL"' + | '"Ashburn, VA"' + | '"San Jose, CA"'; + /** + * @description Sets the type of DTMF digits sent from Telnyx to this Connection. Note that DTMF digits sent to Telnyx will be accepted in all formats. + * @default RFC 2833 + * @example Inband + * @enum {string} + */ + dtmf_type: 'RFC 2833' | 'Inband' | 'SIP INFO'; + /** + * @description Specifies whether calls to phone numbers associated with this connection should hangup after timing out. + * @default false + * @example true + */ + first_command_timeout: boolean; + /** + * @description Specifies how many seconds to wait before timing out a dial command. + * @default 30 + * @example 10 + */ + first_command_timeout_secs: number; + inbound?: components['schemas']['CallControlApplicationInbound']; + outbound?: components['schemas']['CallControlApplicationOutbound']; + /** + * @description Determines which webhook format will be used, Telnyx API v1 or v2. + * @default 1 + * @example 1 + * @enum {string} + */ + webhook_api_version: '1' | '2'; + /** + * Format: url + * @description The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails. Must include a scheme, such as 'https'. + * @default + * @example https://failover.example.com + */ + webhook_event_failover_url: string | null; + /** + * @description Specifies how many seconds to wait before timing out a webhook. + * @default null + * @example 25 + */ + webhook_timeout_secs: number | null; + }; + /** + * Update Call Request + * @example { + * "Status": "completed" + * } + */ + UpdateCallRequest: { + /** + * @description The value to set the call status to. Setting the status to completed ends the call. + * @example completed + */ + Status?: string; + /** + * @description The URL where TeXML will make a request to retrieve a new set of TeXML instructions to continue the call flow. + * @example https://www.example.com/intruction-b.xml + */ + Url?: string; + /** + * @description HTTP request type used for `Url`. + * @example GET + * @enum {string} + */ + Method?: 'GET' | 'POST'; + /** + * @description A failover URL for which Telnyx will retrieve the TeXML call instructions if the Url is not responding. + * @example https://www.example.com/intruction-c.xml + */ + FallbackUrl?: string; + /** + * @description HTTP request type used for `FallbackUrl`. + * @example GET + * @enum {string} + */ + FallbackMethod?: 'GET' | 'POST'; + /** + * @description URL destination for Telnyx to send status callback events to for the call. + * @example https://www.example.com/callback + */ + StatusCallback?: string; + /** + * @description HTTP request type used for `StatusCallback`. + * @example GET + * @enum {string} + */ + StatusCallbackMethod?: 'GET' | 'POST'; + /** + * @description TeXML to replace the current one with. + * @example Hello + */ + Texml?: string; + }; + /** UpdateCampaignRequest */ + UpdateCampaignRequest: { + /** + * Resellerid + * @description Alphanumeric identifier of the reseller that you want to associate with this campaign. + */ + resellerId?: string; + /** + * Sample1 + * @description Message sample. Some campaign tiers require 1 or more message samples. + */ + sample1?: string; + /** + * Sample2 + * @description Message sample. Some campaign tiers require 2 or more message samples. + */ + sample2?: string; + /** + * Sample3 + * @description Message sample. Some campaign tiers require 3 or more message samples. + */ + sample3?: string; + /** + * Sample4 + * @description Message sample. Some campaign tiers require 4 or more message samples. + */ + sample4?: string; + /** + * Sample5 + * @description Message sample. Some campaign tiers require 5 or more message samples. + */ + sample5?: string; + /** + * Messageflow + * @description Message flow description. + */ + messageFlow?: string; + /** + * Helpmessage + * @description Help message of the campaign. + */ + helpMessage?: string; + /** + * Autorenewal + * @description Help message of the campaign. + * @default true + */ + autoRenewal: boolean; + /** + * WebhookURL + * @description Webhook to which campaign status updates are sent. + */ + webhookURL?: string; + /** + * WebhookURL + * @description Webhook failover to which campaign status updates are sent. + */ + webhookFailoverURL?: string; + }; + /** UpdateCampaignResponse */ + UpdateCampaignResponse: { + /** + * Campaignid + * @description Alphanumeric identifier assigned by the registry for a campaign. This identifier is required by the NetNumber OSR SMS enabling process of 10DLC. + * @example 4b30017a-15eb-6a25-2e3f-59b6422cud79 + */ + campaignId?: string; + /** + * Cspid + * @description Alphanumeric identifier of the CSP associated with this campaign. + */ + cspId?: string; + /** + * Resellerid + * @description Alphanumeric identifier of the reseller that you want to associate with this campaign. + * @example RPQFAOY + */ + resellerId?: string; + /** @description Current campaign status. Possible values: ACTIVE, EXPIRED. A newly created campaign defaults to ACTIVE status. */ + status?: components['schemas']['Status']; + /** + * Createdate + * Format: date-time + * @description Unix timestamp when campaign was created. + */ + createDate?: string; + /** + * Autorenewal + * @description Campaign subscription auto-renewal status. + */ + autoRenewal?: boolean; + /** + * Billeddate + * Format: date-time + * @description Campaign recent billed date. + */ + billedDate?: string; + /** + * Brandid + * @description Alphanumeric identifier of the brand associated with this campaign. + * @example 4b206179-f731-8ab7-f19c-34e19d22ide9 + */ + brandId: string; + vertical: components['schemas']['Vertical']; + usecase: components['schemas']['Usecase']; + subUsecases?: components['schemas']['Usecase']; + /** + * Description + * @description Summary description of this campaign. + * @example Campaign description goes here. + */ + description: string; + /** + * Embeddedlink + * @description Does message generated by the campaign include URL link in SMS? + * @default false + */ + embeddedLink: boolean; + /** + * Embeddedphone + * @description Does message generated by the campaign include phone number in SMS? + * @default false + */ + embeddedPhone: boolean; + /** + * Affiliatemarketing + * @description Does message content controlled by affiliate marketing other than the brand? + */ + affiliateMarketing?: boolean; + /** + * Numberpool + * @description Does campaign utilize pool of phone nubers? + * @default false + */ + numberPool: boolean; + /** + * Agegated + * @description Age gated content in campaign. + */ + ageGated?: boolean; + /** Directlending */ + directLending?: boolean; + /** + * Subscriberoptin + * @description Does campaign require subscriber to opt-in before SMS is sent to subscriber? + * @default false + */ + subscriberOptin: boolean; + /** + * Subscriberoptout + * @description Does campaign support subscriber opt-out keyword(s)? + * @default false + */ + subscriberOptout: boolean; + /** + * Subscriberhelp + * @description Does campaign responds to help keyword(s)? + * @default false + */ + subscriberHelp: boolean; + /** + * Sample1 + * @description Message sample. Some campaign tiers require 1 or more message samples. + * @example This is a an updated message! + */ + sample1?: string; + /** + * Sample2 + * @description Message sample. Some campaign tiers require 2 or more message samples. + * @example This is a newly created message! + */ + sample2?: string; + /** + * Sample3 + * @description Message sample. Some campaign tiers require 3 or more message samples. + * @example This is a newly created message! + */ + sample3?: string; + /** + * Sample4 + * @description Message sample. Some campaign tiers require 4 or more message samples. + */ + sample4?: string; + /** + * Sample5 + * @description Message sample. Some campaign tiers require 5 or more message samples. + */ + sample5?: string; + /** + * Messageflow + * @description Message flow description. + */ + messageFlow?: string; + /** + * Helpmessage + * @description Help message of the campaign. + */ + helpMessage?: string; + }; + /** + * Update Call Result + * @example { + * "sid": "c46e06d7-b78f-4b13-96b6-c576af9640ff", + * "status": "accepted" + * } + */ + UpdateCommandResult: { + /** @example c46e06d7-b78f-4b13-96b6-c576af9640ff */ + sid?: string; + /** @example accepted */ + status?: string; + }; + /** + * Update Conference Participant Request + * @example { + * "BeepOnExit": false + * } + */ + UpdateConferenceParticipantRequest: { + /** + * @description Whether the participant should be muted. + * @example true + */ + Muted?: boolean; + /** + * @description Whether the participant should be on hold. + * @example true + */ + Hold?: boolean; + /** + * @description The URL to be called using the `HoldMethod` for music that plays when the participant is on hold. The URL may return an MP3 file, a WAV file, or a TwiML document that contains ``, ``, ``, or `` verbs. + * @example true + */ + HoldUrl?: string; + /** + * @description The HTTP method to use when calling the `HoldUrl`. + * @example POST + * @enum {string} + */ + HoldMethod?: 'GET' | 'POST'; + /** + * @description The URL to call to announce something to the participant. The URL may return an MP3 fileo a WAV file, or a TwiML document that contains ``, ``, ``, or `` verbs. + * @example https://www.example.com/announce.xml + */ + AnnounceUrl?: string; + /** + * @description The HTTP method used to call the `AnnounceUrl`. Defaults to `POST`. + * @example GET + * @enum {string} + */ + AnnounceMethod?: 'GET' | 'POST'; + /** + * @description The URL to call for an audio file to play while the participant is waiting for the conference to start. + * @example https://www.example.com/wait_music.mp3 + */ + WaitUrl?: string; + /** + * @description Whether to play a notification beep to the conference when the participant exits. + * @example false + */ + BeepOnExit?: boolean; + /** + * @description Whether to end the conference when the participant leaves. + * @example false + */ + EndConferenceOnExit?: boolean; + /** + * @description Whether the participant is coaching another call. When `true`, `CallSidToCoach` has to be given. + * @example false + */ + Coaching?: boolean; + /** + * @description The SID of the participant who is being coached. The participant being coached is the only participant who can hear the participant who is coaching. + * @example v3:9X2vxPDFY2RHSJ1EdMS0RHRksMTg7ldNxdjWbVr9zBjbGjGsSe-aiQ + */ + CallSidToCoach?: string; + }; + /** + * Update Conference Request + * @example { + * "Status": "completed" + * } + */ + UpdateConferenceRequest: { + /** + * @description The new status of the resource. Specifying `completed` will end the conference and hang up all participants. + * @example completed + */ + Status?: string; + /** + * @description The URL we should call to announce something into the conference. The URL may return an MP3 file, a WAV file, or a TwiML document that contains ``, ``, ``, or `` verbs. + * @example https://www.example.com/announce.xml + */ + AnnounceUrl?: string; + /** + * @description The HTTP method used to call the `AnnounceUrl`. Defaults to `POST`. + * @example GET + * @enum {string} + */ + AnnounceMethod?: 'GET' | 'POST'; + }; + /** + * Update Credential Connection Request + * @example { + * "active": true, + * "password": "my123secure456password789", + * "user_name": "myusername123", + * "anchorsite_override": "Latency", + * "connection_name": "my name", + * "sip_uri_calling_preference": " disabled", + * "default_on_hold_comfort_noise_enabled": false, + * "dtmf_type": "RFC 2833", + * "encode_contact_header_enabled": true, + * "encrypted_media": "SRTP", + * "onnet_t38_passthrough_enabled": true, + * "ios_push_credential_id": "ec0c8e5d-439e-4620-a0c1-9d9c8d02a836", + * "android_push_credential_id": "06b09dfd-7154-4980-8b75-cebf7a9d4f8e", + * "webhook_event_url": "https://example.com", + * "webhook_event_failover_url": "https://failover.example.com", + * "webhook_api_version": "1", + * "webhook_timeout_secs": 25, + * "rtcp_settings": { + * "port": "rtcp-mux", + * "capture_enabled": true, + * "report_frequency_seconds": 10 + * }, + * "inbound": { + * "ani_number_format": "+E.164", + * "dnis_number_format": "+e164", + * "codecs": "G722", + * "default_routing_method": "sequential", + * "channel_limit": 10, + * "generate_ringback_tone": true, + * "isup_headers_enabled": true, + * "prack_enabled": true, + * "privacy_zone_enabled": true, + * "sip_compact_headers_enabled": true, + * "timeout_1xx_secs": 10, + * "timeout_2xx_secs": 20, + * "shaken_stir_enabled": true + * }, + * "outbound": { + * "call_parking_enabled": true, + * "ani_override": "always", + * "channel_limit": 10, + * "instant_ringback_enabled": true, + * "generate_ringback_tone": true, + * "localization": "US", + * "t38_reinvite_source": "customer", + * "outbound_voice_profile_id": "1293384261075731499" + * } + * } + */ + UpdateCredentialConnectionRequest: { + /** @description Defaults to true */ + active?: boolean; + /** + * @description The user name to be used as part of the credentials. Must be 4-32 characters long and alphanumeric values only (no spaces or special characters). + * @example myusername123 + */ + user_name?: string; + /** + * @description The password to be used as part of the credentials. Must be 8 to 128 characters long. + * @example my123secure456password789 + */ + password?: string; + anchorsite_override?: components['schemas']['AnchorsiteOverride']; + connection_name?: components['schemas']['ConnectionName']; + /** + * @description This feature enables inbound SIP URI calls to your Credential Auth Connection. If enabled for all (unrestricted) then anyone who calls the SIP URI @telnyx.com will be connected to your Connection. You can also choose to allow only calls that are originated on any Connections under your account (internal). + * @enum {string} + */ + sip_uri_calling_preference?: 'disabled' | 'unrestricted' | 'internal'; + /** + * @description When enabled, Telnyx will generate comfort noise when you place the call on hold. If disabled, you will need to generate comfort noise or on hold music to avoid RTP timeout. + * @default false + */ + default_on_hold_comfort_noise_enabled: boolean; + dtmf_type?: components['schemas']['DtmfType']; + /** + * @description Encode the SIP contact header sent by Telnyx to avoid issues for NAT or ALG scenarios. + * @default false + */ + encode_contact_header_enabled: boolean; + encrypted_media?: components['schemas']['EncryptedMedia']; + /** + * @description Enable on-net T38 if you prefer the sender and receiver negotiating T38 directly if both are on the Telnyx network. If this is disabled, Telnyx will be able to use T38 on just one leg of the call depending on each leg's settings. + * @default false + */ + onnet_t38_passthrough_enabled: boolean; + ios_push_credential_id?: components['schemas']['ConnectionIosPushCredentialId']; + android_push_credential_id?: components['schemas']['ConnectionAndroidPushCredentialId']; + /** + * Format: url + * @description The URL where webhooks related to this connection will be sent. Must include a scheme, such as 'https'. + * @example https://example.com + */ + webhook_event_url?: string; + /** + * Format: url + * @description The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails. Must include a scheme, such as 'https'. + * @default + * @example https://failover.example.com + */ + webhook_event_failover_url: string | null; + /** + * @description Determines which webhook format will be used, Telnyx API v1 or v2. + * @default 1 + * @example 1 + * @enum {string} + */ + webhook_api_version: '1' | '2'; + /** + * @description Specifies how many seconds to wait before timing out a webhook. + * @default null + * @example 25 + */ + webhook_timeout_secs: number | null; + rtcp_settings?: components['schemas']['ConnectionRtcpSettings']; + inbound?: components['schemas']['CredentialInbound']; + outbound?: components['schemas']['CredentialOutbound']; + }; + /** Update External Connection Phone Number Request */ + UpdateExternalConnectionPhoneNumberRequest: { + /** + * Format: uuid + * @description Identifies the location to assign the phone number to. + */ + location_id?: string; + }; + /** + * Update External Connection Request + * @example { + * "active": false, + * "outbound": { + * "outbound_voice_profile_id": "1911630617284445511" + * } + * } + */ + UpdateExternalConnectionRequest: { + active?: components['schemas']['ConnectionActive']; + /** + * Format: url + * @description The URL where webhooks related to this connection will be sent. Must include a scheme, such as 'https'. + * @example https://example.com + */ + webhook_event_url?: string; + /** + * Format: url + * @description The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails. Must include a scheme, such as 'https'. + * @default + * @example https://failover.example.com + */ + webhook_event_failover_url: string | null; + /** + * @description Specifies how many seconds to wait before timing out a webhook. + * @default null + * @example 25 + */ + webhook_timeout_secs: number | null; + inbound?: { + /** + * @description When set, this will limit the number of concurrent inbound calls to phone numbers associated with this connection. + * @default null + * @example 10 + */ + channel_limit: number; + }; + outbound?: { + /** + * @description When set, this will limit the number of concurrent outbound calls to phone numbers associated with this connection. + * @default null + * @example 10 + */ + channel_limit: number; + outbound_voice_profile_id?: components['schemas']['OutboundVoiceProfileId']; + }; + }; + /** + * Update Fax Application Request + * @example { + * "application_name": "fax-router", + * "active": false, + * "anchorsite_override": "Amsterdam, Netherlands", + * "webhook_event_url": "https://example.com", + * "webhook_event_failover_url": "https://failover.example.com", + * "webhook_timeout_secs": 25, + * "inbound": { + * "channel_limit": 10, + * "sip_subdomain": "example", + * "sip_subdomain_receive_settings": "only_my_connections" + * }, + * "outbound": { + * "channel_limit": 10, + * "outbound_voice_profile_id": "1293384261075731499" + * } + * } + */ + UpdateFaxApplicationRequest: { + application_name: components['schemas']['ApplicationName']; + active?: components['schemas']['ConnectionActive']; + anchorsite_override?: components['schemas']['AnchorsiteOverride']; + webhook_event_url: components['schemas']['WebhookEventUrl']; + webhook_event_failover_url?: components['schemas']['WebhookEventFailoverUrl']; + webhook_timeout_secs?: components['schemas']['WebhookTimeoutSecs']; + fax_email_recipient?: components['schemas']['FaxEmailRecipient']; + inbound?: { + /** + * @description When set, this will limit the number of concurrent inbound calls to phone numbers associated with this connection. + * @default null + * @example 10 + */ + channel_limit: number; + /** + * @description Specifies a subdomain that can be used to receive Inbound calls to a Connection, in the same way a phone number is used, from a SIP endpoint. Example: the subdomain "example.sip.telnyx.com" can be called from any SIP endpoint by using the SIP URI "sip:@example.sip.telnyx.com" where the user part can be any alphanumeric value. Please note TLS encrypted calls are not allowed for subdomain calls. + * @default null + * @example example + */ + sip_subdomain: string; + /** + * @description This option can be enabled to receive calls from: "Anyone" (any SIP endpoint in the public Internet) or "Only my connections" (any connection assigned to the same Telnyx user). + * @default from_anyone + * @example only_my_connections + * @enum {string} + */ + sip_subdomain_receive_settings: 'only_my_connections' | 'from_anyone'; + }; + outbound?: { + /** + * @description When set, this will limit the number of concurrent outbound calls to phone numbers associated with this connection. + * @default null + * @example 10 + */ + channel_limit: number; + outbound_voice_profile_id?: components['schemas']['OutboundVoiceProfileId']; + }; + }; + /** + * Update FQDN Connection Request + * @example { + * "active": true, + * "anchorsite_override": "Latency", + * "connection_name": "string", + * "transport_protocol": "UDP", + * "default_on_hold_comfort_noise_enabled": true, + * "dtmf_type": "RFC 2833", + * "encode_contact_header_enabled": true, + * "encrypted_media": "SRTP", + * "onnet_t38_passthrough_enabled": true, + * "ios_push_credential_id": "ec0c8e5d-439e-4620-a0c1-9d9c8d02a836", + * "android_push_credential_id": "06b09dfd-7154-4980-8b75-cebf7a9d4f8e", + * "webhook_event_url": "https://example.com", + * "webhook_event_failover_url": "https://failover.example.com", + * "webhook_api_version": "1", + * "webhook_timeout_secs": 25, + * "rtcp_settings": { + * "port": "rtcp-mux", + * "capture_enabled": true, + * "report_frequency_secs": 10 + * }, + * "inbound": { + * "ani_number_format": "+E.164", + * "dnis_number_format": "+e164", + * "codecs": [ + * "G722" + * ], + * "default_routing_method": "sequential", + * "channel_limit": 10, + * "generate_ringback_tone": true, + * "isup_headers_enabled": true, + * "prack_enabled": true, + * "privacy_zone_enabled": true, + * "sip_compact_headers_enabled": true, + * "sip_region": "US", + * "sip_subdomain": "string", + * "sip_subdomain_receive_settings": "only_my_connections", + * "timeout_1xx_secs": 10, + * "timeout_2xx_secs": 10, + * "shaken_stir_enabled": true + * } + * } + */ + UpdateFqdnConnectionRequest: { + /** @description Defaults to true */ + active?: boolean; + anchorsite_override?: components['schemas']['AnchorsiteOverride']; + connection_name?: components['schemas']['ConnectionName']; + transport_protocol?: components['schemas']['FqdnConnectionTransportProtocol']; + /** + * @description When enabled, Telnyx will generate comfort noise when you place the call on hold. If disabled, you will need to generate comfort noise or on hold music to avoid RTP timeout. + * @default true + */ + default_on_hold_comfort_noise_enabled: boolean; + dtmf_type?: components['schemas']['DtmfType']; + /** + * @description Encode the SIP contact header sent by Telnyx to avoid issues for NAT or ALG scenarios. + * @default false + */ + encode_contact_header_enabled: boolean; + encrypted_media?: components['schemas']['EncryptedMedia']; + /** + * @description Enable on-net T38 if you prefer that the sender and receiver negotiate T38 directly when both are on the Telnyx network. If this is disabled, Telnyx will be able to use T38 on just one leg of the call according to each leg's settings. + * @default false + */ + onnet_t38_passthrough_enabled: boolean; + ios_push_credential_id?: components['schemas']['ConnectionIosPushCredentialId']; + android_push_credential_id?: components['schemas']['ConnectionAndroidPushCredentialId']; + webhook_event_url?: components['schemas']['WebhookEventUrl']; + webhook_event_failover_url?: components['schemas']['WebhookEventFailoverUrl']; + webhook_api_version?: components['schemas']['WebhookApiVersion']; + webhook_timeout_secs?: components['schemas']['WebhookTimeoutSecs']; + rtcp_settings?: components['schemas']['ConnectionRtcpSettings']; + inbound?: components['schemas']['InboundFqdn']; + outbound?: components['schemas']['OutboundFqdn']; + }; + /** + * Update FQDN Request + * @example { + * "connection_id": "1516447646313612565", + * "fqdn": "example.com", + * "port": 8080, + * "dns_record_type": "a" + * } + */ + UpdateFqdnRequest: { + /** @description ID of the FQDN connection to which this IP should be attached. */ + connection_id?: string; + /** + * @description FQDN represented by this resource. + * @example example.com + */ + fqdn?: string; + /** + * @description Port to use when connecting to this FQDN. + * @default 5060 + * @example 5060 + */ + port: number; + /** + * @description The DNS record type for the FQDN. For cases where a port is not set, the DNS record type must be 'srv'. For cases where a port is set, the DNS record type must be 'a'. If the DNS record type is 'a' and a port is not specified, 5060 will be used. + * @example a + */ + dns_record_type?: string; + }; + /** + * Update Ip Connection Request + * @example { + * "active": true, + * "anchorsite_override": "Latency", + * "connection_name": "string", + * "transport_protocol": "UDP", + * "default_on_hold_comfort_noise_enabled": true, + * "dtmf_type": "RFC 2833", + * "encode_contact_header_enabled": true, + * "encrypted_media": "SRTP", + * "onnet_t38_passthrough_enabled": false, + * "ios_push_credential_id": "ec0c8e5d-439e-4620-a0c1-9d9c8d02a836", + * "android_push_credential_id": "06b09dfd-7154-4980-8b75-cebf7a9d4f8e", + * "webhook_event_url": "https://example.com", + * "webhook_event_failover_url": "https://failover.example.com", + * "webhook_api_version": "1", + * "webhook_timeout_secs": 25, + * "rtcp_settings": { + * "port": "rtcp-mux", + * "capture_enabled": true, + * "report_frequency_secs": 10 + * }, + * "inbound:": { + * "ani_number_format": "+E.164", + * "dns_number_format": "+e164", + * "codecs": "G722", + * "default_primary_ip_id": "192.168.0.0", + * "default_tertiary_ip_id": "192.168.0.0", + * "default_secondary_ip_id": "192.168.0.0", + * "default_routing_method": "sequential", + * "channel_limit": 10, + * "generate_ringback_tone": true, + * "isup_headers_enabled": true, + * "prack_enabled": true, + * "privacy_zone_enabled": true, + * "sip_compact_headers_enabled": true, + * "sip_region": "US", + * "sip_subdomain": "test", + * "sip_subdomain_receive_settings": "only_my_connections", + * "timeout_1xx_secs": 10, + * "timeout_2xx_secs": 20, + * "shaken_stir_enabled": true + * }, + * "outbound": { + * "call_parking_enabled": true, + * "ani_override": "string", + * "ani_override_type": "always", + * "channel_limit": 10, + * "instant_ringback_enabled": true, + * "generate_ringback_tone": true, + * "localization": "string", + * "t38_reinvite_source": "customer", + * "tech_prefix": "string", + * "ip_authentication_method": "token", + * "ip_authentication_token": "string", + * "outbound_voice_profile_id": "1293384261075731499" + * } + * } + */ + UpdateIpConnectionRequest: { + /** @description Defaults to true */ + active?: boolean; + anchorsite_override?: components['schemas']['AnchorsiteOverride']; + connection_name?: string; + /** + * @description One of UDP, TLS, or TCP. Applies only to connections with IP authentication or FQDN authentication. + * @default UDP + * @enum {string} + */ + transport_protocol: 'UDP' | 'TCP' | 'TLS'; + /** + * @description When enabled, Telnyx will generate comfort noise when you place the call on hold. If disabled, you will need to generate comfort noise or on hold music to avoid RTP timeout. + * @default true + */ + default_on_hold_comfort_noise_enabled: boolean; + dtmf_type?: components['schemas']['DtmfType']; + /** + * @description Encode the SIP contact header sent by Telnyx to avoid issues for NAT or ALG scenarios. + * @default false + */ + encode_contact_header_enabled: boolean; + encrypted_media?: components['schemas']['EncryptedMedia']; + /** + * @description Enable on-net T38 if you prefer the sender and receiver negotiating T38 directly if both are on the Telnyx network. If this is disabled, Telnyx will be able to use T38 on just one leg of the call depending on each leg's settings. + * @default false + */ + onnet_t38_passthrough_enabled: boolean; + ios_push_credential_id?: components['schemas']['ConnectionIosPushCredentialId']; + android_push_credential_id?: components['schemas']['ConnectionAndroidPushCredentialId']; + /** + * Format: url + * @description The URL where webhooks related to this connection will be sent. Must include a scheme, such as 'https'. + * @example https://example.com + */ + webhook_event_url?: string; + /** + * Format: url + * @description The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails. Must include a scheme, such as 'https'. + * @default + * @example https://failover.example.com + */ + webhook_event_failover_url: string | null; + /** + * @description Determines which webhook format will be used, Telnyx API v1 or v2. + * @default 1 + * @example 1 + * @enum {string} + */ + webhook_api_version: '1' | '2'; + /** + * @description Specifies how many seconds to wait before timing out a webhook. + * @default null + * @example 25 + */ + webhook_timeout_secs: number | null; + rtcp_settings?: components['schemas']['ConnectionRtcpSettings']; + inbound?: components['schemas']['InboundIp']; + outbound?: components['schemas']['OutboundIp']; + }; + /** + * Update Ip Request + * @example { + * "connection_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58", + * "ip_address": "192.168.0.0", + * "port": 5060 + * } + */ + UpdateIpRequest: { + /** @description ID of the IP Connection to which this IP should be attached. */ + connection_id?: string; + /** + * @description IP adddress represented by this resource. + * @example 192.168.0.0 + */ + ip_address: string; + /** + * @description Port to use when connecting to this IP. + * @default 5060 + * @example 5060 + */ + port: number; + }; + /** + * Update Managed Account Global Outbound Channels Request + * @example { + * "channel_limit": 30 + * } + */ + UpdateManagedAccountGlobalChannelLimitRequest: { + /** + * @description Integer value that indicates the number of allocatable global outbound channels that should be allocated to the managed account. Must be 0 or more. If the value is 0 then the account will have no usable channels and will not be able to perform outbound calling. + * @example 30 + */ + channel_limit?: number; + }; + /** + * Update Managed Account Request + * @example { + * "managed_account_allow_custom_pricing": true + * } + */ + UpdateManagedAccountRequest: { + /** + * @description Boolean value that indicates if the managed account is able to have custom pricing set for it or not. If false, uses the pricing of the manager account. Defaults to false. This value may be changed, but there may be time lag between when the value is changed and pricing changes take effect. + * @example false + */ + managed_account_allow_custom_pricing?: boolean; + }; + /** + * Upload media multipart request + * @example { + * "media": "string($binary)", + * "ttl_secs": 86400 + * } + */ + UpdateMediaMultipartRequest: { + /** + * Format: binary + * @description The file you want to upload. The maximum allowed size is 20 MB. + */ + media?: string; + /** + * @description The number of seconds after which the media resource will be deleted, defaults to 2 days. The maximum allowed vale is 630720000, which translates to 20 years. + * @example 86400 + */ + ttl_secs?: number; + }; + /** + * Upload media request + * @example { + * "media_url": "http://www.example.com/audio.mp3", + * "ttl_secs": 86400 + * } + */ + UpdateMediaRequest: { + /** + * @description The URL where the media to be stored in Telnyx network is currently hosted. The maximum allowed size is 20 MB. + * @example http://www.example.com/audio.mp3 + */ + media_url?: string; + /** + * @description The number of seconds after which the media resource will be deleted, defaults to 2 days. The maximum allowed vale is 630720000, which translates to 20 years. + * @example 86400 + */ + ttl_secs?: number; + }; + /** @example { + * "name": "Updated Profile for Messages", + * "webhook_url": "https://www.example.com/hooks", + * "webhook_failover_url": "https://backup.example.com/hooks", + * "enabled": true, + * "webhook_api_version": "2", + * "whitelisted_destinations": [ + * "US" + * ], + * "number_pool_settings": { + * "toll_free_weight": 10, + * "long_code_weight": 2, + * "skip_unhealthy": false, + * "sticky_sender": true, + * "geomatch": false + * }, + * "url_shortener_settings": { + * "domain": "example.ex", + * "prefix": "cmpny", + * "replace_blacklist_only": true, + * "send_webhooks": false + * }, + * "v1_secret": "rP1VamejkU2v0qIUxntqLW2c" + * } */ + UpdateMessagingProfileRequest: { + /** + * @description Identifies the type of the resource. + * @enum {string} + */ + readonly record_type?: 'messaging_profile'; + /** + * Format: uuid + * @description Identifies the type of resource. + */ + readonly id?: string; + /** @description A user friendly name for the messaging profile. */ + name?: string; + /** @description Specifies whether the messaging profile is enabled or not. */ + enabled?: boolean; + /** + * Format: url + * @description The URL where webhooks related to this messaging profile will be sent. + */ + webhook_url?: string | null; + /** + * Format: url + * @description The failover URL where webhooks related to this messaging profile will be sent if sending to the primary URL fails. + */ + webhook_failover_url?: string | null; + /** + * @description Determines which webhook format will be used, Telnyx API v1, v2, or a legacy 2010-04-01 format. + * @enum {string} + */ + webhook_api_version?: '1' | '2' | '2010-04-01'; + /** @description Destinations to which the messaging profile is allowed to send. The elements in the list must be valid ISO 3166-1 alpha-2 country codes. If set to `["*"]`, all destinations will be allowed. + * + * This field is required if the messaging profile doesn't have it defined yet. */ + whitelisted_destinations?: string[]; + /** + * Format: date-time + * @description ISO 8601 formatted date indicating when the resource was created. + */ + readonly created_at?: string; + /** + * Format: date-time + * @description ISO 8601 formatted date indicating when the resource was updated. + */ + readonly updated_at?: string; + /** @description Secret used to authenticate with v1 endpoints. */ + v1_secret?: string; + number_pool_settings?: components['schemas']['NumberPoolSettings']; + url_shortener_settings?: components['schemas']['UrlShortenerSettings']; + /** @description The alphanumeric sender ID to use when sending to destinations that require an alphanumeric sender ID. */ + alpha_sender?: string | null; + }; + /** @example { + * "id": "387d1e31-a218-4375-8151-103f2d5e2d2c", + * "record_type": "number_order_document", + * "file_id": "1e3c5822-0362-4702-8e46-5a129f0d3976", + * "requirements_id": "36aaf27d-986b-493c-bd1b-de16af2e4292", + * "customer_reference": "MY REF 001", + * "requirement_type": "address_proof", + * "created_at": "2018-01-01T00:00:00.000000Z" + * } */ + UpdateNumberOrderDocumentRequest: { + /** + * Format: uuid + * @example 387d1e31-a218-4375-8151-103f2d5e2d2c + */ + readonly id?: string; + /** @example number_order_document */ + readonly record_type?: string; + /** + * @description The id of the file to associate as a number order document. + * @example 1e3c5822-0362-4702-8e46-5a129f0d3976 + */ + file_id?: string; + /** + * @description Unique id for a requirement. + * @example 36aaf27d-986b-493c-bd1b-de16af2e4292 + */ + requirements_id?: string; + /** + * @description A customer reference string for customer look ups. + * @example MY REF 001 + */ + customer_reference?: string; + /** @enum {string} */ + readonly requirement_type?: + | 'address_proof' + | 'identification' + | 'reg_form'; + /** + * Format: datetime + * @description An ISO 8901 datetime string denoting when the number order document was uploaded. + * @example 2018-01-01T00:00:00.000000Z + */ + readonly created_at?: string; + }; + UpdateNumberOrderPhoneNumberRequest: { + regulatory_requirements?: components['schemas']['UpdateRegulatoryRequirement'][]; + }; + UpdateNumberOrderRequest: { + regulatory_requirements?: components['schemas']['UpdateRegulatoryRequirement'][]; + /** + * @description A customer reference string for customer look ups. + * @example MY REF 001 + */ + customer_reference?: string; + }; + /** + * Outbound Voice Profile + * @example { + * "name": "office", + * "traffic_type": "conversational", + * "service_plan": "global", + * "concurrent_call_limit": 10, + * "enabled": true, + * "tags": [ + * "office-profile" + * ], + * "usage_payment_method": "rate-deck", + * "whitelisted_destinations": [ + * "US", + * "BR", + * "AU" + * ], + * "max_destination_rate": 10, + * "daily_spend_limit": "100.00", + * "daily_spend_limit_enabled": true, + * "billing_group_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58" + * } + */ + UpdateOutboundVoiceProfileRequest: { + /** + * @description A user-supplied name to help with organization. + * @example office + */ + name: string; + traffic_type?: components['schemas']['TrafficType']; + service_plan?: components['schemas']['ServicePlan']; + /** + * @description Must be no more than your global concurrent call limit. Null means no limit. + * @example 10 + */ + concurrent_call_limit?: number | null; + /** + * @description Specifies whether the outbound voice profile can be used. Disabled profiles will result in outbound calls being blocked for the associated Connections. + * @default true + * @example true + */ + enabled: boolean; + /** @example [ + * "office-profile" + * ] */ + tags?: string[]; + usage_payment_method?: components['schemas']['UsagePaymentMethod']; + /** + * @description The list of destinations you want to be able to call using this outbound voice profile formatted in alpha2. + * @default [ + * "US", + * "CA" + * ] + * @example [ + * "US", + * "BR", + * "AU" + * ] + */ + whitelisted_destinations: string[]; + /** @description Maximum rate (price per minute) for a Destination to be allowed when making outbound calls. */ + max_destination_rate?: number; + /** + * @description The maximum amount of usage charges, in USD, you want Telnyx to allow on this outbound voice profile in a day before disallowing new calls. + * @example 100.00 + */ + daily_spend_limit?: string; + /** + * @description Specifies whether to enforce the daily_spend_limit on this outbound voice profile. + * @default false + * @example true + */ + daily_spend_limit_enabled: boolean; + call_recording?: components['schemas']['OutboundCallRecording']; + /** + * Format: uuid + * @description The ID of the billing group associated with the outbound proflile. Defaults to null (for no group assigned). + * @default null + * @example 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + */ + billing_group_id: string | null; + }; + /** @example { + * "messaging_profile_id": "dd50eba1-a0c0-4563-9925-b25e842a7cb6", + * "messaging_product": "P2P" + * } */ + UpdatePhoneNumberMessagingSettingsRequest: { + /** @description Unique identifier for a messaging profile. */ + messaging_profile_id?: string; + /** + * @description The requested messaging product the number should be on + * @example P2P + */ + messaging_product?: string; + }; + /** @example { + * "id": "dc8e4d67-33a0-4cbb-af74-7b58f05bd494", + * "tags": [ + * "tag" + * ], + * "address_id": "dc8f39ac-953d-4520-b93b-786ae87db0da", + * "external_pin": "1234", + * "customer_reference": "customer-reference", + * "connection_id": "dc8e4d67-33a0-4cbb-af74-7b58f05bd494", + * "billing_group_id": "dc8e4d67-33a0-4cbb-af74-7b58f05bd494", + * "number_level_routing": "disabled", + * "hd_voice_enabled": true + * } */ + UpdatePhoneNumberRequest: { + /** @description Identifies the type of resource. */ + readonly id?: string; + /** @description A list of user-assigned tags to help organize phone numbers. */ + tags?: string[]; + /** @description If someone attempts to port your phone number away from Telnyx and your phone number has an external PIN set, we will attempt to verify that you provided the correct external PIN to the winning carrier. Note that not all carriers cooperate with this security mechanism. */ + external_pin?: string; + /** + * @description Indicates whether HD voice is enabled for this number. + * @example true + */ + hd_voice_enabled?: boolean; + /** + * @description A customer reference string for customer look ups. + * @example MY REF 001 + */ + customer_reference?: string; + /** @description Identifies the connection associated with the phone number. */ + connection_id?: string; + /** @description Identifies the billing group associated with the phone number. */ + billing_group_id?: string; + /** + * @description Deprecated field, the only value for this is 'disabled'. All routing for numbers should be configured via connection settings. + * @default enabled + * @enum {string} + */ + number_level_routing: 'disabled'; + }; + /** @example { + * "tech_prefix_enabled": true, + * "translated_number": "+13035559999", + * "caller_id_name_enabled": true, + * "call_forwarding": { + * "call_forwarding_enabled": true, + * "forwards_to": "+13035559123", + * "forwarding_type": "always" + * }, + * "cnam_listing": { + * "cnam_listing_enabled": true, + * "cnam_listing_details": "example" + * }, + * "usage_payment_method": "pay-per-minute", + * "media_features": { + * "rtp_auto_adjust_enabled": true, + * "accept_any_rtp_packets_enabled": true, + * "t38_fax_gateway_enabled": true + * }, + * "call_recording": { + * "inbound_call_recording_enabled": true, + * "inbound_call_recording_format": "wav", + * "inbound_call_recording_channels": "single" + * }, + * "inbound_call_screening": "disabled" + * } */ + UpdatePhoneNumberVoiceSettingsRequest: { + /** + * @description Controls whether a tech prefix is enabled for this phone number. + * @default false + */ + tech_prefix_enabled: boolean; + /** @description This field allows you to rewrite the destination number of an inbound call before the call is routed to you. The value of this field may be any alphanumeric value, and the value will replace the number originally dialed. */ + translated_number?: string; + /** + * @description Controls whether the caller ID name is enabled for this phone number. + * @default false + */ + caller_id_name_enabled: boolean; + call_forwarding?: components['schemas']['CallForwarding']; + cnam_listing?: components['schemas']['CnamListing']; + /** + * @description Controls whether a number is billed per minute or uses your concurrent channels. + * @default pay-per-minute + * @enum {string} + */ + usage_payment_method: 'pay-per-minute' | 'channel'; + media_features?: components['schemas']['MediaFeatures']; + call_recording?: components['schemas']['CallRecording']; + /** + * @description The inbound_call_screening setting is a phone number configuration option variable that allows users to configure their settings to block or flag fraudulent calls. It can be set to disabled, reject_calls, or flag_calls. This feature has an additional per-number monthly cost associated with it. + * @default disabled + * @enum {string} + */ + inbound_call_screening: 'disabled' | 'reject_calls' | 'flag_calls'; + }; + /** UpdatePortingOrder */ + UpdatePortingOrder: { + misc?: components['schemas']['PortingOrderMisc']; + end_user?: components['schemas']['PortingOrderEndUser']; + documents?: components['schemas']['PortingOrderDocuments']; + activation_settings?: { + /** + * Format: date-time + * @description ISO 8601 formatted Date/Time requested for the FOC date + * @example 2021-03-19T10:07:15.527Z + */ + foc_datetime_requested?: string; + }; + phone_number_configuration?: components['schemas']['PortingOrderPhoneNumberConfiguration']; + /** + * Format: uuid + * @description If present, we will read the current values from the specified Requirement Group into the Documents and Requirements for this Porting Order. Note that any future changes in the Requirement Group would have no impact on this Porting Order. We will return an error if a specified Requirement Group conflicts with documents or requirements in the same request. + * @example DE748D99-06FA-4D90-9F9A-F4B62696BADA + */ + requirement_group_id?: string; + /** @description List of requirements for porting numbers. */ + requirements?: components['schemas']['UpdatePortingOrderRequirement'][]; + user_feedback?: components['schemas']['PortingOrderUserFeedback']; + /** Format: uri */ + webhook_url?: string; + customer_reference?: string; + messaging?: { + /** + * @description Indicates whether Telnyx will port messaging capabilities from the losing carrier. If false, any messaging capabilities will stay with their current provider. + * @example true + */ + enable_messaging?: boolean; + }; + }; + /** @description Specifies a value for a requirement on the Porting Order. */ + UpdatePortingOrderRequirement: { + /** + * @description identifies the document or provides the text value that satisfies this requirement + * @example 9787fb5f-cbe5-4de4-b765-3303774ee9fe + */ + field_value: string; + /** + * @description Identifies the requirement type that the `field_value` fulfills + * @example 59b0762a-b274-4f76-ac32-4d5cf0272e66 + */ + requirement_type_id: string; + }; + UpdateRegulatoryRequirement: { + /** + * Format: uuid + * @description Unique id for a requirement. + * @example 8ffb3622-7c6b-4ccc-b65f-7a3dc0099576 + */ + requirement_id?: string; + /** + * @description The value of the requirement. For address and document requirements, this should be the ID of the resource. For textual, this should be the value of the requirement. + * @example 45f45a04-b4be-4592-95b1-9306b9db2b21 + */ + field_value?: string; + }; + /** @example { + * "messaging_profile_id": "abc85f64-5717-4562-b3fc-2c9600000000" + * } */ + UpdateShortCodeRequest: { + /** @description Unique identifier for a messaging profile. */ + messaging_profile_id: string; + }; + UpdateSubNumberOrderRequest: { + regulatory_requirements?: components['schemas']['UpdateRegulatoryRequirement'][]; + }; + /** + * Update Texml Application Request + * @example { + * "friendly_name": "call-router", + * "active": false, + * "anchorsite_override": "Amsterdam, Netherlands", + * "dtmf_type": "Inband", + * "first_command_timeout": true, + * "first_command_timeout_secs": 10, + * "voice_url": "https://example.com", + * "voice_fallback_url": "https://fallback.example.com", + * "voice_method": "get", + * "status_callback": "https://example.com", + * "status_callback_method": "get", + * "inbound": { + * "channel_limit": 10, + * "shaken_stir_enabled": true, + * "sip_subdomain": "example", + * "sip_subdomain_receive_settings": "only_my_connections" + * }, + * "outbound": { + * "channel_limit": 10, + * "outbound_voice_profile_id": "1293384261075731499" + * } + * } + */ + UpdateTexmlApplicationRequest: { + friendly_name: components['schemas']['ApplicationName']; + active?: components['schemas']['ConnectionActive']; + anchorsite_override?: components['schemas']['AnchorsiteOverride']; + dtmf_type?: components['schemas']['DtmfType']; + first_command_timeout?: components['schemas']['FirstCommandTimeout']; + first_command_timeout_secs?: components['schemas']['FirstCommandTimeoutSecs']; + /** + * Format: url + * @description URL to which Telnyx will deliver your XML Translator webhooks. + * @example https://example.com + */ + voice_url: string; + /** + * Format: url + * @description URL to which Telnyx will deliver your XML Translator webhooks if we get an error response from your voice_url. + * @default null + * @example https://fallback.example.com + */ + voice_fallback_url: string; + /** + * @description HTTP request method Telnyx will use to interact with your XML Translator webhooks. Either 'get' or 'post'. + * @default post + * @example get + * @enum {string} + */ + voice_method: 'get' | 'post'; + /** + * Format: url + * @description URL for Telnyx to send requests to containing information about call progress events. + * @default null + * @example https://example.com + */ + status_callback: string; + /** + * @description HTTP request method Telnyx should use when requesting the status_callback URL. + * @default post + * @example get + * @enum {string} + */ + status_callback_method: 'get' | 'post'; + inbound?: { + /** + * @description When set, this will limit the total number of inbound calls to phone numbers associated with this connection. + * @default null + * @example 10 + */ + channel_limit: number; + /** + * @description When enabled Telnyx will include Shaken/Stir data in the Webhook for new inbound calls. + * @default false + * @example false + */ + shaken_stir_enabled: boolean; + /** + * @description Specifies a subdomain that can be used to receive Inbound calls to a Connection, in the same way a phone number is used, from a SIP endpoint. Example: the subdomain "example.sip.telnyx.com" can be called from any SIP endpoint by using the SIP URI "sip:@example.sip.telnyx.com" where the user part can be any alphanumeric value. Please note TLS encrypted calls are not allowed for subdomain calls. + * @default null + * @example example + */ + sip_subdomain: string; + /** + * @description This option can be enabled to receive calls from: "Anyone" (any SIP endpoint in the public Internet) or "Only my connections" (any connection assigned to the same Telnyx user). + * @default from_anyone + * @example only_my_connections + * @enum {string} + */ + sip_subdomain_receive_settings: 'only_my_connections' | 'from_anyone'; + }; + outbound?: { + /** + * @description When set, this will limit the total number of outbound calls to phone numbers associated with this connection. + * @default null + * @example 10 + */ + channel_limit: number; + outbound_voice_profile_id?: components['schemas']['OutboundVoiceProfileId']; + }; + }; + /** UpdateVerifyProfileCallRequest */ + UpdateVerifyProfileCallRequest: { + /** + * Format: uuid + * @description The message template identifier selected from /verify_profiles/templates + * @example 0abb5b4f-459f-445a-bfcd-488998b7572d + */ + messaging_template_id?: string; + /** + * @description The name that identifies the application requesting 2fa in the verification message. + * @example Example Secure App + */ + app_name?: string; + /** + * @description The length of the verify code to generate. + * @default 5 + * @example 6 + */ + code_length: number; + /** + * @description Enabled country destinations to send verification codes. The elements in the list must be valid ISO 3166-1 alpha-2 country codes. If set to `["*"]`, all destinations will be allowed. + * @example [ + * "US", + * "CA" + * ] + */ + whitelisted_destinations?: string[]; + /** + * @description For every request that is initiated via this Verify profile, this sets the number of seconds before a verification request code expires. Once the verification request expires, the user cannot use the code to verify their identity. + * @default 300 + * @example 300 + */ + default_verification_timeout_secs: number; + }; + /** UpdateVerifyProfileFlashcallRequest */ + UpdateVerifyProfileFlashcallRequest: { + /** + * @description Enabled country destinations to send verification codes. The elements in the list must be valid ISO 3166-1 alpha-2 country codes. If set to `["*"]`, all destinations will be allowed. + * @example [ + * "US", + * "CA" + * ] + */ + whitelisted_destinations?: string[]; + /** + * @description For every request that is initiated via this Verify profile, this sets the number of seconds before a verification request code expires. Once the verification request expires, the user cannot use the code to verify their identity. + * @default 300 + * @example 300 + */ + default_verification_timeout_secs: number; + }; + /** UpdateVerifyProfileSMSRequest */ + UpdateVerifyProfileSMSRequest: { + /** + * Format: uuid + * @description The message template identifier selected from /verify_profiles/templates + * @example 0abb5b4f-459f-445a-bfcd-488998b7572d + */ + messaging_template_id?: string; + /** + * @description The name that identifies the application requesting 2fa in the verification message. + * @example Example Secure App + */ + app_name?: string; + /** + * @description The alphanumeric sender ID to use when sending to destinations that require an alphanumeric sender ID. + * @default Telnyx + */ + alpha_sender: string; + /** + * @description The length of the verify code to generate. + * @default 5 + * @example 6 + */ + code_length: number; + /** + * @description Enabled country destinations to send verification codes. The elements in the list must be valid ISO 3166-1 alpha-2 country codes. If set to `["*"]`, all destinations will be allowed. + * @example [ + * "US", + * "CA" + * ] + */ + whitelisted_destinations?: string[]; + /** + * @description For every request that is initiated via this Verify profile, this sets the number of seconds before a verification request code expires. Once the verification request expires, the user cannot use the code to verify their identity. + * @default 300 + * @example 300 + */ + default_verification_timeout_secs: number; + }; + /** + * @description ISO 8601 formatted date-time indicating when the resource was updated. + * @example 2018-02-02T22:25:27.521Z + */ + UpdatedAt: string; + UplinkData: { + /** + * @description Uplink data + * @example 1 + */ + amount?: number; + /** + * @description Transmission unit + * @default MB + * @enum {string} + */ + unit: 'B' | 'KB' | 'MB'; + }; + /** Upload */ + Upload: { + ticket_id?: components['schemas']['UUID']; + /** + * Format: uuid + * @example ea175aba-f47c-4702-9400-efaa42688048 + */ + tenant_id?: string; + /** + * Format: uuid + * @example c37e5036-1e87-42e6-86a2-b3e8dd39a2ad + */ + location_id?: string; + /** + * @description Represents the status of the upload on Microsoft Teams. + * @default pending_upload + * @example error + * @enum {string} + */ + status: + | 'pending_upload' + | 'pending' + | 'in_progress' + | 'partial_success' + | 'success' + | 'error'; + available_usages?: ( + | 'calling_user_assignment' + | 'first_party_app_assignment' + )[]; + /** @description A code returned by Microsoft Teams if there is an error with the upload process. */ + error_code?: string; + /** @description A message set if there is an error with the upload process. */ + error_message?: string; + tn_upload_entries?: components['schemas']['TnUploadEntry'][]; + }; + /** @example { + * "loa": "example loa", + * "bill": "bill example" + * } */ + UploadFileMessagingHostedNumberOrderRequest: { + /** + * Format: binary + * @description Must be a signed LOA for the numbers in the order in PDF format. + */ + loa?: string; + /** + * Format: binary + * @description Must be the last month's bill with proof of ownership of all of the numbers in the order in PDF format. + */ + bill?: string; + }; + /** + * Upload media multipart request + * @example { + * "media": "string($binary)", + * "ttl_secs": 86400, + * "media_name": "my-file" + * } + */ + UploadMediaMultipartRequest: { + /** + * Format: binary + * @description The file you want to upload. The maximum allowed size is 20 MB. + */ + media: string; + /** + * @description The number of seconds after which the media resource will be deleted, defaults to 2 days. The maximum allowed vale is 630720000, which translates to 20 years. + * @example 86400 + */ + ttl_secs?: number; + /** + * @description The unique identifier of a file. + * @example my_file + */ + media_name?: string; + }; + /** + * Upload media request + * @example { + * "media_url": "http://www.example.com/audio.mp3", + * "ttl_secs": 86400, + * "media_name": "my-file" + * } + */ + UploadMediaRequest: { + /** + * @description The URL where the media to be stored in Telnyx network is currently hosted. The maximum allowed size is 20 MB. + * @example http://www.example.com/audio.mp3 + */ + media_url: string; + /** + * @description The number of seconds after which the media resource will be deleted, defaults to 2 days. The maximum allowed vale is 630720000, which translates to 20 years. + * @example 86400 + */ + ttl_secs?: number; + /** + * @description The unique identifier of a file. + * @example my_file + */ + media_name?: string; + }; + /** Url */ + Url: { + /** + * Url + * Format: uri + */ + url: string; + }; + /** + * @description The URL shortener feature allows automatic replacement of URLs that were generated using + * a public URL shortener service. Some examples include bit.do, bit.ly, goo.gl, ht.ly, + * is.gd, ow.ly, rebrand.ly, t.co, tiny.cc, and tinyurl.com. Such URLs are replaced with + * with links generated by Telnyx. The use of custom links can improve branding and message + * deliverability. + * + * To disable this feature, set the object field to `null`. + * + * @example { + * "domain": "example.ex", + * "prefix": "", + * "replace_blacklist_only": true, + * "send_webhooks": false + * } + */ + UrlShortenerSettings: { + /** + * @description One of the domains provided by the Telnyx URL shortener service. + * + * @example acct.fyi + */ + domain: string; + /** + * @description Optional prefix that can be used to identify your brand, and will appear in the Telnyx generated URLs after the domain name. + * + * @example + */ + prefix?: string; + /** + * @description Use the link replacement tool only for links that are specifically blacklisted by Telnyx. + * + * @example true + */ + replace_blacklist_only?: boolean; + /** + * @description Receive webhooks for when your replaced links are clicked. Webhooks are sent to the webhooks on the messaging profile. + * + * @example false + */ + send_webhooks?: boolean; + } | null; + /** + * @description Setting for how costs for outbound profile are calculated. + * @default rate-deck + * @example rate-deck + * @enum {string} + */ + UsagePaymentMethod: 'rate-deck'; + /** @description An object following one of the schemas published in https://developers.telnyx.com/docs/api/v2/detail-records */ + UsageReportsOptionsRecord: { + /** + * @description Telnyx Product + * @example wireless + */ + product?: string; + /** + * @description Telnyx Product Dimensions + * @example ['mnc', 'mcc', 'sim_card_id', 'sim_group_name'] + */ + product_dimensions?: string[]; + /** + * @description Telnyx Product Metrics + * @example ['uplink_data_bytes','downlink_data','downlink_data_bytes','uplink_data','data_cost'] + */ + product_metrics?: string[]; + /** + * @description Subproducts if applicable + * @example null + */ + record_types?: components['schemas']['RecordType'][]; + }; + /** @description An object following one of the schemas published in https://developers.telnyx.com/docs/api/v2/detail-records */ + UsageReportsOptionsResponse: { + /** @description Collection of product description */ + data?: components['schemas']['UsageReportsOptionsRecord'][]; + }; + UsageReportsResponse: { + meta?: components['schemas']['PaginationData']; + /** @example [ + * { + * "product": "messaging", + * "cost": 0.012, + * "parts": 12, + * "count": 8, + * "customer_carrier_fee": 0, + * "product_name": "long_code", + * "country_iso": "LC", + * "direction": "outbound" + * }, + * { + * "product": "messaging", + * "cost": 0.021, + * "parts": 21, + * "count": 12, + * "customer_carrier_fee": 0, + * "product_name": "long_code", + * "country_iso": "MP", + * "direction": "outbound" + * } + * ] */ + data?: Record[]; + }; + /** + * UseCaseCategories + * @description Tollfree usecase categories + * @enum {string} + */ + UseCaseCategories: + | '2FA' + | 'App Notifications' + | 'Appointments' + | 'Auctions' + | 'Auto Repair Services' + | 'Bank Transfers' + | 'Billing' + | 'Booking Confirmations' + | 'Business Updates' + | 'COVID-19 Alerts' + | 'Career Training' + | 'Chatbot' + | 'Conversational / Alerts' + | 'Courier Services & Deliveries' + | 'Emergency Alerts' + | 'Events & Planning' + | 'Financial Services' + | 'Fraud Alerts' + | 'Fundraising' + | 'General Marketing' + | 'General School Updates' + | 'HR / Staffing' + | 'Healthcare Alerts' + | 'Housing Community Updates' + | 'Insurance Services' + | 'Job Dispatch' + | 'Legal Services' + | 'Mixed' + | 'Motivational Reminders' + | 'Notary Notifications' + | 'Order Notifications' + | 'Political' + | 'Public Works' + | 'Real Estate Services' + | 'Religious Services' + | 'Repair and Diagnostics Alerts' + | 'Rewards Program' + | 'Surveys' + | 'System Alerts' + | 'Voting Reminders' + | 'Waitlist Alerts' + | 'Webinar Reminders' + | 'Workshop Alerts'; + /** + * Usecase + * @description Campaign usecase. Must be of defined valid types. For more details, send a GET request to https://api.telnyx.com/10dlc/enum/usecase + * @example MARKETING + * @enum {unknown} + */ + Usecase: + | '2FA' + | 'ACCOUNT_NOTIFICATION' + | 'AGENTS_FRANCHISES' + | 'CARRIER_EXEMPT' + | 'CHARITY' + | 'CONVERSATIONAL' + | 'CUSTOMER_CARE' + | 'DELIVERY_NOTIFICATION' + | 'EMERGENCY' + | 'FRAUD_ALERT' + | 'HIGHER_EDUCATION' + | 'LOW_VOLUME' + | 'MARKETING' + | 'MANUFACTURING' + | 'MIXED' + | 'POLITICAL' + | 'POLLING_VOTING' + | 'PUBLIC_SERVICE_ANNOUNCEMENT' + | 'SECURITY_ALERT' + | 'SOCIAL' + | 'SWEEPSTAKE' + | 'SOLE_PROPRIETOR' + | 'TRIAL'; + /** UsecaseMetadata */ + UsecaseMetadata: { + /** + * Annualfee + * @description Campaign annual subscription fee + */ + annualFee?: number; + /** + * Maxsubusecases + * @description Maximum number of sub-usecases declaration required. + */ + maxSubUsecases?: number; + /** + * Minsubusecases + * @description Minimum number of sub-usecases declaration required. + */ + minSubUsecases?: number; + /** + * Mnometadata + * @description Map of usecase metadata for each MNO. Key is the network ID of the MNO (e.g. 10017), Value is the mno metadata for the usecase. + */ + mnoMetadata?: Record; + /** + * Monthlyfee + * @description Campaign monthly subscription fee + */ + monthlyFee?: number; + /** + * Quarterlyfee + * @description Campaign quarterly subscription fee + */ + quarterlyFee?: number; + /** + * Usecase + * @description Campaign usecase + */ + usecase?: string; + }; + /** @example { + * "record_type": "balance", + * "pending": "10.00", + * "balance": "300.00", + * "credit_limit": "100.00", + * "available_credit": "400.00", + * "currency": "USD" + * } */ + UserBalance: { + /** + * Format: decimal + * @description The account’s pending amount. + * @example 10.00 + */ + pending?: string; + /** + * @description Identifies the type of the resource. + * @example balance + * @enum {string} + */ + record_type?: 'balance'; + /** + * Format: decimal + * @description The account's current balance. + * @example 300.00 + */ + balance?: string; + /** + * Format: decimal + * @description The account's credit limit. + * @example 100.00 + */ + credit_limit?: string; + /** + * Format: decimal + * @description Available amount to spend (balance + credit limit) + * @example 400.00 + */ + available_credit?: string; + /** + * Format: iso4217 + * @description The ISO 4217 currency identifier. + * @example USD + */ + currency?: string; + }; + /** UserEmbeddedBuckets */ + UserEmbeddedBuckets: { + /** Buckets */ + buckets: string[]; + }; + /** UserEmbeddedBucketsData */ + UserEmbeddedBucketsData: { + data: components['schemas']['UserEmbeddedBuckets']; + }; + /** + * Format: uuid + * @description Identifier of the user to whom the fax belongs + * @example yfff7c54-4df3-4bca-a65a-3da1ecc777f0 + */ + UserId: string; + UserRequirement: { + requirement_id?: string; + field_value?: string; + field_type?: string; + /** @enum {string} */ + status?: 'approved' | 'unapproved' | 'pending-approval' | 'declined'; + /** Format: date-time */ + created_at?: string; + /** Format: date-time */ + updated_at?: string; + }; + ValidateAddress: { + street_address?: components['schemas']['street_address']; + extended_address?: components['schemas']['extended_address']; + locality?: components['schemas']['locality']; + administrative_area?: components['schemas']['administrative_area']; + postal_code?: components['schemas']['postal_code']; + country_code?: components['schemas']['country_code']; + }; + ValidateAddressRequest: { + street_address: components['schemas']['street_address']; + extended_address?: components['schemas']['extended_address']; + locality?: components['schemas']['locality']; + administrative_area?: components['schemas']['administrative_area']; + postal_code: components['schemas']['postal_code']; + country_code: components['schemas']['country_code']; + }; + /** Validate address action result */ + ValidateAddressResult: { + /** + * @description Indicates whether an address is valid or invalid. + * @example valid + * @enum {string} + */ + result: 'valid' | 'invalid'; + /** @description Provides normalized address when available. */ + suggested: components['schemas']['ValidateAddress']; + /** + * @description Identifies the type of the resource. + * @example address_validation + */ + record_type?: string; + errors?: components['schemas']['Error'][]; + }; + /** ValidationError */ + ValidationError: { + /** Location */ + loc: (string | number)[]; + /** Message */ + msg: string; + /** Error Type */ + type: string; + }; + /** Verification */ + Verification: { + /** + * Format: uuid + * @example 12ade33a-21c0-473b-b055-b3c836e1c292 + */ + id?: string; + type?: components['schemas']['VerificationType']; + record_type?: components['schemas']['VerificationRecordType']; + /** + * @description +E164 formatted phone number. + * @example +13035551234 + */ + phone_number?: string; + /** + * Format: uuid + * @description The identifier of the associated Verify profile. + * @example 12ade33a-21c0-473b-b055-b3c836e1c292 + */ + verify_profile_id?: string; + /** + * @description Send a self-generated numeric code to the end-user + * @default null + * @example 43612 + */ + custom_code: string | null; + /** + * @description This is the number of seconds before the code of the request is expired. Once this request has expired, the code will no longer verify the user. Note: this will override the `default_verification_timeout_secs` on the Verify profile. + * @example 300 + */ + timeout_secs?: number; + status?: components['schemas']['VerificationStatus']; + /** @example 2020-09-14T17:03:32.965812 */ + created_at?: string; + /** @example 2020-09-14T17:03:32.965812 */ + updated_at?: string; + }; + /** + * VerificationProfileRecordType + * @description The possible verification profile record types. + * @example verification_profile + * @enum {string} + */ + VerificationProfileRecordType: 'verification_profile'; + /** + * VerificationRecordType + * @description The possible verification record types. + * @example verification + * @enum {string} + */ + VerificationRecordType: 'verification'; + /** + * VerificationRequestEgress + * @description A verification request as it comes out of the database + */ + VerificationRequestEgress: { + /** + * Businessname + * @example Telnyx LLC + */ + businessName: string; + /** + * Corporatewebsite + * @example http://example.com + */ + corporateWebsite: string; + /** + * Businessaddr1 + * @example 311 W Superior St + */ + businessAddr1: string; + /** + * Businessaddr2 + * @example 121 W Superior St + */ + businessAddr2?: string; + /** + * Businesscity + * @example Chicago + */ + businessCity: string; + /** + * Businessstate + * @example Illinois + */ + businessState: string; + /** + * Businesszip + * @example 60654 + */ + businessZip: string; + /** + * Businesscontactfirstname + * @example John + */ + businessContactFirstName: string; + /** + * Businesscontactlastname + * @example Doe + */ + businessContactLastName: string; + /** + * Businesscontactemail + * @example email@example.com + */ + businessContactEmail: string; + /** + * Businesscontactphone + * @example +18005550100 + */ + businessContactPhone: string; + /** + * @description One of the following exact values: 10; 100; 1,000; 10,000; 100,000; 250,000; 500,000; 750,000; 1,000,000; 5,000,000; 10,000,000+ + * @example 100,000 + */ + messageVolume: components['schemas']['Volume']; + /** + * Phonenumbers + * @example [ + * { + * "phoneNumber": "+18773554398" + * }, + * { + * "phoneNumber": "+18773554399" + * } + * ] + */ + phoneNumbers: components['schemas']['TFPhoneNumber'][]; + /** @example 2FA */ + useCase: components['schemas']['UseCaseCategories']; + /** + * Usecasesummary + * @example This is a use case where Telnyx sends out 2FA codes to portal users to verify their identity in order to sign into the portal + */ + useCaseSummary: string; + /** + * Productionmessagecontent + * @example Your Telnyx OTP is XXXX + */ + productionMessageContent: string; + /** + * Optinworkflow + * @example User signs into the Telnyx portal, enters number and is prompted to select whether they want to use 2FA verification for security purposes. If they've opted in a confirmation message is sent out to the handset + */ + optInWorkflow: string; + /** + * Optinworkflowimageurls + * @example [ + * { + * "url": "https://telnyx.com/sign-up" + * }, + * { + * "url": "https://telnyx.com/company/data-privacy" + * } + * ] + */ + optInWorkflowImageURLs: components['schemas']['Url'][]; + /** + * Additionalinformation + * @example This is for security purposes, blah blah blah + */ + additionalInformation: string; + /** + * Isvreseller + * @example Yes + */ + isvReseller: string; + /** + * Webhookurl + * @example http://example-webhook.com + */ + webhookUrl?: string; + /** + * Id + * Format: uuid + */ + id: string; + /** Verificationrequestid */ + verificationRequestId: string; + /** @default In Progress */ + verificationStatus: components['schemas']['TFVerificationStatus']; + }; + /** + * VerificationRequestStatus + * @description A verification request and its status, suitable for returning to users + */ + VerificationRequestStatus: { + /** + * Businessname + * @example Telnyx LLC + */ + businessName: string; + /** + * Corporatewebsite + * @example http://example.com + */ + corporateWebsite: string; + /** + * Businessaddr1 + * @example 311 W Superior St + */ + businessAddr1: string; + /** + * Businessaddr2 + * @example 121 W Superior St + */ + businessAddr2?: string; + /** + * Businesscity + * @example Chicago + */ + businessCity: string; + /** + * Businessstate + * @example Illinois + */ + businessState: string; + /** + * Businesszip + * @example 60654 + */ + businessZip: string; + /** + * Businesscontactfirstname + * @example John + */ + businessContactFirstName: string; + /** + * Businesscontactlastname + * @example Doe + */ + businessContactLastName: string; + /** + * Businesscontactemail + * @example email@example.com + */ + businessContactEmail: string; + /** + * Businesscontactphone + * @example +18889809750 + */ + businessContactPhone: string; + /** + * @description One of the following exact values: 10; 100; 1,000; 10,000; 100,000; 250,000; 500,000; 750,000; 1,000,000; 5,000,000; 10,000,000+ + * @example 100,000 + */ + messageVolume: components['schemas']['Volume']; + /** + * Phonenumbers + * @example [ + * { + * "phoneNumber": "+18773554398" + * }, + * { + * "phoneNumber": "+18773554399" + * } + * ] + */ + phoneNumbers: components['schemas']['TFPhoneNumber'][]; + /** @example 2FA */ + useCase: components['schemas']['UseCaseCategories']; + /** + * Usecasesummary + * @example This is a use case where Telnyx sends out 2FA codes to portal users to verify their identity in order to sign into the portal + */ + useCaseSummary: string; + /** + * Productionmessagecontent + * @example Your Telnyx OTP is XXXX + */ + productionMessageContent: string; + /** + * Optinworkflow + * @example User signs into the Telnyx portal, enters number and is prompted to select whether they want to use 2FA verification for security purposes. If they've opted in a confirmation message is sent out to the handset + */ + optInWorkflow: string; + /** + * Optinworkflowimageurls + * @example [ + * { + * "url": "https://telnyx.com/sign-up" + * }, + * { + * "url": "https://telnyx.com/company/data-privacy" + * } + * ] + */ + optInWorkflowImageURLs: components['schemas']['Url'][]; + /** + * Additionalinformation + * @example This is for security purposes, blah blah blah + */ + additionalInformation: string; + /** + * Isvreseller + * @example Yes + */ + isvReseller: string; + /** + * Webhookurl + * @example http://example-webhook.com + */ + webhookUrl?: string; + /** + * Id + * Format: uuid + * @example eaba9f52-164e-58e0-b002-4f668e18b7ed + */ + id: string; + /** @example Pending Customer Feedback */ + verificationStatus: components['schemas']['TFVerificationStatus']; + /** + * Reason + * @example Unfortunately, we have to cancel this request as we do not support non tollfree US numbers. + */ + reason?: string; + /** + * Createdat + * Format: date-time + * @example 2024-01-23T18:10:02.574Z + */ + createdAt?: string; + /** + * Updatedat + * Format: date-time + * @example 2024-01-23T18:10:02.574Z + */ + updatedAt?: string; + }; + /** + * VerificationStatus + * @description The possible statuses of the verification request. + * @example accepted + * @enum {string} + */ + VerificationStatus: + | 'pending' + | 'accepted' + | 'invalid' + | 'expired' + | 'error'; + /** + * VerificationType + * @description The possible types of verification. + * @example sms + * @enum {string} + */ + VerificationType: 'sms' | 'call' | 'flashcall'; + /** + * VerifiedNumberRecordType + * @description The possible verified numbers record types. + * @example verified_number + * @enum {string} + */ + VerifiedNumberRecordType: 'verified_number'; + /** VerifiedNumberResponse */ + VerifiedNumberResponse: { + /** @example +15551234567 */ + phone_number?: string; + record_type?: components['schemas']['VerifiedNumberRecordType']; + /** @example 2020-09-14T17:03:32.965812 */ + verified_at?: string; + }; + /** VerifiedNumberResponseDataWrapper */ + VerifiedNumberResponseDataWrapper: { + data?: components['schemas']['VerifiedNumberResponse']; + }; + VerifyDetailRecord: { + /** + * Format: uuid + * @description Unique ID of the verification + * @example 0add777f-1549-46f7-84e9-ad7350f6aa97 + */ + id?: string; + /** + * Format: uuid + * @example 49000176-1ab2-8bc1-352e-4009f6c37f82 + */ + verify_profile_id?: string; + /** @example pending */ + delivery_status?: string; + /** @example pending */ + verification_status?: string; + /** + * @description E.164 formatted phone number + * @example +13124515883 + */ + destination_phone_number?: string; + /** + * @description Depending on the type of verification, the `verify_channel_id` + * points to one of the following channel ids; + * --- + * verify_channel_type | verify_channel_id + * ------------------- | ----------------- + * sms, psd2 | messaging_id + * call, flashcall | call_control_id + * whatsapp | messaging_whatsapp_id + * --- + * + * @enum {string} + */ + verify_channel_type?: 'sms' | 'psd2' | 'call' | 'flashcall' | 'whatsapp'; + /** + * Format: uuid + * @example 5b7a8365-91f3-420a-befc-498d1efd6c20 + */ + verify_channel_id?: string; + /** + * Format: datetime + * @example 2021-07-08T00:00:41.000000+00:00 + */ + created_at?: string; + /** + * Format: datetime + * @example 2021-07-08T00:00:41.000000+00:00 + */ + updated_at?: string; + /** + * @description Currency amount per billing unit used to calculate the Telnyx billing costs + * @example 0.002 + */ + rate?: string; + /** + * @description Billing unit used to calculate the Telnyx billing costs + * @example number of occurrences + */ + rate_measured_in?: string; + /** + * @description Currency amount for Verify Usage Fee + * @example 0.002 + */ + verify_usage_fee?: string; + /** + * @description Telnyx account currency used to describe monetary values, including billing costs + * @example USD + */ + currency?: string; + /** + * @description discriminator enum property added by openapi-typescript + * @enum {string} + */ + record_type: 'VerifyDetailRecord'; + }; + /** VerifyProfileCallResponse */ + VerifyProfileCallResponse: { + /** + * Format: uuid + * @description The message template identifier selected from /verify_profiles/templates + * @example 0abb5b4f-459f-445a-bfcd-488998b7572d + */ + messaging_template_id?: string; + /** + * @description The name that identifies the application requesting 2fa in the verification message. + * @example Example Secure App + */ + app_name?: string; + /** + * @description The length of the verify code to generate. + * @default 5 + * @example 6 + */ + code_length: number; + /** + * @description Enabled country destinations to send verification codes. The elements in the list must be valid ISO 3166-1 alpha-2 country codes. If set to `["*"]`, all destinations will be allowed. + * @example [ + * "US", + * "CA" + * ] + */ + whitelisted_destinations?: string[]; + /** + * @description For every request that is initiated via this Verify profile, this sets the number of seconds before a verification request code expires. Once the verification request expires, the user cannot use the code to verify their identity. + * @default 300 + * @example 300 + */ + default_verification_timeout_secs: number; + }; + /** VerifyProfileFlashcallResponse */ + VerifyProfileFlashcallResponse: { + /** + * @description For every request that is initiated via this Verify profile, this sets the number of seconds before a verification request code expires. Once the verification request expires, the user cannot use the code to verify their identity. + * @default 300 + * @example 300 + */ + default_verification_timeout_secs: number; + }; + /** VerifyProfileResponse */ + VerifyProfileMessageTemplateResponse: { + /** + * Format: uuid + * @example 0abb5b4f-459f-445a-bfcd-488998b7572d + */ + id?: string; + /** @example Your {{app_name}} verification code is: {{code}}. */ + text?: string; + }; + /** VerifyProfileResponse */ + VerifyProfileResponse: { + /** + * Format: uuid + * @example 12ade33a-21c0-473b-b055-b3c836e1c292 + */ + id?: string; + /** @example Test Profile */ + name?: string; + /** @example http://example.com/webhook */ + webhook_url?: string; + /** @example http://example.com/webhook/failover */ + webhook_failover_url?: string; + record_type?: components['schemas']['VerificationProfileRecordType']; + /** @example 2020-09-14T17:03:32.965812 */ + created_at?: string; + /** @example 2020-09-14T17:03:32.965812 */ + updated_at?: string; + sms?: components['schemas']['VerifyProfileSMSResponse']; + call?: components['schemas']['VerifyProfileCallResponse']; + flashcall?: components['schemas']['VerifyProfileFlashcallResponse']; + /** @example en-US */ + language?: string; + }; + /** VerifyProfileResponseDataWrapper */ + VerifyProfileResponseDataWrapper: { + data?: components['schemas']['VerifyProfileResponse']; + }; + /** VerifyProfileSMSResponse */ + VerifyProfileSMSResponse: { + /** + * Format: uuid + * @description The message template identifier selected from /verify_profiles/templates + * @example 0abb5b4f-459f-445a-bfcd-488998b7572d + */ + messaging_template_id?: string; + /** + * @description The name that identifies the application requesting 2fa in the verification message. + * @example Example Secure App + */ + app_name?: string; + /** + * @description The alphanumeric sender ID to use when sending to destinations that require an alphanumeric sender ID. + * @default Telnyx + */ + alpha_sender: string; + /** + * @description The length of the verify code to generate. + * @default 5 + * @example 6 + */ + code_length: number; + /** + * @description Enabled country destinations to send verification codes. The elements in the list must be valid ISO 3166-1 alpha-2 country codes. If set to `["*"]`, all destinations will be allowed. + * @example [ + * "US", + * "CA" + * ] + */ + whitelisted_destinations?: string[]; + /** + * @description For every request that is initiated via this Verify profile, this sets the number of seconds before a verification request code expires. Once the verification request expires, the user cannot use the code to verify their identity. + * @default 300 + * @example 300 + */ + default_verification_timeout_secs: number; + }; + /** VerifyVerificationCodeRequestById */ + VerifyVerificationCodeRequestById: { + /** + * @description This is the code the user submits for verification. + * @example 17686 + */ + code: string; + }; + /** VerifyVerificationCodeRequestByPhoneNumber */ + VerifyVerificationCodeRequestByPhoneNumber: { + /** + * @description This is the code the user submits for verification. + * @example 17686 + */ + code: string; + /** + * Format: uuid + * @description The identifier of the associated Verify profile. + * @example 12ade33a-21c0-473b-b055-b3c836e1c292 + */ + verify_profile_id: string; + }; + /** VerifyVerificationCodeResponse */ + VerifyVerificationCodeResponse: { + data: { + /** + * @description +E164 formatted phone number. + * @example +13035551234 + */ + phone_number: string; + /** + * @description Identifies if the verification code has been accepted or rejected. + * @example accepted + * @enum {string} + */ + response_code: 'accepted' | 'rejected'; + }; + }; + /** + * Vertical + * @description Vertical or industry segment of the brand or campaign. + * @example TECHNOLOGY + * @enum {unknown} + */ + Vertical: + | 'REAL_ESTATE' + | 'HEALTHCARE' + | 'ENERGY' + | 'ENTERTAINMENT' + | 'RETAIL' + | 'AGRICULTURE' + | 'INSURANCE' + | 'EDUCATION' + | 'HOSPITALITY' + | 'FINANCIAL' + | 'GAMBLING' + | 'CONSTRUCTION' + | 'NGO' + | 'MANUFACTURING' + | 'GOVERNMENT' + | 'TECHNOLOGY' + | 'COMMUNICATION'; + /** VettingClass */ + VettingClass: { + /** Id */ + id?: string; + /** Enabled */ + enabled?: boolean; + /** Displayname */ + displayName?: string; + /** Description */ + description?: string; + /** Validitymonths */ + validityMonths?: number; + }; + /** + * VettingStatus + * @description An enumeration. + * @enum {string} + */ + VettingStatus: + | 'PENDING' + | 'ACTIVE' + | 'EXPIRED' + | 'ERROR' + | 'CONTACT_VENDOR' + | 'SIMULATION'; + VideoRegion: { + /** + * @description X axis value (in pixels) of the region's upper left corner relative to the upper left corner of the whole room composition viewport. + * @default 0 + * @example 100 + */ + x_pos: number | null; + /** + * @description Y axis value (in pixels) of the region's upper left corner relative to the upper left corner of the whole room composition viewport. + * @default 0 + * @example 100 + */ + y_pos: number | null; + /** + * @description Regions with higher z_pos values are stacked on top of regions with lower z_pos values + * @default 0 + * @example 1 + */ + z_pos: number | null; + /** + * @description Height of the video region + * @example 360 + */ + height?: number | null; + /** + * @description Width of the video region + * @example 480 + */ + width?: number | null; + /** + * @description Maximum number of columns of the region's placement grid. By default, the region has as many columns as needed to layout all the specified video sources. + * @example 3 + */ + max_columns?: number | null; + /** + * @description Maximum number of rows of the region's placement grid. By default, the region has as many rows as needed to layout all the specified video sources. + * @example 3 + */ + max_rows?: number | null; + /** @description Array of video recording ids to be composed in the region. Can be "*" to specify all video recordings in the session */ + video_sources?: string[]; + }; + VirtualCrossConnect: components['schemas']['Record'] & + components['schemas']['Interface'] & { + /** + * @description Identifies the type of the resource. + * @example virtual_cross_connect + */ + readonly record_type?: string; + /** + * @description The Virtual Private Cloud with which you would like to establish a cross connect. + * @example aws + * @enum {string} + */ + cloud_provider?: 'aws' | 'azure' | 'gce'; + /** + * @description The region where your Virtual Private Cloud hosts are located.

The available regions can be found using the /virtual_cross_connect_regions endpoint. + * @example us-east-1 + */ + cloud_provider_region?: string; + /** + * @description The Border Gateway Protocol (BGP) Autonomous System Number (ASN). If null, value will be assigned by Telnyx. + * @example 1234 + */ + bgp_asn?: number; + /** + * @description The desired throughput in Megabits per Second (Mbps) for your Virtual Cross Connect.

The available bandwidths can be found using the /virtual_cross_connect_regions endpoint. + * @example 50 + */ + bandwidth_mbps?: number; + /** + * @description Indicates whether the primary circuit is enabled. Setting this to `false` will disable the circuit. + * @example true + */ + readonly primary_enabled?: boolean; + /** + * @description The identifier for your Virtual Private Cloud. The number will be different based upon your Cloud provider. + * @example 123456789012 + */ + primary_cloud_account_id?: string; + /** + * Format: ipv4 + * @description The IP address assigned to the Telnyx side of the Virtual Cross Connect.

If none is provided, one will be generated for you.

This value should be null for GCE as Google will only inform you of your assigned IP once the connection has been accepted. + * @example 169.254.0.1 + */ + primary_telnyx_ip?: string; + /** + * Format: ipv4 + * @description The IP address assigned for your side of the Virtual Cross Connect.

If none is provided, one will be generated for you.

This value should be null for GCE as Google will only inform you of your assigned IP once the connection has been accepted. + * @example 169.254.0.2 + */ + primary_cloud_ip?: string; + /** + * @description The authentication key for BGP peer configuration. + * @example yFV4wEPtPVPfDUGLWiyQzwga + */ + primary_bgp_key?: string; + /** + * @description Indicates whether the secondary circuit is enabled. Setting this to `false` will disable the circuit. + * @example true + */ + readonly secondary_enabled?: boolean; + /** + * @description The identifier for your Virtual Private Cloud. The number will be different based upon your Cloud provider.

This attribute is only necessary for GCE. + * @example + */ + secondary_cloud_account_id?: string; + /** + * Format: ipv4 + * @description The IP address assigned to the Telnyx side of the Virtual Cross Connect.

If none is provided, one will be generated for you.

This value should be null for GCE as Google will only inform you of your assigned IP once the connection has been accepted. + * @example 169.254.0.3 + */ + secondary_telnyx_ip?: string; + /** + * Format: ipv4 + * @description The IP address assigned for your side of the Virtual Cross Connect.

If none is provided, one will be generated for you.

This value should be null for GCE as Google will only inform you of your assigned IP once the connection has been accepted. + * @example 169.254.0.4 + */ + secondary_cloud_ip?: string; + /** + * @description The authentication key for BGP peer configuration. + * @example ge1lONeK9RcA83uuWaw9DvZy + */ + secondary_bgp_key?: string; + }; + VirtualCrossConnectCombined: components['schemas']['VirtualCrossConnectCreate'] & + components['schemas']['VirtualCrossConnectPatch'] & + components['schemas']['RegionOut']; + VirtualCrossConnectCoverage: { + /** + * @description Identifies the type of the resource. + * @example virtual_cross_connects_coverage + */ + readonly record_type?: string; + location?: components['schemas']['Location']; + /** + * @description The Virtual Private Cloud with which you would like to establish a cross connect. + * @example aws + * @enum {string} + */ + cloud_provider?: 'aws' | 'azure' | 'gce'; + /** + * @description The region where your Virtual Private Cloud hosts are located. Should be identical to how the cloud provider names region, i.e. us-east-1 for AWS but Frankfurt for Azure + * @example us-east-1 + */ + cloud_provider_region?: string; + /** + * @description The available throughput in Megabits per Second (Mbps) for your Virtual Cross Connect. + * @example [ + * 50, + * 100, + * 200, + * 500 + * ] + */ + available_bandwidth?: number[]; + }; + VirtualCrossConnectCreate: components['schemas']['VirtualCrossConnect'] & + components['schemas']['RegionIn'] & + Record; + VirtualCrossConnectPatch: { + /** + * @description Indicates whether the primary circuit is enabled. Setting this to `false` will disable the circuit. + * @example true + */ + primary_enabled?: boolean; + /** + * @description Whether the primary BGP route is being announced. + * @example false + */ + primary_routing_announcement?: boolean; + /** + * Format: ipv4 + * @description The IP address assigned for your side of the Virtual Cross Connect.

If none is provided, one will be generated for you.

This value can not be patched once the VXC has bene provisioned. + * @example 169.254.0.2 + */ + primary_cloud_ip?: string; + /** + * @description Indicates whether the secondary circuit is enabled. Setting this to `false` will disable the circuit. + * @example true + */ + secondary_enabled?: boolean; + /** + * @description Whether the secondary BGP route is being announced. + * @example false + */ + secondary_routing_announcement?: boolean; + /** + * Format: ipv4 + * @description The IP address assigned for your side of the Virtual Cross Connect.

If none is provided, one will be generated for you.

This value can not be patched once the VXC has bene provisioned. + * @example 169.254.0.4 + */ + secondary_cloud_ip?: string; + }; + /** @example { + * "enabled": "true", + * "pin": "1234" + * } */ + VoicemailPrefResponse: { + /** + * @description Whether voicemail is enabled. + * @example true + */ + enabled?: boolean; + /** + * @description The pin used for the voicemail. + * @example 1234 + */ + pin?: string; + }; + VoicemailRequest: { + /** + * @description The pin used for voicemail + * @example 1234 + */ + pin?: string; + /** + * @description Whether voicemail is enabled. + * @example true + */ + enabled?: boolean; + }; + /** + * Volume + * @description Message Volume Enums + * @enum {string} + */ + Volume: + | '10' + | '100' + | '1,000' + | '10,000' + | '100,000' + | '250,000' + | '500,000' + | '750,000' + | '1,000,000' + | '5,000,000' + | '10,000,000+'; + WdrReport: { + /** + * Format: uuid + * @description Identifies the resource. + * @example 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + */ + readonly id?: string; + /** @example detail_records_report */ + readonly record_type?: string; + /** + * @description ISO 8601 formatted date-time indicating when the resource was created. + * @example 2018-02-02T22:25:27.521Z + */ + readonly created_at?: string; + /** + * @description ISO 8601 formatted date-time indicating when the resource was updated. + * @example 2018-02-02T22:25:27.521Z + */ + readonly updated_at?: string; + /** + * @description ISO 8601 formatted date-time indicating the start time. + * @example 2018-02-02T22:25:27.521Z + */ + start_time?: string; + /** + * @description ISO 8601 formatted date-time indicating the end time. + * @example 2018-02-02T22:25:27.521Z + */ + end_time?: string; + /** + * @description Indicates the status of the report, which is updated asynchronously. + * @example pending + * @enum {string} + */ + status?: 'pending' | 'complete' | 'failed' | 'deleted'; + /** + * @description The URL where the report content, when generated, will be published to. + * @example http://example.com + */ + report_url?: string; + }; + /** @example { + * "start_time": "2018-02-02T22:25:27.521Z", + * "end_time": "2018-02-02T22:25:27.521Z" + * } */ + WdrReportRequest: { + /** + * @description ISO 8601 formatted date-time indicating the start time. + * @example 2018-02-02T22:25:27.521Z + */ + start_time?: string; + /** + * @description ISO 8601 formatted date-time indicating the end time. + * @example 2018-02-02T22:25:27.521Z + */ + end_time?: string; + }; + /** + * Webhook API Version + * @description Determines which webhook format will be used, Telnyx API v1 or v2. + * @default 1 + * @example 1 + * @enum {string} + */ + WebhookApiVersion: '1' | '2'; + /** + * Webhook Event Failover URL + * Format: url + * @description The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails. Must include a scheme, such as 'https'. + * @default + * @example https://failover.example.com + */ + WebhookEventFailoverUrl: string | null; + /** + * Webhook Event URL + * Format: url + * @description The URL where webhooks related to this connection will be sent. Must include a scheme, such as 'https'. + * @example https://example.com + */ + WebhookEventUrl: string; + /** @description The webhook payload for the porting_order.deleted event */ + WebhookPortingOrderDeletedPayload: { + /** + * Format: uuid + * @description Identifies the porting order that was deleted. + * @example 96dfa9e4-c753-4fd3-97cd-42d66f26cf0c + */ + id?: string; + /** + * @description Identifies the customer reference associated with the porting order. + * @example my-ref-001 + */ + customer_reference?: string; + /** + * Format: date-time + * @description ISO 8601 formatted date indicating when the porting order was deleted. + * @example 2021-03-19T10:07:15.527Z + */ + deleted_at?: string; + }; + /** @description The webhook payload for the porting_order.messaging_changed event */ + WebhookPortingOrderMessagingChangedPayload: { + /** + * Format: uuid + * @description Identifies the porting order that was moved. + * @example 96dfa9e4-c753-4fd3-97cd-42d66f26cf0c + */ + id?: string; + /** + * @description Identifies the customer reference associated with the porting order. + * @example my-ref-001 + */ + customer_reference?: string; + /** + * @description Identifies the support key associated with the porting order. + * @example sr_b1a2c3 + */ + support_key?: string; + /** @description The messaging portability status of the porting order. */ + messaging?: { + /** + * @description Indicates whether the porting order is messaging capable. + * @example true + */ + messaging_capable?: boolean; + /** + * @description Indicates whether Telnyx will port messaging capabilities from the losing carrier. If false, any messaging capabilities will stay with their current provider. + * @example true + */ + enable_messaging?: boolean; + /** + * @description Indicates the messaging port status of the porting order. + * @example ported + * @enum {string} + */ + messaging_port_status?: + | 'not_applicable' + | 'pending' + | 'activating' + | 'exception' + | 'canceled' + | 'partial_port_complete' + | 'ported'; + /** + * @description Indicates whether the messaging port is completed. + * @example true + */ + messaging_port_completed?: boolean; + }; + }; + /** @description The webhook payload for the porting_order.new_comment event */ + WebhookPortingOrderNewCommentPayload: { + /** + * Format: uuid + * @description Identifies the porting order that the comment was added to. + * @example 96dfa9e4-c753-4fd3-97cd-42d66f26cf0c + */ + porting_order_id?: string; + /** + * @description Identifies the support key associated with the porting order. + * @example sr_b1a2c3 + */ + support_key?: string; + /** @description The comment that was added to the porting order. */ + comment?: { + /** + * Format: uuid + * @description Identifies the comment. + * @example 96dfa9e4-c753-4fd3-97cd-42d66f26cf0c + */ + id?: string; + /** + * @description The body of the comment. + * @example This is a comment. + */ + body?: string; + /** + * Format: uuid + * @description Identifies the user that create the comment. + * @example 96dfa9e4-c753-4fd3-97cd-42d66f26cf0c + */ + user_id?: string; + /** + * @description Identifies the type of the user that created the comment. + * @example user + * @enum {string} + */ + user_type?: 'user' | 'admin' | 'system'; + /** + * Format: date-time + * @description ISO 8601 formatted date indicating when the comment was created. + * @example 2021-03-19T10:07:15.527Z + */ + inserted_at?: string; + }; + }; + /** @description The webhook payload for the porting_order.split event */ + WebhookPortingOrderSplitPayload: { + /** @description The porting order that was split. */ + from?: { + /** + * Format: uuid + * @description Identifies the porting order that was split. + * @example 96dfa9e4-c753-4fd3-97cd-42d66f26cf0c + */ + id?: string; + }; + /** @description The new porting order that the phone numbers was moved to. */ + to?: { + /** + * Format: uuid + * @description Identifies the porting order that was split. + * @example 96dfa9e4-c753-4fd3-97cd-42d66f26cf0c + */ + id?: string; + }; + /** @description The list of porting phone numbers that were moved to the new porting order. */ + porting_phone_numbers?: { + /** + * Format: uuid + * @description Identifies the porting phone number that was moved. + * @example 96dfa9e4-c753-4fd3-97cd-42d66f26cf0c + */ + id?: string; + }[]; + }; + /** @description The webhook payload for the porting_order.status_changed event */ + WebhookPortingOrderStatusChangedPayload: { + /** + * Format: uuid + * @description Identifies the porting order that was moved. + * @example 96dfa9e4-c753-4fd3-97cd-42d66f26cf0c + */ + id?: string; + /** + * @description Identifies the customer reference associated with the porting order. + * @example my-ref-001 + */ + customer_reference?: string; + status?: components['schemas']['PortingOrderStatus']; + /** + * @description Identifies the support key associated with the porting order. + * @example sr_b1a2c3 + */ + support_key?: string; + /** + * Format: date-time + * @description ISO 8601 formatted date indicating when the porting order was moved. + * @example 2021-03-19T10:07:15.527Z + */ + updated_at?: string; + /** + * @description The URL to send the webhook to. + * @example https://example.com/webhook + */ + webhook_url?: string; + }; + /** @description The webhook payload for the portout.foc_date_changed event */ + WebhookPortoutFocDateChangedPayload: { + /** + * Format: uuid + * @description Identifies the port-out order that have the FOC date changed. + * @example 96dfa9e4-c753-4fd3-97cd-42d66f26cf0c + */ + id?: string; + /** + * @description Identifies the organization that port-out order belongs to. + * @example 0e19c89e-f0ce-458a-a36c-3c60bc2014b1 + */ + user_id?: string; + /** + * Format: date-time + * @description ISO 8601 formatted date indicating the new FOC date. + * @example 2021-03-19T10:07:15.527Z + */ + foc_date?: string; + }; + /** @description The webhook payload for the portout.new_comment event */ + WebhookPortoutNewCommentPayload: { + /** + * Format: uuid + * @description Identifies the comment that was added to the port-out order. + * @example 96dfa9e4-c753-4fd3-97cd-42d66f26cf0c + */ + id?: string; + /** + * Format: uuid + * @description Identifies the port-out order that the comment was added to. + * @example d26109e5-0605-4671-a235-d3c649cc8406 + */ + portout_id?: string; + /** + * Format: uuid + * @description Identifies the user that added the comment. + * @example 1c45c968-c2e0-4559-b1dd-db073962fc61 + */ + user_id?: string; + /** + * @description The body of the comment. + * @example This is a comment. + */ + comment?: string; + }; + /** @description The webhook payload for the portout.status_changed event */ + WebhookPortoutStatusChangedPayload: { + /** + * Format: uuid + * @description Identifies the port out that was moved. + * @example 96dfa9e4-c753-4fd3-97cd-42d66f26cf0c + */ + id?: string; + /** + * @description The new status of the port out. + * @example authorized + * @enum {string} + */ + status?: + | 'pending' + | 'authorized' + | 'ported' + | 'rejected' + | 'rejected-pending' + | 'canceled'; + /** + * @description Phone numbers associated with this port-out order + * @example [ + * "+35312345678" + * ] + */ + phone_numbers?: string[]; + /** + * @description Carrier the number will be ported out to + * @example Testing Carrier + */ + carrier_name?: string; + /** + * @description The new carrier SPID. + * @example 987H + */ + spid?: string; + /** + * Format: uuid + * @description Identifies the user that the port-out order belongs to. + * @example 96dfa9e4-c753-4fd3-97cd-42d66f26cf0c + */ + user_id?: string; + /** + * @description The name of the port-out's end user. + * @example John Doe + */ + subscriber_name?: string; + /** + * @description The reason why the order is being rejected by the user. If the order is authorized, this field can be left null + * @example null + */ + rejection_reason?: string; + /** + * @description The PIN that was attempted to be used to authorize the port out. + * @example 1234 + */ + attempted_pin?: string; + }; + /** + * Webhook Timeout Secs + * @description Specifies how many seconds to wait before timing out a webhook. + * @default null + * @example 25 + */ + WebhookTimeoutSecs: number | null; + WhatsAppConversationDetailRecord: { + /** + * @description CLDR two-letter region-code of recipient + * @example US + */ + recipient_region_code?: string; + /** + * @description Telnyx account currency used to describe monetary values, including billing cost + * @example USD + */ + currency?: string; + /** + * Format: date-time + * @description UTC time when the message was created + * @example 2021-08-06T03:32:01.125Z + */ + created_at?: string; + /** + * @description Currency amount for WhatsApp cost + * @example 0.003 + */ + whatsapp_fee?: string; + /** + * @description Whatsapp Conversation ID + * @example f44ae083-c800-4433-baac-b439e5270aa4 + */ + conversation_id?: string; + /** + * @description Whatsapp Conversation Origin + * @enum {string} + */ + conversation_origin?: + | 'business_initiated' + | 'user_initiated' + | 'referral_conversion'; + /** + * @description Whatsapp Business Account ID + * @example 421452453 + */ + whatsapp_business_account_id?: string; + /** + * @description discriminator enum property added by openapi-typescript + * @enum {string} + */ + record_type: 'WhatsAppConversationDetailRecord'; + }; + WhatsAppDetailRecord: { + /** + * @description WhatsApp Message Id + * @example gBOGyfgaqtrewgpRTGqKuHKaTRhP + */ + id?: string; + /** + * @description WhatsApp API Version + * @example v0.1.0 + */ + version?: string; + /** + * @description WhatsApp Sender Id + * @example 18336512500 + */ + sender_id?: string; + /** + * @description WhatsApp Recipient Id + * @example 18336512500 + */ + recipient_id?: string; + /** + * @description WhatsApp Message Type. Consult WhatsApp API documentation to see all available types + * @example session + * @enum {string} + */ + message_type?: 'session' | 'template'; + /** + * @description WhatsApp Message Status. Consult WhatsApp API documentation to see all available status + * @example delivered + * @enum {string} + */ + message_status?: 'sent' | 'delivered' | 'read' | 'failed' | 'deleted'; + /** + * @description Logical direction of the message from the Telnyx customer's perspective. It's inbound when the Telnyx customer receives the message, or outbound otherwise + * @example inbound + * @enum {string} + */ + direction?: 'inbound' | 'outbound'; + /** + * @description CLDR two-letter region-code of recipient + * @example US + */ + recipient_region_code?: string; + /** + * @description Telnyx account currency used to describe monetary values, including billing cost + * @example USD + */ + currency?: string; + /** + * @description A string representing Whatsapp error code. Consult WhatsApp API documentation to see all available error codes + * @example 490 + */ + whatsapp_error_code?: string; + /** + * Format: date-time + * @description UTC time when the message was created + * @example 2021-08-06T03:32:01.125Z + */ + created_at?: string; + /** + * Format: date-time + * @description UTC time when the webhook was received + * @example 2021-08-06T03:32:01.125Z + */ + webhook_received_at?: string; + /** + * @description UUID representation of the webhook unique identifier + * @example 3ca7bd3d-7d82-4e07-9df4-009123068320 + */ + webhook_id?: string; + /** + * @description Currency amount for Telnyx billing cost + * @example 0.003 + */ + telnyx_fee?: string; + /** + * @description Currency amount for WhatsApp cost + * @example 0.003 + */ + whatsapp_fee?: string; + /** + * @description Whatsapp Conversation ID + * @example f44ae083-c800-4433-baac-b439e5270aa4 + */ + conversation_id?: string; + /** + * @description Whatsapp Conversation Origin + * @enum {string} + */ + conversation_origin?: + | 'business_initiated' + | 'user_initiated' + | 'referral_conversion'; + /** + * @description Whatsapp Business Account ID + * @example 421452453 + */ + whatsapp_business_account_id?: string; + /** + * @description discriminator enum property added by openapi-typescript + * @enum {string} + */ + record_type: 'WhatsAppDetailRecord'; + }; + WireguardInterface: components['schemas']['Record'] & + components['schemas']['Interface'] & { + /** + * @description Identifies the type of the resource. + * @example wireguard_interface + */ + readonly record_type?: string; + /** + * @description The Telnyx WireGuard peers `Peer.endpoint` value. + * @example 203.0.113.0:51871 + */ + readonly endpoint?: string; + /** + * @description The Telnyx WireGuard peers `Peer.PublicKey`. + * @example qF4EqlZq+5JL2IKYY8ij49daYyfKVhevJrcDxdqC8GU= + */ + readonly public_key?: string; + /** + * @description Enable SIP traffic forwarding over VPN interface. + * @example false + */ + enable_sip_trunking?: boolean; + }; + WireguardInterfaceCreate: components['schemas']['WireguardInterface'] & + components['schemas']['RegionIn'] & + Record; + WireguardInterfaceRead: components['schemas']['WireguardInterface'] & + components['schemas']['RegionOut']; + WireguardPeer: components['schemas']['Record'] & + components['schemas']['WireguardPeerPatch'] & { + /** + * @description Identifies the type of the resource. + * @example wireguard_peer + */ + readonly record_type?: string; + /** + * @description ISO 8601 formatted date-time indicating when peer sent traffic last time. + * @example 2018-02-02T22:25:27.521Z + */ + readonly last_seen?: string; + /** + * Format: uuid + * @description The id of the wireguard interface associated with the peer. + * @example 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + */ + wireguard_interface_id?: string; + /** + * @description Your WireGuard `Interface.PrivateKey`.

This attribute is only ever utlised if, on POST, you do NOT provide your own `public_key`. In which case, a new Public and Private key pair will be generated for you. When your `private_key` is returned, you must save this immediately as we do not save it within Telnyx. If you lose your Private Key, it can not be recovered. + * @example qF4EqlZq+5JL2IKYY8ij49daYyfKVhevJrcDxdqC8GU= + */ + readonly private_key?: string; + }; + WireguardPeerAllowedIP: components['schemas']['Record'] & { + /** + * @description Identifies the type of the resource. + * @example wireguard_allowed_ip + */ + readonly record_type?: string; + /** + * @description The IP address to add to the Wireguard Interface's AllowedIP list. + * @example 198.51.100.1 + */ + ip_address?: string; + }; + WireguardPeerAllowedIPCreate: components['schemas']['WireguardPeerAllowedIP'] & + Record; + WireguardPeerCreate: components['schemas']['WireguardPeer'] & + Record; + /** WireguardPeerPatch */ + WireguardPeerPatch: { + /** + * @description The WireGuard `PublicKey`.

If you do not provide a Public Key, a new Public and Private key pair will be generated for you. + * @example qF4EqlZq+5JL2IKYY8ij49daYyfKVhevJrcDxdqC8GU= + */ + public_key?: string; + }; + /** + * WirelessConnectivityLog + * @description This object represents a wireless connectivity session log that happened through a SIM card. It aids in finding out potential problems when the SIM is not able to attach properly. + */ + WirelessConnectivityLog: { + /** @example wireless_connectivity_log */ + readonly record_type?: string; + /** + * @description Uniquely identifies the session. + * @example 137509451 + */ + readonly id?: number; + /** + * Format: uuid + * @description The identification UUID of the related SIM card resource. + * @example 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + */ + sim_card_id?: string; + /** + * @description The type of the session, 'registration' being the initial authentication session and 'data' the actual data transfer sessions. + * @example registration + * @enum {string} + */ + readonly log_type?: 'registration' | 'data'; + /** + * @description SIM cards are identified on their individual network operators by a unique International Mobile Subscriber Identity (IMSI).
+ * Mobile network operators connect mobile phone calls and communicate with their market SIM cards using their IMSIs. The IMSI is stored in the Subscriber Identity Module (SIM) inside the device and is sent by the device to the appropriate network. It is used to acquire the details of the device in the Home Location Register (HLR) or the Visitor Location Register (VLR). + * + * @example 081932214823362973 + */ + readonly imsi?: string; + /** + * @description The International Mobile Equipment Identity (or IMEI) is a number, usually unique, that identifies the device currently being used connect to the network. + * @example 490154203237518 + */ + readonly imei?: string; + /** + * @description It's a three decimal digit that identifies a country.

+ * This code is commonly seen joined with a Mobile Network Code (MNC) in a tuple that allows identifying a carrier known as PLMN (Public Land Mobile Network) code. + * @example 310 + */ + readonly mobile_country_code?: string; + /** + * @description It's a two to three decimal digits that identify a network.

+ * This code is commonly seen joined with a Mobile Country Code (MCC) in a tuple that allows identifying a carrier known as PLMN (Public Land Mobile Network) code. + * @example 410 + */ + readonly mobile_network_code?: string; + /** + * @description ISO 8601 formatted date-time indicating when the session started. + * @example 2018-02-02T22:25:27.521Z + */ + readonly start_time?: string; + /** + * @description ISO 8601 formatted date-time indicating when the session ended. + * @example 2018-02-02T22:25:27.521Z + */ + readonly stop_time?: string; + /** + * @description ISO 8601 formatted date-time indicating when the record was created. + * @example 2018-02-02T22:25:27.521Z + */ + readonly created_at?: string; + /** + * @description ISO 8601 formatted date-time indicating when the last heartbeat to the device was successfully recorded. + * @example 2018-02-02T22:25:27.521Z + */ + readonly last_seen?: string; + /** + * @description The Access Point Name (APN) identifies the packet data network that a mobile data user wants to communicate with. + * @example data00.telnyx + */ + readonly apn?: string; + /** + * @description The SIM's address in the currently connected network. This IPv4 address is usually obtained dynamically, so it may vary according to the location or new connections. + * + * @example 192.168.0.0 + */ + readonly ipv4?: string; + /** + * @description The SIM's address in the currently connected network. This IPv6 address is usually obtained dynamically, so it may vary according to the location or new connections. + * + * @example 2001:cdba:0000:0000:0000:0000:3257:9652 + */ + readonly ipv6?: string; + /** + * @description The radio technology the SIM card used during the session. + * @example LTE + */ + readonly radio_access_technology?: string; + /** + * @description The state of the SIM card after when the session happened. + * @example provisioned + */ + readonly state?: string; + /** + * @description The cell ID to which the SIM connected. + * @example 311210-6813 + */ + readonly cell_id?: string; + }; + WirelessCost: { + /** + * @description Final cost. Cost is calculated as rate * unit + * @example 0.1 + */ + amount?: string; + /** + * @description Currency of the rate and cost + * @example USD + * @enum {string} + */ + currency?: 'AUD' | 'CAD' | 'EUR' | 'GBP' | 'USD'; + }; + WirelessRate: { + /** + * @description Rate from which cost is calculated + * @example 0.1 + */ + amount?: string; + /** + * @description Currency of the rate and cost + * @example USD + * @enum {string} + */ + currency?: 'AUD' | 'CAD' | 'EUR' | 'GBP' | 'USD'; + }; + /** + * @description The active status of the authentication provider + * @default true + * @example true + */ + active: boolean; + /** + * @description Indicates whether or not the address should be considered part of your list of addresses that appear for regular use. + * @default true + * @example false + */ + address_book: boolean; + /** + * @description The locality of the address. For US addresses, this corresponds to the state of the address. + * @example IL + */ + administrative_area: string; + /** + * @description Webhook delivery attempt details. + * @example [ + * { + * "status": "delivered", + * "started_at": "2020-08-10T14:00:05.364Z", + * "finished_at": "2020-08-10T14:00:05.595Z", + * "http": { + * "request": { + * "url": "https://fallback.example.com/webhooks", + * "headers": [ + * "Accept: *\/*" + * ] + * }, + * "response": { + * "status": 200, + * "headers": [ + * "Content-Type: text/html" + * ], + * "body": "All good." + * } + * } + * }, + * { + * "status": "failed", + * "started_at": "2020-08-10T14:00:05.004Z", + * "finished_at": "2020-08-10T14:00:05.360Z", + * "http": { + * "request": { + * "url": "https://typo.example.com/webhooks", + * "headers": [ + * "Accept: *\/*" + * ] + * }, + * "response": { + * "status": 404, + * "headers": [ + * "Content-Type: text/html", + * "Pragma: no-cache" + * ], + * "body": "Oops. Not found." + * } + * }, + * "errors": [ + * { + * "code": "75499", + * "title": "Webhook host returned HTTP 4XX", + * "detail": "The server returned another HTTP 4XX error" + * } + * ] + * }, + * { + * "status": "failed", + * "started_at": "2020-08-10T14:00:00.000Z", + * "finished_at": "2020-08-10T14:00:05.000Z", + * "http": { + * "request": { + * "url": "https://slow.example.com/webhooks", + * "headers": [ + * "Accept: *\/*" + * ] + * }, + * "reponse": null + * }, + * "errors": [ + * { + * "code": "75001", + * "title": "Could not resolve name", + * "detail": "Unable to resolve the webhook URL domain name" + * } + * ] + * } + * ] + */ + attempt: { + /** @enum {string} */ + status?: 'delivered' | 'failed'; + /** + * Format: date-time + * @description ISO 8601 timestamp indicating when the attempt was initiated. + */ + started_at?: string; + /** + * Format: date-time + * @description ISO 8601 timestamp indicating when the attempt has finished. + */ + finished_at?: string; + http?: components['schemas']['http']; + /** @description Webhook delivery error codes. */ + errors?: number[]; + }; + /** + * @description The borough of the address. This field is not used for addresses in the US but is used for some international addresses. + * @example Guadalajara + */ + borough: string; + /** + * @description The business name associated with the address. An address must have either a first last name or a business name. + * @example Toy-O'Kon + */ + business_name: string; + /** + * Call Recording Error + * @example { + * "record_type": "event", + * "event_type": "call.recording.error", + * "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + * "occurred_at": "2018-02-02T22:25:27.521992Z", + * "payload": { + * "connection_id": "7267xxxxxxxxxxxxxx", + * "call_leg_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + * "call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + * "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + * "result": "Internal server error" + * } + * } + */ + callRecordingError: { + /** + * @description Identifies the type of the resource. + * @example event + * @enum {string} + */ + record_type?: 'event'; + /** + * @description The type of event being delivered. + * @example call.recording.error + * @enum {string} + */ + event_type?: 'call.recording.error'; + /** + * Format: uuid + * @description Identifies the type of resource. + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + */ + id?: string; + /** + * Format: date-time + * @description ISO 8601 datetime of when the event occurred. + * @example 2018-02-02T22:25:27.521992Z + */ + occurred_at?: string; + payload?: { + /** + * @description Call ID used to issue commands via Call Control API. + * @example v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg + */ + call_control_id?: string; + /** + * @description Call Control App ID (formerly Telnyx connection ID) used in the call. + * @example 7267xxxxxxxxxxxxxx + */ + connection_id?: string; + /** + * @description ID that is unique to the call and can be used to correlate webhook events. + * @example 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + */ + call_leg_id?: string; + /** + * @description ID that is unique to the call session and can be used to correlate webhook events. Call session is a group of related call legs that logically belong to the same phone call, e.g. an inbound and outbound leg of a transferred call. + * @example 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + */ + call_session_id?: string; + /** + * @description State received from a command. + * @example aGF2ZSBhIG5pY2UgZGF5ID1d + */ + client_state?: string; + /** + * @description Indication that there was a problem recording the call. + * @example Internal server error + * @enum {string} + */ + reason?: + | 'Failed to authorize with storage using custom credentials' + | 'Invalid credentials json' + | 'Unsupported backend' + | 'Internal server error'; + }; + }; + /** Call Recording Error Event */ + callRecordingErrorEvent: { + data?: components['schemas']['callRecordingError']; + }; + /** + * @description The two-character (ISO 3166-1 alpha-2) country code of the address. + * @example US + */ + country_code: string; + /** + * @description A customer reference string for customer look ups. + * @example MY REF 001 + */ + customer_reference: string; + error: { + /** Format: int */ + code?: string; + title?: string; + detail?: string; + }; + /** + * @description Additional street address information about the address such as, but not limited to, unit number or apartment number. + * @example #504 + */ + extended_address: string; + /** + * @description The first name associated with the address. An address must have either a first last name or a business name. + * @example Alfred + */ + first_name: string; + /** @description HTTP request and response information. */ + http: { + /** @description Request details. */ + request?: { + /** @example https://example.com/webhooks */ + url?: string; + headers?: components['schemas']['http_headers']; + }; + /** @description Response details, optional. */ + response?: { + /** @example 200 */ + status?: number; + headers?: components['schemas']['http_headers']; + /** @description Raw response body, limited to 10kB. */ + body?: string; + } | null; + }; + /** + * @description List of headers, limited to 10kB. + * @example [ + * [ + * "header_name", + * "header_value" + * ] + * ] + */ + http_headers: string[][]; + /** + * @description The last name associated with the address. An address must have either a first last name or a business name. + * @example Foster + */ + last_name: string; + /** + * @description The locality of the address. For US addresses, this corresponds to the city of the address. + * @example Chicago + */ + locality: string; + /** + * @description The name associated with the authentication provider. + * @example Okta + */ + name: string; + /** + * @description The neighborhood of the address. This field is not used for addresses in the US but is used for some international addresses. + * @example Ciudad de los deportes + */ + neighborhood: string; + /** + * Format: uuid + * @description The id from the Organization the authentication provider belongs to. + * @example 24b4a4bb-c4df-46ad-bbcb-23fc741c5ad7 + */ + organization_id: string; + /** + * @description The phone number associated with the address. + * @example +12125559000 + */ + phone_number: string; + /** + * @description The postal code of the address. + * @example 60654 + */ + postal_code: string; + /** @description The settings associated with the authentication provider. */ + settings: { + /** + * @description The Entity ID for the identity provider (IdP). + * @example https://myorg.myidp.com/saml/metadata + */ + idp_entity_id: string; + /** + * @description The SSO target url for the identity provider (IdP). + * @example https://myorg.myidp.com/trust/saml2/http-post/sso + */ + idp_sso_target_url: string; + /** + * @description The certificate fingerprint for the identity provider (IdP) + * @example 13:38:C7:BB:C9:FF:4A:70:38:3A:E3:D9:5C:CD:DB:2E:50:1E:80:A7 + */ + idp_cert_fingerprint: string; + /** + * @description The algorithm used to generate the identity provider's (IdP) certificate fingerprint + * @default sha1 + * @example sha256 + * @enum {string} + */ + idp_cert_fingerprint_algorithm: 'sha1' | 'sha256' | 'sha384' | 'sha512'; + }; + /** + * @description The URL for the identity provider metadata file to populate the settings automatically. If the settings attribute is provided, that will be used instead. + * @example https://myorg.myidp.com/saml/metadata + */ + settings_url: string; + /** + * @description The short name associated with the authentication provider. This must be unique and URL-friendly, as it's going to be part of the login URL. + * @example myorg + */ + short_name: string; + /** + * @description The primary street address information about the address. + * @example 311 W Superior Street + */ + street_address: string; + /** + * @description Indicates whether or not the address should be validated for emergency use upon creation or not. This should be left with the default value of `true` unless you have used the `/addresses/actions/validate` endpoint to validate the address separately prior to creation. If an address is not validated for emergency use upon creation and it is not valid, it will not be able to be used for emergency services. + * @default true + * @example true + */ + validate_address: boolean; + /** @description Record of all attempts to deliver a webhook. */ + webhook_delivery: { + /** + * Format: uuid + * @description Uniquely identifies the webhook_delivery record. + * @example f5586561-8ff0-4291-a0ac-84fe544797bd + */ + id?: string; + /** + * Format: uuid + * @description Uniquely identifies the user that owns the webhook_delivery record. + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + */ + user_id?: string; + /** + * @description Identifies the type of the resource. + * @example webhook_delivery + */ + record_type?: string; + /** + * @description Delivery status: 'delivered' when successfuly delivered or 'failed' if all attempts have failed. + * @enum {string} + */ + status?: 'delivered' | 'failed'; + /** + * @description Original webhook JSON data. Payload fields vary according to event type. + * @example { + * "record_type": "event", + * "id": "C9C0797E-901D-4349-A33C-C2C8F31A92C2", + * "event_type": "call_initiated", + * "occurred_at": "2020-08-10T13:02:01.000Z", + * "payload": { + * "useful": "information" + * } + * } + */ + webhook?: { + /** + * @description Identifies the type of the resource. + * @example event + * @enum {string} + */ + record_type?: 'event'; + /** + * @description The type of event being delivered. + * @example webhook.command + */ + event_type?: string; + /** + * Format: uuid + * @description Identifies the type of resource. + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + */ + id?: string; + /** + * Format: date-time + * @description ISO 8601 datetime of when the event occurred. + * @example 2018-02-02T22:25:27.521992Z + */ + occurred_at?: string; + payload?: Record; + }; + /** + * Format: date-time + * @description ISO 8601 timestamp indicating when the first request attempt was initiated. + * @example 2020-08-10T14:00:00.000Z + */ + started_at?: string; + /** + * Format: date-time + * @description ISO 8601 timestamp indicating when the last webhook response has been received. + * @example 2020-08-10T14:00:05.595Z + */ + finished_at?: string; + /** + * @description Detailed delivery attempts, ordered by most recent. + * @example [ + * { + * "status": "delivered", + * "started_at": "2020-08-10T14:00:05.364Z", + * "finished_at": "2020-08-10T14:00:05.595Z", + * "http": { + * "request": { + * "url": "https://fallback.example.com/webhooks", + * "headers": [ + * "Accept: *\/*" + * ] + * }, + * "response": { + * "status": 200, + * "headers": [ + * "Content-Type: text/html" + * ], + * "body": "All good." + * } + * } + * }, + * { + * "status": "failed", + * "started_at": "2020-08-10T14:00:05.004Z", + * "finished_at": "2020-08-10T14:00:05.360Z", + * "http": { + * "request": { + * "url": "https://typo.example.com/webhooks", + * "headers": [ + * "Accept: *\/*" + * ] + * }, + * "response": { + * "status": 404, + * "headers": [ + * "Content-Type: text/html", + * "Pragma: no-cache" + * ], + * "body": "Oops. Not found." + * } + * }, + * "errors": [ + * { + * "code": "75499", + * "title": "Webhook host returned HTTP 4XX", + * "detail": "The server returned another HTTP 4XX error" + * } + * ] + * } + * ] + */ + attempts?: components['schemas']['attempt'][]; + }; + }; + responses: { + /** @description Success Action Response */ + ActionSuccessResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: { + /** @example ok */ + result?: string; + }; + }; + }; + }; + /** @description Successful response with list of details about active calls. */ + ActiveCallsResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['ActiveCall'][]; + meta?: components['schemas']['CursorPaginationMeta']; + }; + }; + }; + /** @description Successful response */ + AddressResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['Address']; + }; + }; + }; + /** @description Successful response */ + AuthenticationProviderResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['AuthenticationProvider']; + }; + }; + }; + /** @description Successful response */ + AutoRechargePrefResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['AutoRechargePref']; + }; + }; + }; + /** @description Bad request, the request was unacceptable, often due to missing a required parameter. */ + BadRequestResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['ErrorResponse']; + }; + }; + /** @description Bucket Usage */ + BucketAPIUsageResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['BucketAPIUsageResponse'][]; + }; + }; + }; + /** @description Bucket Storage Usage */ + BucketUsageResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['BucketUsage'][]; + meta?: components['schemas']['PaginationMetaSimple']; + }; + }; + }; + /** @description Successful response for Bulk credential requests */ + BulkCredentialResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: { + /** + * @description Amount of credentials affected + * @example 0 + */ + credentials?: number; + }; + }; + }; + }; + /** @description Successful response for Bulk Delete Room recordings requests */ + BulkDeleteRoomRecordingsResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: { + /** + * @description Amount of room recordings affected + * @example 5 + */ + room_recordings?: number; + }; + }; + }; + }; + /** @description Successful response with details about messaging bulk update phone numbers. */ + BulkMessagingSettingsUpdatePhoneNumbersResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['BulkMessagingSettingsUpdatePhoneNumbers']; + }; + }; + }; + /** @description Successful Response */ + BulkSIMCardActionCollectionResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['BulkSIMCardActionDetailed'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful Response */ + BulkSIMCardActionDetailedResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['BulkSIMCardActionDetailed']; + }; + }; + }; + /** @description Successful Response */ + BulkSIMCardActionResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['BulkSIMCardAction']; + }; + }; + }; + BulkSIMCardNetworkPreferenceResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + /** @description Multi requested SIM cards network preferences. */ + data?: components['schemas']['SIMCardNetworkPreferenceWithOTAUpdates'][]; + errors?: components['schemas']['Error'][]; + }; + }; + }; + /** @description Successful response */ + BulkUploadDocServiceDocumentsResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['DocServiceDocument'][]; + }; + }; + }; + /** @description Successful response with details about a call control application. */ + CallControlApplicationResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['CallControlApplication']; + }; + }; + }; + /** @description Successful response upon making a call control command. */ + CallControlCommandResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['CallControlCommandResult']; + }; + }; + }; + /** @description Successful response upon accepting cancel fax command */ + CancelFaxResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + /** @example ok */ + result?: string; + }; + }; + }; + /** @description Successful response */ + CancelPortingOrderResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['PortingOrder']; + meta?: { + /** @description Link to list all phone numbers */ + phone_numbers_url?: string; + }; + }; + }; + }; + /** @description A Comment Response */ + CommentResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['Comment'] & Record; + }; + }; + }; + /** @description Successful response upon making a conference command. */ + ConferenceCommandResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['ConferenceCommandResult']; + }; + }; + }; + /** @description Successful response with details about a conference. */ + ConferenceResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['Conference']; + }; + }; + }; + /** @description Successful response */ + ConfirmPortingOrderResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['PortingOrder']; + meta?: { + /** @description Link to list all phone numbers */ + phone_numbers_url?: string; + }; + }; + }; + }; + /** @description Successful response with details about a connection. */ + ConnectionResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['Connection']; + }; + }; + }; + /** @description Response for country coverage */ + CountryCoverageResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['CountryCoverage'][]; + }; + }; + }; + /** @description Expected billing group response to a valid request */ + CreateBillingGroupResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['BillingGroup']; + }; + }; + }; + /** @description Successful Response */ + CreateCustomerServiceRecord: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['CustomerServiceRecord']; + }; + }; + }; + /** @description Expected ledger billing group report response to a valid request */ + CreateLedgerBillingGroupReportResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['LedgerBillingGroupReport']; + }; + }; + }; + /** @description Portout Supporting Documents */ + CreatePortOutSupportingDocumentsResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['PortOutSupportingDocument'][]; + }; + }; + }; + /** @description Successful response */ + CreatePortingAdditionalDocuments: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['PortingAdditionalDocument'][]; + }; + }; + }; + /** @description Successful response */ + CreatePortingLOAConfiguration: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['PortingLOAConfiguration']; + }; + }; + }; + /** @description Successful response */ + CreatePortingPhoneNumberConfigurations: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['PortingPhoneNumberConfiguration'][]; + }; + }; + }; + /** @description Successful response */ + CreatePortingReport: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['PortingReport']; + }; + }; + }; + /** @description Successful response */ + CreatePortoutReport: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['PortoutReport']; + }; + }; + }; + /** @description Successful Response */ + CreatePrivateWirelessGatewayResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['PrivateWirelessGateway']; + }; + }; + }; + /** @description Create room client token response. */ + CreateRoomClientTokenResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + /** @example { + * "token": "eyJhbGciOiJFZDI1NTE5IiwidHlwIjoiSldUIn0.eyJhdWQiOiJ0ZWxueXhfYWNjZXNzX3Rva2VuIiwiZXhwIjoxNjE5MDk0Mjk1LCJncmFudHMiOlt7ImFjdGlvbnMiOlsiam9pbiJdLCJyZXNvdXJjZXMiOlsidGVsbnl4OnZpZGVvOnJvb21zOjllMmEwY2JlLWNlNjYtNDExZS1hMWFjLTQ2OGYwYjEwM2M5YSJdLCJzdWJqZWN0cyI6WyJ0ZWxueXg6dXNlcnM6NzgyYjJjYmUtODQ2Ni00ZTNmLWE0ZDMtOTc4MWViNTc3ZTUwIl19XSwiZ3JhbnRzX3ZlcnNpb24iOiIxLjAuMCIsImlhdCI6MTYxOTA5MzY5NSwiaXNzIjoidGVsbnl4X2FjY2Vzc190b2tlbiIsImp0aSI6IjllNjIyOTA2LTc1ZTctNDBiNi1iOTAwLTc1NGIxZjNlZDMyZiIsIm5iZiI6MTYxOTA5MzY5NCwic3ViIjoibnVsbCIsInR5cCI6ImFjY2VzcyJ9.1JGK9PyHkTtoP_iMu-8TzXH_fhmnsDtZZOAJLDzLW6DDtAb80wZ93l1VH5yNx5tFqwIFG0t48dRiBKWlW-nzDA", + * "token_expires_at": "2021-04-22T12:24:55Z", + * "refresh_token": "eyJhbGciOiJFZDI1NTE5IiwidHlwIjoiSldUIn0.eyJhdWQiOiJ0ZWxueXhfYWNjZXNzX3Rva2VuIiwiZXhwIjoxNjE5MDkzNzA1LCJncmFudHMiOlt7ImFjdGlvbnMiOlsiam9pbiJdLCJyZXNvdXJjZXMiOlsidGVsbnl4OnZpZGVvOnJvb21zOjllMmEwY2JlLWNlNjYtNDExZS1hMWFjLTQ2OGYwYjEwM2M5YSJdLCJzdWJqZWN0cyI6WyJ0ZWxueXg6dXNlcnM6NzgyYjJjYmUtODQ2Ni00ZTNmLWE0ZDMtOTc4MWViNTc3ZTUwIl19XSwiZ3JhbnRzX3ZlcnNpb24iOiIxLjAuMCIsImlhdCI6MTYxOTA5MzY5NSwiaXNzIjoidGVsbnl4X2FjY2Vzc190b2tlbiIsImp0aSI6ImQ3OWJlMzhjLWFkNTQtNGQ5ZC1hODc4LWExNjVjNTk0MGQwNyIsIm5iZiI6MTYxOTA5MzY5NCwic3ViIjoibnVsbCIsInR5cCI6InJlZnJlc2gifQ.FHsp7KlVXn1E5tTUiKZzmQ4of39gi57AakeQeqI0oAa8hzjFMVb0RGj-mxWTvHVen4GpgsUW_epqqaxK16viCA", + * "refresh_token_expires_at": "2021-04-22T12:15:05Z" + * } */ + data?: { + /** + * Format: jwt + * @example eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJ0ZWxueXhfdGVsZXBob255IiwiZXhwIjoxNTkwMDEwMTQzLCJpYXQiOjE1ODc1OTA5NDMsImlzcyI6InRlbG55eF90ZWxlcGhvbnkiLCJqdGkiOiJiOGM3NDgzNy1kODllLTRhNjUtOWNmMi0zNGM3YTZmYTYwYzgiLCJuYmYiOjE1ODc1OTA5NDIsInN1YiI6IjVjN2FjN2QwLWRiNjUtNGYxMS05OGUxLWVlYzBkMWQ1YzZhZSIsInRlbF90b2tlbiI6InJqX1pra1pVT1pNeFpPZk9tTHBFVUIzc2lVN3U2UmpaRmVNOXMtZ2JfeENSNTZXRktGQUppTXlGMlQ2Q0JSbWxoX1N5MGlfbGZ5VDlBSThzRWlmOE1USUlzenl6U2xfYURuRzQ4YU81MHlhSEd1UlNZYlViU1ltOVdJaVEwZz09IiwidHlwIjoiYWNjZXNzIn0.gNEwzTow5MLLPLQENytca7pUN79PmPj6FyqZWW06ZeEmesxYpwKh0xRtA0TzLh6CDYIRHrI8seofOO0YFGDhpQ + */ + token?: string; + /** + * Format: datetime + * @description ISO 8601 timestamp when the token expires. + * @example 2021-03-26T17:51:59Z + */ + token_expires_at?: string; + /** + * Format: jwt + * @example eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJ0ZWxueXhfdGVsZXBob255IiwiZXhwIjoxNTkwMDEwMTQzLCJpYXQiOjE1ODc1OTA5NDMsImlzcyI6InRlbG55eF90ZWxlcGhvbnkiLCJqdGkiOiJiOGM3NDgzNy1kODllLTRhNjUtOWNmMi0zNGM3YTZmYTYwYzgiLCJuYmYiOjE1ODc1OTA5NDIsInN1YiI6IjVjN2FjN2QwLWRiNjUtNGYxMS05OGUxLWVlYzBkMWQ1YzZhZSIsInRlbF90b2tlbiI6InJqX1pra1pVT1pNeFpPZk9tTHBFVUIzc2lVN3U2UmpaRmVNOXMtZ2JfeENSNTZXRktGQUppTXlGMlQ2Q0JSbWxoX1N5MGlfbGZ5VDlBSThzRWlmOE1USUlzenl6U2xfYURuRzQ4YU81MHlhSEd1UlNZYlViU1ltOVdJaVEwZz09IiwidHlwIjoiYWNjZXNzIn0.gNEwzTow5MLLPLQENytca7pUN79PmPj6FyqZWW06ZeEmesxYpwKh0xRtA0TzLh6CDYIRHrI8seofOO0YFGDhpQ + */ + refresh_token?: string; + /** + * Format: datetime + * @description ISO 8601 timestamp when the refresh token expires. + * @example 2021-03-26T17:51:59Z + */ + refresh_token_expires_at?: string; + }; + }; + }; + }; + /** @description Create room composition response. */ + CreateRoomCompositionResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['RoomComposition']; + }; + }; + }; + /** @description Create room response. */ + CreateRoomResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['Room']; + }; + }; + }; + /** @description Successful Response */ + CreateSimCardDataUsageNotificationResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['SimCardDataUsageNotification']; + }; + }; + }; + /** @description Successful Response */ + CreateSimCardGroupResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['SIMCardGroup']; + }; + }; + }; + /** @description Successful Response */ + CreateSimCardOrderResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['SIMCardOrder']; + }; + }; + }; + /** @description Successful response upon creating a TeXML secret. */ + CreateTeXMLSecretResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['CreateTeXMLSecretResult']; + }; + }; + }; + /** @description Successful response */ + CreateWdrReportResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['WdrReport']; + }; + }; + }; + /** @description Successful response with details about a credential connection. */ + CredentialConnectionResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['CredentialConnection']; + }; + }; + }; + /** @description A response with credentials resource. */ + CredentialsResponseBody: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['CredentialsResponse']; + }; + }; + /** @description Successful response with details about a CSV download. */ + CsvDownloadResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['CsvDownload'][]; + }; + }; + }; + /** @description A successful network preferences deletion response.

+ * The delete won't be done right away - this is an asynchronous operation. The request will return the resource with an in-progress OTA update resource (in the ota_updates node) representing the delete operation. Similarly to the PUT API, the resource will only be deleted when the OTA updated is successfully completed. */ + DELETESIMCardNetworkPreferenceResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['SIMCardNetworkPreferenceWithOTAUpdates']; + }; + }; + }; + /** @description Successful response */ + DefaultGatewayResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['DefaultGateway'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Expected billing group response to a valid request */ + DeleteBillingGroupResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['BillingGroup']; + }; + }; + }; + /** @description Successful response with details about a phone number. */ + DeletePhoneNumberResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['PhoneNumberDeletedDetailed']; + }; + }; + }; + /** @description Successful Response */ + DeletePrivateWirelessGatewayResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['PrivateWirelessGateway']; + }; + }; + }; + /** @description Successful Response */ + DeleteSimCardDataUsageNotificationResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['SimCardDataUsageNotification']; + }; + }; + }; + /** @description Successful Response */ + DeleteSimCardGroupResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['SIMCardGroup']; + }; + }; + }; + /** @description Successful response */ + DeleteSimCardResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['SIMCard']; + }; + }; + }; + /** @description Successful response */ + DeleteWdrReportResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['WdrReport']; + }; + }; + }; + /** @description New participant resource. */ + DialParticipantResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['NewParticipantResource']; + }; + }; + /** @description Return details of the Dialogflow connection associated with the given CallControl connection. */ + DialogflowConnectionResponseBody: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['DialogflowConnectionResponse']; + }; + }; + /** @description Successful response */ + DocReqsListRequirementTypesResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['DocReqsRequirementTypeList']; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful response */ + DocReqsRequirementResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['DocReqsRequirement']; + }; + }; + }; + /** @description Successful response */ + DocReqsRequirementTypeResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['DocReqsRequirementType']; + }; + }; + }; + /** @description Successful response */ + DocServiceDocumentResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['DocServiceDocument']; + }; + }; + }; + /** @description Successful response */ + DownloadDocServiceDocumentResponse: { + headers: { + [name: string]: unknown; + }; + content: { + '*': string; + }; + }; + /** @description Successful response */ + DownloadLOATemplate: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/pdf': string; + }; + }; + /** @description Dynamic Emergency Address Response */ + DynamicEmergencyAddressResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['DynamicEmergencyAddress']; + }; + }; + }; + /** @description Dynamic Emergency Endpoint Response */ + DynamicEmergencyEndpointResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['DynamicEmergencyEndpoint']; + }; + }; + }; + /** @description Successful response */ + ExternalConnectionResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['ExternalConnection']; + }; + }; + }; + /** @description Successful response */ + FaxApplicationResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['FaxApplication']; + }; + }; + }; + /** @description Forbidden */ + Forbidden: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description You do not have permission to perform the requested action on the specified resource or resources. */ + ForbiddenErrorResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + errors?: components['schemas']['ForbiddenError'][]; + }; + }; + }; + /** @description Unauthorized response. Happens when the current user is not authorized to access the endpoint. */ + ForbiddenResponse: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Successful response with details about an FQDN connection. */ + FqdnConnectionResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['FqdnConnection']; + }; + }; + }; + /** @description Successful response with details about an FQDN connection. */ + FqdnResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['Fqdn']; + }; + }; + }; + /** @description Unexpected error */ + GenericErrorResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['Errors']; + }; + }; + /** @description Successful response */ + GetAllAddressResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['Address'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful response */ + GetAllAuthenticationProviderResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['AuthenticationProvider'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful response */ + GetAllCivicAddressesResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['CivicAddress'][]; + }; + }; + }; + /** @description Successful response */ + GetAllExternalConnectionResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['ExternalConnection'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful response */ + GetAllFaxApplicationsResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['FaxApplication'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful Response */ + GetAllPrivateWirelessGatewaysResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['PrivateWirelessGateway'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful Response */ + GetAllSimCardGroupsResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['SearchedSIMCardGroup'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful Response */ + GetAllSimCardOrdersResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['SIMCardOrder'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful response with multiple credentials */ + GetAllTelephonyCredentialResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['TelephonyCredential'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful response */ + GetAllTexmlApplicationsResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['TexmlApplication'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Call resource. */ + GetCallResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['CallResource']; + }; + }; + /** @description Multiple call resources. */ + GetCallsResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['CallResourceIndex']; + }; + }; + /** @description Successful response */ + GetCivicAddressResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['CivicAddress']; + }; + }; + }; + /** @description Multiple conference recording resources. */ + GetConferenceRecordingsResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['ConferenceRecordingResourceIndex']; + }; + }; + /** @description Conference resource. */ + GetConferenceResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['ConferenceResource']; + }; + }; + /** @description Multiple conference resources. */ + GetConferencesResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['ConferenceResourceIndex']; + }; + }; + /** @description Successful response */ + GetExternalConnectionPhoneNumberResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['ExternalConnectionPhoneNumber']; + }; + }; + }; + /** @description Get fax response */ + GetFaxResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['Fax']; + }; + }; + }; + /** @description Requested channel zone */ + GetGcbChannelZoneRequestResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['GcbChannelZone']; + }; + }; + /** @description A list of channel zones */ + GetGcbChannelZonesRequestResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['GcbChannelZone'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description A list of phone numbers */ + GetGcbPhoneNumbersRequestResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['GcbPhoneNumber'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful response */ + GetLogMessageResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + log_messages?: components['schemas']['LogMessage'][]; + }; + }; + }; + /** @description Participant resource. */ + GetParticipantResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['ParticipantResource']; + }; + }; + /** @description Multiple participant resources. */ + GetParticipantsResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['ParticipantResourceIndex']; + }; + }; + /** @description Successful Response */ + GetPrivateWirelessGatewayResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['PrivateWirelessGateway']; + }; + }; + }; + /** @description Successful response */ + GetReleaseResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['Release']; + }; + }; + }; + /** @description Get room composition response. */ + GetRoomCompositionResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['RoomComposition']; + }; + }; + }; + /** @description Get room participant response. */ + GetRoomParticipantResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['RoomParticipant']; + }; + }; + }; + /** @description Get room recording response. */ + GetRoomRecordingResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['RoomRecording']; + }; + }; + }; + /** @description Get room response. */ + GetRoomResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['Room']; + }; + }; + }; + /** @description Get room session response. */ + GetRoomSessionResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['RoomSession']; + }; + }; + }; + /** @description Successful Response */ + GetSimCardDataUsageNotificationResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['SimCardDataUsageNotification']; + }; + }; + }; + /** @description Successful Response */ + GetSimCardGroupResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['SIMCardGroup']; + }; + }; + }; + /** @description Successful Response */ + GetSimCardOrderResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['SIMCardOrder']; + }; + }; + }; + /** @description Successful response */ + GetSimCardResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['SIMCard']; + }; + }; + }; + /** @description Successful response */ + GetUploadResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['Upload']; + }; + }; + }; + /** @description Successful response */ + GetUploadsStatusResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: { + /** @description The count of phone numbers that are pending assignment to the external connection. */ + pending_numbers_count?: number; + /** @description The count of number uploads that have not yet been uploaded to Microsoft. */ + pending_orders_count?: number; + }; + }; + }; + }; + /** @description Successful response */ + GetWdrReportResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['WdrReport']; + }; + }; + }; + /** @description Successful response */ + GetWdrReportsResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['WdrReport'][]; + }; + }; + }; + /** @description Successful response */ + GlobalIpAllowedPortListResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['GlobalIPAllowedPort'][]; + }; + }; + }; + /** @description Successful response */ + GlobalIpAssignmentListResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['GlobalIpAssignment'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful response */ + GlobalIpAssignmentResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['GlobalIpAssignment']; + }; + }; + }; + /** @description Successful response */ + GlobalIpAssignmentUsageResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['GlobalIpAssignmentUsageMetric'][]; + }; + }; + }; + /** @description Successful response */ + GlobalIpHealthCheckListResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['GlobalIPHealthCheck'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful response */ + GlobalIpHealthCheckResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['GlobalIPHealthCheck']; + }; + }; + }; + /** @description Successful response */ + GlobalIpHealthCheckTypesResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['GlobalIpHealthCheckType'][]; + }; + }; + }; + /** @description Successful response */ + GlobalIpHealthResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['GlobalIpAssignmentHealthMetric'][]; + }; + }; + }; + /** @description Successful response */ + GlobalIpLatencyResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['GlobalIpLatencyMetric'][]; + }; + }; + }; + /** @description Successful response */ + GlobalIpListResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['GlobalIP'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful response */ + GlobalIpProtocolListResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['GlobalIPProtocol'][]; + }; + }; + }; + /** @description Successful response */ + GlobalIpResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['GlobalIP']; + }; + }; + }; + /** @description Successful response */ + GlobalIpUsageResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['GlobalIpUsageMetric'][]; + }; + }; + }; + /** @description Successful response upon initiating a TeXML call. */ + InitiateCallResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['InitiateCallResult']; + }; + }; + /** @description Successful response with a list of inventory coverage levels */ + InventoryCoverageResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['InventoryCoverage'][]; + meta?: components['schemas']['InventoryCoverageMetadata']; + }; + }; + }; + /** @description Successful response with details about an IP connection. */ + IpConnectionResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['IpConnection']; + }; + }; + }; + /** @description Successful response with details about an IP. */ + IpResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['Ip']; + }; + }; + }; + /** @description Successful response */ + ListAllowedFocWindows: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['PortingOrdersAllowedFocWindow'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description List of audit log entries */ + ListAuditLogsResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['AuditLogEntry'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful response with a list of available phone numbers blocks. */ + ListAvailablePhoneNumbersBlockResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['AvailablePhoneNumberBlock'][]; + meta?: components['schemas']['AvailablePhoneNumbersMetadata']; + }; + }; + }; + /** @description Successful response with a list of available phone numbers. */ + ListAvailablePhoneNumbersResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['AvailablePhoneNumber'][]; + meta?: components['schemas']['AvailablePhoneNumbersMetadata']; + }; + }; + }; + /** @description A paginated array of billing groups */ + ListBillingGroupsResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['BillingGroup'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful response with a list of call control applications. */ + ListCallControlApplicationsResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['CallControlApplication'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful response with a list of call events. */ + ListCallEventsResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['CallEvent'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful response with a list of conferences. */ + ListConferencesResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['Conference'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful response with a list of connections. */ + ListConnectionsResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['Connection'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful response with a list of credential connections. */ + ListCredentialConnectionsResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['CredentialConnection'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful response with a list of CSV downloads. */ + ListCsvDownloadsResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['CsvDownload'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful Response */ + ListCustomerServiceRecordPhoneNumberCoverage: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['CustomerServiceRecordPhoneNumberCoverage'][]; + }; + }; + }; + /** @description Successful Response */ + ListCustomerServiceRecords: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['CustomerServiceRecord'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful response */ + ListDocServiceDocumentLinksResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['DocServiceDocumentLink'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful response */ + ListDocServiceDocumentsResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['DocServiceDocument'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful response */ + ListDraftPortingOrdersWithoutPagination: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['PortingOrder'][]; + }; + }; + }; + /** @description Successful response */ + ListExternalConnectionPhoneNumbersResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['ExternalConnectionPhoneNumber'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description List faxes response */ + ListFaxesResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['Fax'][]; + /** @example { + * "page_number": 2, + * "page_size": 1, + * "total_pages": 3, + * "total_results": 3 + * } */ + meta?: Record; + }; + }; + }; + /** @description Successful response with a list of FQDN connections. */ + ListFqdnConnectionsResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['FqdnConnection'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful response with a list of FQDN connections. */ + ListFqdnsResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['Fqdn'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful response with a list of IP connections. */ + ListIpConnectionsResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['IpConnection'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful response with a list of IPs. */ + ListIpsResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['Ip'][]; + }; + }; + }; + /** @description Successful response */ + ListLogMessagesResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + log_messages?: components['schemas']['LogMessage'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful response with information about allocatable global outbound channels. */ + ListManagedAccountsAllocatableGlobalOutboundChannelsResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['ManagedAccountsGlobalOutboundChannels']; + }; + }; + }; + /** @description Successful response with a list of managed accounts. */ + ListManagedAccountsResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['ManagedAccountMultiListing'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description A response with a list of media resources */ + ListMediaResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['MediaResource'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful response with a list of messaging hosted number orders. */ + ListMessagingHostedNumberOrdersResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['MessagingHostedNumberOrder'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful response with a list of messaging profile metrics. */ + ListMessagingProfileMetrics: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['MessagingProfileHighLevelMetrics'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful response with a list of messaging profile phone numbers. */ + ListMessagingProfilePhoneNumbersResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['PhoneNumberWithMessagingSettings'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful response with a list of messaging profile short codes. */ + ListMessagingProfileShortCodesResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['ShortCode'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful response with a list of messaging profiles. */ + ListMessagingProfilesResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['MessagingProfile'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful response with details about a messaging URL domain. */ + ListMessagingUrlDomains: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['MessagingUrlDomain'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description List Migrations Response */ + ListMigrationResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['MigrationParams'][]; + meta?: components['schemas']['PaginationMetaSimple']; + }; + }; + }; + /** @description List Migrations Source Coverage Response */ + ListMigrationSourceCoverageResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['MigrationSourceCoverageParams'][]; + meta?: components['schemas']['PaginationMetaSimple']; + }; + }; + }; + /** @description List Migration Sources Response */ + ListMigrationSourceResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['MigrationSourceParams'][]; + meta?: components['schemas']['PaginationMetaSimple']; + }; + }; + }; + /** @description Successful response with a list of number block orders. */ + ListNumberBlockOrdersResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['NumberBlockOrder'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful response with a list of number order documents. */ + ListNumberOrderDocumentsResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['NumberOrderDocument'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful response with a list of number order phone numbers. */ + ListNumberOrderPhoneNumbersResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['NumberOrderPhoneNumber'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful response with a list of number orders. */ + ListNumberOrdersResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['NumberOrder'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful response with a list of number reservations. */ + ListNumberReservationsResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['NumberReservation'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful response */ + ListOutboundVoiceProfilesResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['OutboundVoiceProfile'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful response with a list of conference participants. */ + ListParticipantsResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['Participant'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful response with a list of phone number blocks background jobs. */ + ListPhoneNumberBlocksJobsResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['PhoneNumberBlocksJob'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful response with a list of phone numbers background jobs. */ + ListPhoneNumbersJobsResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['PhoneNumbersJob'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful response with a list of phone numbers. */ + ListPhoneNumbersResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['PhoneNumberDetailed'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful response with a list of phone numbers with messaging settings. */ + ListPhoneNumbersWithMessagingSettingsResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['PhoneNumberWithMessagingSettings'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful response with a list of phone numbers with voice settings. */ + ListPhoneNumbersWithVoiceSettingsResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['PhoneNumberWithVoiceSettings'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful response */ + ListPortingAdditionalDocuments: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['PortingAdditionalDocument'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful response */ + ListPortingEventsResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['PortingEvent'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful response */ + ListPortingLOAConfigurations: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['PortingLOAConfiguration'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful response */ + ListPortingOrder: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['PortingOrder'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful response */ + ListPortingOrderRequirements: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['PortingOrderRequirementDetail'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful response */ + ListPortingOrdersActivationJobs: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['PortingOrdersActivationJob'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful response */ + ListPortingOrdersComments: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['PortingOrdersComment'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful response */ + ListPortingOrdersExceptionTypes: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['PortingOrdersExceptionType'][]; + }; + }; + }; + /** @description Successful response */ + ListPortingPhoneNumberBlocks: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['PortingPhoneNumberBlock'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful response */ + ListPortingPhoneNumberConfigurations: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['PortingPhoneNumberConfiguration'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful response */ + ListPortingPhoneNumberExtensions: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['PortingPhoneNumberExtension'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful response */ + ListPortingPhoneNumbers: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['PortingPhoneNumber'][]; + meta?: components['schemas']['PaginationMeta']; + }; + 'text/csv': string; + }; + }; + /** @description Successful response */ + ListPortingReports: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['PortingReport'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful response */ + ListPortingVerificationCodes: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['PortingVerificationCode'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Portout Comments */ + ListPortoutComments: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['PortoutComment'][]; + meta?: components['schemas']['Metadata']; + }; + }; + }; + /** @description Successful response */ + ListPortoutEventsResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['PortoutEvent'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful response */ + ListPortoutReports: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['PortoutReport'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Portout Response */ + ListPortoutResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['PortoutDetails'][]; + meta?: components['schemas']['Metadata']; + }; + }; + }; + /** @description Mobile mobile push credentials */ + ListPushCredentialsResponse: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Successful response with a list of calls in a queue. */ + ListQueueCallsResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['QueueCall'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description A response listing recording transcriptions */ + ListRecordingTranscriptionsResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['RecordingTranscription'][]; + meta?: components['schemas']['CursorPaginationMeta']; + }; + }; + }; + /** @description Successful response */ + ListReleasesResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['Release'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful response */ + ListRequirementsResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['DocReqsRequirementList']; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description List room compositions response. */ + ListRoomCompositionsResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['RoomComposition'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description List room participants response. */ + ListRoomParticipantsResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['RoomParticipant'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description List room recordings response. */ + ListRoomRecordingsResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['RoomRecording'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description List room sessions response. */ + ListRoomSessionsResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['RoomSession'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description List rooms response. */ + ListRoomsResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['Room'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful response with a list of short codes. */ + ListShortCodesResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['ShortCode'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful response with a list of sub number orders. */ + ListSubNumberOrdersResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['SubNumberOrder'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful response with multiple tags */ + ListTagsResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: { + /** @example a_tag */ + tag?: string; + /** @example 1 */ + amount?: number; + }[]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful response */ + ListUploadsResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['Upload'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description A paginated array of webhook_delivery attempts */ + ListWebhookDeliveriesResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['webhook_delivery'][]; + meta?: components['schemas']['PaginationMetaSimple']; + }; + }; + }; + /** @description Successful response with information about a single managed account. */ + ManagedAccountResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['ManagedAccount']; + }; + }; + }; + /** @description A response describing a media resource */ + MediaDownloadResponse: { + headers: { + [name: string]: unknown; + }; + content: { + '*/*': string; + }; + }; + /** @description A response describing a media resource */ + MediaResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['MediaResource']; + }; + }; + }; + /** @description Successful response with details about a message. */ + MessageResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['OutboundMessagePayload']; + }; + }; + }; + /** @description Successful response with details about a messaging hosted number order. */ + MessagingHostedNumberOrderResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['MessagingHostedNumberOrder']; + }; + }; + }; + /** @description Successful response with details about a messaging hosted number. */ + MessagingHostedNumberResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['HostedNumber']; + }; + }; + }; + /** @description Successful response with details about a messaging profile. */ + MessagingProfileResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['MessagingProfile']; + }; + }; + }; + /** @description Create Migration Response */ + MigrationResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['MigrationParams']; + }; + }; + }; + /** @description Create Migration Source Response */ + MigrationSourceResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['MigrationSourceParams']; + }; + }; + }; + /** @description Successful response */ + NetworkCoverageListResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['NetworkCoverage'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful response */ + NetworkInterfaceListResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['NetworkInterface'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful response */ + NetworkListResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['Network'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful response */ + NetworkResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['Network']; + }; + }; + }; + /** @description Resource Not Found */ + NotFoundErrorResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['Errors']; + }; + }; + /** @description The requested resource doesn't exist. */ + NotFoundResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['ErrorResponse']; + }; + }; + /** @description Successful response with details about a number block order. */ + NumberBlockOrderResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['NumberBlockOrder']; + }; + }; + }; + /** @description Successful response */ + NumberLookupResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['NumberLookupRecord']; + }; + }; + }; + /** @description Successful response with details about a number order document. */ + NumberOrderDocumentResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['NumberOrderDocument']; + }; + }; + }; + /** @description Successful response with details about a number order phone number. */ + NumberOrderPhoneNumberResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['NumberOrderPhoneNumber']; + }; + }; + }; + /** @description Successful response with details about a number order. */ + NumberOrderResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['NumberOrderWithPhoneNumbers']; + }; + }; + }; + /** @description Successful response with details about a number reservation. */ + NumberReservationResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['NumberReservation']; + }; + }; + }; + /** @description Successful response */ + OTAUpdateResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['CompleteOTAUpdate']; + }; + }; + }; + /** @description Successful response */ + OutboundVoiceProfileResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['OutboundVoiceProfile']; + }; + }; + }; + /** @description A successful network preferences definition response.

+ * The sent mobile_network_operators_preferences parameter won't be applied to the main resource right away - this is an asynchronous operation. While interacting with this API, you will face the following scenarios: + * + * * The first request for this API will return an empty mobile_network_operators_preferences with an in-progress OTA update resource in the ota_updates node containing the exact sent parameters to indicate the operation progress. The value will be applied to the principal object when the OTA update finishes its processing, thus indicating the SIM card network preference current state. + * * The subsequent requests will contain the current state, that is what's applied to the SIM card settings, and return the related OTA update in the ota_updates node. + * + * The returned OTA updated (present in the ota_updates node) will, by default, be the resource related to the operation, not all of them. */ + PUTSIMCardNetworkPreferenceResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['SIMCardNetworkPreferenceWithOTAUpdates']; + }; + }; + }; + /** @description Successfuly patched channel zone */ + PatchGcbChannelZoneRequestResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['GcbChannelZone']; + }; + }; + /** @description Update room response. */ + PatchRoomResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['Room']; + }; + }; + }; + /** @description Successful response with details about a phone number. */ + PhoneNumberResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['PhoneNumberDetailed']; + }; + }; + }; + /** @description Successful response with details about a phone number including voice settings. */ + PhoneNumberWithMessagingSettingsResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['PhoneNumberWithMessagingSettings']; + }; + }; + }; + /** @description Successful response with details about a phone number including voice settings. */ + PhoneNumberWithVoiceSettingsResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['PhoneNumberWithVoiceSettings']; + }; + }; + }; + /** @description Portout Supporting Documents */ + PortOutListSupportingDocumentsResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['PortOutSupportingDocument'][]; + }; + }; + }; + /** @description PortabilityCheck Response */ + PortabilityCheckResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['PortabilityCheckDetails'][]; + }; + }; + }; + /** @description Portout Comment Response */ + PortoutCommentResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['PortoutComment']; + }; + }; + }; + /** @description Portout Response */ + PortoutResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['PortoutDetails']; + }; + }; + }; + /** @description A new inserted phone number */ + PostGcbPhoneNumberRequestResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['GcbPhoneNumber']; + }; + }; + /** @description Presigned URL Object Response */ + PresignedObjectUrlResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['PresignedObjectUrl']; + }; + }; + /** @description Successful response */ + PublicInternetGatewayListResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['PublicInternetGatewayRead'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful response */ + PublicInternetGatewayResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['PublicInternetGatewayRead']; + }; + }; + }; + /** @description Success response with details about a push credential */ + PushCredentialResponse: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Successful response with details about a call in a queue. */ + QueueCallResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['QueueCall']; + }; + }; + }; + /** @description Successful response with details about a queue. */ + QueueResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['Queue']; + }; + }; + }; + /** @description A Comment Response */ + ReadCommentResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['ReadComment'] & Record; + }; + }; + }; + /** @description A response with recording resource. */ + RecordingResponseBody: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['RecordingResponse']; + }; + }; + /** @description A response with a recording transcription resource. */ + RecordingTranscriptionResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['RecordingTranscription']; + }; + }; + }; + /** @description A response with recordings. */ + RecordingsResponseBody: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['RecordingResponse'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Refresh fax response */ + RefreshFaxResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + /** @example ok */ + result?: string; + }; + }; + }; + /** @description Refresh room client token response. */ + RefreshRoomClientTokenResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + /** @example { + * "token": "eyJhbGciOiJFZDI1NTE5IiwidHlwIjoiSldUIn0.eyJhdWQiOiJ0ZWxueXhfYWNjZXNzX3Rva2VuIiwiZXhwIjoxNjE5MDk0Mjk1LCJncmFudHMiOlt7ImFjdGlvbnMiOlsiam9pbiJdLCJyZXNvdXJjZXMiOlsidGVsbnl4OnZpZGVvOnJvb21zOjllMmEwY2JlLWNlNjYtNDExZS1hMWFjLTQ2OGYwYjEwM2M5YSJdLCJzdWJqZWN0cyI6WyJ0ZWxueXg6dXNlcnM6NzgyYjJjYmUtODQ2Ni00ZTNmLWE0ZDMtOTc4MWViNTc3ZTUwIl19XSwiZ3JhbnRzX3ZlcnNpb24iOiIxLjAuMCIsImlhdCI6MTYxOTA5MzY5NSwiaXNzIjoidGVsbnl4X2FjY2Vzc190b2tlbiIsImp0aSI6IjllNjIyOTA2LTc1ZTctNDBiNi1iOTAwLTc1NGIxZjNlZDMyZiIsIm5iZiI6MTYxOTA5MzY5NCwic3ViIjoibnVsbCIsInR5cCI6ImFjY2VzcyJ9.1JGK9PyHkTtoP_iMu-8TzXH_fhmnsDtZZOAJLDzLW6DDtAb80wZ93l1VH5yNx5tFqwIFG0t48dRiBKWlW-nzDA", + * "token_expires_at": "2021-04-22T12:24:55Z" + * } */ + data?: { + /** + * Format: jwt + * @example eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJ0ZWxueXhfdGVsZXBob255IiwiZXhwIjoxNTkwMDEwMTQzLCJpYXQiOjE1ODc1OTA5NDMsImlzcyI6InRlbG55eF90ZWxlcGhvbnkiLCJqdGkiOiJiOGM3NDgzNy1kODllLTRhNjUtOWNmMi0zNGM3YTZmYTYwYzgiLCJuYmYiOjE1ODc1OTA5NDIsInN1YiI6IjVjN2FjN2QwLWRiNjUtNGYxMS05OGUxLWVlYzBkMWQ1YzZhZSIsInRlbF90b2tlbiI6InJqX1pra1pVT1pNeFpPZk9tTHBFVUIzc2lVN3U2UmpaRmVNOXMtZ2JfeENSNTZXRktGQUppTXlGMlQ2Q0JSbWxoX1N5MGlfbGZ5VDlBSThzRWlmOE1USUlzenl6U2xfYURuRzQ4YU81MHlhSEd1UlNZYlViU1ltOVdJaVEwZz09IiwidHlwIjoiYWNjZXNzIn0.gNEwzTow5MLLPLQENytca7pUN79PmPj6FyqZWW06ZeEmesxYpwKh0xRtA0TzLh6CDYIRHrI8seofOO0YFGDhpQ + */ + token?: string; + /** + * Format: datetime + * @description ISO 8601 timestamp when the token expires. + * @example 2021-03-26T17:51:59Z + */ + token_expires_at?: string; + }; + }; + }; + }; + /** @description Successful response */ + RegionListResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['Region'][]; + }; + }; + }; + /** @description Successful response */ + RegisterSimCardsResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + /** @description Successfully registered SIM cards. */ + data?: components['schemas']['SimpleSIMCard'][]; + errors?: components['schemas']['Error'][]; + }; + }; + }; + /** @description Successful response with details about a credential connection registration status. */ + RegistrationStatusResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + /** + * Registration Status + * @example { + * "data": { + * "record_type": "registration_status", + * "status": "Expired", + * "sip_username": "rogerp", + * "ip_address": "190.106.106.121", + * "transport": "UDP", + * "port": 37223, + * "user_agent": "Z 5.4.12 v2.10.13.2-mod", + * "last_registration": "2021-09-28T15:11:02", + * "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58" + * } + * } + */ + data?: { + /** + * @description Identifies the type of the resource. + * @example registration_status + */ + record_type?: string; + /** + * @description The current registration status of your SIP connection + * @enum {string} + */ + status?: + | 'Not Applicable' + | 'Not Registered' + | 'Failed' + | 'Expired' + | 'Registered' + | 'Unregistered'; + /** + * @description The user name of the SIP connection + * @example sip_username + */ + sip_username?: string; + /** + * @description The ip used during the SIP connection + * @example 190.106.106.121 + */ + ip_address?: string; + /** + * @description The protocol of the SIP connection + * @example TCP + */ + transport?: string; + /** + * @description The port of the SIP connection + * @example 37223 + */ + port?: number; + /** + * @description The user agent of the SIP connection + * @example Z 5.4.12 v2.10.13.2-mod + */ + user_agent?: string; + /** + * @description ISO 8601 formatted date indicating when the resource was last updated. + * @example 2018-02-02T22:25:27.521Z + */ + last_registration?: string; + }; + }; + }; + }; + /** @description Resource not found */ + ResourceNotFound: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Resource not found */ + ResourceNotFoundErrorResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + errors?: components['schemas']['ResourceNotFoundError'][]; + }; + }; + }; + /** @description Expected billing group response to a valid request */ + RetrieveBillingGroupResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['BillingGroup']; + }; + }; + }; + /** @description Successful response with details about a call status. */ + RetrieveCallStatusResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['Call']; + }; + }; + }; + /** @description Expected ledger billing group report response to a valid request */ + RetrieveLedgerBillingGroupReportResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['LedgerBillingGroupReport']; + }; + }; + }; + /** @description Successful response with details about a messaging profile's metrics. */ + RetrieveMessagingProfileMetrics: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['MessagingProfileDetailedMetrics']; + }; + }; + }; + /** @description Expected portout response to a valid request */ + RetrievePortoutResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['PortoutDetails']; + }; + }; + }; + /** @description Successful Response */ + SIMCardActionResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['SIMCardAction']; + }; + }; + }; + /** @description Successful response */ + SIMCardActivationCodeResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['SIMCardActivationCode']; + }; + }; + }; + /** @description Successful response */ + SIMCardDeviceDetailsResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['SIMCardDeviceDetails']; + }; + }; + }; + /** @description Successful Response */ + SIMCardGroupActionResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['SIMCardGroupAction']; + }; + }; + }; + /** @description A successful network preferences definition response. */ + SIMCardNetworkPreferenceResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['SIMCardNetworkPreference']; + }; + }; + }; + /** @description A successful network preferences definition response. */ + SIMCardNetworkPreferenceWithOTAUpdatesResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['SIMCardNetworkPreferenceWithOTAUpdates']; + }; + }; + }; + /** @description Successful Response */ + SIMCardOrdersPreviewResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['SIMCardOrderPreview']; + }; + }; + }; + /** @description Successful response */ + SIMCardPublicIPResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['SIMCardPublicIP']; + }; + }; + }; + /** @description SSL Certificate Response */ + SSLCertificateResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['SSLCertificate']; + }; + }; + }; + /** @description Successful Response */ + SearchMobileNetworkOperatorsResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['MobileNetworkOperator'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful response */ + SearchOTAUpdateResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['SimplifiedOTAUpdate'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful response */ + SearchSimCardsResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['SimpleSIMCard'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Send fax response */ + SendFaxResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['Fax']; + }; + }; + }; + /** @description Successful response */ + SharePortingOrder: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['PortingOrderSharingToken']; + }; + }; + }; + /** @description Successful response with details about a short code. */ + ShortCodeResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['ShortCode']; + }; + }; + }; + /** @description Successful Response */ + ShowCustomerServiceRecord: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['CustomerServiceRecord']; + }; + }; + }; + /** @description Successful response */ + ShowPortingEventResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['PortingEvent']; + }; + }; + }; + /** @description Successful response */ + ShowPortingLOAConfiguration: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['PortingLOAConfiguration']; + }; + }; + }; + /** @description Successful response */ + ShowPortingOrder: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['PortingOrder']; + meta?: { + /** + * @description Link to list all phone numbers + * @example /v2/porting_phone_numbers?filter[porting_order_id]=eef10fb8-f3df-4c67-97c5-e18179723222 + */ + phone_numbers_url?: string; + }; + }; + }; + }; + /** @description Successful response */ + ShowPortingOrdersActivationJob: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['PortingOrdersActivationJob']; + }; + }; + }; + /** @description Successful response */ + ShowPortingOrdersComment: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['PortingOrdersComment']; + }; + }; + }; + /** @description Successful response */ + ShowPortingPhoneNumber: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['PortingPhoneNumber']; + meta?: { + /** + * Format: uri + * @description Link to list porting order + * @example /porting_orders/a700d03c-4062-4091-8189-1b75216cf7a2 + */ + porting_order_url?: string; + }; + }; + }; + }; + /** @description Successful response */ + ShowPortingPhoneNumberBlock: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['PortingPhoneNumberBlock']; + }; + }; + }; + /** @description Successful response */ + ShowPortingPhoneNumberExtension: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['PortingPhoneNumberExtension']; + }; + }; + }; + /** @description Successful response */ + ShowPortingReport: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['PortingReport']; + }; + }; + }; + /** @description Successful response */ + ShowPortoutEventResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['PortoutEvent']; + }; + }; + }; + /** @description Successful response */ + ShowPortoutReport: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['PortoutReport']; + }; + }; + }; + /** @description Successful Response */ + SimCardActionCollectionResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['SIMCardAction'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful Response */ + SimCardDataUsageNotificationCollectionResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['SimCardDataUsageNotification'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful Response */ + SimCardGroupActionCollectionResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['SIMCardGroupAction'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful response */ + SimpleSimCardResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['SimpleSIMCard']; + }; + }; + }; + /** @description Successful Response */ + SinglePhoneNumberCampaign: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['PhoneNumberCampaign']; + }; + }; + /** @description Successful response with a list of phone numbers. */ + SlimListPhoneNumbersResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['SlimPhoneNumberDetailed'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Response for specific country coverage */ + SpecificCountryResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['CountryCoverage']; + }; + }; + }; + /** @description Successful response with details about a sub number order. */ + SubNumberOrderResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['SubNumberOrder']; + }; + }; + }; + /** @description Successful response */ + SubRequestByPortingOrder: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['GetSubRequestByPortingOrder']; + }; + }; + }; + /** @description Successful response with details about a credential */ + TelephonyCredentialResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['TelephonyCredential']; + }; + }; + }; + /** @description Successful response */ + TexmlApplicationResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['TexmlApplication']; + }; + }; + }; + /** @description Successful call recording create response */ + TexmlCreateCallRecordingResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['TexmlCreateCallRecordingResponseBody']; + }; + }; + /** @description Successful call streaming create response */ + TexmlCreateCallStreamingResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['TexmlCreateCallStreamingResponseBody']; + }; + }; + /** @description Retrieves call recording resource. */ + TexmlGetCallRecordingResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['TexmlGetCallRecordingResponseBody']; + }; + }; + /** @description Successful Get Call Recordings Response */ + TexmlGetCallRecordingsResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['TexmlGetCallRecordingsResponseBody']; + }; + }; + /** @description Successful get Recording Transcription Response */ + TexmlGetRecordingTranscriptionResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['TexmlRecordingTranscription']; + }; + }; + /** @description Successful list Recording Transcriptions Response */ + TexmlListRecordingTranscriptionResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + transcriptions?: components['schemas']['TexmlRecordingTranscription'][]; + /** + * @description The number of the last element on the page, zero-indexed + * @example 1 + */ + end?: number; + /** + * Format: uri + * @description Relative uri to the first page of the query results + * @example /v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Transcriptions.json?Page=0&PageSize=1 + */ + first_page_uri?: string; + /** + * Format: uri + * @description Relative uri to the previous page of the query results + * @example /v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Transcriptions.json?PageToken=MZQTDUHX&PageSize=1 + */ + previous_page_uri?: string; + /** + * @description Relative uri to the next page of the query results + * @example /v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Transcriptions.json?PageToken=KRWXZPO&PageSize=1 + */ + next_page_uri?: string; + /** + * @description Current page number, zero-indexed. + * @example 0 + */ + page?: number; + /** + * @description The number of items on the page + * @example 20 + */ + page_size?: number; + /** + * @description The number of the first element on the page, zero-indexed. + * @example 0 + */ + start?: number; + /** + * @description The URI of the current page. + * @example /v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Transcriptions.json?PageToken=YTBNAXPI&PageSize=1 + */ + uri?: string; + }; + }; + }; + /** @description Successful call streaming update response */ + TexmlUpdateCallStreamingResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['TexmlUpdateCallStreamingResponseBody']; + }; + }; + /** @description Unauthorized */ + UnauthenticatedResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['ErrorResponse']; + }; + }; + /** @description The required authentication headers were either invalid or not included in the request. */ + UnauthorizedErrorResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + errors?: components['schemas']['UnauthorizedError'][]; + }; + }; + }; + /** @description Unauthorized Request */ + UnauthorizedRequestErrorResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['Errors']; + }; + }; + /** @description Unauthorized */ + UnauthorizedResponse: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description An unexpected error occurred. */ + UnexpectedErrorResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + errors?: components['schemas']['UnexpectedError'][]; + }; + }; + }; + /** @description Unprocessable entity. Check the 'detail' field in response for details. */ + UnprocessableEntity: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['Errors']; + }; + }; + /** @description Unprocessable entity. Check the 'detail' field in response for details. */ + UnprocessableEntityErrorResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + errors?: components['schemas']['UnprocessableEntityError'][]; + }; + }; + }; + /** @description The request was well-formed but was unable to be followed due to semantic errors. */ + UnprocessableEntityResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['ErrorResponse']; + }; + }; + /** @description Unprocessable entity. Check the 'detail' field in response for details. */ + UnprocessableManagedAccountEntity: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + errors?: components['schemas']['UnprocessableEntityError'][]; + }; + }; + }; + /** @description Expected billing group response to a valid request */ + UpdateBillingGroupResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['BillingGroup']; + }; + }; + }; + /** @description Successful response with information about the allocatable global outbound channels for the given account. */ + UpdateManagedAccountGlobalChannelLimitResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['SingleManagedAccountGlobalOutboundChannels']; + }; + }; + }; + /** @description Successful response */ + UpdatePortingLOAConfiguration: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['PortingLOAConfiguration']; + }; + }; + }; + /** @description Successful response */ + UpdatePortingOrderResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['PortingOrder']; + meta?: { + /** @description Link to list all phone numbers */ + phone_numbers_url?: string; + }; + }; + }; + }; + /** @description Expected portout response to a valid request */ + UpdatePortoutResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['PortoutDetails']; + }; + }; + }; + /** @description Successful Response */ + UpdateSimCardDataUsageNotificationResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['SimCardDataUsageNotification']; + }; + }; + }; + /** @description Successful Response */ + UpdateSimCardGroupResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['SIMCardGroup']; + }; + }; + }; + /** @description Successful response */ + UpdateSimCardResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['SIMCard']; + }; + }; + }; + /** @description Successful response upon updating a TeXML call. */ + UpdateTeXMLCallResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['UpdateCommandResult']; + }; + }; + }; + /** @description Get user balance details */ + UserBalanceResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['UserBalance']; + }; + }; + }; + /** @description Action response */ + ValidateAddressResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['ValidateAddressResult']; + }; + }; + }; + /** @description Successful response */ + VerifyPortingVerificationCodes: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['PortingVerificationCode'][]; + }; + }; + }; + /** @description Successful response */ + VirtualCrossConnectCoverageListResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['VirtualCrossConnectCoverage'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful response */ + VirtualCrossConnectListResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['VirtualCrossConnectCombined'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful response */ + VirtualCrossConnectResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['VirtualCrossConnectCombined']; + }; + }; + }; + /** @description Successful response */ + VoicemailResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['VoicemailPrefResponse']; + }; + }; + }; + /** @description Successful response */ + WireguardInterfaceListResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['WireguardInterfaceRead'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful response */ + WireguardInterfaceResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['WireguardInterfaceRead']; + }; + }; + }; + /** @description Successful response */ + WireguardPeerListResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['WireguardPeer'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Successful response */ + WireguardPeerResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['WireguardPeer']; + }; + }; + }; + /** @description Successful Response */ + WirelessConnectivityLogCollectionResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['WirelessConnectivityLog'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description An array of Comment Responses */ + listCommentsResponse: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['Comment'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + /** @description Dynamic Emergency Address Responses */ + listDynamicEmergencyAddresses: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['DynamicEmergencyAddress'][]; + meta?: components['schemas']['Metadata']; + }; + }; + }; + /** @description Dynamic Emergency Endpoints Responses */ + listDynamicEmergencyEndpoints: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['DynamicEmergencyEndpoint'][]; + meta?: components['schemas']['Metadata']; + }; + }; + }; + /** @description An array of Regulatory Requirements Responses */ + listRegulatoryRequirements: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['RegulatoryRequirements'][]; + }; + }; + }; + /** @description An array of Regulatory Requirements Responses */ + listRegulatoryRequirementsPhoneNumbers: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['RegulatoryRequirementsPhoneNumbers'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + }; + parameters: { + /** @description The id of the account the resource belongs to. */ + AccountSid: string; + /** @description The ID of the TeXML application used for the call. */ + ApplicationId: string; + /** @description Filter by the associated record type */ + AssociatedRecordType: 'account' | 'phone_number'; + /** @description The id of the billing group */ + BillingGroupId: string; + /** @description Unique identifier and token for controlling the call */ + CallControlId: string; + /** @description The CallSid that identifies the call to update. */ + CallSid: string; + /** @description Filter by the id of a channel type */ + ChannelTypeId: 'webhook' | 'sms' | 'email' | 'voice'; + /** @description Identifies the child resource */ + ChildId: string; + /** @description The ConferenceSid that uniquely identifies a conference. */ + ConferenceSid: string; + /** + * @description Filters conferences by status. + * @example in-progress + */ + ConferenceStatus: 'init' | 'in-progress' | 'completed'; + /** @description Uniquely identifies a Telnyx application (Call Control, TeXML) or Sip connection resource. */ + ConnectionId: string; + /** @description Filters records to those created after a specific date. */ + CreatedAtGtFilter: string; + /** @description Filters records to those created before a specific date. */ + CreatedAtLtFilter: string; + /** + * @description Filters conferences by the creation date. Expected format is YYYY-MM-DD. Also accepts inequality operators, e.g. DateCreated>=2023-05-22. + * @example >=2023-05-22 + */ + DateCreated: string; + /** + * @description Filters conferences by the time they were last updated. Expected format is YYYY-MM-DD. Also accepts inequality operators, e.g. DateUpdated>=2023-05-22. + * @example >=2023-05-22 + */ + DateUpdated: string; + /** @description Filters requirements to those applying to a specific action. */ + DocReqsActionFilter: 'ordering' | 'porting'; + /** @description Filters results to those applying to a 2-character (ISO 3166-1 alpha-2) country code */ + DocReqsCountryFilter: string; + /** @description Filters results to those applying to a specific `phone_number_type` */ + DocReqsPhoneNumberTypeFilter: 'local' | 'national' | 'toll-free'; + /** + * @description Uniquely identifies the requirement_type record + * @example a9dad8d5-fdbd-49d7-aa23-39bb08a5ebaa + */ + DocReqsRequirementId: string; + /** + * @description Uniquely identifies the requirement_type record + * @example a38c217a-8019-48f8-bff6-0fdd9939075b + */ + DocReqsRequirementTypeId: string; + /** @description Filters requirement types to those whose name contains a certain string. */ + DocReqsRequirementTypeNameFilter: string; + /** @description Specifies the sort order for results. If you want to sort by a field in ascending order, include it as a sort parameter. If you want to sort in descending order, prepend a `-` in front of the field name. */ + DocReqsRequirementTypesSort: 'created_at' | 'name' | 'updated_at'; + /** @description Specifies the sort order for results. If you want to sort by a field in ascending order, include it as a sort parameter. If you want to sort in descending order, prepend a `-` in front of the field name. */ + DocReqsRequirementsSort: + | 'action' + | 'country_code' + | 'locality' + | 'phone_number_type'; + /** @description Identifies the associated document to filter on. */ + DocServiceDocumentIdFilter: string; + /** @description Filter by created at greater than provided value. */ + DocumentsCreatedAtGreaterThanFilter: string; + /** @description Filter by created at less than provided value. */ + DocumentsCreatedAtLessThanFilter: string; + /** @description Filter documents by a customer references. */ + DocumentsCustomerReferenceEqFilter: string; + /** @description Filter documents by a list of customer references. */ + DocumentsCustomerReferenceInFilter: string; + /** @description Filter by string matching part of filename. */ + DocumentsFilenameContainsFilter: string; + /** @description Specifies the sort order for results. If you want to sort by a field in ascending order, include it as a sort parameter. If you want to sort in descending order, prepend a `-` in front of the field name. */ + DocumentsSort: 'filename' | 'created_at' | 'updated_at'; + /** + * @description Filters calls by their end date. Expected format is YYYY-MM-DD + * @example 2023-05-22 + */ + EndTime: string; + /** + * @description Filters calls by their end date (before). Expected format is YYYY-MM-DD + * @example 2023-05-22 + */ + 'EndTime<': string; + /** + * @description Filters calls by their end date (after). Expected format is YYYY-MM-DD + * @example 2023-05-22 + */ + 'EndTime>': string; + /** @description If present, only returns results with the address_book flag set to the given value. */ + FilterAddressBook: string; + /** @description Filter by state or province where the address is located. */ + FilterAddressByAdministrativeArea: string; + /** @description Filter by the mobile operator two-character (ISO 3166-1 alpha-2) origin country code. */ + FilterAddressByCountryCode: string; + /** @description Returns entries with matching name of the supplemental field for address information. */ + FilterAddressByExtendedAddress: string; + /** @description Uniquely identifies the address for the order. */ + FilterAddressById: string; + /** @description Filter by the name of the city where the address is located. */ + FilterAddressByLocality: string; + /** @description Filter by postal code for the address. */ + FilterAddressByPostalCode: string; + /** @description Returns entries with matching name of the street where the address is located. */ + FilterAddressByStreetAddress: string; + /** @description If present, applications with application_name containing the given value will be returned. Matching is not case-sensitive. Requires at least three characters. */ + FilterApplicationName: string; + /** @description Filter by a specific status of the resource's lifecycle. */ + FilterBasicStatusLifecycle: 'in-progress' | 'completed' | 'failed'; + /** @description Filter by a bulk SIM card action ID. */ + FilterBulkSIMCardActionId: string; + /** @description Filter results by phone number */ + FilterByPhoneNumber: string; + /** @description Filter results by a list of phone numbers */ + FilterByPhoneNumberIn: string[]; + /** @description Filter results by portability status */ + FilterByPortabilityStatus: components['schemas']['PortabilityStatus']; + /** @description Filter results by activation status */ + FilterByPortingOrderActivationStatus: components['schemas']['PortingOrderActivationStatus']; + /** @description Filter results by porting order id */ + FilterByPortingOrderID: string; + /** @description Filter results by a list of porting order ids */ + FilterByPortingOrderIdIn: string[]; + /** @description Filter results by status */ + FilterByPortingOrderStatus: + | 'draft' + | 'in-process' + | 'submitted' + | 'exception' + | 'foc-date-confirmed' + | 'cancel-pending' + | 'ported' + | 'cancelled'; + /** @description Filter porting orders by multiple statuses */ + FilterByPortingOrderStatusIn: + | 'draft' + | 'in-process' + | 'submitted' + | 'exception' + | 'foc-date-confirmed' + | 'cancel-pending' + | 'ported' + | 'cancelled'; + /** @description Filter results by support key */ + FilterBySupportKeyEq: string; + /** @description Filter results by a list of support keys */ + FilterBySupportKeyIn: string[]; + /** @description Filter results by the TCR Brand id */ + FilterByTCRBrandID: string; + /** @description Filter results by the TCR Campaign id */ + FilterByTCRCampaignID: string; + /** @description Filter results by the Telnyx Brand id */ + FilterByTelnyxBrandID: string; + /** @description Filter results by the Telnyx Campaign id */ + FilterByTelnyxCampaignID: string; + /** @description Event status */ + FilterCallEventStatus: 'delivered' | 'failed'; + /** @description Event timestamp: equal */ + FilterCallEventTimestampEqualTo: string; + /** @description Event timestamp: greater than */ + FilterCallEventTimestampGreaterThan: string; + /** @description Event timestamp: greater than or equal */ + FilterCallEventTimestampGreaterThanOrEqualTo: string; + /** @description Event timestamp: lower than */ + FilterCallEventTimestampLessThan: string; + /** @description Event timestamp: lower than or equal */ + FilterCallEventTimestampLessThanOrEqualTo: string; + /** @description Event type */ + FilterCallEventType: 'command' | 'webhook'; + /** @description The unique identifier of an individual call leg. */ + FilterCallLegId: string; + /** @description The unique identifier of the call control session. A session may include multiple call leg events. */ + FilterCallSessionId: string; + /** @description The civic address ID to filter by */ + FilterCivicAddressId: string; + /** @description If present, conferences will be filtered to those with a matching `name` attribute. Matching is case-sensitive */ + FilterConferenceName: string; + /** @description If present, conferences will be filtered by status. */ + FilterConferenceStatus: 'init' | 'in_progress' | 'completed'; + /** @description If present, connections with connection_name containing the given value will be returned. Matching is not case-sensitive. Requires at least three characters. */ + FilterConnectionName: string; + /** @description The total monetary amount of the order. */ + FilterCostByAmount: string; + /** @description Filter by ISO 4217 currency string. */ + FilterCostByCurrency: string; + /** @description Filter by ISO 8601 formatted date-time string matching resource creation date-time. */ + FilterCreatedAt: string; + /** @description If present, addresses with customer_reference containing the given value will be returned. Matching is not case-sensitive. */ + FilterCustomerReferenceContains: string; + /** @description Filter addresses via the customer reference set. Matching is not case-sensitive. */ + FilterCustomerReferenceEquals: string; + /** @description If present, email containing the given value will be returned. Matching is not case-sensitive. Requires at least three characters. */ + FilterEmailContains: string; + /** @description If present, only returns results with the email matching exactly the value given. */ + FilterEmailEq: string; + /** @description The external connection ID to filter by or "null" to filter for logs without an external connection ID */ + FilterExternalConnectionId: string; + /** @description If present, connections with external_sip_connection matching the given value will be returned. */ + FilterExternalSipConnection: 'zoom' | 'operator_connect'; + /** @description If present, connections with an `fqdn` that equals the given value will be returned. Matching is case-sensitive, and the full string must match. */ + FilterFqdn: string; + /** @description If present, connections with id matching the given value will be returned. */ + FilterId: string; + /** @description Identifies the associated outbound voice profile. */ + FilterInnerOutboundVoiceProfileId: string; + /** @description The location ID to filter by */ + FilterLocationId: string; + /** @description Filter by name */ + FilterName: string; + /** @description If present, only returns results with the organization_name containing the given value. Matching is not case-sensitive. Requires at least three characters. */ + FilterOrganizationEmailContains: string; + /** @description If present, only returns results with the organization_name matching exactly the value given. */ + FilterOrganizationEmailEq: string; + /** @description Identifies the associated outbound voice profile. */ + FilterOutboundVoiceProfileId: string; + /** @description If present, connections associated with the given phone_number will be returned. A full match is necessary with a e164 format. */ + FilterPhoneNumber: string; + /** @description The partial phone number to filter by. Requires 3-15 digits. */ + FilterPhoneNumberContains: string; + /** @description The phone number to filter by */ + FilterPhoneNumberEq: string; + /** @description The partial phone number to filter log messages for. Requires 3-15 digits. */ + FilterPhoneNumberLogMessageContains: string; + /** @description The phone number to filter log messages for or "null" to filter for logs without a phone number */ + FilterPhoneNumberLogMessageEq: string; + /** @description Filter orders by how many SIM cards were ordered. */ + FilterQuantity: number; + /** @description Returns orders with quantity lower than the specified argument. */ + FilterQuantityLessThan: number; + /** @description The status of the release to filter by */ + FilterReleaseStatus: ( + | 'pending_upload' + | 'pending' + | 'in_progress' + | 'complete' + | 'failed' + | 'expired' + | 'unknown' + )[]; + /** @description Filter by resource_id */ + FilterResourceId: string; + /** @description A valid SIM card group ID. */ + FilterSIMCardGroupId: string; + /** @description A valid SIM card ID. */ + FilterSIMCardId: string; + /** @description Filter by sip_username */ + FilterSipUsername: string; + /** @description Filter by status */ + FilterStatus: string; + /** @description If present, addresses with street_address containing the given value will be returned. Matching is not case-sensitive. Requires at least three characters. */ + FilterStreetAddress: string; + /** @description Filter by ISO 8601 formatted date-time string matching resource last update date-time. */ + FilterUpdatedAt: string; + /** @description The status of the upload to filter by */ + FilterUploadStatus: ( + | 'pending_upload' + | 'pending' + | 'in_progress' + | 'success' + | 'error' + )[]; + /** @description If set as 'true', only addresses used as the emergency address for at least one active phone-number will be returned. When set to 'false', the opposite happens: only addresses not used as the emergency address from phone-numbers will be returned. */ + FilterUsedAsEmergency: string; + /** @description Identifies the resource. */ + FqdnId: string; + /** + * @description Filters conferences by their friendly name. + * @example weekly_review_call + */ + FriendlyName: string; + /** + * @description Filters calls by the from number. + * @example +1312345678 + */ + From: string; + /** @description Channel zone identifier */ + GcbChannelZoneId: string; + /** @description The phone number to be looked up */ + GcbPhoneNumber: string; + /** @description Identifies the resource. */ + Id: string; + /** @description Specifies if cancelled accounts should be included in the results. */ + IncludeCancelledAccounts: boolean; + /** @description It includes the associated OTA update objects in the response when present. */ + IncludeOTAUpdates: boolean; + /** @description It includes the associated SIM card group object in the response when present. */ + IncludeSIMCardGroup: boolean; + /** @description Identifies the resource. */ + IntId: string; + /** @description Identifies the type of resource. */ + IpId: string; + /** @description The id of the ledger billing group report */ + LedgerBillingGroupReportId: string; + /** @description The `linked_record_type` of the document to filter on. */ + LinkedRecordTypeFilter: string; + /** @description The `linked_resource_id` of the document to filter on. */ + LinkedResourceIdFilter: string; + /** @description Uniquely identifies a media resource. */ + MediaName: string; + /** @description The id of the messaging profile to retrieve */ + MessagingProfileId: string; + /** @description The id of the messaging profile(s) to retrieve */ + MessagingProfileMetric: string; + /** @description The timeframe for which you'd like to retrieve metrics. */ + MessagingProfileMetricTimeFrame: '1h' | '3h' | '24h' | '3d' | '7d' | '30d'; + /** @description Optional filter on outbound voice profile name. */ + NameFilter: string; + /** @description Filter by the id of a notification channel */ + NotificationChannelId: string; + /** @description Filter by the id of a notification channel */ + NotificationEventConditionId: string; + /** @description Filter by the id of a notification profile */ + NotificationProfileId: string; + /** @description Specifies the type of number lookup to be performed */ + NumberLookupType: 'carrier' | 'caller-name'; + /** @description Filter by tag */ + OptionalTag: string; + /** + * @description The number of the page to be displayed, zero-indexed, should be used in conjuction with PageToken. + * @example 1 + */ + Page: number; + /** @description Opaque identifier of next page */ + PageAfter: string; + /** @description Opaque identifier of previous page */ + PageBefore: string; + /** @description Limit of records per single page */ + PageLimit: number; + /** @description The page number to load */ + PageNumber: number; + /** @description The size of the page */ + PageSize: number; + /** + * @description The number of records to be displayed on a page + * @example 10 + */ + PageSizeTexml: number; + /** @description Used to request the next page of results. */ + PageToken: string; + /** @description Comment id */ + PathCommentID: string; + /** @description The ID of the customer service record */ + PathCustomerServiceRecordId: string; + /** @description Phone number */ + PathPhoneNumber: string; + /** @description Porting Order id */ + PathPortingOrderID: string; + /** @description Activation Job Identifier */ + PathPortingOrdersActivationJobID: string; + /** @description The phone number to be looked up */ + PhoneNumber: string; + /** @description Filters records to those with a specified number. */ + PhoneNumberEqFilter: string; + /** @description Filters records to those with at least one number in the list. */ + PhoneNumberInFilter: string[]; + /** @description Identifies the private wireless gateway. */ + PrivateWirelessGatewayId: string; + /** @description Include the first 50 phone number objects in the results */ + QueryIncludePhoneNumbers: boolean; + /** @description Uniquely identifies the recording by id. */ + RecordingId: string; + /** @description Uniquely identifies the recording by id. */ + RecordingSid: string; + RecordingTranscriptionId: string; + /** @description Uniquely identifies the recording transcription by id. */ + RecordingTranscriptionSid: string; + /** @description Filter by tag, required by bulk operations. */ + RequiredTag: string; + /** @description Identifies the resource. */ + ResourceId: string; + /** @description Identifies the SIM group. */ + SIMCardGroupId: string; + /** @description Identifies the SIM. */ + SIMCardId: string; + /** @description The id of the short code */ + ShortCodeId: string; + /** @description Specifies the sort order for results. By default sorting direction is ascending. To have the results sorted in descending order add the - prefix.

+ * That is:
    + *
  • + * email: sorts the result by the + * email field in ascending order. + *
  • + * + *
  • + * -email: sorts the result by the + * email field in descending order. + *
  • + *

If not given, results are sorted by created_at in descending order. */ + Sort: 'created_at' | 'email'; + /** @description Specifies the sort order for results. By default sorting direction is ascending. To have the results sorted in descending order add the - prefix.

+ * That is:
    + *
  • + * street_address: sorts the result by the + * street_address field in ascending order. + *
  • + * + *
  • + * -street_address: sorts the result by the + * street_address field in descending order. + *
  • + *

If not given, results are sorted by created_at in descending order. */ + SortAddress: + | 'created_at' + | 'first_name' + | 'last_name' + | 'business_name' + | 'street_address'; + /** @description Specifies the sort order for results. By default sorting direction is ascending. To have the results sorted in descending order add the - prefix.

+ * That is:
    + *
  • + * friendly_name: sorts the result by the + * friendly_name field in ascending order. + *
  • + * + *
  • + * -friendly_name: sorts the result by the + * friendly_name field in descending order. + *
  • + *

If not given, results are sorted by created_at in descending order. */ + SortApplication: 'created_at' | 'friendly_name' | 'active'; + /** @description Specifies the sort order for results. By default sorting direction is ascending. To have the results sorted in descending order add the - prefix.

+ * That is:
    + *
  • + * name: sorts the result by the + * name field in ascending order. + *
  • + * + *
  • + * -name: sorts the result by the + * name field in descending order. + *
  • + *

If not given, results are sorted by created_at in descending order. */ + SortAuthenticationProvider: + | 'name' + | '-name' + | 'short_name' + | '-short_name' + | 'active' + | '-active' + | 'created_at' + | '-created_at' + | 'updated_at' + | '-updated_at'; + /** @description Specifies the sort order for results. By default sorting direction is ascending. To have the results sorted in descending order add the - prefix.

+ * That is:
    + *
  • + * connection_name: sorts the result by the + * connection_name field in ascending order. + *
  • + * + *
  • + * -connection_name: sorts the result by the + * connection_name field in descending order. + *
  • + *

If not given, results are sorted by created_at in descending order. */ + SortConnection: 'created_at' | 'connection_name' | 'active'; + /** @description Specifies the sort order for results. By default sorting direction is ascending. To have the results sorted in descending order add the - prefix.

+ * That is:
    + *
  • + * name: sorts the result by the + * name field in ascending order. + *
  • + * + *
  • + * -name: sorts the result by the + * name field in descending order. + *
  • + *

*/ + SortOutboundVoiceProfile: + | 'enabled' + | '-enabled' + | 'created_at' + | '-created_at' + | 'name' + | '-name' + | 'service_plan' + | '-service_plan' + | 'traffic_type' + | '-traffic_type' + | 'usage_payment_method' + | '-usage_payment_method'; + /** + * @description Filters calls by their start date. Expected format is YYYY-MM-DD. + * @example 2023-05-22 + */ + StartTime: string; + /** + * @description Filters calls by their start date (before). Expected format is YYYY-MM-DD + * @example 2023-05-22 + */ + 'StartTime<': string; + /** + * @description Filters calls by their start date (after). Expected format is YYYY-MM-DD + * @example 2023-05-22 + */ + 'StartTime>': string; + /** + * @description Filters calls by status. + * @example no-answer + */ + Status: 'canceled' | 'completed' | 'failed' | 'busy' | 'no-answer'; + /** @description Filters records to those with a specific status. */ + StatusEqFilter: 'pending' | 'completed' | 'failed'; + /** @description Filters records to those with a least one status in the list. */ + StatusInFilter: ('pending' | 'completed' | 'failed')[]; + /** @description Uniquely identifies the streaming by id. */ + StreamingSid: string; + /** @description Filters recording by the creation date. Expected format is ISO8601 date or date-time, ie. {YYYY}-{MM}-{DD} or {YYYY}-{MM}-{DD}T{hh}:{mm}:{ss}Z. Also accepts inequality operators, e.g. DateCreated>=2023-05-22. */ + TexmlDateCreated: string; + /** @description Filter by timestamp greater than */ + TimestampGreater: string; + /** @description Filter by timestamp less than */ + TimestampLess: string; + /** + * @description Filters calls by the to number. + * @example +1312345678 + */ + To: string; + /** @description Identifies a civic address or a location. */ + address_id: string; + /** @description Identifies the resource. */ + id: string; + /** @description A phone number's ID via the Telnyx API */ + phone_number_id: string; + /** @description Identifies a Release request */ + release_id: string; + /** @description Identifies an Upload request */ + ticket_id: string; + }; + requestBodies: { + /** @description Creates new credentials resource for given connection_id. */ + CreateCredentialsRequest: { + content: { + 'application/json': components['schemas']['CustomStorageConfiguration']; + }; + }; + CreateCustomerServiceRecord: { + content: { + 'application/json': { + /** + * @description A valid US phone number in E164 format. + * @example +1234567890 + */ + phone_number: string; + /** + * @description Callback URL to receive webhook notifications. + * @example https://example.com/webhook + */ + webhook_url?: string; + additional_data?: components['schemas']['CustomerServiceRecordAdditionalData']; + }; + }; + }; + /** @description A list of additional document parameters */ + CreatePortingAdditionalDocuments: { + content: { + 'application/json': { + additional_documents?: { + /** + * @description The type of document being created. + * @enum {string} + */ + document_type?: 'loa' | 'invoice' | 'csr' | 'other'; + /** + * Format: uuid + * @description The document identification + */ + document_id?: string; + }[]; + }; + }; + }; + CreatePortingLOAConfiguration: { + content: { + 'application/json': { + /** + * @description The name of the LOA configuration + * @example My LOA Configuration + */ + name: string; + /** @description The logo of the LOA configuration */ + logo: { + /** + * Format: uuid + * @description The document identification + */ + document_id: string; + }; + /** + * @description The name of the company + * @example Telnyx + */ + company_name: string; + /** @description The address of the company. */ + address: { + /** + * @description The street address of the company + * @example 311 W. Superior St + */ + street_address: string; + /** + * @description The extended address of the company + * @example Suite 504 + */ + extended_address?: string; + /** + * @description The locality of the company + * @example Chicago + */ + city?: string; + /** + * @description The administrative area of the company + * @example IL + */ + state?: string; + /** + * @description The postal code of the company + * @example 60654 + */ + zip_code?: string; + /** + * @description The country code of the company + * @example US + */ + country_code: string; + }; + /** @description The contact information of the company. */ + contact: { + /** + * Format: email + * @description The email address of the contact + * @example testing@telnyx.com + */ + email: string; + /** + * @description The phone number of the contact + * @example +12003270001 + */ + phone_number: string; + }; + }; + }; + }; + CreatePortingPhoneNumberBlock: { + content: { + 'application/json': { + phone_number_range: { + /** + * @description Specifies the start of the phone number range for this porting phone number block. + * @example +4930244999901 + */ + start_at: string; + /** + * @description Specifies the end of the phone number range for this porting phone number block. + * @example +4930244999910 + */ + end_at: string; + }; + /** @description Specifies the activation ranges for this porting phone number block. The activation range must be within the block range and should not overlap with other activation ranges. */ + activation_ranges: { + /** + * @description Specifies the start of the activation range. Must be greater or equal the start of the extension range. + * @example +4930244999901 + */ + start_at: string; + /** + * @description Specifies the end of the activation range. It must be no more than the end of the extension range. + * @example +4930244999910 + */ + end_at: string; + }[]; + }; + }; + }; + /** @description A list of phone number configuration parameters */ + CreatePortingPhoneNumberConfigurations: { + content: { + 'application/json': { + phone_number_configurations?: { + /** + * Format: uuid + * @description Identifies the porting phone number to be configured. + * @example 927f4687-318c-44bc-9f2f-22a5898143a4 + */ + porting_phone_number_id: string; + /** + * Format: uuid + * @description Identifies the user bundle to be associated with the porting phone number. + * @example ff901545-3e27-462a-ba9d-2b34654cab82 + */ + user_bundle_id: string; + }[]; + }; + }; + }; + CreatePortingPhoneNumberExtension: { + content: { + 'application/json': { + /** + * Format: uuid + * @description Identifies the porting phone number associated with this porting phone number extension. + * @example f24151b6-3389-41d3-8747-7dd8c681e5e2 + */ + porting_phone_number_id: string; + extension_range: { + /** + * @description Specifies the start of the extension range for this porting phone number extension. + * @example 1 + */ + start_at: number; + /** + * @description Specifies the end of the extension range for this porting phone number extension. + * @example 10 + */ + end_at: number; + }; + /** @description Specifies the activation ranges for this porting phone number extension. The activation range must be within the extension range and should not overlap with other activation ranges. */ + activation_ranges: { + /** + * @description Specifies the start of the activation range. Must be greater or equal the start of the extension range. + * @example 1 + */ + start_at: number; + /** + * @description Specifies the end of the activation range. It must be no more than the end of the extension range. + * @example 10 + */ + end_at: number; + }[]; + }; + }; + }; + CreatePortingReport: { + content: { + 'application/json': { + /** + * @description Identifies the type of report + * @example export_porting_orders_csv + * @enum {string} + */ + report_type: 'export_porting_orders_csv'; + params: components['schemas']['ExportPortingOrdersCSVReport']; + }; + }; + }; + CreatePortoutReport: { + content: { + 'application/json': { + /** + * @description Identifies the type of report + * @example export_portouts_csv + * @enum {string} + */ + report_type: 'export_portouts_csv'; + params: components['schemas']['ExportPortoutsCSVReport']; + }; + }; + }; + /** @description Deletes recordings for given ids. */ + DeleteRecordingsRequest: { + content: { + 'application/json': string[]; + }; + }; + /** @description The params expected to create/update a Dialogflow Connection for given connection_id. */ + DialogflowConnectionRequest: { + content: { + 'application/json': components['schemas']['DialogflowConnection']; + }; + }; + /** @description A list of phone numbers to send the verification codes to and the method to send them by */ + SendPortingVerificationCodes: { + content: { + 'application/json': { + phone_numbers?: string[]; + /** @enum {string} */ + verification_method?: 'sms' | 'call'; + }; + }; + }; + SharePortingOrder: { + content: { + 'application/json': { + /** @description The number of seconds the token will be valid for */ + expires_in_seconds?: number; + /** + * @description The permissions the token will have + * @enum {string} + */ + permissions?: + | 'porting_order.document.read' + | 'porting_order.document.update'; + }; + }; + }; + /** @description Starts call recording on a call. */ + TexmlCreateCallRecordingRequest: { + content: { + 'application/x-www-form-urlencoded': components['schemas']['TexmlCreateCallRecordingRequestBody']; + }; + }; + /** @description Start streaming media from a call */ + TexmlCreateCallStreamingRequest: { + content: { + 'application/x-www-form-urlencoded': components['schemas']['TexmlCreateCallStreamingRequestBody']; + }; + }; + /** @description Update call recording on a call. */ + TexmlUpdateCallRecordingRequest: { + content: { + 'application/x-www-form-urlencoded': components['schemas']['TexmlUpdateCallRecordingRequestBody']; + }; + }; + /** @description Update streaming */ + TexmlUpdateCallStreamingRequest: { + content: { + 'application/x-www-form-urlencoded': components['schemas']['TexmlUpdateCallStreamingRequestBody']; + }; + }; + UpdatePortingOrdersActivationJob: { + content: { + 'application/json': { + /** + * Format: date-time + * @description The desired activation time. The activation time should be between any of the activation windows. + * @example 2019-01-01T00:00:00Z + */ + activate_at?: string; + }; + }; + }; + VerifyCustomerServiceRecordPhoneNumberCoverage: { + content: { + 'application/json': { + /** @description The phone numbers list to be verified. */ + phone_numbers: string[]; + }; + }; + }; + /** @description A list of phone numbers and their verification codes */ + VerifyPortingVerificationCodes: { + content: { + 'application/json': { + verification_codes?: { + phone_number?: string; + code?: string; + }[]; + }; + }; + }; + }; + headers: never; + pathItems: never; +} +export type $defs = Record; +export interface operations { + ListBuckets: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Success */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'text/xml': components['schemas']['ListBucketsResponse']; + }; + }; + }; + }; + ListAccessIpAddresses: { + parameters: { + query?: { + 'filter[ip_source]'?: string; + 'filter[ip_address]'?: string; + 'filter[created_at][gt]'?: string; + 'filter[created_at][lt]'?: string; + 'page[number]'?: number; + 'page[size]'?: number; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['AccessIPAddressListResponseSchema']; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['Errors']; + }; + }; + }; + }; + CreateAccessIpAddress: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['AccessIPAddressPOST']; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['AccessIPAddressResponseSchema']; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['Errors']; + }; + }; + }; + }; + GetAccessIpAddress: { + parameters: { + query?: never; + header?: never; + path: { + access_ip_address_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['AccessIPAddressResponseSchema']; + }; + }; + }; + }; + DeleteAccessIpAddress: { + parameters: { + query?: never; + header?: never; + path: { + access_ip_address_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['AccessIPAddressResponseSchema']; + }; + }; + }; + }; + ListAccessIpRanges: { + parameters: { + query?: { + 'filter[cidr_block]'?: string; + 'filter[cidr_block][startswith]'?: string; + 'filter[cidr_block][endswith]'?: string; + 'filter[cidr_block][contains]'?: string; + 'filter[created_at][gt]'?: string; + 'filter[created_at][lt]'?: string; + 'page[number]'?: number; + 'page[size]'?: number; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['AccessIPRangeListResponseSchema']; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['Errors']; + }; + }; + }; + }; + CreateAccessIPRange: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['AccessIPRangePOST']; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['AccessIPRangeResponseSchema']; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['Errors']; + }; + }; + }; + }; + CreateBulkTelephonyCredentials: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Requested parameters to create credentials on bulk */ + requestBody: { + content: { + 'application/json': components['schemas']['BulkCredentialRequest']; + }; + }; + responses: { + 201: components['responses']['BulkCredentialResponse']; + /** @description Bad request */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + DeleteTelephonyCredentials: { + parameters: { + query: { + /** @description Filter by tag, required by bulk operations. */ + 'filter[tag]': components['parameters']['RequiredTag']; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 201: components['responses']['BulkCredentialResponse']; + /** @description Bad request */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + UpdateBulkTelephonyCredential: { + parameters: { + query: { + /** @description Filter by tag, required by bulk operations. */ + 'filter[tag]': components['parameters']['RequiredTag']; + }; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Parameters to update credentials on bulk */ + requestBody: { + content: { + 'application/json': components['schemas']['BulkCredentialRequest']; + }; + }; + responses: { + 201: components['responses']['BulkCredentialResponse']; + /** @description Bad request */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + BulkSimCardNetworkPreferences: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + 'application/json': { + /** @example [ + * "6b14e151-8493-4fa1-8664-1cc4e6d14158", + * "6b14e151-8493-4fa1-8664-1cc4e6d14158" + * ] */ + sim_card_ids?: string[]; + mobile_network_operators_preferences?: components['schemas']['MobileNetworkOperatorsPreferencesRequest']; + }; + }; + }; + responses: { + 202: components['responses']['BulkSIMCardNetworkPreferenceResponse']; + 422: components['responses']['UnprocessableEntity']; + }; + }; + PurchaseESim: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['ESimPurchase']; + }; + }; + responses: { + 202: components['responses']['RegisterSimCardsResponse']; + }; + }; + RegisterSimCards: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['SIMCardRegistration']; + }; + }; + responses: { + 202: components['responses']['RegisterSimCardsResponse']; + }; + }; + BulkCredentialAction: { + parameters: { + query: { + /** @description Filter by tag, required by bulk operations. */ + 'filter[tag]': components['parameters']['RequiredTag']; + }; + header?: never; + path: { + /** @description Identifies the action to be taken. Activate will change the status to active. Deactivate will change the status to inactive. */ + action: 'activate' | 'deactivate'; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['BulkCredentialResponse']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Bad request */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + FindAddresses: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + /** @description Filter addresses via the customer reference set. Matching is not case-sensitive. */ + 'filter[customer_reference][eq]'?: components['parameters']['FilterCustomerReferenceEquals']; + /** @description If present, addresses with customer_reference containing the given value will be returned. Matching is not case-sensitive. */ + 'filter[customer_reference][contains]'?: components['parameters']['FilterCustomerReferenceContains']; + /** @description If set as 'true', only addresses used as the emergency address for at least one active phone-number will be returned. When set to 'false', the opposite happens: only addresses not used as the emergency address from phone-numbers will be returned. */ + 'filter[used_as_emergency]'?: components['parameters']['FilterUsedAsEmergency']; + /** @description If present, addresses with street_address containing the given value will be returned. Matching is not case-sensitive. Requires at least three characters. */ + 'filter[street_address][contains]'?: components['parameters']['FilterStreetAddress']; + /** @description If present, only returns results with the address_book flag set to the given value. */ + 'filter[address_book][eq]'?: components['parameters']['FilterAddressBook']; + /** @description Specifies the sort order for results. By default sorting direction is ascending. To have the results sorted in descending order add the - prefix.

+ * That is:
    + *
  • + * street_address: sorts the result by the + * street_address field in ascending order. + *
  • + * + *
  • + * -street_address: sorts the result by the + * street_address field in descending order. + *
  • + *

If not given, results are sorted by created_at in descending order. */ + sort?: components['parameters']['SortAddress']; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['GetAllAddressResponse']; + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + CreateAddress: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Parameters that can be defined during address creation */ + requestBody: { + content: { + 'application/json': components['schemas']['AddressCreate']; + }; + }; + responses: { + 200: components['responses']['AddressResponse']; + /** @description Bad request */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + ValidateAddress: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Parameters that can be defined during address validation */ + requestBody: { + content: { + 'application/json': components['schemas']['ValidateAddressRequest']; + }; + }; + responses: { + 200: components['responses']['ValidateAddressResponse']; + /** @description Bad request */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + GetAddress: { + parameters: { + query?: never; + header?: never; + path: { + /** @description address ID */ + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['AddressResponse']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Bad request */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + DeleteAddress: { + parameters: { + query?: never; + header?: never; + path: { + /** @description address ID */ + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['AddressResponse']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Bad request */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + acceptAddressSuggestions: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The UUID of the address that should be accepted. */ + id: string; + }; + cookie?: never; + }; + requestBody?: { + content: { + 'application/json': components['schemas']['AcceptSuggestionsRequest']; + }; + }; + responses: { + /** @description This address suggestion has already been accepted. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['AddressSuggestionResponse']; + }; + }; + /** @description This address suggestion was accepted. The numbers associated to it will resume processing in the background. */ + 202: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['AddressSuggestionResponse']; + }; + }; + /** @description Address not found or not accessible by the user. */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['ResourceNotFoundError']; + }; + }; + }; + }; + get_assistants_public_assistants_get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['AssistantsListData']; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['HTTPValidationError']; + }; + }; + }; + }; + create_new_assistant_public_assistants_post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['CreateAssistantRequest']; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['Assistant']; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['HTTPValidationError']; + }; + }; + }; + }; + get_assistant_public_assistants__assistant_id__get: { + parameters: { + query?: never; + header?: never; + path: { + assistant_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['Assistant']; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['HTTPValidationError']; + }; + }; + }; + }; + update_assistant_public_assistants__assistant_id__post: { + parameters: { + query?: never; + header?: never; + path: { + assistant_id: string; + }; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['UpdateAssistantRequest']; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': unknown; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['HTTPValidationError']; + }; + }; + }; + }; + delete_assistant_public_assistants__assistant_id__delete: { + parameters: { + query?: never; + header?: never; + path: { + assistant_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['AssistantDeletedResponse']; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['HTTPValidationError']; + }; + }; + }; + }; + audio_public_audio_transcriptions_post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + 'multipart/form-data': components['schemas']['AudioTranscriptionRequest']; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['AudioTranscriptionResponse']; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['HTTPValidationError']; + }; + }; + }; + }; + chat_public_chat_completions_post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + /** @example { + * "messages": [ + * { + * "role": "system", + * "content": "You are a friendly chatbot." + * }, + * { + * "role": "user", + * "content": "Hello, world!" + * } + * ] + * } */ + 'application/json': components['schemas']['ChatCompletionRequest']; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': unknown; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['HTTPValidationError']; + }; + }; + }; + }; + GetTasksByStatus: { + parameters: { + query?: { + /** @description List of task statuses i.e. `status=queued&status=processing` */ + status?: string[]; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['BackgroundTasksQueryResponseData']; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['HTTPValidationError']; + }; + }; + }; + }; + PostEmbedding: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['EmbeddingBucketRequest']; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['EmbeddingResponse']; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['HTTPValidationError']; + }; + }; + }; + }; + GetEmbeddingBuckets: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['UserEmbeddedBucketsData']; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['HTTPValidationError']; + }; + }; + }; + }; + GetBucketName: { + parameters: { + query?: never; + header?: never; + path: { + bucket_name: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['EmbeddingsBucketFilesData']; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['HTTPValidationError']; + }; + }; + }; + }; + embedding_bucket_files_public_embedding_buckets__bucket_name__delete: { + parameters: { + query?: never; + header?: never; + path: { + bucket_name: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Bucket Embeddings Deleted Successfully */ + 200: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Bucket Not Found */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['BucketNotFoundError']; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['HTTPValidationError']; + }; + }; + }; + }; + PostEmbeddingSimilaritySearch: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['EmbeddingSimilaritySearchRequest']; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['EmbeddingSimilaritySearchResponse']; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['HTTPValidationError']; + }; + }; + }; + }; + GetEmbeddingTask: { + parameters: { + query?: never; + header?: never; + path: { + task_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['TaskStatusResponse']; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['HTTPValidationError']; + }; + }; + }; + }; + get_models_public_models_get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['ModelsResponse']; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['HTTPValidationError']; + }; + }; + }; + }; + PostSummary: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['SummaryRequest']; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['SummaryResponseData']; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['HTTPValidationError']; + }; + }; + }; + }; + FindAuthenticationProviders: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + /** @description Specifies the sort order for results. By default sorting direction is ascending. To have the results sorted in descending order add the - prefix.

+ * That is:
    + *
  • + * name: sorts the result by the + * name field in ascending order. + *
  • + * + *
  • + * -name: sorts the result by the + * name field in descending order. + *
  • + *

If not given, results are sorted by created_at in descending order. */ + sort?: components['parameters']['SortAuthenticationProvider']; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['GetAllAuthenticationProviderResponse']; + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + CreateAuthenticationProvider: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Parameters that can be defined during authentication provider creation */ + requestBody: { + content: { + 'application/json': components['schemas']['AuthenticationProviderCreate']; + }; + }; + responses: { + 200: components['responses']['AuthenticationProviderResponse']; + /** @description Bad request */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + GetAuthenticationProvider: { + parameters: { + query?: never; + header?: never; + path: { + /** @description authentication provider ID */ + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['AuthenticationProviderResponse']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Bad request */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + DeleteAuthenticationProvider: { + parameters: { + query?: never; + header?: never; + path: { + /** @description authentication provider ID */ + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['AuthenticationProviderResponse']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Bad request */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + UpdateAuthenticationProvider: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: string; + }; + cookie?: never; + }; + /** @description Parameters that can be updated in a authentication provider */ + requestBody: { + content: { + 'application/json': components['schemas']['UpdateAuthenticationProviderRequest']; + }; + }; + responses: { + 200: components['responses']['AuthenticationProviderResponse']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Bad request */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + ListAvailablePhoneNumberBlocks: { + parameters: { + query?: { + /** @description Filter phone numbers by city. */ + 'filter[locality]'?: string; + /** @description Filter phone numbers by country. */ + 'filter[country_code]'?: string; + /** @description Filter by the national destination code of the number. */ + 'filter[national_destination_code]'?: string; + /** @description Filter phone numbers by number type. */ + 'filter[phone_number_type]'?: + | 'local' + | 'toll_free' + | 'mobile' + | 'national' + | 'shared_cost'; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListAvailablePhoneNumbersBlockResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + ListAvailablePhoneNumbers: { + parameters: { + query?: { + /** @description Filter numbers starting with a pattern (excludes NDC if used with `national_destination_code` filter). */ + 'filter[phone_number][starts_with]'?: string; + /** @description Filter numbers ending with a pattern (excludes NDC if used with `national_destination_code` filter). */ + 'filter[phone_number][ends_with]'?: string; + /** @description Filter numbers containing a pattern (excludes NDC if used with `national_destination_code` filter). */ + 'filter[phone_number][contains]'?: string; + /** @description Filter phone numbers by city. */ + 'filter[locality]'?: string; + /** @description Find numbers in a particular US state or CA province. */ + 'filter[administrative_area]'?: string; + /** @description Filter phone numbers by country. */ + 'filter[country_code]'?: string; + /** @description Filter by the national destination code of the number. */ + 'filter[national_destination_code]'?: string; + /** @description Filter phone numbers by rate center. This filter is only applicable to USA and Canada numbers. */ + 'filter[rate_center]'?: string; + /** @description Filter phone numbers by number type. */ + 'filter[phone_number_type]'?: + | 'local' + | 'toll_free' + | 'mobile' + | 'national' + | 'shared_cost'; + /** @description Filter phone numbers with specific features. */ + 'filter[features]'?: ( + | 'sms' + | 'mms' + | 'voice' + | 'fax' + | 'emergency' + | 'hd_voice' + | 'international_sms' + | 'local_calling' + )[]; + /** @description Limits the number of results. */ + 'filter[limit]'?: number; + /** @description Filter to determine if best effort results should be included. Only available in USA/CANADA. */ + 'filter[best_effort]'?: boolean; + /** @description Filter to exclude phone numbers that need additional time after to purchase to activate. Only applicable for +1 toll_free numbers. */ + 'filter[quickship]'?: boolean; + /** @description Filter to ensure only numbers that can be reserved are included in the results. */ + 'filter[reservable]'?: boolean; + /** @description Filter to exclude phone numbers that are currently on hold/reserved for your account. */ + 'filter[exclude_held_numbers]'?: boolean; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListAvailablePhoneNumbersResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + GetUserBalance: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['UserBalanceResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + ListBillingGroups: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListBillingGroupsResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + CreateBillingGroup: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description New billing group object */ + requestBody: { + content: { + 'application/json': components['schemas']['NewBillingGroup']; + }; + }; + responses: { + 200: components['responses']['CreateBillingGroupResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + GetBillingGroup: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The id of the billing group */ + id: components['parameters']['BillingGroupId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['RetrieveBillingGroupResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + DeleteBillingGroup: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The id of the billing group */ + id: components['parameters']['BillingGroupId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['DeleteBillingGroupResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + UpdateBillingGroup: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The id of the billing group */ + id: components['parameters']['BillingGroupId']; + }; + cookie?: never; + }; + /** @description Update billing group object */ + requestBody: { + content: { + 'application/json': components['schemas']['UpdateBillingGroup']; + }; + }; + responses: { + 200: components['responses']['UpdateBillingGroupResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + GetBrands: { + parameters: { + query?: { + page?: number; + /** @description number of records per page. maximum of 500 */ + recordsPerPage?: number; + /** + * @description Specifies the sort order for results. If not given, results are sorted by createdAt in descending order. + * @example -identityStatus + */ + sort?: + | 'assignedCampaignsCount' + | '-assignedCampaignsCount' + | 'brandId' + | '-brandId' + | 'createdAt' + | '-createdAt' + | 'displayName' + | '-displayName' + | 'identityStatus' + | '-identityStatus' + | 'status' + | '-status' + | 'tcrBrandId' + | '-tcrBrandId'; + displayName?: string; + entityType?: string; + state?: string; + country?: string; + /** @description Filter results by the Telnyx Brand id */ + brandId?: string; + /** @description Filter results by the TCR Brand id */ + tcrBrandId?: string; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['BrandRecordSetCSP']; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['HTTPValidationError']; + }; + }; + }; + }; + CreateBrandPost: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['CreateBrand']; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['TelnyxBrand']; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['HTTPValidationError']; + }; + }; + }; + }; + GetBrandFeedbackById: { + parameters: { + query?: never; + header?: never; + path: { + brandId: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['BrandFeedback']; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['HTTPValidationError']; + }; + }; + }; + }; + GetBrand: { + parameters: { + query?: never; + header?: never; + path: { + brandId: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['TelnyxBrandWithCampaignsCount']; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['HTTPValidationError']; + }; + }; + }; + }; + UpdateBrand: { + parameters: { + query?: never; + header?: never; + path: { + brandId: string; + }; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['UpdateBrand']; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['TelnyxBrand']; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['HTTPValidationError']; + }; + }; + }; + }; + DeleteBrand: { + parameters: { + query?: never; + header?: never; + path: { + brandId: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': unknown; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['HTTPValidationError']; + }; + }; + }; + }; + ResendBrand2faEmail: { + parameters: { + query?: never; + header?: never; + path: { + brandId: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + ListExternalVettings: { + parameters: { + query?: never; + header?: never; + path: { + brandId: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': unknown; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['HTTPValidationError']; + }; + }; + }; + }; + PutExternalVettingRecord: { + parameters: { + query?: never; + header?: never; + path: { + brandId: string; + }; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['ImportExternalVetting']; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['ExternalVetting']; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['HTTPValidationError']; + }; + }; + }; + }; + PostOrderExternalVetting: { + parameters: { + query?: never; + header?: never; + path: { + brandId: string; + }; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['OrderExternalVetting']; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': unknown; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['HTTPValidationError']; + }; + }; + }; + }; + RevetBrand: { + parameters: { + query?: never; + header?: never; + path: { + brandId: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': unknown; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['HTTPValidationError']; + }; + }; + }; + }; + ListBulkSimCardActions: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + /** @description Filter by action type. */ + 'filter[action_type]'?: 'bulk_set_public_ips'; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['BulkSIMCardActionCollectionResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + GetBulkSimCardAction: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['ResourceId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['BulkSIMCardActionDetailedResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + ListCallControlApplications: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + /** @description If present, applications with application_name containing the given value will be returned. Matching is not case-sensitive. Requires at least three characters. */ + 'filter[application_name][contains]'?: components['parameters']['FilterApplicationName']; + /** @description Identifies the associated outbound voice profile. */ + 'filter[outbound_voice_profile_id]'?: components['parameters']['FilterOutboundVoiceProfileId']; + /** @description Specifies the sort order for results. By default sorting direction is ascending. To have the results sorted in descending order add the - prefix.

+ * That is:
    + *
  • + * connection_name: sorts the result by the + * connection_name field in ascending order. + *
  • + * + *
  • + * -connection_name: sorts the result by the + * connection_name field in descending order. + *
  • + *

If not given, results are sorted by created_at in descending order. */ + sort?: components['parameters']['SortConnection']; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListCallControlApplicationsResponse']; + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + 401: components['responses']['UnauthorizedResponse']; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + CreateCallControlApplication: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Create call control application request. */ + requestBody: { + content: { + 'application/json': components['schemas']['CreateCallControlApplicationRequest']; + }; + }; + responses: { + 201: components['responses']['CallControlApplicationResponse']; + /** @description Bad Request */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + RetrieveCallControlApplication: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['CallControlApplicationResponse']; + 401: components['responses']['UnauthorizedResponse']; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Bad request */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + DeleteCallControlApplication: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['CallControlApplicationResponse']; + 401: components['responses']['UnauthorizedResponse']; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Bad request */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + UpdateCallControlApplication: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: string; + }; + cookie?: never; + }; + /** @description Update call control application request. */ + requestBody: { + content: { + 'application/json': components['schemas']['UpdateCallControlApplicationRequest']; + }; + }; + responses: { + 200: components['responses']['CallControlApplicationResponse']; + 401: components['responses']['UnauthorizedResponse']; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Bad request */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + ListCallEvents: { + parameters: { + query?: { + /** @description The unique identifier of an individual call leg. */ + 'filter[call_leg_id]'?: components['parameters']['FilterCallLegId']; + /** @description The unique identifier of the call control session. A session may include multiple call leg events. */ + 'filter[call_session_id]'?: components['parameters']['FilterCallSessionId']; + /** @description Event status */ + 'filter[status]'?: components['parameters']['FilterCallEventStatus']; + /** @description Event type */ + 'filter[type]'?: components['parameters']['FilterCallEventType']; + /** @description Event timestamp: greater than */ + 'filter[event_timestamp][gt]'?: components['parameters']['FilterCallEventTimestampGreaterThan']; + /** @description Event timestamp: greater than or equal */ + 'filter[event_timestamp][gte]'?: components['parameters']['FilterCallEventTimestampGreaterThanOrEqualTo']; + /** @description Event timestamp: lower than */ + 'filter[event_timestamp][lt]'?: components['parameters']['FilterCallEventTimestampLessThan']; + /** @description Event timestamp: lower than or equal */ + 'filter[event_timestamp][lte]'?: components['parameters']['FilterCallEventTimestampLessThanOrEqualTo']; + /** @description Event timestamp: equal */ + 'filter[event_timestamp][eq]'?: components['parameters']['FilterCallEventTimestampEqualTo']; + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListCallEventsResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + DialCall: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Call request */ + requestBody: { + content: { + 'application/json': components['schemas']['CallRequest']; + }; + }; + responses: { + 200: components['responses']['RetrieveCallStatusResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + RetrieveCallStatus: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Unique identifier and token for controlling the call */ + call_control_id: components['parameters']['CallControlId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['RetrieveCallStatusResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + AnswerCall: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Unique identifier and token for controlling the call */ + call_control_id: components['parameters']['CallControlId']; + }; + cookie?: never; + }; + /** @description Answer call request */ + requestBody: { + content: { + 'application/json': components['schemas']['AnswerRequest']; + }; + }; + responses: { + 200: components['responses']['CallControlCommandResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + BridgeCall: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Unique identifier and token for controlling the call */ + call_control_id: components['parameters']['CallControlId']; + }; + cookie?: never; + }; + /** @description Bridge call request */ + requestBody: { + content: { + 'application/json': components['schemas']['BridgeRequest']; + }; + }; + responses: { + 200: components['responses']['CallControlCommandResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + UpdateClientState: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Unique identifier and token for controlling the call */ + call_control_id: components['parameters']['CallControlId']; + }; + cookie?: never; + }; + /** @description Updates client state for every subsequent webhook */ + requestBody: { + content: { + 'application/json': components['schemas']['ClientStateUpdateRequest']; + }; + }; + responses: { + 200: components['responses']['CallControlCommandResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + EnqueueCall: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Unique identifier and token for controlling the call */ + call_control_id: components['parameters']['CallControlId']; + }; + cookie?: never; + }; + /** @description Enqueue call request */ + requestBody: { + content: { + 'application/json': components['schemas']['EnqueueRequest']; + }; + }; + responses: { + 200: components['responses']['CallControlCommandResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + StartCallFork: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Unique identifier and token for controlling the call */ + call_control_id: components['parameters']['CallControlId']; + }; + cookie?: never; + }; + /** @description Fork media request */ + requestBody: { + content: { + 'application/json': components['schemas']['StartForkingRequest']; + }; + }; + responses: { + 200: components['responses']['CallControlCommandResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + StopCallFork: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Unique identifier and token for controlling the call */ + call_control_id: components['parameters']['CallControlId']; + }; + cookie?: never; + }; + /** @description Stop forking media request */ + requestBody: { + content: { + 'application/json': components['schemas']['StopForkingRequest']; + }; + }; + responses: { + 200: components['responses']['CallControlCommandResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + GatherCall: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Unique identifier and token for controlling the call */ + call_control_id: components['parameters']['CallControlId']; + }; + cookie?: never; + }; + /** @description Gather */ + requestBody: { + content: { + 'application/json': components['schemas']['GatherRequest']; + }; + }; + responses: { + 200: components['responses']['CallControlCommandResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + StopCallGather: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Unique identifier and token for controlling the call */ + call_control_id: components['parameters']['CallControlId']; + }; + cookie?: never; + }; + /** @description Stop current gather */ + requestBody: { + content: { + 'application/json': components['schemas']['StopGatherRequest']; + }; + }; + responses: { + 200: components['responses']['CallControlCommandResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + callGatherUsingAI: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Unique identifier and token for controlling the call */ + call_control_id: components['parameters']['CallControlId']; + }; + cookie?: never; + }; + /** @description Gather using AI request */ + requestBody: { + content: { + 'application/json': components['schemas']['GatherUsingAIRequest']; + }; + }; + responses: { + 200: components['responses']['CallControlCommandResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + GatherUsingAudio: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Unique identifier and token for controlling the call */ + call_control_id: components['parameters']['CallControlId']; + }; + cookie?: never; + }; + /** @description Gather using audio request */ + requestBody: { + content: { + 'application/json': components['schemas']['GatherUsingAudioRequest']; + }; + }; + responses: { + 200: components['responses']['CallControlCommandResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + GatherUsingSpeak: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Unique identifier and token for controlling the call */ + call_control_id: components['parameters']['CallControlId']; + }; + cookie?: never; + }; + /** @description Gather using speak request */ + requestBody: { + content: { + 'application/json': components['schemas']['GatherUsingSpeakRequest']; + }; + }; + responses: { + 200: components['responses']['CallControlCommandResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + HangupCall: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Unique identifier and token for controlling the call */ + call_control_id: components['parameters']['CallControlId']; + }; + cookie?: never; + }; + /** @description Hangup request */ + requestBody: { + content: { + 'application/json': components['schemas']['HangupRequest']; + }; + }; + responses: { + 200: components['responses']['CallControlCommandResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + LeaveQueue: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Unique identifier and token for controlling the call */ + call_control_id: components['parameters']['CallControlId']; + }; + cookie?: never; + }; + /** @description Removes the call from the queue, the call currently is enqueued in. */ + requestBody: { + content: { + 'application/json': components['schemas']['LeaveQueueRequest']; + }; + }; + responses: { + 200: components['responses']['CallControlCommandResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + StartCallPlayback: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Unique identifier and token for controlling the call */ + call_control_id: components['parameters']['CallControlId']; + }; + cookie?: never; + }; + /** @description Play audio URL request */ + requestBody: { + content: { + 'application/json': components['schemas']['PlayAudioUrlRequest']; + }; + }; + responses: { + 200: components['responses']['CallControlCommandResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + StopCallPlayback: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Unique identifier and token for controlling the call */ + call_control_id: components['parameters']['CallControlId']; + }; + cookie?: never; + }; + /** @description Stop audio playback request */ + requestBody: { + content: { + 'application/json': components['schemas']['PlaybackStopRequest']; + }; + }; + responses: { + 200: components['responses']['CallControlCommandResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + PauseCallRecording: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Unique identifier and token for controlling the call */ + call_control_id: components['parameters']['CallControlId']; + }; + cookie?: never; + }; + /** @description Pause recording call request */ + requestBody: { + content: { + 'application/json': components['schemas']['PauseRecordingRequest']; + }; + }; + responses: { + 200: components['responses']['CallControlCommandResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + ResumeCallRecording: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Unique identifier and token for controlling the call */ + call_control_id: components['parameters']['CallControlId']; + }; + cookie?: never; + }; + /** @description Resume recording call request */ + requestBody: { + content: { + 'application/json': components['schemas']['ResumeRecordingRequest']; + }; + }; + responses: { + 200: components['responses']['CallControlCommandResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + StartCallRecord: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Unique identifier and token for controlling the call */ + call_control_id: components['parameters']['CallControlId']; + }; + cookie?: never; + }; + /** @description Start recording audio request */ + requestBody: { + content: { + 'application/json': components['schemas']['StartRecordingRequest']; + }; + }; + responses: { + 200: components['responses']['CallControlCommandResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + StopCallRecording: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Unique identifier and token for controlling the call */ + call_control_id: components['parameters']['CallControlId']; + }; + cookie?: never; + }; + /** @description Stop recording call request */ + requestBody: { + content: { + 'application/json': components['schemas']['StopRecordingRequest']; + }; + }; + responses: { + 200: components['responses']['CallControlCommandResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + ReferCall: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Unique identifier and token for controlling the call */ + call_control_id: components['parameters']['CallControlId']; + }; + cookie?: never; + }; + /** @description Refer request */ + requestBody: { + content: { + 'application/json': components['schemas']['ReferRequest']; + }; + }; + responses: { + 200: components['responses']['CallControlCommandResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + RejectCall: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Unique identifier and token for controlling the call */ + call_control_id: components['parameters']['CallControlId']; + }; + cookie?: never; + }; + /** @description Reject request */ + requestBody: { + content: { + 'application/json': components['schemas']['RejectRequest']; + }; + }; + responses: { + 200: components['responses']['CallControlCommandResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + SendDTMF: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Unique identifier and token for controlling the call */ + call_control_id: components['parameters']['CallControlId']; + }; + cookie?: never; + }; + /** @description Send DTMF request */ + requestBody: { + content: { + 'application/json': components['schemas']['SendDTMFRequest']; + }; + }; + responses: { + 200: components['responses']['CallControlCommandResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + SendSIPInfo: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Unique identifier and token for controlling the call */ + call_control_id: components['parameters']['CallControlId']; + }; + cookie?: never; + }; + /** @description Send SIP INFO request */ + requestBody: { + content: { + 'application/json': components['schemas']['SendSIPInfoRequest']; + }; + }; + responses: { + 200: components['responses']['CallControlCommandResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + SpeakCall: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Unique identifier and token for controlling the call */ + call_control_id: components['parameters']['CallControlId']; + }; + cookie?: never; + }; + /** @description Speak request */ + requestBody: { + content: { + 'application/json': components['schemas']['SpeakRequest']; + }; + }; + responses: { + 200: components['responses']['CallControlCommandResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + StartCallStreaming: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Unique identifier and token for controlling the call */ + call_control_id: components['parameters']['CallControlId']; + }; + cookie?: never; + }; + /** @description Start streaming media request */ + requestBody: { + content: { + 'application/json': components['schemas']['StartStreamingRequest']; + }; + }; + responses: { + 200: components['responses']['CallControlCommandResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + StopCallStreaming: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Unique identifier and token for controlling the call */ + call_control_id: components['parameters']['CallControlId']; + }; + cookie?: never; + }; + /** @description Stop streaming media request */ + requestBody: { + content: { + 'application/json': components['schemas']['StopStreamingRequest']; + }; + }; + responses: { + 200: components['responses']['CallControlCommandResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + noiseSuppressionStart: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Unique identifier and token for controlling the call */ + call_control_id: components['parameters']['CallControlId']; + }; + cookie?: never; + }; + /** @description Start streaming media request */ + requestBody: { + content: { + 'application/json': components['schemas']['NoiseSuppressionStart']; + }; + }; + responses: { + 200: components['responses']['CallControlCommandResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + noiseSuppressionStop: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Unique identifier and token for controlling the call */ + call_control_id: components['parameters']['CallControlId']; + }; + cookie?: never; + }; + /** @description Start streaming media request */ + requestBody: { + content: { + 'application/json': components['schemas']['NoiseSuppressionStop']; + }; + }; + responses: { + 200: components['responses']['CallControlCommandResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + StartCallTranscription: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Unique identifier and token for controlling the call */ + call_control_id: components['parameters']['CallControlId']; + }; + cookie?: never; + }; + /** @description Transcription start request */ + requestBody: { + content: { + 'application/json': components['schemas']['TranscriptionStartRequest']; + }; + }; + responses: { + 200: components['responses']['CallControlCommandResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + StopCallTranscription: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Unique identifier and token for controlling the call */ + call_control_id: components['parameters']['CallControlId']; + }; + cookie?: never; + }; + /** @description Transcription stop request */ + requestBody: { + content: { + 'application/json': components['schemas']['TranscriptionStopRequest']; + }; + }; + responses: { + 200: components['responses']['CallControlCommandResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + TransferCall: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Unique identifier and token for controlling the call */ + call_control_id: components['parameters']['CallControlId']; + }; + cookie?: never; + }; + /** @description Transfer call request */ + requestBody: { + content: { + 'application/json': components['schemas']['TransferCallRequest']; + }; + }; + responses: { + 200: components['responses']['CallControlCommandResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + GetCampaigns: { + parameters: { + query: { + brandId: string; + /** @description The 1-indexed page number to get. The default value is `1`. */ + page?: number; + /** @description The amount of records per page, limited to between 1 and 500 inclusive. The default value is `10`. */ + recordsPerPage?: number; + /** + * @description Specifies the sort order for results. If not given, results are sorted by createdAt in descending order. + * @example -assignedPhoneNumbersCount + */ + sort?: + | 'assignedPhoneNumbersCount' + | '-assignedPhoneNumbersCount' + | 'createdAt' + | '-createdAt' + | 'status' + | '-status' + | 'tcrCampaignId' + | '-tcrCampaignId'; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['CampaignRecordSet_CSP']; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['HTTPValidationError']; + }; + }; + }; + }; + AcceptCampaign: { + parameters: { + query?: never; + header?: never; + path: { + /** @description TCR's ID for the campaign to import */ + campaignId: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': unknown; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['HTTPValidationError']; + }; + }; + }; + }; + GetCampaignCost: { + parameters: { + query: { + usecase: string; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['CampaignCost']; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['HTTPValidationError']; + }; + }; + }; + }; + GetCampaign: { + parameters: { + query?: never; + header?: never; + path: { + campaignId: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['TelnyxCampaign_CSP']; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['HTTPValidationError']; + }; + }; + }; + }; + UpdateCampaign: { + parameters: { + query?: never; + header?: never; + path: { + campaignId: string; + }; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['UpdateCampaignRequest']; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['TelnyxCampaign_CSP']; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['HTTPValidationError']; + }; + }; + }; + }; + DeactivateCampaign: { + parameters: { + query?: never; + header?: never; + path: { + campaignId: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['CampaignDeletionResponse']; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['HTTPValidationError']; + }; + }; + }; + }; + GetCampaignMnoMetadata: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the campaign in question */ + campaignId: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response. It constains a map of usecase metadata for each MNO. The key is the network ID of the MNO (e.g. 10017), the value is the mno metadata for the usecase. The metadata may also include some MNO specific fields. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['MnoMetadata']; + }; + }; + /** @description Unexpected Error */ + default: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['Errors']; + }; + }; + }; + }; + GetCampaignOperationStatus: { + parameters: { + query?: never; + header?: never; + path: { + campaignId: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': Record; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['HTTPValidationError']; + }; + }; + }; + }; + GetCampaignOsrAttributes: { + parameters: { + query?: never; + header?: never; + path: { + campaignId: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': Record; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['HTTPValidationError']; + }; + }; + }; + }; + GetCampaignSharingStatus: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the campaign in question */ + campaignId: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['CampaignSharingChain']; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['HTTPValidationError']; + }; + }; + }; + }; + PostCampaign: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['CampaignRequest']; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': + | Record + | components['schemas']['TelnyxCampaign_CSP']; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['HTTPValidationError']; + }; + }; + }; + }; + GetUsecaseQualification: { + parameters: { + query?: never; + header?: never; + path: { + usecase: string; + brandId: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['UsecaseMetadata']; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['HTTPValidationError']; + }; + }; + }; + }; + GetChannelZones: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['GetGcbChannelZonesRequestResponse']; + }; + }; + GetChannelZone: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Channel zone identifier */ + channel_zone_id: components['parameters']['GcbChannelZoneId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['GetGcbChannelZoneRequestResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + PatchChannelZone: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Channel zone identifier */ + channel_zone_id: components['parameters']['GcbChannelZoneId']; + }; + cookie?: never; + }; + /** @description Quantity of reserved channels */ + requestBody: { + content: { + 'application/json': { + /** Format: int64 */ + channels?: number; + }; + }; + }; + responses: { + 200: components['responses']['PatchGcbChannelZoneRequestResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + GetPhoneNumbers: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + }; + header?: never; + path: { + /** @description Channel zone identifier */ + channel_zone_id: components['parameters']['GcbChannelZoneId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['GetGcbPhoneNumbersRequestResponse']; + }; + }; + AssignPhoneNumber: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Channel zone identifier */ + channel_zone_id: components['parameters']['GcbChannelZoneId']; + }; + cookie?: never; + }; + /** @description Phone number to assign to the channel zone. The phone number should be in E.164 format. */ + requestBody: { + content: { + 'application/json': { + /** + * Format: +E.164 + * @example +15554441234 + */ + phone_number: string; + }; + }; + }; + responses: { + 200: components['responses']['PostGcbPhoneNumberRequestResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + UnassignPhoneNumber: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Channel zone identifier */ + channel_zone_id: components['parameters']['GcbChannelZoneId']; + /** @description The phone number to be looked up */ + phone_number: components['parameters']['GcbPhoneNumber']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The phone number is successfully deleted */ + 200: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + default: components['responses']['GenericErrorResponse']; + }; + }; + ListComments: { + parameters: { + query: { + /** @description Record type that the comment relates to i.e number_order, sub_number_order or number_order_phone_number */ + 'filter[comment_record_type]': string; + /** @description ID of the record the comments relate to */ + 'filter[comment_record_id]': string; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['listCommentsResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + RetrieveComment: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The comment ID. */ + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['CommentResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + MarkCommentRead: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The comment ID. */ + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ReadCommentResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + ListConferences: { + parameters: { + query?: { + /** @description If present, conferences will be filtered to those with a matching `name` attribute. Matching is case-sensitive */ + 'filter[name]'?: components['parameters']['FilterConferenceName']; + /** @description If present, conferences will be filtered by status. */ + 'filter[status]'?: components['parameters']['FilterConferenceStatus']; + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListConferencesResponse']; + 401: components['responses']['UnauthorizedResponse']; + 422: components['responses']['UnprocessableEntityResponse']; + }; + }; + CreateConference: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Create a conference */ + requestBody: { + content: { + 'application/json': components['schemas']['CreateConferenceRequest']; + }; + }; + responses: { + 200: components['responses']['ConferenceResponse']; + 401: components['responses']['UnauthorizedResponse']; + 422: components['responses']['UnprocessableEntityResponse']; + }; + }; + ListConferenceParticipants: { + parameters: { + query?: { + /** @description If present, participants will be filtered to those who are/are not muted */ + 'filter[muted]'?: boolean; + /** @description If present, participants will be filtered to those who are/are not put on hold */ + 'filter[on_hold]'?: boolean; + /** @description If present, participants will be filtered to those who are whispering or are not */ + 'filter[whispering]'?: boolean; + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + }; + header?: never; + path: { + /** @description Uniquely identifies the conference by id */ + conference_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListParticipantsResponse']; + 401: components['responses']['UnauthorizedResponse']; + 404: components['responses']['NotFoundResponse']; + 422: components['responses']['UnprocessableEntityResponse']; + }; + }; + RetrieveConference: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Uniquely identifies the conference by id */ + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ConferenceResponse']; + 404: components['responses']['NotFoundResponse']; + }; + }; + HoldConferenceParticipants: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Uniquely identifies the conference by id or name */ + id: string; + }; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['ConferenceHoldRequest']; + }; + }; + responses: { + 200: components['responses']['ConferenceCommandResponse']; + 401: components['responses']['UnauthorizedResponse']; + 404: components['responses']['NotFoundResponse']; + 422: components['responses']['UnprocessableEntityResponse']; + }; + }; + JoinConference: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Uniquely identifies the conference by id or name */ + id: string; + }; + cookie?: never; + }; + /** @description Join Conference request object */ + requestBody: { + content: { + 'application/json': components['schemas']['JoinConferenceRequest']; + }; + }; + responses: { + 200: components['responses']['ConferenceCommandResponse']; + 401: components['responses']['UnauthorizedResponse']; + 422: components['responses']['UnprocessableEntityResponse']; + }; + }; + LeaveConference: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Uniquely identifies the conference by id or name */ + id: string; + }; + cookie?: never; + }; + /** @description Leave Conference request object */ + requestBody: { + content: { + 'application/json': components['schemas']['LeaveConferenceRequest']; + }; + }; + responses: { + 200: components['responses']['ConferenceCommandResponse']; + 401: components['responses']['UnauthorizedResponse']; + 422: components['responses']['UnprocessableEntityResponse']; + }; + }; + MuteConferenceParticipants: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Uniquely identifies the conference by id or name */ + id: string; + }; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['ConferenceMuteRequest']; + }; + }; + responses: { + 200: components['responses']['ConferenceCommandResponse']; + 401: components['responses']['UnauthorizedResponse']; + 404: components['responses']['NotFoundResponse']; + 422: components['responses']['UnprocessableEntityResponse']; + }; + }; + PlayConferenceAudio: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Uniquely identifies the conference by id or name */ + id: string; + }; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['ConferencePlayRequest']; + }; + }; + responses: { + 200: components['responses']['ConferenceCommandResponse']; + 401: components['responses']['UnauthorizedResponse']; + 404: components['responses']['NotFoundResponse']; + 422: components['responses']['UnprocessableEntityResponse']; + }; + }; + PauseConferenceRecording: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Specifies the conference by id or name */ + id: string; + }; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['PauseConferenceRecordingRequest']; + }; + }; + responses: { + 200: components['responses']['ConferenceCommandResponse']; + 401: components['responses']['UnauthorizedResponse']; + 404: components['responses']['NotFoundResponse']; + 422: components['responses']['UnprocessableEntityResponse']; + }; + }; + ResumeConferenceRecording: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Specifies the conference by id or name */ + id: string; + }; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['ResumeConferenceRecordingRequest']; + }; + }; + responses: { + 200: components['responses']['ConferenceCommandResponse']; + 401: components['responses']['UnauthorizedResponse']; + 404: components['responses']['NotFoundResponse']; + 422: components['responses']['UnprocessableEntityResponse']; + }; + }; + StartConferenceRecording: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Specifies the conference to record by id or name */ + id: string; + }; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['StartConferenceRecordingRequest']; + }; + }; + responses: { + 200: components['responses']['ConferenceCommandResponse']; + 401: components['responses']['UnauthorizedResponse']; + 404: components['responses']['NotFoundResponse']; + 422: components['responses']['UnprocessableEntityResponse']; + }; + }; + StopConferenceRecording: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Specifies the conference to stop the recording for by id or name */ + id: string; + }; + cookie?: never; + }; + /** @description Stop recording conference request */ + requestBody: { + content: { + 'application/json': components['schemas']['StopRecordingRequest']; + }; + }; + responses: { + 200: components['responses']['ConferenceCommandResponse']; + 401: components['responses']['UnauthorizedResponse']; + 404: components['responses']['NotFoundResponse']; + 422: components['responses']['UnprocessableEntityResponse']; + }; + }; + SpeakTextToConference: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Specifies the conference by id or name */ + id: string; + }; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['ConferenceSpeakRequest']; + }; + }; + responses: { + 200: components['responses']['ConferenceCommandResponse']; + 401: components['responses']['UnauthorizedResponse']; + 404: components['responses']['NotFoundResponse']; + 422: components['responses']['UnprocessableEntityResponse']; + }; + }; + StopConferenceAudio: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Uniquely identifies the conference by id or name */ + id: string; + }; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['ConferenceStopRequest']; + }; + }; + responses: { + 200: components['responses']['ConferenceCommandResponse']; + 401: components['responses']['UnauthorizedResponse']; + 404: components['responses']['NotFoundResponse']; + 422: components['responses']['UnprocessableEntityResponse']; + }; + }; + UnholdConferenceParticipants: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Uniquely identifies the conference by id or name */ + id: string; + }; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['ConferenceUnholdRequest']; + }; + }; + responses: { + 200: components['responses']['ConferenceCommandResponse']; + 401: components['responses']['UnauthorizedResponse']; + 404: components['responses']['NotFoundResponse']; + 422: components['responses']['UnprocessableEntityResponse']; + }; + }; + UnmuteConferenceParticipants: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Uniquely identifies the conference by id or name */ + id: string; + }; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['ConferenceUnmuteRequest']; + }; + }; + responses: { + 200: components['responses']['ConferenceCommandResponse']; + 401: components['responses']['UnauthorizedResponse']; + 404: components['responses']['NotFoundResponse']; + 422: components['responses']['UnprocessableEntityResponse']; + }; + }; + UpdateConference: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Uniquely identifies the conference by id or name */ + id: string; + }; + cookie?: never; + }; + /** @description Update Conference request object */ + requestBody: { + content: { + 'application/json': components['schemas']['UpdateConferenceRequest']; + }; + }; + responses: { + 200: components['responses']['ConferenceCommandResponse']; + 401: components['responses']['UnauthorizedResponse']; + 422: components['responses']['UnprocessableEntityResponse']; + }; + }; + ListConnections: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + /** @description If present, connections with connection_name containing the given value will be returned. Matching is not case-sensitive. Requires at least three characters. */ + 'filter[connection_name][contains]'?: components['parameters']['FilterConnectionName']; + /** @description Identifies the associated outbound voice profile. */ + 'filter[outbound_voice_profile_id]'?: components['parameters']['FilterOutboundVoiceProfileId']; + /** @description Specifies the sort order for results. By default sorting direction is ascending. To have the results sorted in descending order add the - prefix.

+ * That is:
    + *
  • + * connection_name: sorts the result by the + * connection_name field in ascending order. + *
  • + * + *
  • + * -connection_name: sorts the result by the + * connection_name field in descending order. + *
  • + *

If not given, results are sorted by created_at in descending order. */ + sort?: components['parameters']['SortConnection']; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListConnectionsResponse']; + 400: components['responses']['BadRequestResponse']; + 401: components['responses']['UnauthenticatedResponse']; + 403: components['responses']['UnauthorizedResponse']; + }; + }; + ListConnectionActiveCalls: { + parameters: { + query?: { + /** @description Limit of records per single page */ + 'page[limit]'?: components['parameters']['PageLimit']; + /** @description Opaque identifier of next page */ + 'page[after]'?: components['parameters']['PageAfter']; + /** @description Opaque identifier of previous page */ + 'page[before]'?: components['parameters']['PageBefore']; + }; + header?: never; + path: { + /** @description Uniquely identifies a Telnyx application (Call Control, TeXML) or Sip connection resource. */ + connection_id: components['parameters']['ConnectionId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ActiveCallsResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + RetrieveConnection: { + parameters: { + query?: never; + header?: never; + path: { + /** @description IP Connection ID */ + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ConnectionResponse']; + 400: components['responses']['BadRequestResponse']; + 401: components['responses']['UnauthenticatedResponse']; + 403: components['responses']['UnauthorizedResponse']; + 404: components['responses']['NotFoundResponse']; + }; + }; + retreiveCountryCoverage: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['CountryCoverageResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + retreiveSpecificCountryCoverage: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Country ISO code. */ + country_code: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['SpecificCountryResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + ListCredentialConnections: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + /** @description If present, connections with connection_name containing the given value will be returned. Matching is not case-sensitive. Requires at least three characters. */ + 'filter[connection_name][contains]'?: components['parameters']['FilterConnectionName']; + /** @description Identifies the associated outbound voice profile. */ + 'filter[outbound.outbound_voice_profile_id]'?: components['parameters']['FilterInnerOutboundVoiceProfileId']; + /** @description Specifies the sort order for results. By default sorting direction is ascending. To have the results sorted in descending order add the - prefix.

+ * That is:
    + *
  • + * connection_name: sorts the result by the + * connection_name field in ascending order. + *
  • + * + *
  • + * -connection_name: sorts the result by the + * connection_name field in descending order. + *
  • + *

If not given, results are sorted by created_at in descending order. */ + sort?: components['parameters']['SortConnection']; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListCredentialConnectionsResponse']; + 400: components['responses']['BadRequestResponse']; + 401: components['responses']['UnauthenticatedResponse']; + 403: components['responses']['UnauthorizedResponse']; + }; + }; + CreateCredentialConnection: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Parameters that can be defined during credential connection creation */ + requestBody: { + content: { + 'application/json': components['schemas']['CreateCredentialConnectionRequest']; + }; + }; + responses: { + 201: components['responses']['CredentialConnectionResponse']; + 401: components['responses']['UnauthenticatedResponse']; + 403: components['responses']['UnauthorizedResponse']; + 422: components['responses']['UnprocessableEntityResponse']; + }; + }; + RetrieveCredentialConnection: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['CredentialConnectionResponse']; + 400: components['responses']['BadRequestResponse']; + 401: components['responses']['UnauthenticatedResponse']; + 403: components['responses']['UnauthorizedResponse']; + 404: components['responses']['NotFoundResponse']; + }; + }; + DeleteCredentialConnection: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['CredentialConnectionResponse']; + 400: components['responses']['BadRequestResponse']; + 401: components['responses']['UnauthenticatedResponse']; + 403: components['responses']['UnauthorizedResponse']; + 404: components['responses']['NotFoundResponse']; + }; + }; + UpdateCredentialConnection: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: string; + }; + cookie?: never; + }; + /** @description Parameters that can be updated in a credential connection */ + requestBody: { + content: { + 'application/json': components['schemas']['UpdateCredentialConnectionRequest']; + }; + }; + responses: { + 200: components['responses']['CredentialConnectionResponse']; + 401: components['responses']['UnauthenticatedResponse']; + 403: components['responses']['UnauthorizedResponse']; + 404: components['responses']['NotFoundResponse']; + 422: components['responses']['UnprocessableEntityResponse']; + }; + }; + CheckRegistrationStatus: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['RegistrationStatusResponse']; + 400: components['responses']['BadRequestResponse']; + 401: components['responses']['UnauthenticatedResponse']; + 403: components['responses']['UnauthorizedResponse']; + 404: components['responses']['NotFoundResponse']; + }; + }; + GetCustomStorageCredentials: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Uniquely identifies a Telnyx application (Call Control, TeXML) or Sip connection resource. */ + connection_id: components['parameters']['ConnectionId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['CredentialsResponseBody']; + default: components['responses']['GenericErrorResponse']; + }; + }; + UpdateCustomStorageCredentials: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Uniquely identifies a Telnyx application (Call Control, TeXML) or Sip connection resource. */ + connection_id: components['parameters']['ConnectionId']; + }; + cookie?: never; + }; + requestBody: components['requestBodies']['CreateCredentialsRequest']; + responses: { + 200: components['responses']['CredentialsResponseBody']; + default: components['responses']['GenericErrorResponse']; + }; + }; + CreateCustomStorageCredentials: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Uniquely identifies a Telnyx application (Call Control, TeXML) or Sip connection resource. */ + connection_id: components['parameters']['ConnectionId']; + }; + cookie?: never; + }; + requestBody: components['requestBodies']['CreateCredentialsRequest']; + responses: { + 200: components['responses']['CredentialsResponseBody']; + default: components['responses']['GenericErrorResponse']; + }; + }; + DeleteCustomStorageCredentials: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Uniquely identifies a Telnyx application (Call Control, TeXML) or Sip connection resource. */ + connection_id: components['parameters']['ConnectionId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The credentials configuration for connection_id was deleted successfully. */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + default: components['responses']['GenericErrorResponse']; + }; + }; + ListCustomerServiceRecords: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + /** @description Specifies the sort order for results. If not given, results are sorted by created_at in descending order. */ + 'sort[]'?: 'created_at' | '-created_at'; + /** @description Filters records to those with a specified number. */ + 'filter[phone_number][eq]'?: components['parameters']['PhoneNumberEqFilter']; + /** @description Filters records to those with at least one number in the list. */ + 'filter[phone_number][in][]'?: components['parameters']['PhoneNumberInFilter']; + /** @description Filters records to those with a specific status. */ + 'filter[status][eq]'?: components['parameters']['StatusEqFilter']; + /** @description Filters records to those with a least one status in the list. */ + 'filter[status][in][]'?: components['parameters']['StatusInFilter']; + /** @description Filters records to those created after a specific date. */ + 'filter[created_at][lt]'?: components['parameters']['CreatedAtGtFilter']; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListCustomerServiceRecords']; + 401: components['responses']['UnauthorizedErrorResponse']; + 403: components['responses']['ForbiddenErrorResponse']; + 422: components['responses']['UnprocessableEntityErrorResponse']; + 500: components['responses']['UnexpectedErrorResponse']; + }; + }; + CreateCustomerServiceRecord: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: components['requestBodies']['CreateCustomerServiceRecord']; + responses: { + 201: components['responses']['CreateCustomerServiceRecord']; + 401: components['responses']['UnauthorizedErrorResponse']; + 403: components['responses']['ForbiddenErrorResponse']; + 422: components['responses']['UnprocessableEntityErrorResponse']; + 500: components['responses']['UnexpectedErrorResponse']; + }; + }; + VerifyPhoneNumberCoverage: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: components['requestBodies']['VerifyCustomerServiceRecordPhoneNumberCoverage']; + responses: { + 201: components['responses']['ListCustomerServiceRecordPhoneNumberCoverage']; + 401: components['responses']['UnauthorizedErrorResponse']; + 403: components['responses']['ForbiddenErrorResponse']; + 422: components['responses']['UnprocessableEntityErrorResponse']; + 500: components['responses']['UnexpectedErrorResponse']; + }; + }; + GetCustomerServiceRecord: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The ID of the customer service record */ + customer_service_record_id: components['parameters']['PathCustomerServiceRecordId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 201: components['responses']['ShowCustomerServiceRecord']; + 401: components['responses']['UnauthorizedErrorResponse']; + 403: components['responses']['ForbiddenErrorResponse']; + 404: components['responses']['ResourceNotFoundErrorResponse']; + 500: components['responses']['UnexpectedErrorResponse']; + }; + }; + SearchDetailRecords: { + parameters: { + query: { + /** @description Filter by the given record type. */ + 'filter[record_type]': + | 'amd' + | 'conference' + | 'conference-participant' + | 'media_storage' + | 'messaging' + | 'verify' + | 'whatsapp' + | 'whatsapp-conversation' + | 'wireless'; + /** @description Filter by the given user-friendly date range. You can specify one of the following enum values, or a dynamic one using this format: last_N_days. */ + 'filter[date_range]'?: + | 'yesterday' + | 'today' + | 'tomorrow' + | 'last_week' + | 'this_week' + | 'next_week' + | 'last_month' + | 'this_month' + | 'next_month'; + /** @description Filter records on a given record attribute and value.
Example: filter[status]=delivered */ + filter?: { + [key: string]: unknown; + }; + /** @description Page number */ + 'page[number]'?: number; + /** @description Page size */ + 'page[size]'?: number; + /** @description Specifies the sort order for results.
Example: sort=-created_at */ + sort?: string[]; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['DetailRecordsSearchResponse']; + }; + }; + }; + }; + GetDialogflowConnection: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Uniquely identifies a Telnyx application (Call Control, TeXML) or Sip connection resource. */ + connection_id: components['parameters']['ConnectionId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['DialogflowConnectionResponseBody']; + default: components['responses']['GenericErrorResponse']; + }; + }; + UpdateDialogflowConnection: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Uniquely identifies a Telnyx application (Call Control, TeXML) or Sip connection resource. */ + connection_id: components['parameters']['ConnectionId']; + }; + cookie?: never; + }; + requestBody: components['requestBodies']['DialogflowConnectionRequest']; + responses: { + 200: components['responses']['DialogflowConnectionResponseBody']; + default: components['responses']['GenericErrorResponse']; + }; + }; + CreateDialogflowConnection: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Uniquely identifies a Telnyx application (Call Control, TeXML) or Sip connection resource. */ + connection_id: components['parameters']['ConnectionId']; + }; + cookie?: never; + }; + requestBody: components['requestBodies']['DialogflowConnectionRequest']; + responses: { + 201: components['responses']['DialogflowConnectionResponseBody']; + default: components['responses']['GenericErrorResponse']; + }; + }; + DeleteDialogflowConnection: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Uniquely identifies a Telnyx application (Call Control, TeXML) or Sip connection resource. */ + connection_id: components['parameters']['ConnectionId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The Dialogflow Connection for connection_id was deleted successfully. */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + default: components['responses']['GenericErrorResponse']; + }; + }; + ListDocumentLinks: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + /** @description Identifies the associated document to filter on. */ + 'filter[document_id]'?: components['parameters']['DocServiceDocumentIdFilter']; + /** @description The `linked_record_type` of the document to filter on. */ + 'filter[linked_record_type]'?: components['parameters']['LinkedRecordTypeFilter']; + /** @description The `linked_resource_id` of the document to filter on. */ + 'filter[linked_resource_id]'?: components['parameters']['LinkedResourceIdFilter']; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListDocServiceDocumentLinksResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + ListDocuments: { + parameters: { + query?: { + /** @description Filter by string matching part of filename. */ + 'filter[filename][contains]'?: components['parameters']['DocumentsFilenameContainsFilter']; + /** @description Filter documents by a customer references. */ + 'filter[customer_reference][eq]'?: components['parameters']['DocumentsCustomerReferenceEqFilter']; + /** @description Filter documents by a list of customer references. */ + 'filter[customer_reference][in][]'?: components['parameters']['DocumentsCustomerReferenceInFilter']; + /** @description Filter by created at greater than provided value. */ + 'filter[created_at][gt]'?: components['parameters']['DocumentsCreatedAtGreaterThanFilter']; + /** @description Filter by created at less than provided value. */ + 'filter[created_at][lt]'?: components['parameters']['DocumentsCreatedAtLessThanFilter']; + /** @description Specifies the sort order for results. If you want to sort by a field in ascending order, include it as a sort parameter. If you want to sort in descending order, prepend a `-` in front of the field name. */ + 'sort[]'?: components['parameters']['DocumentsSort']; + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListDocServiceDocumentsResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + CreateDocument: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['CreateDocServiceDocumentRequest']; + 'multipart/form-data': components['schemas']['CreateMultiPartDocServiceDocumentRequest']; + }; + }; + responses: { + 200: components['responses']['DocServiceDocumentResponse']; + 422: components['responses']['UnprocessableEntity']; + default: components['responses']['GenericErrorResponse']; + }; + }; + RetrieveDocument: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['Id']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['DocServiceDocumentResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + DeleteDocument: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['Id']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['DocServiceDocumentResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + UpdateDocument: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['Id']; + }; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['DocServiceDocument']; + }; + }; + responses: { + 200: components['responses']['DocServiceDocumentResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + DownloadDocument: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['Id']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['DownloadDocServiceDocumentResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + ListDynamicEmergencyAddresses: { + parameters: { + query?: { + /** @description Filter by status. */ + 'filter[status]'?: 'pending' | 'activated' | 'rejected'; + /** @description Filter by country code. */ + 'filter[country_code]'?: string; + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['listDynamicEmergencyAddresses']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Unprocessable entity. Check message field in response for details. */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + CreateDynamicEmergencyAddress: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['DynamicEmergencyAddress']; + }; + }; + responses: { + 201: components['responses']['DynamicEmergencyAddressResponse']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Unprocessable entity. Check message field in response for details. */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + GetDynamicEmergencyAddress: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Dynamic Emergency Address id */ + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['DynamicEmergencyAddressResponse']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Unprocessable entity. Check message field in response for details. */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + DeleteDynamicEmergencyAddress: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Dynamic Emergency Address id */ + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['DynamicEmergencyAddressResponse']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Unprocessable entity. Check message field in response for details. */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + ListDynamicEmergencyEndpoints: { + parameters: { + query?: { + /** @description Filter by status. */ + 'filter[status]'?: 'pending' | 'activated' | 'rejected'; + /** @description Filter by country code. */ + 'filter[country_code]'?: string; + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['listDynamicEmergencyEndpoints']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Unprocessable entity. Check message field in response for details. */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + CreateDynamicEmergencyEndpoint: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['DynamicEmergencyEndpoint']; + }; + }; + responses: { + 201: components['responses']['DynamicEmergencyEndpointResponse']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Unprocessable entity. Check message field in response for details. */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + GetDynamicEmergencyEndpoint: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Dynamic Emergency Endpoint id */ + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['DynamicEmergencyEndpointResponse']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Unprocessable entity. Check message field in response for details. */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + DeleteDynamicEmergencyEndpoint: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Dynamic Emergency Endpoint id */ + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['DynamicEmergencyEndpointResponse']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Unprocessable entity. Check message field in response for details. */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + GetEnumEndpoint: { + parameters: { + query?: never; + header?: never; + path: { + endpoint: + | 'mno' + | 'optionalAttributes' + | 'usecase' + | 'vertical' + | 'altBusinessIdType' + | 'brandIdentityStatus' + | 'brandRelationship' + | 'campaignStatus' + | 'entityType' + | 'extVettingProvider' + | 'vettingStatus' + | 'brandStatus' + | 'operationStatus' + | 'approvedPublicCompany' + | 'stockExchange' + | 'vettingClass'; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': + | components['schemas']['EnumListResponse'] + | components['schemas']['EnumObjectResponse'] + | components['schemas']['EnumPaginatedResponse']; + }; + }; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['Errors']; + }; + }; + }; + }; + ListExternalConnections: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + /** @description If present, connections with connection_name containing the given value will be returned. Matching is not case-sensitive. Requires at least three characters. */ + 'filter[connection_name][contains]'?: components['parameters']['FilterConnectionName']; + /** @description If present, connections with external_sip_connection matching the given value will be returned. */ + 'filter[external_sip_connection]'?: components['parameters']['FilterExternalSipConnection']; + /** @description If present, connections with id matching the given value will be returned. */ + 'filter[id]'?: components['parameters']['FilterId']; + /** @description Filter by ISO 8601 formatted date-time string matching resource creation date-time. */ + 'filter[created_at]'?: components['parameters']['FilterCreatedAt']; + /** @description If present, connections associated with the given phone_number will be returned. A full match is necessary with a e164 format. */ + 'filter[phone_number][contains]'?: components['parameters']['FilterPhoneNumber']; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['GetAllExternalConnectionResponse']; + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + CreateExternalConnection: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Parameters that can be set when creating a External Connection */ + requestBody: { + content: { + 'application/json': components['schemas']['CreateExternalConnectionRequest']; + }; + }; + responses: { + 201: components['responses']['ExternalConnectionResponse']; + /** @description Bad request */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + ListExternalConnectionLogMessages: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + /** @description The external connection ID to filter by or "null" to filter for logs without an external connection ID */ + 'filter[external_connection_id]'?: components['parameters']['FilterExternalConnectionId']; + /** @description The partial phone number to filter log messages for. Requires 3-15 digits. */ + 'filter[telephone_number][contains]'?: components['parameters']['FilterPhoneNumberLogMessageContains']; + /** @description The phone number to filter log messages for or "null" to filter for logs without a phone number */ + 'filter[telephone_number][eq]'?: components['parameters']['FilterPhoneNumberLogMessageEq']; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListLogMessagesResponse']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Bad request */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + GetExternalConnectionLogMessage: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['id']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['GetLogMessageResponse']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + DeleteExternalConnectionLogMessage: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['id']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + /** @description Describes wether or not the operation was successful */ + success?: boolean; + }; + }; + }; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + GetExternalConnection: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['id']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ExternalConnectionResponse']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Bad request */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + DeleteExternalConnection: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['id']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ExternalConnectionResponse']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Bad request */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + UpdateExternalConnection: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['id']; + }; + cookie?: never; + }; + /** @description Parameters to be updated for the External Connection */ + requestBody: { + content: { + 'application/json': components['schemas']['UpdateExternalConnectionRequest']; + }; + }; + responses: { + 200: components['responses']['ExternalConnectionResponse']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Bad request */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + ListCivicAddresses: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['id']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['GetAllCivicAddressesResponse']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Unexpected Error */ + 500: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Bad Gateway */ + 502: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + GetExternalConnectionCivicAddress: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['id']; + /** @description Identifies a civic address or a location. */ + address_id: components['parameters']['address_id']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['GetCivicAddressResponse']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Unexpected Error */ + 500: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Bad Gateway */ + 502: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + ListExternalConnectionPhoneNumbers: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + /** @description The phone number to filter by */ + 'filter[phone_number][eq]'?: components['parameters']['FilterPhoneNumberEq']; + /** @description If present, connections associated with the given phone_number will be returned. A full match is necessary with a e164 format. */ + 'filter[phone_number][contains]'?: components['parameters']['FilterPhoneNumber']; + /** @description The civic address ID to filter by */ + 'filter[civic_address_id][eq]'?: components['parameters']['FilterCivicAddressId']; + /** @description The location ID to filter by */ + 'filter[location_id][eq]'?: components['parameters']['FilterLocationId']; + }; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['id']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListExternalConnectionPhoneNumbersResponse']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Bad request */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + GetExternalConnectionPhoneNumber: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['id']; + /** @description A phone number's ID via the Telnyx API */ + phone_number_id: components['parameters']['phone_number_id']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['GetExternalConnectionPhoneNumberResponse']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + UpdateExternalConnectionPhoneNumber: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['id']; + /** @description A phone number's ID via the Telnyx API */ + phone_number_id: components['parameters']['phone_number_id']; + }; + cookie?: never; + }; + /** @description Values that can be set when updating a phone number */ + requestBody: { + content: { + 'application/json': components['schemas']['UpdateExternalConnectionPhoneNumberRequest']; + }; + }; + responses: { + 200: components['responses']['GetExternalConnectionPhoneNumberResponse']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Bad request */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + ListExternalConnectionReleases: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + /** @description The status of the release to filter by */ + 'filter[status][eq]'?: components['parameters']['FilterReleaseStatus']; + /** @description The civic address ID to filter by */ + 'filter[civic_address_id][eq]'?: components['parameters']['FilterCivicAddressId']; + /** @description The location ID to filter by */ + 'filter[location_id][eq]'?: components['parameters']['FilterLocationId']; + /** @description The phone number to filter by */ + 'filter[phone_number][eq]'?: components['parameters']['FilterPhoneNumberEq']; + /** @description The partial phone number to filter by. Requires 3-15 digits. */ + 'filter[phone_number][contains]'?: components['parameters']['FilterPhoneNumberContains']; + }; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['id']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListReleasesResponse']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Bad request */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + GetExternalConnectionRelease: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['id']; + /** @description Identifies a Release request */ + release_id: components['parameters']['release_id']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['GetReleaseResponse']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + ListExternalConnectionUploads: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + /** @description The status of the upload to filter by */ + 'filter[status][eq]'?: components['parameters']['FilterUploadStatus']; + /** @description The civic address ID to filter by */ + 'filter[civic_address_id][eq]'?: components['parameters']['FilterCivicAddressId']; + /** @description The location ID to filter by */ + 'filter[location_id][eq]'?: components['parameters']['FilterLocationId']; + /** @description The phone number to filter by */ + 'filter[phone_number][eq]'?: components['parameters']['FilterPhoneNumberEq']; + /** @description The partial phone number to filter by. Requires 3-15 digits. */ + 'filter[phone_number][contains]'?: components['parameters']['FilterPhoneNumberContains']; + }; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['id']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListUploadsResponse']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Bad request */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + CreateExternalConnectionUpload: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['id']; + }; + cookie?: never; + }; + /** @description Parameters that can be set when creating an Upload request. */ + requestBody: { + content: { + 'application/json': components['schemas']['CreateExternalConnectionUploadRequest']; + }; + }; + responses: { + /** @description Successful response */ + 202: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + /** @description Describes wether or not the operation was successful */ + success?: boolean; + /** + * Format: uuid + * @description Ticket id of the upload request + */ + ticket_id?: string; + }; + }; + }; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Payload too large. The maximum allowed phone numbers for the numbers_ids array is 1000. */ + 413: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Unprocessable Entity */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Gateway Timeout */ + 504: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + RefreshExternalConnectionUploads: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['id']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + /** @description Describes wether or not the operation was successful */ + success?: boolean; + }; + }; + }; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Status refresh is still in progress, please wait before calling again */ + 409: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + GetExternalConnectionUploadsStatus: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['id']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['GetUploadsStatusResponse']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + GetExternalConnectionUpload: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['id']; + /** @description Identifies an Upload request */ + ticket_id: components['parameters']['ticket_id']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['GetUploadResponse']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + RetryUpload: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['id']; + /** @description Identifies an Upload request */ + ticket_id: components['parameters']['ticket_id']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 202: components['responses']['GetUploadResponse']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Order is still in progress, please wait before retrying */ + 409: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Unprocessable Entity */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + ListFaxApplications: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + /** @description If present, applications with application_name containing the given value will be returned. Matching is not case-sensitive. Requires at least three characters. */ + 'filter[application_name][contains]'?: components['parameters']['FilterApplicationName']; + /** @description Identifies the associated outbound voice profile. */ + 'filter[outbound_voice_profile_id]'?: components['parameters']['FilterOutboundVoiceProfileId']; + /** @description Specifies the sort order for results. By default sorting direction is ascending. To have the results sorted in descending order add the - prefix.

+ * That is:
    + *
  • + * friendly_name: sorts the result by the + * friendly_name field in ascending order. + *
  • + * + *
  • + * -friendly_name: sorts the result by the + * friendly_name field in descending order. + *
  • + *

If not given, results are sorted by created_at in descending order. */ + sort?: components['parameters']['SortApplication']; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['GetAllFaxApplicationsResponse']; + 400: components['responses']['BadRequestResponse']; + 401: components['responses']['UnauthenticatedResponse']; + 403: components['responses']['UnauthorizedResponse']; + }; + }; + CreateFaxApplication: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Parameters that can be set when creating a Fax Application */ + requestBody: { + content: { + 'application/json': components['schemas']['CreateFaxApplicationRequest']; + }; + }; + responses: { + 201: components['responses']['FaxApplicationResponse']; + 401: components['responses']['UnauthenticatedResponse']; + 403: components['responses']['UnauthorizedResponse']; + 422: components['responses']['UnprocessableEntityResponse']; + }; + }; + GetFaxApplication: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['id']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['FaxApplicationResponse']; + 400: components['responses']['BadRequestResponse']; + 401: components['responses']['UnauthenticatedResponse']; + 403: components['responses']['UnauthorizedResponse']; + 404: components['responses']['NotFoundResponse']; + }; + }; + DeleteFaxApplication: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['id']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['FaxApplicationResponse']; + 400: components['responses']['BadRequestResponse']; + 401: components['responses']['UnauthenticatedResponse']; + 403: components['responses']['UnauthorizedResponse']; + 404: components['responses']['NotFoundResponse']; + }; + }; + UpdateFaxApplication: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['id']; + }; + cookie?: never; + }; + /** @description Parameters to be updated for the Fax Application */ + requestBody: { + content: { + 'application/json': components['schemas']['UpdateFaxApplicationRequest']; + }; + }; + responses: { + 200: components['responses']['FaxApplicationResponse']; + 401: components['responses']['UnauthenticatedResponse']; + 403: components['responses']['UnauthorizedResponse']; + 404: components['responses']['NotFoundResponse']; + 422: components['responses']['UnprocessableEntityResponse']; + }; + }; + ListFaxes: { + parameters: { + query?: { + /** @description ISO 8601 date time for filtering faxes created after or on that date */ + 'filter[created_at][gte]'?: string; + /** @description ISO 8601 date time for filtering faxes created after that date */ + 'filter[created_at][gt]'?: string; + /** @description ISO 8601 formatted date time for filtering faxes created on or before that date */ + 'filter[created_at][lte]'?: string; + /** @description ISO 8601 formatted date time for filtering faxes created before that date */ + 'filter[created_at][lt]'?: string; + /** @description The direction, inbound or outbound, for filtering faxes sent from this account */ + 'filter[direction][eq]'?: string; + /** @description The phone number, in E.164 format for filtering faxes sent from this number */ + 'filter[from][eq]'?: string; + /** @description The phone number, in E.164 format for filtering faxes sent to this number */ + 'filter[to][eq]'?: string; + /** @description Number of fax resourcxes for the single page returned */ + 'page[size]'?: number; + /** @description Number of the page to be retrieved */ + 'page[number]'?: number; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListFaxesResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + SendFax: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Send fax request */ + requestBody: { + content: { + 'application/json': components['schemas']['SendFaxRequest']; + 'multipart/form-data': components['schemas']['SendFaxMultipartRequest']; + }; + }; + responses: { + 202: components['responses']['SendFaxResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + ViewFax: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The unique identifier of a fax. */ + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['GetFaxResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + DeleteFax: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The unique identifier of a fax. */ + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The resource was deleted successfully. */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + default: components['responses']['GenericErrorResponse']; + }; + }; + CancelFax: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The unique identifier of a fax. */ + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 202: components['responses']['CancelFaxResponse']; + 404: components['responses']['NotFoundResponse']; + 422: components['responses']['UnprocessableEntityResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + RefreshFax: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The unique identifier of a fax. */ + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['RefreshFaxResponse']; + 404: components['responses']['NotFoundResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + ListFqdnConnections: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + /** @description If present, connections with connection_name containing the given value will be returned. Matching is not case-sensitive. Requires at least three characters. */ + 'filter[connection_name][contains]'?: components['parameters']['FilterConnectionName']; + /** @description If present, connections with an `fqdn` that equals the given value will be returned. Matching is case-sensitive, and the full string must match. */ + 'filter[fqdn]'?: components['parameters']['FilterFqdn']; + /** @description Identifies the associated outbound voice profile. */ + 'filter[outbound_voice_profile_id]'?: components['parameters']['FilterOutboundVoiceProfileId']; + /** @description Specifies the sort order for results. By default sorting direction is ascending. To have the results sorted in descending order add the - prefix.

+ * That is:
    + *
  • + * connection_name: sorts the result by the + * connection_name field in ascending order. + *
  • + * + *
  • + * -connection_name: sorts the result by the + * connection_name field in descending order. + *
  • + *

If not given, results are sorted by created_at in descending order. */ + sort?: components['parameters']['SortConnection']; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListFqdnConnectionsResponse']; + 400: components['responses']['BadRequestResponse']; + 401: components['responses']['UnauthenticatedResponse']; + 403: components['responses']['UnauthorizedResponse']; + 404: components['responses']['NotFoundResponse']; + }; + }; + CreateFqdnConnection: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Parameters that can be defined during FQDN connection creation */ + requestBody: { + content: { + 'application/json': components['schemas']['CreateFqdnConnectionRequest']; + }; + }; + responses: { + 201: components['responses']['FqdnConnectionResponse']; + 401: components['responses']['UnauthenticatedResponse']; + 403: components['responses']['UnauthorizedResponse']; + 404: components['responses']['NotFoundResponse']; + 422: components['responses']['UnprocessableEntityResponse']; + }; + }; + RetrieveFqdnConnection: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['id']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['FqdnConnectionResponse']; + 401: components['responses']['UnauthenticatedResponse']; + 403: components['responses']['UnauthorizedResponse']; + 404: components['responses']['NotFoundResponse']; + 422: components['responses']['UnprocessableEntityResponse']; + }; + }; + DeleteFqdnConnection: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['id']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['FqdnConnectionResponse']; + 401: components['responses']['UnauthenticatedResponse']; + 403: components['responses']['UnauthorizedResponse']; + 404: components['responses']['NotFoundResponse']; + 422: components['responses']['UnprocessableEntityResponse']; + }; + }; + UpdateFqdnConnection: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['id']; + }; + cookie?: never; + }; + /** @description Parameters that can be updated in a FQDN connection */ + requestBody: { + content: { + 'application/json': components['schemas']['UpdateFqdnConnectionRequest']; + }; + }; + responses: { + 200: components['responses']['FqdnConnectionResponse']; + 401: components['responses']['UnauthenticatedResponse']; + 403: components['responses']['UnauthorizedResponse']; + 404: components['responses']['NotFoundResponse']; + 422: components['responses']['UnprocessableEntityResponse']; + }; + }; + ListFqdns: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + /** @description ID of the FQDN connection to which the FQDN belongs. */ + 'filter[connection_id]'?: string; + /** @description FQDN represented by the resource. */ + 'filter[fqdn]'?: string; + /** @description Port to use when connecting to the FQDN. */ + 'filter[port]'?: number; + /** @description DNS record type used by the FQDN. */ + 'filter[dns_record_type]'?: string; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListFqdnsResponse']; + 400: components['responses']['BadRequestResponse']; + 401: components['responses']['UnauthenticatedResponse']; + }; + }; + CreateFqdn: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + 'application/json': components['schemas']['CreateFqdnRequest']; + }; + }; + responses: { + 201: components['responses']['FqdnResponse']; + 401: components['responses']['UnauthenticatedResponse']; + 403: components['responses']['UnauthorizedResponse']; + 422: components['responses']['UnprocessableEntityResponse']; + }; + }; + RetrieveFqdn: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['FqdnId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['FqdnResponse']; + 400: components['responses']['BadRequestResponse']; + 401: components['responses']['UnauthenticatedResponse']; + 403: components['responses']['UnauthorizedResponse']; + 404: components['responses']['NotFoundResponse']; + }; + }; + DeleteFqdn: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['FqdnId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['FqdnResponse']; + 400: components['responses']['BadRequestResponse']; + 401: components['responses']['UnauthenticatedResponse']; + 403: components['responses']['UnauthorizedResponse']; + 404: components['responses']['NotFoundResponse']; + }; + }; + UpdateFqdn: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['FqdnId']; + }; + cookie?: never; + }; + requestBody?: { + content: { + 'application/json': components['schemas']['UpdateFqdnRequest']; + }; + }; + responses: { + 200: components['responses']['FqdnResponse']; + 401: components['responses']['UnauthenticatedResponse']; + 403: components['responses']['UnauthorizedResponse']; + 404: components['responses']['NotFoundResponse']; + 422: components['responses']['UnprocessableEntityResponse']; + }; + }; + ListGlobalIpAllowedPorts: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['GlobalIpAllowedPortListResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + GetGlobalIpAssignmentHealth: { + parameters: { + query?: { + /** @description Filter by Global IP ID(s) separated by commas */ + 'filter[global_ip_id][in]'?: string; + /** @description Filter by Global IP Assignment ID(s) separated by commas */ + 'filter[global_ip_assignment_id][in]'?: string; + /** @description Filter by timestamp greater than */ + 'filter[timestamp][gt]'?: components['parameters']['TimestampGreater']; + /** @description Filter by timestamp less than */ + 'filter[timestamp][lt]'?: components['parameters']['TimestampLess']; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['GlobalIpHealthResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + ListGlobalIpAssignments: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['GlobalIpAssignmentListResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + CreateGlobalIpAssignment: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['GlobalIpAssignment']; + }; + }; + responses: { + 202: components['responses']['GlobalIpAssignmentResponse']; + 422: components['responses']['UnprocessableEntity']; + default: components['responses']['GenericErrorResponse']; + }; + }; + GetGlobalIpAssignment: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['ResourceId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['GlobalIpAssignmentResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + DeleteGlobalIpAssignment: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['ResourceId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['GlobalIpAssignmentResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + UpdateGlobalIpAssignment: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['ResourceId']; + }; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['GlobalIpAssignmentUpdate']; + }; + }; + responses: { + 200: components['responses']['GlobalIpAssignmentResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + GetGlobalIpAssignmentUsage: { + parameters: { + query?: { + /** @description Filter by Global IP Assignment ID(s) separated by commas */ + 'filter[global_ip_assignment_id][in]'?: string; + /** @description Filter by Global IP ID(s), separated by commas */ + 'filter[global_ip_id][in]'?: string; + /** @description Filter by timestamp greater than */ + 'filter[timestamp][gt]'?: components['parameters']['TimestampGreater']; + /** @description Filter by timestamp less than */ + 'filter[timestamp][lt]'?: components['parameters']['TimestampLess']; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['GlobalIpAssignmentUsageResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + ListGlobalIpHealthCheckTypes: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['GlobalIpHealthCheckTypesResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + ListGlobalIpHealthChecks: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['GlobalIpHealthCheckListResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + CreateGlobalIpHealthCheck: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['GlobalIPHealthCheck']; + }; + }; + responses: { + 202: components['responses']['GlobalIpHealthCheckResponse']; + 422: components['responses']['UnprocessableEntity']; + default: components['responses']['GenericErrorResponse']; + }; + }; + GetGlobalIpHealthCheck: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['ResourceId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['GlobalIpHealthCheckResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + DeleteGlobalIpHealthCheck: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['ResourceId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['GlobalIpHealthCheckResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + GetGlobalIpLatency: { + parameters: { + query?: { + /** @description Filter by Global IP ID(s) separated by commas */ + 'filter[global_ip_id][in]'?: string; + /** @description Filter by timestamp greater than */ + 'filter[timestamp][gt]'?: components['parameters']['TimestampGreater']; + /** @description Filter by timestamp less than */ + 'filter[timestamp][lt]'?: components['parameters']['TimestampLess']; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['GlobalIpLatencyResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + ListGlobalIpProtocols: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['GlobalIpProtocolListResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + GetGlobalIpUsage: { + parameters: { + query?: { + /** @description Filter by Global IP ID(s) separated by commas */ + 'filter[global_ip_id][in]'?: string; + /** @description Filter by timestamp greater than */ + 'filter[timestamp][gt]'?: components['parameters']['TimestampGreater']; + /** @description Filter by timestamp less than */ + 'filter[timestamp][lt]'?: components['parameters']['TimestampLess']; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['GlobalIpUsageResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + ListGlobalIps: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['GlobalIpListResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + CreateGlobalIp: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['GlobalIP']; + }; + }; + responses: { + 202: components['responses']['GlobalIpResponse']; + 422: components['responses']['UnprocessableEntity']; + default: components['responses']['GenericErrorResponse']; + }; + }; + GetGlobalIp: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['ResourceId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['GlobalIpResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + DeleteGlobalIp: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['ResourceId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['GlobalIpResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + CreateInventoryCoverage: { + parameters: { + query: { + /** @example 318 */ + 'filter[npa]'?: number; + /** @example 202 */ + 'filter[nxx]'?: number; + /** @example LA */ + 'filter[administrative_area]'?: string; + /** @example local */ + 'filter[phone_number_type]'?: + | 'local' + | 'toll_free' + | 'national' + | 'mobile' + | 'landline' + | 'shared_cost'; + /** @example US */ + 'filter[country_code]'?: + | 'AT' + | 'AU' + | 'BE' + | 'BG' + | 'CA' + | 'CH' + | 'CN' + | 'CY' + | 'CZ' + | 'DE' + | 'DK' + | 'EE' + | 'ES' + | 'FI' + | 'FR' + | 'GB' + | 'GR' + | 'HU' + | 'HR' + | 'IE' + | 'IT' + | 'LT' + | 'LU' + | 'LV' + | 'NL' + | 'NZ' + | 'MX' + | 'NO' + | 'PL' + | 'PT' + | 'RO' + | 'SE' + | 'SG' + | 'SI' + | 'SK' + | 'US'; + /** @example true */ + 'filter[count]'?: boolean; + /** @description Filter if the phone number should be used for voice, fax, mms, sms, emergency. Returns features in the response when used. */ + 'filter[features]'?: ('sms' | 'mms' | 'voice' | 'fax' | 'emergency')[]; + /** @example nxx */ + 'filter[groupBy]': 'locality' | 'npa' | 'national_destination_code'; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['InventoryCoverageResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + ListIpConnections: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + /** @description If present, connections with connection_name containing the given value will be returned. Matching is not case-sensitive. Requires at least three characters. */ + 'filter[connection_name][contains]'?: components['parameters']['FilterConnectionName']; + /** @description Identifies the associated outbound voice profile. */ + 'filter[outbound.outbound_voice_profile_id]'?: components['parameters']['FilterInnerOutboundVoiceProfileId']; + /** @description Specifies the sort order for results. By default sorting direction is ascending. To have the results sorted in descending order add the - prefix.

+ * That is:
    + *
  • + * connection_name: sorts the result by the + * connection_name field in ascending order. + *
  • + * + *
  • + * -connection_name: sorts the result by the + * connection_name field in descending order. + *
  • + *

If not given, results are sorted by created_at in descending order. */ + sort?: components['parameters']['SortConnection']; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListIpConnectionsResponse']; + 400: components['responses']['BadRequestResponse']; + 401: components['responses']['UnauthenticatedResponse']; + 403: components['responses']['UnauthorizedResponse']; + }; + }; + CreateIpConnection: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Parameters that can be defined during IP connection creation */ + requestBody: { + content: { + 'application/json': components['schemas']['CreateIpConnectionRequest']; + }; + }; + responses: { + 201: components['responses']['IpConnectionResponse']; + 401: components['responses']['UnauthenticatedResponse']; + 403: components['responses']['UnauthorizedResponse']; + 422: components['responses']['UnprocessableEntityResponse']; + }; + }; + RetrieveIpConnection: { + parameters: { + query?: never; + header?: never; + path: { + /** @description IP Connection ID */ + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['IpConnectionResponse']; + 400: components['responses']['BadRequestResponse']; + 401: components['responses']['UnauthenticatedResponse']; + 403: components['responses']['UnauthorizedResponse']; + 404: components['responses']['NotFoundResponse']; + }; + }; + DeleteIpConnection: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the type of resource. */ + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['IpConnectionResponse']; + 400: components['responses']['BadRequestResponse']; + 401: components['responses']['UnauthenticatedResponse']; + 403: components['responses']['UnauthorizedResponse']; + 404: components['responses']['NotFoundResponse']; + }; + }; + UpdateIpConnection: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the type of resource. */ + id: string; + }; + cookie?: never; + }; + /** @description Parameters that can be updated in a IP connection */ + requestBody: { + content: { + 'application/json': components['schemas']['UpdateIpConnectionRequest']; + }; + }; + responses: { + 200: components['responses']['IpConnectionResponse']; + 401: components['responses']['UnauthenticatedResponse']; + 403: components['responses']['UnauthorizedResponse']; + 404: components['responses']['NotFoundResponse']; + 422: components['responses']['UnprocessableEntityResponse']; + }; + }; + ListIps: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + /** @description ID of the IP Connection to which this IP should be attached. */ + 'filter[connection_id]'?: string; + /** @description IP adddress represented by this resource. */ + 'filter[ip_address]'?: string; + /** @description Port to use when connecting to this IP. */ + 'filter[port]'?: number; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListIpsResponse']; + 400: components['responses']['BadRequestResponse']; + 401: components['responses']['UnauthenticatedResponse']; + 403: components['responses']['UnauthorizedResponse']; + }; + }; + CreateIp: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + 'application/json': components['schemas']['CreateIpRequest']; + }; + }; + responses: { + 201: components['responses']['IpResponse']; + 401: components['responses']['UnauthenticatedResponse']; + 403: components['responses']['UnauthorizedResponse']; + 422: components['responses']['UnprocessableEntityResponse']; + }; + }; + RetrieveIp: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the type of resource. */ + id: components['parameters']['IpId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['IpResponse']; + 400: components['responses']['BadRequestResponse']; + 401: components['responses']['UnauthenticatedResponse']; + 403: components['responses']['UnauthorizedResponse']; + 404: components['responses']['NotFoundResponse']; + }; + }; + DeleteIp: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the type of resource. */ + id: components['parameters']['IpId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['IpResponse']; + 400: components['responses']['BadRequestResponse']; + 401: components['responses']['UnauthenticatedResponse']; + 403: components['responses']['UnauthorizedResponse']; + 404: components['responses']['NotFoundResponse']; + }; + }; + UpdateIp: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the type of resource. */ + id: components['parameters']['IpId']; + }; + cookie?: never; + }; + requestBody?: { + content: { + 'application/json': components['schemas']['UpdateIpRequest']; + }; + }; + responses: { + 200: components['responses']['IpResponse']; + 401: components['responses']['UnauthenticatedResponse']; + 403: components['responses']['UnauthorizedResponse']; + 404: components['responses']['NotFoundResponse']; + 422: components['responses']['UnprocessableEntityResponse']; + }; + }; + CreateBillingGroupReport: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description New ledger billing group report parameters */ + requestBody: { + content: { + 'application/json': components['schemas']['NewLedgerBillingGroupReport']; + }; + }; + responses: { + 200: components['responses']['CreateLedgerBillingGroupReportResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + GetBillingGroupReport: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The id of the ledger billing group report */ + id: components['parameters']['LedgerBillingGroupReportId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['RetrieveLedgerBillingGroupReportResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + ListManagedAccounts: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + /** @description If present, email containing the given value will be returned. Matching is not case-sensitive. Requires at least three characters. */ + 'filter[email][contains]'?: components['parameters']['FilterEmailContains']; + /** @description If present, only returns results with the email matching exactly the value given. */ + 'filter[email][eq]'?: components['parameters']['FilterEmailEq']; + /** @description If present, only returns results with the organization_name containing the given value. Matching is not case-sensitive. Requires at least three characters. */ + 'filter[organization_name][contains]'?: components['parameters']['FilterOrganizationEmailContains']; + /** @description If present, only returns results with the organization_name matching exactly the value given. */ + 'filter[organization_name][eq]'?: components['parameters']['FilterOrganizationEmailEq']; + /** @description Specifies the sort order for results. By default sorting direction is ascending. To have the results sorted in descending order add the - prefix.

+ * That is:
    + *
  • + * email: sorts the result by the + * email field in ascending order. + *
  • + * + *
  • + * -email: sorts the result by the + * email field in descending order. + *
  • + *

If not given, results are sorted by created_at in descending order. */ + sort?: components['parameters']['Sort']; + /** @description Specifies if cancelled accounts should be included in the results. */ + include_cancelled_accounts?: components['parameters']['IncludeCancelledAccounts']; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListManagedAccountsResponse']; + 401: components['responses']['UnauthorizedResponse']; + }; + }; + CreateManagedAccount: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Parameters that define the managed account to be created */ + requestBody: { + content: { + 'application/json': components['schemas']['CreateManagedAccountRequest']; + }; + }; + responses: { + 200: components['responses']['ManagedAccountResponse']; + 401: components['responses']['UnauthorizedResponse']; + 422: components['responses']['UnprocessableManagedAccountEntity']; + }; + }; + ListAllocatableGlobalOutboundChannels: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListManagedAccountsAllocatableGlobalOutboundChannelsResponse']; + 401: components['responses']['UnauthorizedResponse']; + 403: components['responses']['ForbiddenResponse']; + }; + }; + RetrieveManagedAccount: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Managed Account User ID */ + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ManagedAccountResponse']; + 401: components['responses']['UnauthorizedResponse']; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + UpdateManagedAccount: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Managed Account User ID */ + id: string; + }; + cookie?: never; + }; + /** @description Parameters that define the updates to the managed account */ + requestBody: { + content: { + 'application/json': components['schemas']['UpdateManagedAccountRequest']; + }; + }; + responses: { + 200: components['responses']['ManagedAccountResponse']; + 401: components['responses']['UnauthorizedResponse']; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + 422: components['responses']['UnprocessableManagedAccountEntity']; + }; + }; + DisableManagedAccount: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Managed Account User ID */ + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ManagedAccountResponse']; + 401: components['responses']['UnauthorizedResponse']; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + 422: components['responses']['UnprocessableManagedAccountEntity']; + }; + }; + EnableManagedAccount: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Managed Account User ID */ + id: string; + }; + cookie?: never; + }; + /** @description Additional parameters for what to do when enabling the managed account */ + requestBody?: { + content: { + 'application/json': { + /** + * @description When true, all connections owned by this managed account will automatically be re-enabled. Note: Any connections that do not pass validations will not be re-enabled. + * @default false + * @example true + */ + reenable_all_connections?: boolean; + }; + }; + }; + responses: { + 200: components['responses']['ManagedAccountResponse']; + 401: components['responses']['UnauthorizedResponse']; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + 422: components['responses']['UnprocessableManagedAccountEntity']; + }; + }; + UpdateManagedAccountGlobalChannelLimit: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Managed Account User ID */ + id: string; + }; + cookie?: never; + }; + /** @description Parameters that define the changes to the global outbounds channels for the managed account */ + requestBody: { + content: { + 'application/json': components['schemas']['UpdateManagedAccountGlobalChannelLimitRequest']; + }; + }; + responses: { + 200: components['responses']['UpdateManagedAccountGlobalChannelLimitResponse']; + 401: components['responses']['UnauthorizedResponse']; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + 422: components['responses']['UnprocessableManagedAccountEntity']; + }; + }; + ListMediaStorage: { + parameters: { + query?: { + /** @description Filters files by given content types */ + 'filter[content_type][]'?: string; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListMediaResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + CreateMediaStorage: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Upload media request */ + requestBody: { + content: { + 'application/json': components['schemas']['UploadMediaRequest']; + 'multipart/form-data': components['schemas']['UploadMediaMultipartRequest']; + }; + }; + responses: { + 201: components['responses']['MediaResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + GetMediaStorage: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Uniquely identifies a media resource. */ + media_name: components['parameters']['MediaName']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['MediaResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + UpdateMediaStorage: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Uniquely identifies a media resource. */ + media_name: components['parameters']['MediaName']; + }; + cookie?: never; + }; + /** @description Update media request */ + requestBody: { + content: { + 'application/json': components['schemas']['UpdateMediaRequest']; + 'multipart/form-data': components['schemas']['UpdateMediaMultipartRequest']; + }; + }; + responses: { + 200: components['responses']['MediaResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + DeleteMediaStorage: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Uniquely identifies a media resource. */ + media_name: components['parameters']['MediaName']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The media was deleted successfully. */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + default: components['responses']['GenericErrorResponse']; + }; + }; + DownloadMedia: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Uniquely identifies a media resource. */ + media_name: components['parameters']['MediaName']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['MediaDownloadResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + SendMessage: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Message payload */ + requestBody?: { + content: { + 'application/json': components['schemas']['CreateMessageRequest']; + }; + }; + responses: { + 200: components['responses']['MessageResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + CreateGroupMmsMessage: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Message payload */ + requestBody?: { + content: { + 'application/json': components['schemas']['CreateGroupMMSMessageRequest']; + }; + }; + responses: { + 200: components['responses']['MessageResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + CreateLongCodeMessage: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Message payload */ + requestBody?: { + content: { + 'application/json': components['schemas']['CreateLongCodeMessageRequest']; + }; + }; + responses: { + 200: components['responses']['MessageResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + CreateNumberPoolMessage: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Message payload */ + requestBody?: { + content: { + 'application/json': components['schemas']['CreateNumberPoolMessageRequest']; + }; + }; + responses: { + 200: components['responses']['MessageResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + CreateShortCodeMessage: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Message payload */ + requestBody?: { + content: { + 'application/json': components['schemas']['CreateShortCodeMessageRequest']; + }; + }; + responses: { + 200: components['responses']['MessageResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + GetMessage: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The id of the message */ + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful response with details of a message. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: + | components['schemas']['OutboundMessagePayload'] + | components['schemas']['InboundMessagePayload']; + }; + }; + }; + default: components['responses']['GenericErrorResponse']; + }; + }; + ListMessagingHostedNumberOrders: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListMessagingHostedNumberOrdersResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + CreateMessagingHostedNumberOrder: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Message payload */ + requestBody?: { + content: { + 'application/json': components['schemas']['CreateMessagingHostedNumberOrderRequest']; + }; + }; + responses: { + 200: components['responses']['MessagingHostedNumberOrderResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + GetMessagingHostedNumberOrder: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the type of resource. */ + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['MessagingHostedNumberOrderResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + UploadMessagingHostedNumberOrderFile: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the type of resource. */ + id: string; + }; + cookie?: never; + }; + /** @description Message payload */ + requestBody?: { + content: { + 'multipart/form-data': components['schemas']['UploadFileMessagingHostedNumberOrderRequest']; + }; + }; + responses: { + 200: components['responses']['MessagingHostedNumberOrderResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + DeleteMessagingHostedNumber: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the type of resource. */ + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['MessagingHostedNumberResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + BulkUpdateMessagingSettingsOnPhoneNumbers: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['BulkMessagingSettingsUpdatePhoneNumbersRequest']; + }; + }; + responses: { + 200: components['responses']['BulkMessagingSettingsUpdatePhoneNumbersResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + GetBulkUpdateMessagingSettingsOnPhoneNumbersStatus: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Order ID to verify bulk update status. */ + order_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['BulkMessagingSettingsUpdatePhoneNumbersResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + ListProfileMetrics: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + /** @description The id of the messaging profile(s) to retrieve */ + id?: components['parameters']['MessagingProfileMetric']; + /** @description The timeframe for which you'd like to retrieve metrics. */ + time_frame?: components['parameters']['MessagingProfileMetricTimeFrame']; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListMessagingProfileMetrics']; + default: components['responses']['GenericErrorResponse']; + }; + }; + ListMessagingProfiles: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + /** @description Filter by name */ + 'filter[name]'?: string; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListMessagingProfilesResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + CreateMessagingProfile: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description New Messaging Profile object */ + requestBody: { + content: { + 'application/json': components['schemas']['CreateMessagingProfileRequest']; + }; + }; + responses: { + 200: components['responses']['MessagingProfileResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + RetrieveMessagingProfile: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The id of the messaging profile to retrieve */ + id: components['parameters']['MessagingProfileId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['MessagingProfileResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + DeleteMessagingProfile: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The id of the messaging profile to retrieve */ + id: components['parameters']['MessagingProfileId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['MessagingProfileResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + UpdateMessagingProfile: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The id of the messaging profile to retrieve */ + id: components['parameters']['MessagingProfileId']; + }; + cookie?: never; + }; + /** @description New Messaging Profile object */ + requestBody: { + content: { + 'application/json': components['schemas']['UpdateMessagingProfileRequest']; + }; + }; + responses: { + 200: components['responses']['MessagingProfileResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + GetMessagingProfileMetrics: { + parameters: { + query?: { + /** @description The timeframe for which you'd like to retrieve metrics. */ + time_frame?: components['parameters']['MessagingProfileMetricTimeFrame']; + }; + header?: never; + path: { + /** @description The id of the messaging profile to retrieve */ + id: components['parameters']['MessagingProfileId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['RetrieveMessagingProfileMetrics']; + default: components['responses']['GenericErrorResponse']; + }; + }; + ListProfilePhoneNumbers: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + }; + header?: never; + path: { + /** @description The id of the messaging profile to retrieve */ + id: components['parameters']['MessagingProfileId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListMessagingProfilePhoneNumbersResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + ListProfileShortCodes: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + }; + header?: never; + path: { + /** @description The id of the messaging profile to retrieve */ + id: components['parameters']['MessagingProfileId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListMessagingProfileShortCodesResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + GetAutorespConfigs: { + parameters: { + query?: { + country_code?: string; + 'created_at[gte]'?: string; + 'created_at[lte]'?: string; + 'updated_at[gte]'?: string; + 'updated_at[lte]'?: string; + }; + header?: never; + path: { + profile_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['AutorespConfigsResponseSchema']; + }; + }; + default: components['responses']['GenericErrorResponse']; + }; + }; + CreateAutorespConfig: { + parameters: { + query?: never; + header?: never; + path: { + profile_id: string; + }; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['AutoRespConfigCreateSchema']; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['AutorespConfigResponseSchema']; + }; + }; + default: components['responses']['GenericErrorResponse']; + }; + }; + GetAutorespConfig: { + parameters: { + query?: never; + header?: never; + path: { + profile_id: string; + autoresp_cfg_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['AutorespConfigResponseSchema']; + }; + }; + default: components['responses']['GenericErrorResponse']; + }; + }; + UpdateAutoRespConfig: { + parameters: { + query?: never; + header?: never; + path: { + profile_id: string; + autoresp_cfg_id: string; + }; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['AutoRespConfigCreateSchema']; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['AutorespConfigResponseSchema']; + }; + }; + default: components['responses']['GenericErrorResponse']; + }; + }; + DeleteAutorespConfig: { + parameters: { + query?: never; + header?: never; + path: { + profile_id: string; + autoresp_cfg_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': unknown; + }; + }; + default: components['responses']['GenericErrorResponse']; + }; + }; + ListVerificationRequests: { + parameters: { + query: { + page: number; + /** @description + * Request this many records per page + * + * This value is automatically clamped if the provided value is too large. + * */ + page_size: number; + date_start?: string; + date_end?: string; + status?: components['schemas']['TFVerificationStatus']; + phone_number?: string; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['Paginated_VerificationRequestStatus_']; + }; + }; + default: components['responses']['GenericErrorResponse']; + }; + }; + SubmitVerificationRequest: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['TFVerificationRequest']; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['VerificationRequestEgress']; + }; + }; + default: components['responses']['GenericErrorResponse']; + }; + }; + GetVerificationRequest: { + parameters: { + query?: never; + header?: never; + path: { + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['VerificationRequestStatus']; + }; + }; + default: components['responses']['GenericErrorResponse']; + }; + }; + DeleteVerificationRequest: { + parameters: { + query?: never; + header?: never; + path: { + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': unknown; + }; + }; + default: components['responses']['GenericErrorResponse']; + }; + }; + UpdateVerificationRequest: { + parameters: { + query?: never; + header?: never; + path: { + id: string; + }; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['TFVerificationRequest']; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['VerificationRequestEgress']; + }; + }; + default: components['responses']['GenericErrorResponse']; + }; + }; + ListMessagingUrlDomains: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListMessagingUrlDomains']; + default: components['responses']['GenericErrorResponse']; + }; + }; + GetMobileNetworkOperators: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + /** @description Filter by name starting with. */ + 'filter[name][starts_with]'?: string; + /** @description Filter by name containing match. */ + 'filter[name][contains]'?: string; + /** @description Filter by name ending with. */ + 'filter[name][ends_with]'?: string; + /** @description Filter by exact country_code. */ + 'filter[country_code]'?: string; + /** @description Filter by exact MCC. */ + 'filter[mcc]'?: string; + /** @description Filter by exact MNC. */ + 'filter[mnc]'?: string; + /** @description Filter by exact TADIG. */ + 'filter[tadig]'?: string; + /** @description Filter by network_preferences_enabled. */ + 'filter[network_preferences_enabled]'?: boolean; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['SearchMobileNetworkOperatorsResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + ListPushCredentials: { + parameters: { + query?: { + /** @description type of mobile push credentials */ + 'filter[type]'?: 'ios' | 'android'; + /** @description Unique mobile push credential alias */ + 'filter[alias]'?: string; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Mobile mobile push credentials */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['responses']['ListPushCredentialsResponse']; + }; + }; + /** @description Unauthorized request */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['Errors']; + }; + }; + }; + }; + CreatePushCredential: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Mobile push credential parameters that need to be sent in the request */ + requestBody: { + content: { + 'application/json': + | components['schemas']['CreateIosPushCredentialRequest'] + | components['schemas']['CreateAndroidPushCredentialRequest']; + }; + }; + responses: { + /** @description Mobile push credential created */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['responses']['PushCredentialResponse']; + }; + }; + /** @description Unauthorized request */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['Errors']; + }; + }; + /** @description Unable to process request */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['Errors']; + }; + }; + }; + }; + GetPushCredentialById: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The unique identifier of a mobile push credential */ + push_credential_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful get mobile push credential response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['responses']['PushCredentialResponse']; + }; + }; + /** @description Unauthorized request */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['Errors']; + }; + }; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['Errors']; + }; + }; + /** @description Unable to process request */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['Errors']; + }; + }; + }; + }; + DeletePushCredentialById: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The unique identifier of a mobile push credential */ + push_credential_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The mobile push credential was deleted successfully */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Unauthorized request */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['Errors']; + }; + }; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['Errors']; + }; + }; + /** @description Unable to process request */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['Errors']; + }; + }; + }; + }; + ListNetworkCoverage: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + /** @description The region of associated location to filter on. */ + 'filters[available_services][contains]'?: components['schemas']['AvailableService']; + /** @description The region of associated location to filter on. */ + 'filter[location.region]'?: string; + /** @description The site of associated location to filter on. */ + 'filter[location.site]'?: string; + /** @description The POP of associated location to filter on. */ + 'filter[location.pop]'?: string; + /** @description The code of associated location to filter on. */ + 'filter[location.code]'?: string; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['NetworkCoverageListResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + ListNetworks: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + /** @description The network name to filter on. */ + 'filter[name]'?: string; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['NetworkListResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + CreateNetwork: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['NetworkCreate']; + }; + }; + responses: { + 200: components['responses']['NetworkResponse']; + 422: components['responses']['UnprocessableEntity']; + default: components['responses']['GenericErrorResponse']; + }; + }; + GetNetwork: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['ResourceId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['NetworkResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + DeleteNetwork: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['ResourceId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['NetworkResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + UpdateNetwork: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['ResourceId']; + }; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['NetworkCreate']; + }; + }; + responses: { + 200: components['responses']['NetworkResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + GetDefaultGateway: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['ResourceId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['DefaultGatewayResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + CreateDefaultGateway: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['ResourceId']; + }; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['DefaultGateway']; + }; + }; + responses: { + 200: components['responses']['DefaultGatewayResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + DeleteDefaultGateway: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['ResourceId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['DefaultGatewayResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + ListNetworkInterfaces: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + /** @description The interface name to filter on. */ + 'filter[name]'?: string; + /** @description The interface type to filter on. */ + 'filter[type]'?: string; + /** @description The interface status to filter on. */ + 'filter[status]'?: components['schemas']['InterfaceStatus']; + }; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['ResourceId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['NetworkInterfaceListResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + ListNotificationChannels: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + /** @description Filter by the id of a channel type */ + 'filter[channel_type_id][eq]'?: components['parameters']['ChannelTypeId']; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Returns a list of notification channels. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['NotificationChannel'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + default: components['responses']['GenericErrorResponse']; + }; + }; + CreateNotificationChannels: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Add a Notification Channel */ + requestBody?: { + content: { + 'application/json': components['schemas']['NotificationChannel']; + }; + }; + responses: { + /** @description A Notification Channel response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['NotificationChannel']; + }; + }; + }; + default: components['responses']['GenericErrorResponse']; + }; + }; + GetNotificationChannel: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['Id']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description A Notification Channel response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['NotificationChannel']; + }; + }; + }; + default: components['responses']['GenericErrorResponse']; + }; + }; + DeleteNotificationChannel: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['Id']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description A Notification Channel response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['NotificationChannel']; + }; + }; + }; + default: components['responses']['GenericErrorResponse']; + }; + }; + UpdateNotificationChannel: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['Id']; + }; + cookie?: never; + }; + /** @description Update notification channel object */ + requestBody: { + content: { + 'application/json': components['schemas']['NotificationChannel']; + }; + }; + responses: { + /** @description A Notification Channel response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['NotificationChannel']; + }; + }; + }; + default: components['responses']['GenericErrorResponse']; + }; + }; + FindNotificationsEventsConditions: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + /** @description Filter by the associated record type */ + 'filter[associated_record_type][eq]'?: components['parameters']['AssociatedRecordType']; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Returns a list of notification event conditions available. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['NotificationEventCondition'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + default: components['responses']['GenericErrorResponse']; + }; + }; + FindNotificationsEvents: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Returns a list of notification events available. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['NotificationEvent'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + default: components['responses']['GenericErrorResponse']; + }; + }; + FindNotificationsProfiles: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Returns a list of notification profiles. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['NotificationProfile'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + default: components['responses']['GenericErrorResponse']; + }; + }; + CreateNotificationProfile: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Add a Notification Profile */ + requestBody?: { + content: { + 'application/json': components['schemas']['NotificationProfile']; + }; + }; + responses: { + /** @description A Notification Profile response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['NotificationProfile']; + }; + }; + }; + default: components['responses']['GenericErrorResponse']; + }; + }; + GetNotificationProfile: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['Id']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description A Notification Profile response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['NotificationProfile']; + }; + }; + }; + default: components['responses']['GenericErrorResponse']; + }; + }; + DeleteNotificationProfile: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['Id']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description A Notification Profile response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['NotificationProfile']; + }; + }; + }; + default: components['responses']['GenericErrorResponse']; + }; + }; + UpdateNotificationProfile: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['Id']; + }; + cookie?: never; + }; + /** @description Update notification profile object */ + requestBody: { + content: { + 'application/json': components['schemas']['NotificationProfile']; + }; + }; + responses: { + /** @description A Notification Profile response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['NotificationProfile']; + }; + }; + }; + default: components['responses']['GenericErrorResponse']; + }; + }; + ListNotificationSettings: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + /** @description Filter by the id of a notification profile */ + 'filter[notification_profile_id][eq]'?: components['parameters']['NotificationProfileId']; + /** @description Filter by the id of a notification channel */ + 'filter[notification_channel][eq]'?: components['parameters']['NotificationChannelId']; + /** @description Filter by the id of a notification channel */ + 'filter[notification_event_condition_id][eq]'?: components['parameters']['NotificationEventConditionId']; + /** @description Filter by the associated record type */ + 'filter[associated_record_type][eq]'?: components['parameters']['AssociatedRecordType']; + /** + * @description Filters calls by status. + * @example no-answer + */ + Status?: components['parameters']['Status']; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Returns a list of notification settings. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['NotificationSetting'][]; + meta?: components['schemas']['PaginationMeta']; + }; + }; + }; + default: components['responses']['GenericErrorResponse']; + }; + }; + CreateNotificationSetting: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + 'application/json': components['schemas']['NotificationSetting']; + }; + }; + responses: { + /** @description A Notification Setting response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['NotificationSetting']; + }; + }; + }; + /** @description A Notification Setting response - async */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['NotificationSetting']; + }; + }; + }; + default: components['responses']['GenericErrorResponse']; + }; + }; + GetNotificationSetting: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['Id']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description A Notification Setting response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['NotificationSetting']; + }; + }; + }; + default: components['responses']['GenericErrorResponse']; + }; + }; + DeleteNotificationSetting: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['Id']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description A Notification Setting response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['NotificationSetting']; + }; + }; + }; + /** @description A Notification Setting response - async */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['NotificationSetting']; + }; + }; + }; + default: components['responses']['GenericErrorResponse']; + }; + }; + ListNumberBlockOrders: { + parameters: { + query?: { + /** @description Filter number block orders by status. */ + 'filter[status]'?: string; + /** @description Filter number block orders later than this value. */ + 'filter[created_at][gt]'?: string; + /** @description Filter number block orders earlier than this value. */ + 'filter[created_at][lt]'?: string; + /** @description Filter number block orders having these phone numbers. */ + 'filter[phone_numbers.starting_number]'?: string; + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListNumberBlockOrdersResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + CreateNumberBlockOrder: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['CreateNumberBlockOrderRequest']; + }; + }; + responses: { + 200: components['responses']['NumberBlockOrderResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + RetrieveNumberBlockOrder: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The number block order ID. */ + number_block_order_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['NumberBlockOrderResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + LookupNumber: { + parameters: { + query?: { + /** @description Specifies the type of number lookup to be performed */ + type?: components['parameters']['NumberLookupType']; + }; + header?: never; + path: { + /** @description The phone number to be looked up */ + phone_number: components['parameters']['PhoneNumber']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['NumberLookupResponse']; + 422: components['responses']['UnprocessableEntity']; + default: components['responses']['GenericErrorResponse']; + }; + }; + ListNumberOrderDocuments: { + parameters: { + query?: { + /** @description Filter number order documents by `requirement_id`. */ + 'filter[requirement_id]'?: string; + /** @description Filter number order documents after this datetime. */ + 'filter[created_at][gt]'?: string; + /** @description Filter number order documents from before this datetime. */ + 'filter[created_at][lt]'?: string; + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListNumberOrderDocumentsResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + CreateNumberOrderDocument: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['CreateNumberOrderDocumentRequest']; + }; + }; + responses: { + 200: components['responses']['NumberOrderDocumentResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + RetrieveNumberOrderDocument: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The number order document ID. */ + number_order_document_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['NumberOrderDocumentResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + UpdateNumberOrderDocument: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The number order document ID. */ + number_order_document_id: string; + }; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['UpdateNumberOrderDocumentRequest']; + }; + }; + responses: { + 200: components['responses']['NumberOrderDocumentResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + RetrieveOrderPhoneNumbers: { + parameters: { + query?: { + /** @description Country code of the order phone number. */ + 'filter[country_code]'?: string; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListNumberOrderPhoneNumbersResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + GetNumberOrderPhoneNumber: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The number order phone number ID. */ + number_order_phone_number_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['NumberOrderPhoneNumberResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + UpdateNumberOrderPhoneNumber: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The number order phone number ID. */ + number_order_phone_number_id: string; + }; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['UpdateNumberOrderPhoneNumberRequest']; + }; + }; + responses: { + 200: components['responses']['NumberOrderPhoneNumberResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + ListNumberOrders: { + parameters: { + query?: { + /** @description Filter number orders by status. */ + 'filter[status]'?: string; + /** @description Filter number orders later than this value. */ + 'filter[created_at][gt]'?: string; + /** @description Filter number orders earlier than this value. */ + 'filter[created_at][lt]'?: string; + /** @description Filter number order with this amount of numbers */ + 'filter[phone_numbers_count]'?: string; + /** @description Filter number orders via the customer reference set. */ + 'filter[customer_reference]'?: string; + /** @description Filter number orders by requirements met. */ + 'filter[requirements_met]'?: boolean; + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListNumberOrdersResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + CreateNumberOrder: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['CreateNumberOrderRequest']; + }; + }; + responses: { + 200: components['responses']['NumberOrderResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + RetrieveNumberOrder: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The number order ID. */ + number_order_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['NumberOrderResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + UpdateNumberOrder: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The number order ID. */ + number_order_id: string; + }; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['UpdateNumberOrderRequest']; + }; + }; + responses: { + 200: components['responses']['NumberOrderResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + ListNumberReservations: { + parameters: { + query?: { + /** @description Filter number reservations by status. */ + 'filter[status]'?: string; + /** @description Filter number reservations later than this value. */ + 'filter[created_at][gt]'?: string; + /** @description Filter number reservations earlier than this value. */ + 'filter[created_at][lt]'?: string; + /** @description Filter number reservations having these phone numbers. */ + 'filter[phone_numbers.phone_number]'?: string; + /** @description Filter number reservations via the customer reference set. */ + 'filter[customer_reference]'?: string; + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListNumberReservationsResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + CreateNumberReservation: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['CreateNumberReservationRequest']; + }; + }; + responses: { + 200: components['responses']['NumberReservationResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + RetrieveNumberReservation: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The number reservation ID. */ + number_reservation_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['NumberReservationResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + ExtendNumberReservationExpiryTime: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The number reservation ID. */ + number_reservation_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['NumberReservationResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + PostNumbersFeatures: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': { + phone_numbers: string[]; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: { + /** Format: phone */ + phone_number: string; + features: string[]; + }[]; + }; + }; + }; + }; + }; + ListOtaUpdates: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + /** @description Filter by a specific status of the resource's lifecycle. */ + 'filter[status]'?: components['parameters']['FilterBasicStatusLifecycle']; + /** @description The SIM card identification UUID. */ + 'filter[sim_card_id]'?: string; + /** @description Filter by type. */ + 'filter[type]'?: 'sim_card_network_preferences'; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['SearchOTAUpdateResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + GetOtaUpdate: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['ResourceId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['OTAUpdateResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + ListOutboundVoiceProfiles: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + /** @description Optional filter on outbound voice profile name. */ + 'filter[name][contains]'?: components['parameters']['NameFilter']; + /** @description Specifies the sort order for results. By default sorting direction is ascending. To have the results sorted in descending order add the - prefix.

+ * That is:
    + *
  • + * name: sorts the result by the + * name field in ascending order. + *
  • + * + *
  • + * -name: sorts the result by the + * name field in descending order. + *
  • + *

*/ + sort?: components['parameters']['SortOutboundVoiceProfile']; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListOutboundVoiceProfilesResponse']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Bad request */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + CreateVoiceProfile: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Parameters that can be defined when creating an outbound voice profile */ + requestBody: { + content: { + 'application/json': components['schemas']['CreateOutboundVoiceProfileRequest']; + }; + }; + responses: { + 200: components['responses']['OutboundVoiceProfileResponse']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Bad request */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + GetOutboundVoiceProfile: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['id']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['OutboundVoiceProfileResponse']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Bad request */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + DeleteOutboundVoiceProfile: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['id']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['OutboundVoiceProfileResponse']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Bad request */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + UpdateOutboundVoiceProfile: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['id']; + }; + cookie?: never; + }; + /** @description Parameters that can be updated on an outbound voice profile */ + requestBody: { + content: { + 'application/json': components['schemas']['UpdateOutboundVoiceProfileRequest']; + }; + }; + responses: { + 200: components['responses']['OutboundVoiceProfileResponse']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Bad request */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + GetPartnerCampaignsSharedByUser: { + parameters: { + query?: { + /** @description The 1-indexed page number to get. The default value is `1`. */ + page?: number; + /** @description The amount of records per page, limited to between 1 and 500 inclusive. The default value is `10`. */ + recordsPerPage?: number; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['SharedCampaignRecordSet']; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['HTTPValidationError']; + }; + }; + }; + }; + GetPartnerCampaignSharingStatus: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the campaign in question */ + campaignId: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + [key: string]: components['schemas']['CampaignSharingStatus']; + }; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['HTTPValidationError']; + }; + }; + }; + }; + GetAutoRechargePrefs: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['AutoRechargePrefResponse']; + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + UpdateAutoRechargePrefs: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Details to update auto recharge preferences */ + requestBody: { + content: { + 'application/json': components['schemas']['AutoRechargePrefRequest']; + }; + }; + responses: { + 200: components['responses']['AutoRechargePrefResponse']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Bad request */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + PostAssignMessagingProfileToCampaign: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['AssignProfileToCampaignRequest']; + }; + }; + responses: { + /** @description Successful Response */ + 202: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': + | components['schemas']['AssignProfileToCampaignResponse'] + | components['schemas']['SettingsDataErrorMessage']; + }; + }; + default: components['responses']['GenericErrorResponse']; + }; + }; + GetAssignmentTaskStatus: { + parameters: { + query?: never; + header?: never; + path: { + taskId: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['AssignmentTaskStatusResponse']; + }; + }; + default: components['responses']['GenericErrorResponse']; + }; + }; + GetPhoneNumberStatus: { + parameters: { + query?: { + recordsPerPage?: unknown; + page?: unknown; + }; + header?: never; + path: { + taskId: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['PhoneNumberStatusResponsePaginated']; + }; + }; + default: components['responses']['GenericErrorResponse']; + }; + }; + GetAllPhoneNumberCampaignsCamelCase: { + parameters: { + query?: { + recordsPerPage?: unknown; + page?: unknown; + /** @description Filter results by the Telnyx Campaign id */ + 'filter[telnyx_campaign_id]'?: components['parameters']['FilterByTelnyxCampaignID']; + /** @description Filter results by the Telnyx Brand id */ + 'filter[telnyx_brand_id]'?: components['parameters']['FilterByTelnyxBrandID']; + /** @description Filter results by the TCR Campaign id */ + 'filter[tcr_campaign_id]'?: components['parameters']['FilterByTCRCampaignID']; + /** @description Filter results by the TCR Brand id */ + 'filter[tcr_brand_id]'?: components['parameters']['FilterByTCRBrandID']; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['PhoneNumberCampaignPaginated']; + }; + }; + default: components['responses']['GenericErrorResponse']; + }; + }; + CreatePhoneNumberCampaignCamelCase: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['PhoneNumberCampaignCreate']; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['PhoneNumberCampaign']; + }; + }; + default: components['responses']['GenericErrorResponse']; + }; + }; + GetPhoneNumberCampaign: { + parameters: { + query?: never; + header?: never; + path: { + phoneNumber: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['PhoneNumberCampaign']; + }; + }; + default: components['responses']['GenericErrorResponse']; + }; + }; + CreatePhoneNumberCampaignCamelCasePut: { + parameters: { + query?: never; + header?: never; + path: { + phoneNumber: string; + }; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['PhoneNumberCampaignCreate']; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['PhoneNumberCampaign']; + }; + }; + default: components['responses']['GenericErrorResponse']; + }; + }; + DeletePhoneNumberCampaignCamelCase: { + parameters: { + query?: never; + header?: never; + path: { + phoneNumber: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['SinglePhoneNumberCampaign']; + default: components['responses']['GenericErrorResponse']; + }; + }; + ListPhoneNumberBlocksJobs: { + parameters: { + query?: { + /** @description Filter the phone number blocks jobs by type. */ + 'filter[type]'?: 'delete_phone_number_block'; + /** @description Filter the phone number blocks jobs by status. */ + 'filter[status]'?: 'pending' | 'in_progress' | 'completed' | 'failed'; + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + /** @description Specifies the sort order for results. If not given, results are sorted by created_at in descending order. */ + sort?: 'created_at'; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListPhoneNumberBlocksJobsResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + CreatePhoneNumberBlockDeletionJob: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['PhoneNumberBlocksJobDeletePhoneNumberBlockRequest']; + }; + }; + responses: { + /** @description Phone number blocks job delete phone numbers requested. */ + 202: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['PhoneNumberBlocksJob']; + }; + }; + }; + default: components['responses']['GenericErrorResponse']; + }; + }; + GetPhoneNumberBlocksJob: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the Phone Number Blocks Job. */ + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Phone number blocks job details. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['PhoneNumberBlocksJob']; + }; + }; + }; + default: components['responses']['GenericErrorResponse']; + }; + }; + GetAllPhoneNumberCampaigns: { + parameters: { + query?: { + recordsPerPage?: unknown; + page?: unknown; + /** @description Filter results by the Telnyx Campaign id */ + 'filter[telnyx_campaign_id]'?: components['parameters']['FilterByTelnyxCampaignID']; + /** @description Filter results by the Telnyx Brand id */ + 'filter[telnyx_brand_id]'?: components['parameters']['FilterByTelnyxBrandID']; + /** @description Filter results by the TCR Campaign id */ + 'filter[tcr_campaign_id]'?: components['parameters']['FilterByTCRCampaignID']; + /** @description Filter results by the TCR Brand id */ + 'filter[tcr_brand_id]'?: components['parameters']['FilterByTCRBrandID']; + /** + * @description Specifies the sort order for results. If not given, results are sorted by createdAt in descending order. + * @example -phoneNumber + */ + sort?: + | 'assignmentStatus' + | '-assignmentStatus' + | 'createdAt' + | '-createdAt' + | 'phoneNumber' + | '-phoneNumber'; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['PhoneNumberCampaignPaginated']; + }; + }; + default: components['responses']['GenericErrorResponse']; + }; + }; + CreatePhoneNumberCampaign: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['PhoneNumberCampaignCreate']; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['PhoneNumberCampaign']; + }; + }; + default: components['responses']['GenericErrorResponse']; + }; + }; + GetSinglePhoneNumberCampaign: { + parameters: { + query?: never; + header?: never; + path: { + phoneNumber: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['PhoneNumberCampaign']; + }; + }; + default: components['responses']['GenericErrorResponse']; + }; + }; + PutPhoneNumberCampaign: { + parameters: { + query?: never; + header?: never; + path: { + phoneNumber: string; + }; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['PhoneNumberCampaignCreate']; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['PhoneNumberCampaign']; + }; + }; + default: components['responses']['GenericErrorResponse']; + }; + }; + DeletePhoneNumberCampaign: { + parameters: { + query?: never; + header?: never; + path: { + phoneNumber: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['SinglePhoneNumberCampaign']; + default: components['responses']['GenericErrorResponse']; + }; + }; + ListPhoneNumbers: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + /** @description Filter by phone number tags. */ + 'filter[tag]'?: string; + /** @description Filter by phone number. Requires at least three digits. + * Non-numerical characters will result in no values being returned. */ + 'filter[phone_number]'?: string; + /** @description Filter by phone number status. */ + 'filter[status]'?: + | 'purchase_pending' + | 'purchase_failed' + | 'port_pending' + | 'active' + | 'deleted' + | 'port_failed' + | 'emergency_only' + | 'ported_out' + | 'port_out_pending'; + /** @description Filter by connection_id. */ + 'filter[connection_id]'?: string; + /** @description Filter contains connection name. Requires at least three characters. */ + 'filter[voice.connection_name][contains]'?: string; + /** @description Filter starts with connection name. Requires at least three characters. */ + 'filter[voice.connection_name][starts_with]'?: string; + /** @description Filter ends with connection name. Requires at least three characters. */ + 'filter[voice.connection_name][ends_with]'?: string; + /** @description Filter by connection name. */ + 'filter[voice.connection_name][eq]'?: string; + /** @description Filter by usage_payment_method. */ + 'filter[voice.usage_payment_method]'?: 'pay-per-minute' | 'channel'; + /** @description Filter by the billing_group_id associated with phone numbers. To filter to only phone numbers that have no billing group associated them, set the value of this filter to the string 'null'. */ + 'filter[billing_group_id]'?: string; + /** @description Filter by the emergency_address_id associated with phone numbers. To filter only phone numbers that have no emergency address associated with them, set the value of this filter to the string 'null'. */ + 'filter[emergency_address_id]'?: string; + /** @description Filter numbers via the customer_reference set. */ + 'filter[customer_reference]'?: string; + /** @description Specifies the sort order for results. If not given, results are sorted by created_at in descending order. */ + sort?: + | 'purchased_at' + | 'phone_number' + | 'connection_name' + | 'usage_payment_method'; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListPhoneNumbersResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + ListCsvDownloads: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListCsvDownloadsResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + CreateCsvDownload: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['CsvDownloadResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + GetCsvDownload: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the CSV download. */ + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['CsvDownloadResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + ListInboundChannels: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Inbound Channels Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: { + /** + * @description The current number of concurrent channels set for the account + * @example 7 + */ + channels?: number; + /** + * @description Identifies the type of the response + * @example inbound_channels + */ + record_type?: string; + }; + }; + }; + }; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Unprocessable entity. Check message field in response for details. */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + UpdateOutboundChannels: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Inbound channels update */ + requestBody: { + content: { + 'application/json': { + /** + * @description The new number of concurrent channels for the account + * @example 7 + */ + channels: number; + }; + }; + }; + responses: { + /** @description Expected Update response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: { + /** + * @description The number of channels set for the account + * @example 7 + */ + channels?: number; + /** + * @description Identifies the type of the response + * @example inbound_channels + */ + record_type?: string; + }; + }; + }; + }; + /** @description Unexpected error */ + default: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + errors?: { + /** Format: int */ + code: string; + title: string; + detail?: string; + source?: { + /** + * Format: json-pointer + * @description JSON pointer (RFC6901) to the offending entity. + */ + pointer?: string; + /** @description Indicates which query parameter caused the error. */ + parameter?: string; + }; + meta?: Record; + }[]; + }; + }; + }; + }; + }; + ListPhoneNumbersJobs: { + parameters: { + query?: { + /** @description Filter the phone number jobs by type. */ + 'filter[type]'?: + | 'update_emergency_settings' + | 'delete_phone_numbers' + | 'update_phone_numbers'; + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + /** @description Specifies the sort order for results. If not given, results are sorted by created_at in descending order. */ + sort?: 'created_at'; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListPhoneNumbersJobsResponse']; + 401: components['responses']['UnauthorizedResponse']; + /** @description Unprocessable Entity */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['Errors']; + }; + }; + default: components['responses']['GenericErrorResponse']; + }; + }; + CreateDeletePhoneNumbersJob: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['PhoneNumbersJobDeletePhoneNumbersRequest']; + }; + }; + responses: { + /** @description Phone numbers job delete phone numbers requested. */ + 202: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['PhoneNumbersJob']; + }; + }; + }; + 401: components['responses']['UnauthorizedResponse']; + 403: components['responses']['ForbiddenResponse']; + /** @description Unprocessable Entity */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['Errors']; + }; + }; + default: components['responses']['GenericErrorResponse']; + }; + }; + CreatePhoneNumbersJobUpdateEmergencySettings: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['PhoneNumbersJobUpdateEmergencySettingsRequest']; + }; + }; + responses: { + /** @description Phone numbers enable emergency requested. */ + 202: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['PhoneNumbersJob']; + }; + }; + }; + 401: components['responses']['UnauthorizedResponse']; + 403: components['responses']['ForbiddenResponse']; + /** @description Unprocessable Entity */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['Errors']; + }; + }; + default: components['responses']['GenericErrorResponse']; + }; + }; + CreateUpdatePhoneNumbersJob: { + parameters: { + query?: { + /** @description Filter by phone number that have bundles. */ + 'filter[has_bundle]'?: string; + /** @description Filter by phone number tags. */ + 'filter[tag]'?: string; + /** @description Filter by connection_id. */ + 'filter[connection_id]'?: string; + /** @description Filter by phone number. Requires at least three digits. + * Non-numerical characters will result in no values being returned. */ + 'filter[phone_number]'?: string; + /** @description Filter by phone number status. */ + 'filter[status]'?: + | 'purchase_pending' + | 'purchase_failed' + | 'port_pending' + | 'active' + | 'deleted' + | 'port_failed' + | 'emergency_only' + | 'ported_out' + | 'port_out_pending'; + /** @description Filter contains connection name. Requires at least three characters. */ + 'filter[voice.connection_name][contains]'?: string; + /** @description Filter by usage_payment_method. */ + 'filter[voice.usage_payment_method]'?: 'pay-per-minute' | 'channel'; + /** @description Filter by the billing_group_id associated with phone numbers. To filter to only phone numbers that have no billing group associated them, set the value of this filter to the string 'null'. */ + 'filter[billing_group_id]'?: string; + /** @description Filter by the emergency_address_id associated with phone numbers. To filter only phone numbers that have no emergency address associated with them, set the value of this filter to the string 'null'. */ + 'filter[emergency_address_id]'?: string; + /** @description Filter numbers via the customer_reference set. */ + 'filter[customer_reference]'?: string; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['PhoneNumbersJobUpdatePhoneNumbersRequest']; + }; + }; + responses: { + /** @description Phone numbers job update phone numbers requested. */ + 202: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['PhoneNumbersJob']; + }; + }; + }; + 401: components['responses']['UnauthorizedResponse']; + /** @description Forbidden */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['Errors']; + }; + }; + /** @description Unprocessable Entity */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['Errors']; + }; + }; + default: components['responses']['GenericErrorResponse']; + }; + }; + RetrievePhoneNumbersJob: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the Phone Numbers Job. */ + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Phone numbers job details. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['PhoneNumbersJob']; + }; + }; + }; + 401: components['responses']['UnauthorizedResponse']; + /** @description Not Found */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['Errors']; + }; + }; + default: components['responses']['GenericErrorResponse']; + }; + }; + ListPhoneNumbersWithMessagingSettings: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListPhoneNumbersWithMessagingSettingsResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + SlimListPhoneNumbers: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + /** @description Include the connection associated with the phone number. */ + include_connection?: boolean; + /** @description Include the tags associated with the phone number. */ + include_tags?: boolean; + /** @description Filter by phone number tags. (This requires the include_tags param) */ + 'filter[tag]'?: string; + /** @description Filter by phone number. Requires at least three digits. + * Non-numerical characters will result in no values being returned. */ + 'filter[phone_number]'?: string; + /** @description Filter by phone number status. */ + 'filter[status]'?: + | 'purchase_pending' + | 'purchase_failed' + | 'port_pending' + | 'active' + | 'deleted' + | 'port_failed' + | 'emergency_only' + | 'ported_out' + | 'port_out_pending'; + /** @description Filter by connection_id. */ + 'filter[connection_id]'?: string; + /** @description Filter contains connection name. Requires at least three characters and the include_connection param. */ + 'filter[voice.connection_name][contains]'?: string; + /** @description Filter starts with connection name. Requires at least three characters and the include_connection param. */ + 'filter[voice.connection_name][starts_with]'?: string; + /** @description Filter ends with connection name. Requires at least three characters and the include_connection param. */ + 'filter[voice.connection_name][ends_with]'?: string; + /** @description Filter by connection name , requires the include_connection param and the include_connection param. */ + 'filter[voice.connection_name]'?: string; + /** @description Filter by usage_payment_method. */ + 'filter[voice.usage_payment_method]'?: 'pay-per-minute' | 'channel'; + /** @description Filter by the billing_group_id associated with phone numbers. To filter to only phone numbers that have no billing group associated them, set the value of this filter to the string 'null'. */ + 'filter[billing_group_id]'?: string; + /** @description Filter by the emergency_address_id associated with phone numbers. To filter only phone numbers that have no emergency address associated with them, set the value of this filter to the string 'null'. */ + 'filter[emergency_address_id]'?: string; + /** @description Filter numbers via the customer_reference set. */ + 'filter[customer_reference]'?: string; + /** @description Specifies the sort order for results. If not given, results are sorted by created_at in descending order. */ + sort?: + | 'purchased_at' + | 'phone_number' + | 'connection_name' + | 'usage_payment_method'; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['SlimListPhoneNumbersResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + ListPhoneNumbersWithVoiceSettings: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + /** @description Filter by phone number. Requires at least three digits. + * Non-numerical characters will result in no values being returned. */ + 'filter[phone_number]'?: string; + /** @description Filter contains connection name. Requires at least three characters. */ + 'filter[connection_name][contains]'?: string; + /** @description Filter numbers via the customer_reference set. */ + 'filter[customer_reference]'?: string; + /** @description Filter by usage_payment_method. */ + 'filter[voice.usage_payment_method]'?: 'pay-per-minute' | 'channel'; + /** @description Specifies the sort order for results. If not given, results are sorted by created_at in descending order. */ + sort?: + | 'purchased_at' + | 'phone_number' + | 'connection_name' + | 'usage_payment_method'; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListPhoneNumbersWithVoiceSettingsResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + RetrievePhoneNumber: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['IntId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['PhoneNumberResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + DeletePhoneNumber: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['IntId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['DeletePhoneNumberResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + UpdatePhoneNumber: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['IntId']; + }; + cookie?: never; + }; + /** @description Updated settings for the phone number. */ + requestBody: { + content: { + 'application/json': components['schemas']['UpdatePhoneNumberRequest']; + }; + }; + responses: { + 200: components['responses']['PhoneNumberResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + EnablePhoneNumberEmergency: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['IntId']; + }; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['PhoneNumberEnableEmergencyRequest']; + }; + }; + responses: { + /** @description Phone number emergency enabled. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['PhoneNumberWithVoiceSettings']; + }; + }; + }; + /** @description Phone number emergency requested. */ + 202: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['PhoneNumberWithVoiceSettings']; + }; + }; + }; + default: components['responses']['GenericErrorResponse']; + }; + }; + GetPhoneNumberMessagingSettings: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the type of resource. */ + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['PhoneNumberWithMessagingSettingsResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + UpdatePhoneNumberMessagingSettings: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The phone number to update. */ + id: string; + }; + cookie?: never; + }; + /** @description The new configuration to set for this phone number. + * + * To avoid modifying a value, either omit the field or set its value to `null`. */ + requestBody: { + content: { + 'application/json': components['schemas']['UpdatePhoneNumberMessagingSettingsRequest']; + }; + }; + responses: { + 200: components['responses']['PhoneNumberWithMessagingSettingsResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + GetPhoneNumberVoiceSettings: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['IntId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['PhoneNumberWithVoiceSettingsResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + UpdatePhoneNumberVoiceSettings: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['IntId']; + }; + cookie?: never; + }; + /** @description Updated voice settings for the phone number. */ + requestBody: { + content: { + 'application/json': components['schemas']['UpdatePhoneNumberVoiceSettingsRequest']; + }; + }; + responses: { + 200: components['responses']['PhoneNumberWithVoiceSettingsResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + GetVoicemail: { + parameters: { + query?: never; + header?: never; + path: { + /** + * @description The ID of the phone number. + * @example 123455678900 + */ + phone_number_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['VoicemailResponse']; + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + CreateVoicemail: { + parameters: { + query?: never; + header?: never; + path: { + /** + * @description The ID of the phone number. + * @example 123455678900 + */ + phone_number_id: string; + }; + cookie?: never; + }; + /** @description Details to create */ + requestBody: { + content: { + 'application/json': components['schemas']['VoicemailRequest']; + }; + }; + responses: { + 200: components['responses']['VoicemailResponse']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Bad request */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + UpdateVoicemail: { + parameters: { + query?: never; + header?: never; + path: { + /** + * @description The ID of the phone number. + * @example 123455678900 + */ + phone_number_id: string; + }; + cookie?: never; + }; + /** @description Details to update */ + requestBody: { + content: { + 'application/json': components['schemas']['VoicemailRequest']; + }; + }; + responses: { + 200: components['responses']['VoicemailResponse']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Bad request */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + ListRegulatoryRequirementsPhoneNumbers: { + parameters: { + query: { + /** @description Record type phone number/ phone numbers */ + 'filter[phone_number]': string; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['listRegulatoryRequirementsPhoneNumbers']; + default: components['responses']['GenericErrorResponse']; + }; + }; + PostPortabilityCheck: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': { + /** + * @description The list of +E.164 formatted phone numbers to check for portability + * @example [ + * "+13035550000", + * "+13035550001", + * "+13035550002" + * ] + */ + phone_numbers?: string[]; + }; + }; + }; + responses: { + 201: components['responses']['PortabilityCheckResponse']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Unprocessable entity. Check message field in response for details. */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + listPortingEvents: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + /** @description Filter by event type. */ + 'filter[type]'?: + | 'porting_order.deleted' + | 'porting_order.loa_updated' + | 'porting_order.messaging_changed' + | 'porting_order.status_changed' + | 'porting_order.sharing_token_expired' + | 'porting_order.new_comment' + | 'porting_order.split'; + /** @description Filter by porting order ID. */ + 'filter[porting_order_id]'?: string; + /** @description Filter by created at greater than or equal to. */ + 'filter[created_at][gte]'?: string; + /** @description Filter by created at less than or equal to. */ + 'filter[created_at][lte]'?: string; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListPortingEventsResponse']; + /** @description Internal server error */ + 500: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + showPortingEvent: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the porting event. */ + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ShowPortingEventResponse']; + /** @description Not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Internal server error */ + 500: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + republishPortingEvent: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the porting event. */ + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description No content */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Internal server error */ + 500: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + PreviewLoaConfigurationParams: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: components['requestBodies']['CreatePortingLOAConfiguration']; + responses: { + 200: components['responses']['DownloadLOATemplate']; + /** @description Unprocessable entity. Check message field in response for details. */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Internal server error */ + 500: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + ListLoaConfigurations: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListPortingLOAConfigurations']; + /** @description Unprocessable entity. Check message field in response for details. */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Internal server error */ + 500: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + CreateLoaConfiguration: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: components['requestBodies']['CreatePortingLOAConfiguration']; + responses: { + 201: components['responses']['CreatePortingLOAConfiguration']; + /** @description Unprocessable entity. Check message field in response for details. */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Internal server error */ + 500: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + GetLoaConfiguration: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies a LOA configuration. */ + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ShowPortingLOAConfiguration']; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Internal server error */ + 500: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + DeleteLoaConfiguration: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies a LOA configuration. */ + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description No content */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Internal server error */ + 500: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + UpdateLoaConfiguration: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies a LOA configuration. */ + id: string; + }; + cookie?: never; + }; + requestBody: components['requestBodies']['CreatePortingLOAConfiguration']; + responses: { + 200: components['responses']['UpdatePortingLOAConfiguration']; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Unprocessable entity. Check message field in response for details. */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Internal server error */ + 500: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + PreviewLoaConfiguration: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies a LOA configuration. */ + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['DownloadLOATemplate']; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Internal server error */ + 500: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + ListPortingReports: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + /** @description Filter reports of a specific type */ + 'filter[report_type]'?: 'export_porting_orders_csv'; + /** @description Filter reports of a specific status */ + 'filter[status]'?: 'pending' | 'completed'; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListPortingReports']; + /** @description Unprocessable entity. Check message field in response for details. */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Internal server error */ + 500: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + CreatePortingReport: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: components['requestBodies']['CreatePortingReport']; + responses: { + 201: components['responses']['CreatePortingReport']; + /** @description Unprocessable entity. Check message field in response for details. */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Internal server error */ + 500: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + ListPortingOrders: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + /** @description Include the first 50 phone number objects in the results */ + include_phone_numbers?: components['parameters']['QueryIncludePhoneNumbers']; + /** @description Filter results by status */ + 'filter[status]'?: components['parameters']['FilterByPortingOrderStatus']; + /** @description Filter porting orders by multiple statuses */ + 'filter[status][in][]'?: components['parameters']['FilterByPortingOrderStatusIn']; + /** + * @description Filter results by customer_reference + * @example 123abc + */ + 'filter[customer_reference]'?: string; + /** + * @description Filter results by parent_support_key + * @example 123abc + */ + 'filter[parent_support_key]'?: string; + /** + * @description Filter results by country ISO 3166-1 alpha-2 code + * @example US + */ + 'filter[phone_numbers.country_code]'?: string; + /** + * @description Filter results by old service provider + * @example Telnyx + */ + 'filter[phone_numbers.carrier_name]'?: string; + /** + * @description Filter results by porting order type + * @example full + */ + 'filter[misc.type]'?: components['schemas']['PortingOrderType']; + /** + * @description Filter results by person or company name + * @example Porter McPortersen + */ + 'filter[end_user.admin.entity_name]'?: string; + /** + * @description Filter results by authorized person + * @example Admin McPortersen + */ + 'filter[end_user.admin.auth_person_name]'?: string; + /** + * @description Filter results by fast port eligible + * @example false + */ + 'filter[activation_settings.fast_port_eligible]'?: boolean; + /** + * @description Filter results by foc date later than this value + * @example 2021-03-25T10:00:00.000Z + */ + 'filter[activation_settings.foc_datetime_requested][gt]'?: string; + /** + * @description Filter results by foc date earlier than this value + * @example 2021-03-25T10:00:00.000Z + */ + 'filter[activation_settings.foc_datetime_requested][lt]'?: string; + /** + * @description Filter results by full or partial phone_number + * @example +13038675309 + */ + 'filter[phone_numbers.phone_number][contains]'?: string; + /** @description Specifies the sort order for results. If not given, results are sorted by created_at in descending order. */ + 'sort[]'?: + | 'created_at' + | '-created_at' + | 'activation_settings.foc_datetime_requested' + | '-activation_settings.foc_datetime_requested'; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListPortingOrder']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Unprocessable entity. Check message field in response for details. */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + CreatePortingOrder: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['CreatePortingOrder']; + }; + }; + responses: { + 201: components['responses']['ListDraftPortingOrdersWithoutPagination']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Unprocessable entity. Check message field in response for details. */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + ListExceptionTypes: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListPortingOrdersExceptionTypes']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Unprocessable entity. Check message field in response for details. */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + ListPhoneNumberConfigurations: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + /** @description Filter results by porting order id */ + 'filter[porting_order_id]'?: components['parameters']['FilterByPortingOrderID']; + /** @description Filter results by a list of porting order ids */ + 'filter[porting_order_id][in][]'?: components['parameters']['FilterByPortingOrderIdIn']; + /** @description Filter results by a specific porting order status */ + 'filter[porting_order.status]'?: + | 'activation-in-progress' + | 'cancel-pending' + | 'cancelled' + | 'draft' + | 'exception' + | 'foc-date-confirmed' + | 'in-process' + | 'ported' + | 'submitted'; + /** @description Filter results by specific porting order statuses */ + 'filter[porting_order.status][in][]'?: ( + | 'activation-in-progress' + | 'cancel-pending' + | 'cancelled' + | 'draft' + | 'exception' + | 'foc-date-confirmed' + | 'in-process' + | 'ported' + | 'submitted' + )[]; + /** @description Filter results by a specific porting phone number ID */ + 'filter[porting_phone_number]'?: string; + /** @description Filter results by a list of porting phone number IDs */ + 'filter[porting_phone_number][in][]'?: string[]; + /** @description Filter results by a specific user bundle ID */ + 'filter[user_bundle_id]'?: string; + /** @description Filter results by a list of user bundle IDs */ + 'filter[user_bundle_id][in][]'?: string[]; + /** @description Specifies the sort order for results. If not given, results are sorted by created_at in descending order. */ + 'sort[]'?: 'created_at' | '-created_at'; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListPortingPhoneNumberConfigurations']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Unprocessable entity. Check message field in response for details. */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + CreatePhoneNumberConfigurations: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: components['requestBodies']['CreatePortingPhoneNumberConfigurations']; + responses: { + 201: components['responses']['CreatePortingPhoneNumberConfigurations']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Unprocessable entity. Check message field in response for details. */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + GetPortingOrder: { + parameters: { + query?: { + /** @description Include the first 50 phone number objects in the results */ + include_phone_numbers?: components['parameters']['QueryIncludePhoneNumbers']; + }; + header?: never; + path: { + /** @description Porting Order id */ + id: components['parameters']['PathPortingOrderID']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ShowPortingOrder']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + DeletePortingOrder: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Porting Order id */ + id: components['parameters']['PathPortingOrderID']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description No content */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Unprocessable entity. Check message field in response for details. */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + UpdatePortingOrder: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Porting Order id */ + id: components['parameters']['PathPortingOrderID']; + }; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['UpdatePortingOrder']; + }; + }; + responses: { + 200: components['responses']['UpdatePortingOrderResponse']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Unprocessable entity. Check message field in response for details. */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + ActivatePortingOrder: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Porting Order id */ + id: components['parameters']['PathPortingOrderID']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 202: components['responses']['ShowPortingOrdersActivationJob']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Unprocessable entity. Check message field in response for details. */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + CancelPortingOrder: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Porting Order id */ + id: components['parameters']['PathPortingOrderID']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['CancelPortingOrderResponse']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Unprocessable entity. Check message field in response for details. */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + ConfirmPortingOrder: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Porting Order id */ + id: components['parameters']['PathPortingOrderID']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ConfirmPortingOrderResponse']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Unprocessable entity. Check message field in response for details. */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + SharePortingOrder: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Porting Order id */ + id: components['parameters']['PathPortingOrderID']; + }; + cookie?: never; + }; + requestBody: components['requestBodies']['SharePortingOrder']; + responses: { + 201: components['responses']['SharePortingOrder']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Porting Order not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + ListPortingOrderActivationJobs: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + }; + header?: never; + path: { + /** @description Porting Order id */ + id: components['parameters']['PathPortingOrderID']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListPortingOrdersActivationJobs']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Unprocessable entity. Check message field in response for details. */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + GetPortingOrdersActivationJob: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Porting Order id */ + id: components['parameters']['PathPortingOrderID']; + /** @description Activation Job Identifier */ + activationJobId: components['parameters']['PathPortingOrdersActivationJobID']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ShowPortingOrdersActivationJob']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Unprocessable entity. Check message field in response for details. */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + UpdatePortingOrdersActivationJob: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Porting Order id */ + id: components['parameters']['PathPortingOrderID']; + /** @description Activation Job Identifier */ + activationJobId: components['parameters']['PathPortingOrdersActivationJobID']; + }; + cookie?: never; + }; + requestBody: components['requestBodies']['UpdatePortingOrdersActivationJob']; + responses: { + 200: components['responses']['ShowPortingOrdersActivationJob']; + /** @description Not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Unprocessable entity. Check message field in response for details. */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + ListAdditionalDocuments: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + /** @description Filter additional documents of a specific document type */ + 'filter[document_type]'?: 'loa' | 'invoice' | 'csr' | 'other'; + /** @description Filter additional documents by a list of document types */ + 'filter[document_type][in][]'?: ('loa' | 'invoice' | 'csr' | 'other')[]; + /** @description Specifies the sort order for results. If not given, results are sorted by created_at in descending order. */ + 'sort[]'?: 'created_at' | '-created_at'; + }; + header?: never; + path: { + /** @description Porting Order id */ + id: components['parameters']['PathPortingOrderID']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListPortingAdditionalDocuments']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + CreateAdditionalDocuments: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Porting Order id */ + id: components['parameters']['PathPortingOrderID']; + }; + cookie?: never; + }; + requestBody: components['requestBodies']['CreatePortingAdditionalDocuments']; + responses: { + 201: components['responses']['CreatePortingAdditionalDocuments']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Unprocessable entity. Check message field in response for details. */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + DeleteAdditionalDocument: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Porting Order id */ + id: components['parameters']['PathPortingOrderID']; + /** @description Additional document identification. */ + additional_document_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description No content */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + ListAllowedFocWindows: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Porting Order id */ + id: components['parameters']['PathPortingOrderID']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListAllowedFocWindows']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + ListPortingOrderComments: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + }; + header?: never; + path: { + /** @description Porting Order id */ + id: components['parameters']['PathPortingOrderID']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListPortingOrdersComments']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Unprocessable entity. Check message field in response for details. */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + CreateComment: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Porting Order id */ + id: components['parameters']['PathPortingOrderID']; + }; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['CreatePortingOrderComment']; + }; + }; + responses: { + 201: components['responses']['ShowPortingOrdersComment']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Unprocessable entity. Check message field in response for details. */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + GetPortingOrderLoaTemplate: { + parameters: { + query?: { + /** + * @description The identifier of the LOA configuration to use for the template. If not provided, the default LOA configuration will be used. + * @example a36c2277-446b-4d11-b4ea-322e02a5c08d + */ + loa_configuration_id?: string; + }; + header?: never; + path: { + /** @description Porting Order id */ + id: components['parameters']['PathPortingOrderID']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['DownloadLOATemplate']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + ListPortingOrderRequirements: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + }; + header?: never; + path: { + /** @description Porting Order id */ + id: components['parameters']['PathPortingOrderID']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListPortingOrderRequirements']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Unprocessable entity. Check message field in response for details. */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + GetPortingOrderSubRequest: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Porting Order id */ + id: components['parameters']['PathPortingOrderID']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['SubRequestByPortingOrder']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Porting Order not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + ListVerificationCodes: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + /** @description Filter results by phone number */ + 'filter[phone_number]'?: components['parameters']['FilterByPhoneNumber']; + /** @description Filter results by a list of phone numbers */ + 'filter[phone_number][in][]'?: components['parameters']['FilterByPhoneNumberIn']; + /** @description Filter verification codes that have been verified or not */ + 'filter[verified]'?: boolean; + /** @description Specifies the sort order for results. If not given, results are sorted by created_at in descending order. */ + 'sort[]'?: 'created_at' | '-created_at'; + }; + header?: never; + path: { + /** @description Porting Order id */ + id: components['parameters']['PathPortingOrderID']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListPortingVerificationCodes']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + SendPortingVerificationCodes: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Porting Order id */ + id: components['parameters']['PathPortingOrderID']; + }; + cookie?: never; + }; + requestBody?: components['requestBodies']['SendPortingVerificationCodes']; + responses: { + /** @description No content */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Unprocessable entity. Check message field in response for details. */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + VerifyPortingVerificationCodes: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Porting Order id */ + id: components['parameters']['PathPortingOrderID']; + }; + cookie?: never; + }; + requestBody: components['requestBodies']['VerifyPortingVerificationCodes']; + responses: { + 200: components['responses']['VerifyPortingVerificationCodes']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Unprocessable entity. Check message field in response for details. */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + listPortingPhoneNumberBlocks: { + parameters: { + query?: { + /** @description Filter results by phone number */ + 'filter[phone_number]'?: components['parameters']['FilterByPhoneNumber']; + /** @description Filter results by a list of phone numbers */ + 'filter[phone_number][in][]'?: components['parameters']['FilterByPhoneNumberIn']; + /** @description Specifies the sort order for results. If not given, results are sorted by created_at in descending order */ + 'sort[]'?: '-created_at' | 'created_at'; + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + }; + header?: never; + path: { + /** @description Identifies the Porting Order associated with the phone number blocks */ + porting_order_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListPortingPhoneNumberBlocks']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Unprocessable entity. Check message field in response for details. */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + createPortingPhoneNumberBlock: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the Porting Order associated with the phone number block */ + porting_order_id: string; + }; + cookie?: never; + }; + requestBody: components['requestBodies']['CreatePortingPhoneNumberBlock']; + responses: { + 201: components['responses']['ShowPortingPhoneNumberBlock']; + /** @description Not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Unprocessable entity. Check message field in response for details. */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + deletePortingPhoneNumberBlock: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the Porting Order associated with the phone number block */ + porting_order_id: string; + /** @description Identifies the phone number block to be deleted */ + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ShowPortingPhoneNumberBlock']; + /** @description Not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Unprocessable entity. Check message field in response for details. */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + listPortingPhoneNumberExtensions: { + parameters: { + query?: { + /** @description Filter results by phone number */ + 'filter[phone_number]'?: components['parameters']['FilterByPhoneNumber']; + /** @description Filter results by a list of phone numbers */ + 'filter[phone_number][in][]'?: components['parameters']['FilterByPhoneNumberIn']; + /** @description Filter results by porting phone number id */ + 'filter[porting_phone_number_id]'?: string; + /** @description Filter results by a list of porting phone number ids */ + 'filter[porting_phone_number_id][in][]'?: string; + /** @description Specifies the sort order for results. If not given, results are sorted by created_at in descending order */ + 'sort[]'?: '-created_at' | 'created_at'; + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + }; + header?: never; + path: { + /** @description Identifies the Porting Order associated with the phone number extensions */ + porting_order_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListPortingPhoneNumberExtensions']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Unprocessable entity. Check message field in response for details. */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + createPortingPhoneNumberExtension: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the Porting Order associated with the phone number extension */ + porting_order_id: string; + }; + cookie?: never; + }; + requestBody: components['requestBodies']['CreatePortingPhoneNumberExtension']; + responses: { + 201: components['responses']['ShowPortingPhoneNumberExtension']; + /** @description Not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Unprocessable entity. Check message field in response for details. */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + deletePortingPhoneNumberExtension: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the Porting Order associated with the phone number extension */ + porting_order_id: string; + /** @description Identifies the phone number extension to be deleted */ + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ShowPortingPhoneNumberExtension']; + /** @description Not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Unprocessable entity. Check message field in response for details. */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + ListPortingPhoneNumbers: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + /** @description Filter results by porting order id */ + 'filter[porting_order_id]'?: components['parameters']['FilterByPortingOrderID']; + /** @description Filter results by a list of porting order ids */ + 'filter[porting_order_id][in][]'?: components['parameters']['FilterByPortingOrderIdIn']; + /** @description Filter results by support key */ + 'filter[support_key][eq]'?: components['parameters']['FilterBySupportKeyEq']; + /** @description Filter results by a list of support keys */ + 'filter[support_key][in][]'?: components['parameters']['FilterBySupportKeyIn']; + /** @description Filter results by phone number */ + 'filter[phone_number]'?: components['parameters']['FilterByPhoneNumber']; + /** @description Filter results by a list of phone numbers */ + 'filter[phone_number][in][]'?: components['parameters']['FilterByPhoneNumberIn']; + /** @description Filter results by porting order status */ + 'filter[porting_order_status]'?: + | 'draft' + | 'in-process' + | 'submitted' + | 'exception' + | 'foc-date-confirmed' + | 'cancel-pending' + | 'ported' + | 'cancelled'; + /** @description Filter results by activation status */ + 'filter[activation_status]'?: components['parameters']['FilterByPortingOrderActivationStatus']; + /** @description Filter results by portability status */ + 'filter[portability_status]'?: components['parameters']['FilterByPortabilityStatus']; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListPortingPhoneNumbers']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Unprocessable entity. Check message field in response for details. */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + listPortoutEvents: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + /** @description Filter by event type. */ + 'filter[event_type]'?: + | 'portout.status_changed' + | 'portout.new_comment' + | 'portout.foc_date_changed'; + /** @description Filter by port-out order ID. */ + 'filter[portout_id]'?: string; + /** @description Filter by created at greater than or equal to. */ + 'filter[created_at][gte]'?: string; + /** @description Filter by created at less than or equal to. */ + 'filter[created_at][lte]'?: string; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListPortoutEventsResponse']; + /** @description Internal server error */ + 500: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + showPortoutEvent: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the port-out event. */ + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ShowPortoutEventResponse']; + /** @description Not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Internal server error */ + 500: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + republishPortoutEvent: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the port-out event. */ + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description No content */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Internal server error */ + 500: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + ListPortoutReports: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + /** @description Filter reports of a specific type */ + 'filter[report_type]'?: 'export_portouts_csv'; + /** @description Filter reports of a specific status */ + 'filter[status]'?: 'pending' | 'completed'; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListPortoutReports']; + /** @description Unprocessable entity. Check message field in response for details. */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Internal server error */ + 500: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + CreatePortoutReport: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: components['requestBodies']['CreatePortoutReport']; + responses: { + 201: components['responses']['CreatePortoutReport']; + /** @description Unprocessable entity. Check message field in response for details. */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Internal server error */ + 500: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + GetPortingReport: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies a report. */ + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ShowPortoutReport']; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Internal server error */ + 500: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + ListPortoutRequest: { + parameters: { + query?: { + /** @description Filter by new carrier name. */ + 'filter[carrier_name]'?: string; + /** @description Filter by new carrier spid. */ + 'filter[spid]'?: string; + /** @description Filter by portout status. */ + 'filter[status]'?: + | 'pending' + | 'authorized' + | 'ported' + | 'rejected' + | 'rejected-pending' + | 'canceled'; + /** @description Filter by a list of portout statuses */ + 'filter[status_in]'?: ( + | 'pending' + | 'authorized' + | 'ported' + | 'rejected' + | 'rejected-pending' + | 'canceled' + )[]; + /** @description Filter by ported_out_at date greater than or equal. */ + 'filter[ported_out_at][gte]'?: string; + /** @description Filter by ported_out_at date less than or equal. */ + 'filter[ported_out_at][lte]'?: string; + /** @description Filter by inserted_at date greater than or equal. */ + 'filter[inserted_at][gte]'?: string; + /** @description Filter by inserted_at date less than or equal. */ + 'filter[inserted_at][lte]'?: string; + /** @description Filter by foc_date. Matches all portouts with the same date */ + 'filter[foc_date]'?: string; + /** @description Filter by a phone number on the portout. Matches all portouts with the phone number */ + 'filter[phone_number]'?: string; + /** @description Filter by the portout's support_key */ + 'filter[support_key]'?: string; + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListPortoutResponse']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Unprocessable entity. Check message field in response for details. */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + FindPortoutRequest: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Portout id */ + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['PortoutResponse']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Unprocessable entity. Check message field in response for details. */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + FindPortoutComments: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Portout id */ + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListPortoutComments']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Unprocessable entity. Check message field in response for details. */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + PostPortRequestComment: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Portout id */ + id: string; + }; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': { + /** @description Comment to post on this portout request */ + body?: string; + }; + }; + }; + responses: { + 201: components['responses']['PortoutCommentResponse']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Unprocessable entity. Check message field in response for details. */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + GetPortRequestSupportingDocuments: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Portout id */ + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 201: components['responses']['PortOutListSupportingDocumentsResponse']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + PostPortRequestSupportingDocuments: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Portout id */ + id: string; + }; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': { + /** @description List of supporting documents parameters */ + documents?: { + /** + * @description Identifies the type of the document + * @example loa + * @enum {string} + */ + type: 'loa' | 'invoice'; + /** + * Format: uuid + * @description Identifies the associated document + * @example 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + */ + document_id: string; + }[]; + }; + }; + }; + responses: { + 201: components['responses']['CreatePortOutSupportingDocumentsResponse']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Unprocessable entity. Check message field in response for details. */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + UpdatePortoutStatus: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Portout id */ + id: string; + /** @description Updated portout status */ + status: 'authorized' | 'rejected-pending'; + }; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': { + /** + * @description Provide a reason if rejecting the port out request + * @example I do not recognize this transaction + */ + reason?: string; + }; + }; + }; + responses: { + 200: components['responses']['PortoutResponse']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Unprocessable entity. Check message field in response for details. */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + GetPrivateWirelessGateways: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + /** + * @description The name of the Private Wireless Gateway. + * @example my private gateway + */ + 'filter[name]'?: string; + /** + * @description The IP address range of the Private Wireless Gateway. + * @example 192.168.0.0/24 + */ + 'filter[ip_range]'?: string; + /** + * @description The name of the region where the Private Wireless Gateway is deployed. + * @example ashburn-va + */ + 'filter[region_code]'?: string; + /** + * @description Private Wireless Gateway resource creation date. + * @example 2018-02-02T22:25:27.521Z + */ + 'filter[created_at]'?: string; + /** + * @description When the Private Wireless Gateway was last updated. + * @example 2018-02-02T22:25:27.521Z + */ + 'filter[updated_at]'?: string; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['GetAllPrivateWirelessGatewaysResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + CreatePrivateWirelessGateway: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': { + /** + * Format: uuid + * @description The identification of the related network resource. + * @example 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + */ + network_id: string; + /** + * @description The private wireless gateway name. + * @example My private wireless gateway + */ + name: string; + }; + }; + }; + responses: { + 202: components['responses']['CreatePrivateWirelessGatewayResponse']; + 422: components['responses']['UnprocessableEntity']; + default: components['responses']['GenericErrorResponse']; + }; + }; + GetPrivateWirelessGateway: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the private wireless gateway. */ + id: components['parameters']['PrivateWirelessGatewayId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['GetPrivateWirelessGatewayResponse']; + 404: components['responses']['ResourceNotFound']; + default: components['responses']['GenericErrorResponse']; + }; + }; + DeleteWirelessGateway: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the private wireless gateway. */ + id: components['parameters']['PrivateWirelessGatewayId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['DeletePrivateWirelessGatewayResponse']; + 404: components['responses']['ResourceNotFound']; + default: components['responses']['GenericErrorResponse']; + }; + }; + ListPublicInternetGateways: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + /** @description The associated network id to filter on. */ + 'filter[network_id]'?: string; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['PublicInternetGatewayListResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + CreatePublicInternetGateway: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['PublicInternetGatewayCreate']; + }; + }; + responses: { + 202: components['responses']['PublicInternetGatewayResponse']; + 422: components['responses']['UnprocessableEntity']; + default: components['responses']['GenericErrorResponse']; + }; + }; + GetPublicInternetGateway: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['ResourceId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['PublicInternetGatewayResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + DeletePublicInternetGateway: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['ResourceId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['PublicInternetGatewayResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + RetrieveCallQueue: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Uniquely identifies the queue by name */ + queue_name: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['QueueResponse']; + 404: components['responses']['NotFoundResponse']; + }; + }; + ListQueueCalls: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + }; + header?: never; + path: { + /** @description Uniquely identifies the queue by name */ + queue_name: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListQueueCallsResponse']; + 404: components['responses']['NotFoundResponse']; + }; + }; + RetrieveCallFromQueue: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Uniquely identifies the queue by name */ + queue_name: string; + /** @description Unique identifier and token for controlling the call */ + call_control_id: components['parameters']['CallControlId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['QueueCallResponse']; + 404: components['responses']['NotFoundResponse']; + }; + }; + getRecordingTranscriptions: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListRecordingTranscriptionsResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + getRecordingTranscription: { + parameters: { + query?: never; + header?: never; + path: { + recording_transcription_id: components['parameters']['RecordingTranscriptionId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['RecordingTranscriptionResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + deleteRecordingTranscription: { + parameters: { + query?: never; + header?: never; + path: { + recording_transcription_id: components['parameters']['RecordingTranscriptionId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['RecordingTranscriptionResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + GetRecordings: { + parameters: { + query?: { + /** @description Returns only recordings associated with a given conference */ + 'filter[conference_id]'?: string; + /** @description Returns only recordings created later than or at given ISO 8601 datetime */ + 'filter[created_at][gte]'?: string; + /** @description Returns only recordings created earlier than or at given ISO 8601 datetime */ + 'filter[created_at][lte]'?: string; + /** @description If present, recordings will be filtered to those with a matching call_leg_id. */ + 'filter[call_leg_id]'?: string; + /** @description If present, recordings will be filtered to those with a matching call_session_id. */ + 'filter[call_session_id]'?: string; + /** @description If present, recordings will be filtered to those with a matching `from` attribute. Matching is case-sensitive */ + 'filter[from]'?: string; + /** @description If present, recordings will be filtered to those with a matching `to` attribute. Matching is case-sensitive */ + 'filter[to]'?: string; + /** @description If present, recordings will be filtered to those with a matching `connection_id` attribute. Matching is case-sensitive */ + 'filter[connection_id]'?: string; + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['RecordingsResponseBody']; + default: components['responses']['GenericErrorResponse']; + }; + }; + DeleteRecordings: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: components['requestBodies']['DeleteRecordingsRequest']; + responses: { + /** @description The recordings have been successfully deleted. */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + default: components['responses']['GenericErrorResponse']; + }; + }; + GetRecording: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Uniquely identifies the recording by id. */ + recording_id: components['parameters']['RecordingId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['RecordingResponseBody']; + default: components['responses']['GenericErrorResponse']; + }; + }; + DeleteRecording: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Uniquely identifies the recording by id. */ + recording_id: components['parameters']['RecordingId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['RecordingResponseBody']; + default: components['responses']['GenericErrorResponse']; + }; + }; + ListRegions: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['RegionListResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + ListRegulatoryRequirements: { + parameters: { + query?: { + /** @description Phone number to check requirements for */ + 'filter[phone_number]'?: string; + /** @description ID of requirement group to check requirements for */ + 'filter[requirement_group_id]'?: string; + /** @description Country code(iso2) to check requirements for */ + 'filter[country_code]'?: string; + /** @description Phone number type to check requirements for */ + 'filter[phone_number_type]'?: + | 'local' + | 'toll_free' + | 'mobile' + | 'national' + | 'shared_cost'; + /** @description Action to check requirements for */ + 'filter[action]'?: 'ordering' | 'porting' | 'action'; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['listRegulatoryRequirements']; + default: components['responses']['GenericErrorResponse']; + }; + }; + GetUsageReports: { + parameters: { + query?: { + /** @description Page number */ + 'page[number]'?: number; + /** @description Size of the page */ + 'page[size]'?: number; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['MdrGetUsageReportsResponse']; + }; + }; + }; + }; + SubmitUsageReport: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Mdr usage report data */ + requestBody: { + content: { + '*/*': components['schemas']['MdrPostUsageReportRequest']; + }; + }; + responses: { + /** @description Successful */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['MdrPostUsageReportsResponse']; + }; + }; + }; + }; + GetUsageReportSync: { + parameters: { + query: { + start_date?: string; + end_date?: string; + aggregation_type: 'NO_AGGREGATION' | 'PROFILE' | 'TAGS'; + profiles?: string[]; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['MdrGetSyncUsageReportResponse']; + }; + }; + }; + }; + DeleteUsageReport: { + parameters: { + query?: never; + header?: never; + path: { + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['MdrDeleteUsageReportsResponse']; + }; + }; + }; + }; + GetPaginatedMdrs: { + parameters: { + query?: { + /** @description Pagination start date */ + start_date?: string; + /** @description Pagination end date */ + end_date?: string; + id?: string; + direction?: 'INBOUND' | 'OUTBOUND'; + profile?: string; + cld?: string; + cli?: string; + status?: + | 'GW_TIMEOUT' + | 'DELIVERED' + | 'DLR_UNCONFIRMED' + | 'DLR_TIMEOUT' + | 'RECEIVED' + | 'GW_REJECT' + | 'FAILED'; + message_type?: 'SMS' | 'MMS'; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['MdrGetDetailResponse']; + }; + }; + }; + }; + GetPaginatedWdrs: { + parameters: { + query?: { + /** @description Start date */ + start_date?: string; + /** @description End date */ + end_date?: string; + id?: string; + mcc?: string; + mnc?: string; + imsi?: string; + sim_group_name?: string; + sim_group_id?: string; + sim_card_id?: string; + phone_number?: string; + /** @description Page number */ + 'page[number]'?: number; + /** @description Size of the page */ + 'page[size]'?: number; + sort?: string[]; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['ExternalWdrGetDetailResponse']; + }; + }; + }; + }; + GetRequirementGroups: { + parameters: { + query?: { + /** @description Filter requirement groups by country code (iso alpha 2) */ + 'filter[country_code]'?: string; + /** @description Filter requirement groups by phone number type. */ + 'filter[phone_number_type]'?: + | 'local' + | 'toll_free' + | 'mobile' + | 'national' + | 'shared_cost'; + /** @description Filter requirement groups by action type */ + 'filter[action]'?: 'ordering' | 'porting' | 'action'; + /** @description Filter requirement groups by customer reference */ + 'filter[customer_reference]'?: string; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description List requirement groups */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['RequirementGroup'][]; + }; + }; + }; + }; + CreateRequirementGroup: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': { + /** + * @description ISO alpha 2 country code + * @example US + */ + country_code: string; + /** + * @example local + * @enum {string} + */ + phone_number_type: + | 'local' + | 'toll_free' + | 'mobile' + | 'national' + | 'shared_cost'; + /** + * @example ordering + * @enum {string} + */ + action: 'ordering' | 'porting'; + customer_reference?: string; + regulatory_requirements?: { + requirement_id?: string; + field_value?: string; + }[]; + }; + }; + }; + responses: { + /** @description Requirement group created */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['RequirementGroup']; + }; + }; + }; + }; + GetRequirementGroup: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the requirement group to retrieve */ + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description A single requirement group */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['RequirementGroup']; + }; + }; + }; + }; + DeleteRequirementGroup: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the requirement group */ + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Deleted requirement group */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['RequirementGroup']; + }; + }; + }; + }; + UpdateRequirementGroup: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the requirement group */ + id: string; + }; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': { + /** + * @description Reference for the customer + * @example 0002 + */ + customer_reference?: string; + regulatory_requirements?: { + /** + * @description Unique identifier for the regulatory requirement + * @example 53970723-fbff-4f46-a975-f62be6c1a585 + */ + requirement_id?: string; + /** + * @description New value for the regulatory requirement + * @example new requirement value + */ + field_value?: string; + }[]; + }; + }; + }; + responses: { + /** @description Updated requirement group */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['RequirementGroup']; + }; + }; + }; + }; + ListRequirementTypes: { + parameters: { + query?: { + /** @description Filters requirement types to those whose name contains a certain string. */ + 'filter[name][contains]'?: components['parameters']['DocReqsRequirementTypeNameFilter']; + /** @description Specifies the sort order for results. If you want to sort by a field in ascending order, include it as a sort parameter. If you want to sort in descending order, prepend a `-` in front of the field name. */ + 'sort[]'?: components['parameters']['DocReqsRequirementTypesSort']; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['DocReqsListRequirementTypesResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + RetrieveRequirementType: { + parameters: { + query?: never; + header?: never; + path: { + /** + * @description Uniquely identifies the requirement_type record + * @example a38c217a-8019-48f8-bff6-0fdd9939075b + */ + id: components['parameters']['DocReqsRequirementTypeId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['DocReqsRequirementTypeResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + ListRequirements: { + parameters: { + query?: { + /** @description Filters results to those applying to a 2-character (ISO 3166-1 alpha-2) country code */ + 'filter[country_code]'?: components['parameters']['DocReqsCountryFilter']; + /** @description Filters results to those applying to a specific `phone_number_type` */ + 'filter[phone_number_type]'?: components['parameters']['DocReqsPhoneNumberTypeFilter']; + /** @description Filters requirements to those applying to a specific action. */ + 'filter[action]'?: components['parameters']['DocReqsActionFilter']; + /** @description Specifies the sort order for results. If you want to sort by a field in ascending order, include it as a sort parameter. If you want to sort in descending order, prepend a `-` in front of the field name. */ + 'sort[]'?: components['parameters']['DocReqsRequirementsSort']; + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListRequirementsResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + RetrieveDocumentRequirements: { + parameters: { + query?: never; + header?: never; + path: { + /** + * @description Uniquely identifies the requirement_type record + * @example a9dad8d5-fdbd-49d7-aa23-39bb08a5ebaa + */ + id: components['parameters']['DocReqsRequirementId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['DocReqsRequirementResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + ListRoomCompositions: { + parameters: { + query?: { + /** @description ISO 8601 date for filtering room compositions created on that date. */ + 'filter[date_created_at][eq]'?: string; + /** @description ISO 8601 date for filtering room compositions created after that date. */ + 'filter[date_created_at][gte]'?: string; + /** @description ISO 8601 date for filtering room compositions created before that date. */ + 'filter[date_created_at][lte]'?: string; + /** @description The session_id for filtering room compositions. */ + 'filter[session_id]'?: string; + /** @description The status for filtering room compositions. */ + 'filter[status]'?: 'completed' | 'processing' | 'enqueued'; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListRoomCompositionsResponse']; + }; + }; + CreateRoomComposition: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Parameters that can be defined during room composition creation. */ + requestBody: { + content: { + 'application/json': components['schemas']['CreateRoomCompositionRequest']; + }; + }; + responses: { + 202: components['responses']['CreateRoomCompositionResponse']; + 422: components['responses']['UnprocessableEntity']; + }; + }; + ViewRoomComposition: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The unique identifier of a room composition. */ + room_composition_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['GetRoomCompositionResponse']; + 404: components['responses']['ResourceNotFound']; + }; + }; + DeleteRoomComposition: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The unique identifier of a room composition. */ + room_composition_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The resource was deleted successfully. */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + 404: components['responses']['ResourceNotFound']; + }; + }; + ViewRoomParticipant: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The unique identifier of a room participant. */ + room_participant_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['GetRoomParticipantResponse']; + 404: components['responses']['ResourceNotFound']; + }; + }; + ListRoomRecordings: { + parameters: { + query?: { + /** @description ISO 8601 date for filtering room recordings ended on that date. */ + 'filter[date_ended_at][eq]'?: string; + /** @description ISO 8601 date for filtering room recordings ended after that date. */ + 'filter[date_ended_at][gte]'?: string; + /** @description ISO 8601 date for filtering room recordings ended before that date. */ + 'filter[date_ended_at][lte]'?: string; + /** @description ISO 8601 date for filtering room recordings started on that date. */ + 'filter[date_started_at][eq]'?: string; + /** @description ISO 8601 date for filtering room recordings started after that date. */ + 'filter[date_started_at][gte]'?: string; + /** @description ISO 8601 date for filtering room recordings started before that date. */ + 'filter[date_started_at][lte]'?: string; + /** @description room_id for filtering room recordings. */ + 'filter[room_id]'?: string; + /** @description participant_id for filtering room recordings. */ + 'filter[participant_id]'?: string; + /** @description session_id for filtering room recordings. */ + 'filter[session_id]'?: string; + /** @description status for filtering room recordings. */ + 'filter[status]'?: string; + /** @description type for filtering room recordings. */ + 'filter[type]'?: string; + /** @description duration_secs equal for filtering room recordings. */ + 'filter[duration_secs][eq]'?: number; + /** @description duration_secs less or equal for filtering room recordings. */ + 'filter[duration_secs][lte]'?: number; + /** @description duration_secs greater or equal for filtering room recordings. */ + 'filter[duration_secs][gte]'?: number; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListRoomRecordingsResponse']; + }; + }; + DeleteRoomRecordings: { + parameters: { + query?: { + /** @description ISO 8601 date for filtering room recordings ended on that date. */ + 'filter[date_ended_at][eq]'?: string; + /** @description ISO 8601 date for filtering room recordings ended after that date. */ + 'filter[date_ended_at][gte]'?: string; + /** @description ISO 8601 date for filtering room recordings ended before that date. */ + 'filter[date_ended_at][lte]'?: string; + /** @description ISO 8601 date for filtering room recordings started on that date. */ + 'filter[date_started_at][eq]'?: string; + /** @description ISO 8601 date for filtering room recordings started after that date. */ + 'filter[date_started_at][gte]'?: string; + /** @description ISO 8601 date for filtering room recordings started before that date. */ + 'filter[date_started_at][lte]'?: string; + /** @description room_id for filtering room recordings. */ + 'filter[room_id]'?: string; + /** @description participant_id for filtering room recordings. */ + 'filter[participant_id]'?: string; + /** @description session_id for filtering room recordings. */ + 'filter[session_id]'?: string; + /** @description status for filtering room recordings. */ + 'filter[status]'?: string; + /** @description type for filtering room recordings. */ + 'filter[type]'?: string; + /** @description duration_secs equal for filtering room recordings. */ + 'filter[duration_secs][eq]'?: number; + /** @description duration_secs less or equal for filtering room recordings. */ + 'filter[duration_secs][lte]'?: number; + /** @description duration_secs greater or equal for filtering room recordings. */ + 'filter[duration_secs][gte]'?: number; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 201: components['responses']['BulkDeleteRoomRecordingsResponse']; + 422: components['responses']['UnprocessableEntity']; + }; + }; + ViewRoomRecording: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The unique identifier of a room recording. */ + room_recording_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['GetRoomRecordingResponse']; + 404: components['responses']['ResourceNotFound']; + }; + }; + DeleteRoomRecording: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The unique identifier of a room recording. */ + room_recording_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The resource was deleted successfully. */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + 404: components['responses']['ResourceNotFound']; + }; + }; + ListRoomSessions: { + parameters: { + query?: { + /** @description ISO 8601 date for filtering room sessions created on that date. */ + 'filter[date_created_at][eq]'?: string; + /** @description ISO 8601 date for filtering room sessions created after that date. */ + 'filter[date_created_at][gte]'?: string; + /** @description ISO 8601 date for filtering room sessions created before that date. */ + 'filter[date_created_at][lte]'?: string; + /** @description ISO 8601 date for filtering room sessions updated on that date. */ + 'filter[date_updated_at][eq]'?: string; + /** @description ISO 8601 date for filtering room sessions updated after that date. */ + 'filter[date_updated_at][gte]'?: string; + /** @description ISO 8601 date for filtering room sessions updated before that date. */ + 'filter[date_updated_at][lte]'?: string; + /** @description ISO 8601 date for filtering room sessions ended on that date. */ + 'filter[date_ended_at][eq]'?: string; + /** @description ISO 8601 date for filtering room sessions ended after that date. */ + 'filter[date_ended_at][gte]'?: string; + /** @description ISO 8601 date for filtering room sessions ended before that date. */ + 'filter[date_ended_at][lte]'?: string; + /** @description Room_id for filtering room sessions. */ + 'filter[room_id]'?: string; + /** @description Filter active or inactive room sessions. */ + 'filter[active]'?: boolean; + /** @description To decide if room participants should be included in the response. */ + include_participants?: boolean; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListRoomSessionsResponse']; + }; + }; + ViewRoomSession: { + parameters: { + query?: { + /** @description To decide if room participants should be included in the response. */ + include_participants?: boolean; + }; + header?: never; + path: { + /** @description The unique identifier of a room session. */ + room_session_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['GetRoomSessionResponse']; + 404: components['responses']['ResourceNotFound']; + }; + }; + EndSession: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The unique identifier of a room session. */ + room_session_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ActionSuccessResponse']; + }; + }; + KickParticipantInSession: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The unique identifier of a room session. */ + room_session_id: string; + }; + cookie?: never; + }; + /** @description Parameters that can be defined during Kick action. */ + requestBody: { + content: { + 'application/json': components['schemas']['ActionsParticipantsRequest']; + }; + }; + responses: { + 200: components['responses']['ActionSuccessResponse']; + }; + }; + MuteParticipantInSession: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The unique identifier of a room session. */ + room_session_id: string; + }; + cookie?: never; + }; + /** @description Parameters that can be defined during Mute action. */ + requestBody: { + content: { + 'application/json': components['schemas']['ActionsParticipantsRequest']; + }; + }; + responses: { + 200: components['responses']['ActionSuccessResponse']; + }; + }; + UnmuteParticipantInSession: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The unique identifier of a room session. */ + room_session_id: string; + }; + cookie?: never; + }; + /** @description Parameters that can be defined during Unmute action. */ + requestBody: { + content: { + 'application/json': components['schemas']['ActionsParticipantsRequest']; + }; + }; + responses: { + 200: components['responses']['ActionSuccessResponse']; + }; + }; + ListRoomParticipants: { + parameters: { + query?: { + /** @description ISO 8601 date for filtering room participants that joined on that date. */ + 'filter[date_joined_at][eq]'?: string; + /** @description ISO 8601 date for filtering room participants that joined after that date. */ + 'filter[date_joined_at][gte]'?: string; + /** @description ISO 8601 date for filtering room participants that joined before that date. */ + 'filter[date_joined_at][lte]'?: string; + /** @description ISO 8601 date for filtering room participants updated on that date. */ + 'filter[date_updated_at][eq]'?: string; + /** @description ISO 8601 date for filtering room participants updated after that date. */ + 'filter[date_updated_at][gte]'?: string; + /** @description ISO 8601 date for filtering room participants updated before that date. */ + 'filter[date_updated_at][lte]'?: string; + /** @description ISO 8601 date for filtering room participants that left on that date. */ + 'filter[date_left_at][eq]'?: string; + /** @description ISO 8601 date for filtering room participants that left after that date. */ + 'filter[date_left_at][gte]'?: string; + /** @description ISO 8601 date for filtering room participants that left before that date. */ + 'filter[date_left_at][lte]'?: string; + /** @description Filter room participants based on the context. */ + 'filter[context]'?: string; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + }; + header?: never; + path: { + /** @description The unique identifier of a room session. */ + room_session_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListRoomParticipantsResponse']; + }; + }; + ListRooms: { + parameters: { + query?: { + /** @description ISO 8601 date for filtering rooms created on that date. */ + 'filter[date_created_at][eq]'?: string; + /** @description ISO 8601 date for filtering rooms created after that date. */ + 'filter[date_created_at][gte]'?: string; + /** @description ISO 8601 date for filtering rooms created before that date. */ + 'filter[date_created_at][lte]'?: string; + /** @description ISO 8601 date for filtering rooms updated on that date. */ + 'filter[date_updated_at][eq]'?: string; + /** @description ISO 8601 date for filtering rooms updated after that date. */ + 'filter[date_updated_at][gte]'?: string; + /** @description ISO 8601 date for filtering rooms updated before that date. */ + 'filter[date_updated_at][lte]'?: string; + /** @description Unique_name for filtering rooms. */ + 'filter[unique_name]'?: string; + /** @description To decide if room sessions should be included in the response. */ + include_sessions?: boolean; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListRoomsResponse']; + }; + }; + CreateRoom: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Parameters that can be defined during room creation. */ + requestBody: { + content: { + 'application/json': components['schemas']['CreateRoomRequest']; + }; + }; + responses: { + 201: components['responses']['CreateRoomResponse']; + 422: components['responses']['UnprocessableEntity']; + }; + }; + ViewRoom: { + parameters: { + query?: { + /** @description To decide if room sessions should be included in the response. */ + include_sessions?: boolean; + }; + header?: never; + path: { + /** @description The unique identifier of a room. */ + room_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['GetRoomResponse']; + 404: components['responses']['ResourceNotFound']; + }; + }; + DeleteRoom: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The unique identifier of a room. */ + room_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The resource was deleted successfully. */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + 404: components['responses']['ResourceNotFound']; + }; + }; + UpdateRoom: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The unique identifier of a room. */ + room_id: string; + }; + cookie?: never; + }; + /** @description Parameters that can be defined during room update. */ + requestBody: { + content: { + 'application/json': components['schemas']['PatchRoomRequest']; + }; + }; + responses: { + 200: components['responses']['PatchRoomResponse']; + 401: components['responses']['UnauthorizedResponse']; + 404: components['responses']['ResourceNotFound']; + /** @description Bad request */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + CreateRoomClientToken: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The unique identifier of a room. */ + room_id: string; + }; + cookie?: never; + }; + /** @description Parameters that can be defined during Room Client Token creation. */ + requestBody: { + content: { + 'application/json': components['schemas']['CreateRoomClientTokenRequest']; + }; + }; + responses: { + 201: components['responses']['CreateRoomClientTokenResponse']; + 403: components['responses']['Forbidden']; + }; + }; + RefreshRoomClientToken: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The unique identifier of a room. */ + room_id: string; + }; + cookie?: never; + }; + /** @description Parameters that can be defined during Room Client Token refresh. */ + requestBody: { + content: { + 'application/json': components['schemas']['RefreshRoomClientTokenRequest']; + }; + }; + responses: { + 201: components['responses']['RefreshRoomClientTokenResponse']; + 403: components['responses']['Forbidden']; + }; + }; + ListShortCodes: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + /** @description Filter by Messaging Profile ID. Use the string `null` for phone numbers without assigned profiles. A synonym for the `/messaging_profiles/{id}/short_codes` endpoint when querying about an extant profile. */ + 'filter[messaging_profile_id]'?: string; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListShortCodesResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + RetrieveShortCode: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The id of the short code */ + id: components['parameters']['ShortCodeId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ShortCodeResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + UpdateShortCode: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The id of the short code */ + id: components['parameters']['ShortCodeId']; + }; + cookie?: never; + }; + /** @description Short code update */ + requestBody: { + content: { + 'application/json': components['schemas']['UpdateShortCodeRequest']; + }; + }; + responses: { + 200: components['responses']['ShortCodeResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + ListSimCardActions: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + /** @description A valid SIM card ID. */ + 'filter[sim_card_id]'?: components['parameters']['FilterSIMCardId']; + /** @description Filter by a specific status of the resource's lifecycle. */ + 'filter[status]'?: components['parameters']['FilterBasicStatusLifecycle']; + /** @description Filter by a bulk SIM card action ID. */ + 'filter[bulk_sim_card_action_id]'?: components['parameters']['FilterBulkSIMCardActionId']; + /** @description Filter by action type. */ + 'filter[action_type]'?: + | 'enable' + | 'enable_standby_sim_card' + | 'disable' + | 'set_standby' + | 'remove_public_ip' + | 'set_public_ip'; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['SimCardActionCollectionResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + GetSimCardAction: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['ResourceId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['SIMCardActionResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + ListDataUsageNotifications: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + /** @description A valid SIM card ID. */ + 'filter[sim_card_id]'?: components['parameters']['FilterSIMCardId']; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['SimCardDataUsageNotificationCollectionResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + PostSimCardDataUsageNotification: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': { + /** + * Format: uuid + * @description The identification UUID of the related SIM card resource. + * @example 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + */ + sim_card_id: string; + /** @description Data usage threshold that will trigger the notification. */ + threshold: { + /** + * Format: decimal + * @example 2048.1 + */ + amount?: string; + /** + * @example MB + * @enum {string} + */ + unit?: 'MB' | 'GB'; + }; + }; + }; + }; + responses: { + 201: components['responses']['CreateSimCardDataUsageNotificationResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + GetSimCardDataUsageNotification: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['ResourceId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['GetSimCardDataUsageNotificationResponse']; + 404: components['responses']['ResourceNotFound']; + default: components['responses']['GenericErrorResponse']; + }; + }; + DeleteSimCardDataUsageNotifications: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['ResourceId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['DeleteSimCardDataUsageNotificationResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + PatchSimCardDataUsageNotification: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['ResourceId']; + }; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['SimCardDataUsageNotification']; + }; + }; + responses: { + 200: components['responses']['UpdateSimCardDataUsageNotificationResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + GetSimCardGroupActions: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + /** @description A valid SIM card group ID. */ + 'filter[sim_card_group_id]'?: components['parameters']['FilterSIMCardGroupId']; + /** @description Filter by a specific status of the resource's lifecycle. */ + 'filter[status]'?: components['parameters']['FilterBasicStatusLifecycle']; + /** @description Filter by action type. */ + 'filter[type]'?: + | 'set_private_wireless_gateway' + | 'remove_private_wireless_gateway'; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['SimCardGroupActionCollectionResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + GetSimCardGroupAction: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['ResourceId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['SIMCardGroupActionResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + GetAllSimCardGroups: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + /** @description A valid SIM card group name. */ + 'filter[name]'?: string; + /** @description A Private Wireless Gateway ID associated with the group. */ + 'filter[private_wireless_gateway_id]'?: string; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['GetAllSimCardGroupsResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + CreateSimCardGroup: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['SIMCardGroupCreate']; + }; + }; + responses: { + 200: components['responses']['CreateSimCardGroupResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + GetSimCardGroup: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the SIM group. */ + id: components['parameters']['SIMCardGroupId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['GetSimCardGroupResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + DeleteSimCardGroup: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the SIM group. */ + id: components['parameters']['SIMCardGroupId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['DeleteSimCardGroupResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + UpdateSimCardGroup: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the SIM group. */ + id: components['parameters']['SIMCardGroupId']; + }; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['SIMCardGroupPatch']; + }; + }; + responses: { + 200: components['responses']['UpdateSimCardGroupResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + RemoveSimCardGroupPrivateWirelessGateway: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the SIM group. */ + id: components['parameters']['SIMCardGroupId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 202: components['responses']['SIMCardGroupActionResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + SetPrivateWirelessGatewayForSimCardGroup: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the SIM group. */ + id: components['parameters']['SIMCardGroupId']; + }; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': { + /** + * Format: uuid + * @description The identification of the related Private Wireless Gateway resource. + * @example 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + */ + private_wireless_gateway_id: string; + }; + }; + }; + responses: { + 202: components['responses']['SIMCardGroupActionResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + PreviewSimCardOrders: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + 'application/json': { + /** + * @description The amount of SIM cards that the user would like to purchase in the SIM card order. + * @example 21 + */ + quantity: number; + /** + * Format: int64 + * @description Uniquely identifies the address for the order. + * @example 1293384261075731499 + */ + address_id: string; + }; + }; + }; + responses: { + 202: components['responses']['SIMCardOrdersPreviewResponse']; + 422: components['responses']['UnprocessableEntity']; + }; + }; + GetSimCardOrders: { + parameters: { + query?: { + /** @description Filter by ISO 8601 formatted date-time string matching resource creation date-time. */ + 'filter[created_at]'?: components['parameters']['FilterCreatedAt']; + /** @description Filter by ISO 8601 formatted date-time string matching resource last update date-time. */ + 'filter[updated_at]'?: components['parameters']['FilterUpdatedAt']; + /** @description Filter orders by how many SIM cards were ordered. */ + 'filter[quantity]'?: components['parameters']['FilterQuantity']; + /** @description The total monetary amount of the order. */ + 'filter[cost.amount]'?: components['parameters']['FilterCostByAmount']; + /** @description Filter by ISO 4217 currency string. */ + 'filter[cost.currency]'?: components['parameters']['FilterCostByCurrency']; + /** @description Uniquely identifies the address for the order. */ + 'filter[address.id]'?: components['parameters']['FilterAddressById']; + /** @description Returns entries with matching name of the street where the address is located. */ + 'filter[address.street_address]'?: components['parameters']['FilterAddressByStreetAddress']; + /** @description Returns entries with matching name of the supplemental field for address information. */ + 'filter[address.extended_address]'?: components['parameters']['FilterAddressByExtendedAddress']; + /** @description Filter by the name of the city where the address is located. */ + 'filter[address.locality]'?: components['parameters']['FilterAddressByLocality']; + /** @description Filter by state or province where the address is located. */ + 'filter[address.administrative_area]'?: components['parameters']['FilterAddressByAdministrativeArea']; + /** @description Filter by the mobile operator two-character (ISO 3166-1 alpha-2) origin country code. */ + 'filter[address.country_code]'?: components['parameters']['FilterAddressByCountryCode']; + /** @description Filter by postal code for the address. */ + 'filter[address.postal_code]'?: components['parameters']['FilterAddressByPostalCode']; + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['GetAllSimCardOrdersResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + CreateSimCardOrder: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['SimCardOrderCreate']; + }; + }; + responses: { + 200: components['responses']['CreateSimCardOrderResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + GetSimCardOrder: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['ResourceId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['GetSimCardOrderResponse']; + 404: components['responses']['ResourceNotFound']; + default: components['responses']['GenericErrorResponse']; + }; + }; + GetSimCards: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + /** @description It includes the associated SIM card group object in the response when present. */ + include_sim_card_group?: components['parameters']['IncludeSIMCardGroup']; + /** @description A valid SIM card group ID. */ + 'filter[sim_card_group_id]'?: components['parameters']['FilterSIMCardGroupId']; + /** @description A list of SIM card tags to filter on.

+ * If the SIM card contains all of the given tags they will be found.

+ * For example, if the SIM cards have the following tags:
    + *
  • ['customers', 'staff', 'test'] + *
  • ['test']
  • + *
  • ['customers']
  • + *
+ * Searching for ['customers', 'test'] returns only the first because it's the only one with both tags.
Searching for test returns the first two SIMs, because both of them have such tag.
Searching for customers returns the first and last SIMs.
+ * */ + 'filter[tags]'?: string[]; + /** @description A search string to partially match for the SIM card's ICCID. */ + 'filter[iccid]'?: string; + /** @description Filter by a SIM card's status. */ + 'filter[status]'?: ( + | 'enabled' + | 'disabled' + | 'standby' + | 'data_limit_exceeded' + | 'unauthorized_imei' + )[]; + /** + * @description Sorts SIM cards by the given field. Defaults to ascending order unless field is prefixed with a minus sign. + * @example -current_billing_period_consumed_data.amount + */ + sort?: 'current_billing_period_consumed_data.amount'; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['SearchSimCardsResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + SetNetworkPreferencesBulk: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + 'application/json': { + /** @example [ + * "6b14e151-8493-4fa1-8664-1cc4e6d14158" + * ] */ + sim_card_ids: components['schemas']['Id'][]; + }; + }; + }; + responses: { + 202: components['responses']['BulkSIMCardActionResponse']; + 422: components['responses']['UnprocessableEntity']; + }; + }; + SetPublicIPsBulk: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + 'application/json': { + /** @example [ + * "6b14e151-8493-4fa1-8664-1cc4e6d14158" + * ] */ + sim_card_ids: components['schemas']['Id'][]; + }; + }; + }; + responses: { + 202: components['responses']['BulkSIMCardActionResponse']; + 422: components['responses']['UnprocessableEntity']; + }; + }; + ValidateRegistrationCodes: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': { + registration_codes?: string[]; + }; + }; + }; + responses: { + /** @description Successful */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['SIMCardRegistrationCodeValidations']; + }; + }; + default: components['responses']['GenericErrorResponse']; + }; + }; + GetSimCard: { + parameters: { + query?: { + /** @description It includes the associated SIM card group object in the response when present. */ + include_sim_card_group?: components['parameters']['IncludeSIMCardGroup']; + }; + header?: never; + path: { + /** @description Identifies the SIM. */ + id: components['parameters']['SIMCardId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['GetSimCardResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + DeleteSimCard: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the SIM. */ + id: components['parameters']['SIMCardId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['DeleteSimCardResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + UpdateSimCard: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the SIM. */ + id: components['parameters']['SIMCardId']; + }; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['SIMCard']; + }; + }; + responses: { + 200: components['responses']['UpdateSimCardResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + DeleteNetworkPreferences: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the SIM. */ + id: components['parameters']['SIMCardId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 202: components['responses']['SIMCardActionResponse']; + 422: components['responses']['UnprocessableEntity']; + default: components['responses']['GenericErrorResponse']; + }; + }; + DisableSimCard: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the SIM. */ + id: components['parameters']['SIMCardId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 202: components['responses']['SIMCardActionResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + EnableSimCard: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the SIM. */ + id: components['parameters']['SIMCardId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 202: components['responses']['SIMCardActionResponse']; + 422: components['responses']['UnprocessableEntity']; + default: components['responses']['GenericErrorResponse']; + }; + }; + RemoveSimCardPublicIp: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the SIM. */ + id: components['parameters']['SIMCardId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 202: components['responses']['SIMCardActionResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + SetNetworkPreference: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the SIM. */ + id: components['parameters']['SIMCardId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 202: components['responses']['SIMCardActionResponse']; + 422: components['responses']['UnprocessableEntity']; + default: components['responses']['GenericErrorResponse']; + }; + }; + SetSimCardPublicIp: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the SIM. */ + id: components['parameters']['SIMCardId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 202: components['responses']['SIMCardActionResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + SetSimCardStandby: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the SIM. */ + id: components['parameters']['SIMCardId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 202: components['responses']['SIMCardActionResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + GetSimCardActivationCode: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the SIM. */ + id: components['parameters']['SIMCardId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['SIMCardActivationCodeResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + GetSimCardDeviceDetails: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the SIM. */ + id: components['parameters']['SIMCardId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['SIMCardDeviceDetailsResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + GetSimCardNetworkPreferences: { + parameters: { + query?: { + /** @description It includes the associated OTA update objects in the response when present. */ + include_ota_updates?: components['parameters']['IncludeOTAUpdates']; + }; + header?: never; + path: { + /** @description Identifies the SIM. */ + id: components['parameters']['SIMCardId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['SIMCardNetworkPreferenceWithOTAUpdatesResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + PutSimCardNetworkPreferences: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the SIM. */ + id: components['parameters']['SIMCardId']; + }; + cookie?: never; + }; + requestBody?: { + content: { + 'application/json': { + /** @description A list of mobile network operators and the priority that should be applied when the SIM is connecting to the network. */ + mobile_network_operators_preferences?: components['schemas']['MobileNetworkOperatorPreferencesRequest'][]; + }; + }; + }; + responses: { + 202: components['responses']['PUTSIMCardNetworkPreferenceResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + DeleteSIMCardNetworkPreferences: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the SIM. */ + id: components['parameters']['SIMCardId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 202: components['responses']['DELETESIMCardNetworkPreferenceResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + GetSimCardPublicIp: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the SIM. */ + id: components['parameters']['SIMCardId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['SIMCardPublicIPResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + GetWirelessConnectivityLogs: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + }; + header?: never; + path: { + /** @description Identifies the SIM. */ + id: components['parameters']['SIMCardId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['WirelessConnectivityLogCollectionResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + GetStorageSSLCertificates: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The name of the bucket */ + bucketName: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['SSLCertificateResponse']; + }; + }; + AddStorageSSLCertificate: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The name of the bucket */ + bucketName: string; + }; + cookie?: never; + }; + requestBody?: { + content: { + 'multipart/form-data': { + /** + * Format: binary + * @description The SSL certificate file + */ + certificate?: string; + /** + * Format: binary + * @description The private key file + */ + private_key?: string; + }; + }; + }; + responses: { + 200: components['responses']['SSLCertificateResponse']; + }; + }; + RemoveStorageSSLCertificate: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Bucket Name */ + bucketName: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['SSLCertificateResponse']; + }; + }; + GetStorageAPIUsage: { + parameters: { + query: { + /** @description The start time of the period to filter the usage (ISO microsecond format) */ + 'filter[start_time]': string; + /** @description The end time of the period to filter the usage (ISO microsecond format) */ + 'filter[end_time]': string; + }; + header?: never; + path: { + /** @description The name of the bucket */ + bucketName: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['BucketAPIUsageResponse']; + }; + }; + GetBucketUsage: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The name of the bucket */ + bucketName: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['BucketUsageResponse']; + }; + }; + CreatePresignedObjectUrl: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The name of the bucket */ + bucketName: string; + /** @description The name of the object */ + objectName: string; + }; + cookie?: never; + }; + requestBody?: { + content: { + 'application/json': components['schemas']['PresignedObjectUrlParams']; + }; + }; + responses: { + 200: components['responses']['PresignedObjectUrlResponse']; + }; + }; + ListMigrationSourceCoverage: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListMigrationSourceCoverageResponse']; + }; + }; + ListMigrationSources: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListMigrationSourceResponse']; + }; + }; + CreateMigrationSource: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + 'application/json': components['schemas']['MigrationSourceParams']; + }; + }; + responses: { + 200: components['responses']['MigrationSourceResponse']; + }; + }; + GetMigrationSource: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Unique identifier for the data migration source. */ + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['MigrationSourceResponse']; + }; + }; + DeleteMigrationSource: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Unique identifier for the data migration source. */ + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['MigrationSourceResponse']; + }; + }; + ListMigrations: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListMigrationResponse']; + }; + }; + CreateMigration: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + 'application/json': components['schemas']['MigrationParams']; + }; + }; + responses: { + 200: components['responses']['MigrationResponse']; + }; + }; + GetMigration: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Unique identifier for the data migration. */ + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['MigrationResponse']; + }; + }; + StopMigration: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Unique identifier for the data migration. */ + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['MigrationResponse']; + }; + }; + ListSubNumberOrders: { + parameters: { + query?: { + /** @description Filter sub number orders by status. */ + 'filter[status]'?: string; + /** @description ID of the number order the sub number order belongs to */ + 'filter[order_request_id]'?: string; + /** @description ISO alpha-2 country code. */ + 'filter[country_code]'?: string; + /** @description Phone Number Type */ + 'filter[phone_number_type]'?: string; + /** @description Amount of numbers in the sub number order */ + 'filter[phone_numbers_count]'?: number; + /** @description Include the first 50 phone number objects for each sub order in the results. Note: use of this filter could produce unexpected results due to payload size. */ + 'filter[include_phone_numbers]'?: boolean; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListSubNumberOrdersResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + GetSubNumberOrder: { + parameters: { + query?: { + /** @description Include the first 50 phone number objects in the results */ + 'filter[include_phone_numbers]'?: boolean; + }; + header?: never; + path: { + /** @description The sub number order ID. */ + sub_number_order_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['SubNumberOrderResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + UpdateSubNumberOrder: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The sub number order ID. */ + sub_number_order_id: string; + }; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['UpdateSubNumberOrderRequest']; + }; + }; + responses: { + 200: components['responses']['SubNumberOrderResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + CancelSubNumberOrder: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The ID of the sub number order. */ + sub_number_order_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['SubNumberOrderResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + FindTelephonyCredentials: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + /** @description Filter by tag */ + 'filter[tag]'?: components['parameters']['OptionalTag']; + /** @description Filter by name */ + 'filter[name]'?: components['parameters']['FilterName']; + /** @description Filter by status */ + 'filter[status]'?: components['parameters']['FilterStatus']; + /** @description Filter by resource_id */ + 'filter[resource_id]'?: components['parameters']['FilterResourceId']; + /** @description Filter by sip_username */ + 'filter[sip_username]'?: components['parameters']['FilterSipUsername']; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['GetAllTelephonyCredentialResponse']; + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + CreateTelephonyCredential: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Parameters that can be defined during credential creation */ + requestBody: { + content: { + 'application/json': components['schemas']['TelephonyCredentialCreateRequest']; + }; + }; + responses: { + 201: components['responses']['TelephonyCredentialResponse']; + /** @description Bad request */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + ListTags: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListTagsResponse']; + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + GetTelephonyCredential: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['TelephonyCredentialResponse']; + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + DeleteTelephonyCredential: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['TelephonyCredentialResponse']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Bad request */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + UpdateTelephonyCredential: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: string; + }; + cookie?: never; + }; + /** @description Parameters that can be updated in a credential */ + requestBody: { + content: { + 'application/json': components['schemas']['TelephonyCredentialUpdateRequest']; + }; + }; + responses: { + 200: components['responses']['TelephonyCredentialResponse']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Bad request */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + PerformCredentialAction: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: string; + /** @description Identifies the action to be taken. */ + action: 'activate' | 'deactivate'; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['TelephonyCredentialResponse']; + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + CreateTelephonyCredentialToken: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description JWT */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + 'text/plain': string; + }; + }; + /** @description Resource not Found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + GetTexmlCalls: { + parameters: { + query?: { + /** + * @description The number of the page to be displayed, zero-indexed, should be used in conjuction with PageToken. + * @example 1 + */ + Page?: components['parameters']['Page']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + /** @description Used to request the next page of results. */ + PageToken?: components['parameters']['PageToken']; + /** + * @description Filters calls by the to number. + * @example +1312345678 + */ + To?: components['parameters']['To']; + /** + * @description Filters calls by the from number. + * @example +1312345678 + */ + From?: components['parameters']['From']; + /** + * @description Filters calls by status. + * @example no-answer + */ + Status?: components['parameters']['Status']; + /** + * @description Filters calls by their start date. Expected format is YYYY-MM-DD. + * @example 2023-05-22 + */ + StartTime?: components['parameters']['StartTime']; + /** + * @description Filters calls by their start date (after). Expected format is YYYY-MM-DD + * @example 2023-05-22 + */ + 'StartTime>'?: components['parameters']['StartTime>']; + /** + * @description Filters calls by their start date (before). Expected format is YYYY-MM-DD + * @example 2023-05-22 + */ + 'StartTime<'?: components['parameters']['StartTime<']; + /** + * @description Filters calls by their end date. Expected format is YYYY-MM-DD + * @example 2023-05-22 + */ + EndTime?: components['parameters']['EndTime']; + /** + * @description Filters calls by their end date (after). Expected format is YYYY-MM-DD + * @example 2023-05-22 + */ + 'EndTime>'?: components['parameters']['EndTime>']; + /** + * @description Filters calls by their end date (before). Expected format is YYYY-MM-DD + * @example 2023-05-22 + */ + 'EndTime<'?: components['parameters']['EndTime<']; + }; + header?: never; + path: { + /** @description The id of the account the resource belongs to. */ + account_sid: components['parameters']['AccountSid']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['GetCallsResponse']; + 404: components['responses']['NotFoundResponse']; + }; + }; + GetTexmlCall: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The CallSid that identifies the call to update. */ + call_sid: components['parameters']['CallSid']; + /** @description The id of the account the resource belongs to. */ + account_sid: components['parameters']['AccountSid']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['GetCallResponse']; + 404: components['responses']['NotFoundResponse']; + }; + }; + FetchTeXMLCallRecordings: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The id of the account the resource belongs to. */ + account_sid: components['parameters']['AccountSid']; + /** @description The CallSid that identifies the call to update. */ + call_sid: components['parameters']['CallSid']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['TexmlGetCallRecordingsResponse']; + 404: components['responses']['NotFoundResponse']; + }; + }; + StartTeXMLCallRecording: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The id of the account the resource belongs to. */ + account_sid: components['parameters']['AccountSid']; + /** @description The CallSid that identifies the call to update. */ + call_sid: components['parameters']['CallSid']; + }; + cookie?: never; + }; + requestBody?: components['requestBodies']['TexmlCreateCallRecordingRequest']; + responses: { + 200: components['responses']['TexmlCreateCallRecordingResponse']; + 404: components['responses']['NotFoundResponse']; + }; + }; + UpdateTeXMLCallRecording: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The id of the account the resource belongs to. */ + account_sid: components['parameters']['AccountSid']; + /** @description The CallSid that identifies the call to update. */ + call_sid: components['parameters']['CallSid']; + /** @description Uniquely identifies the recording by id. */ + recording_sid: components['parameters']['RecordingSid']; + }; + cookie?: never; + }; + requestBody?: components['requestBodies']['TexmlUpdateCallRecordingRequest']; + responses: { + 200: components['responses']['TexmlCreateCallRecordingResponse']; + 404: components['responses']['NotFoundResponse']; + }; + }; + StartTeXMLCallStreaming: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The id of the account the resource belongs to. */ + account_sid: components['parameters']['AccountSid']; + /** @description The CallSid that identifies the call to update. */ + call_sid: components['parameters']['CallSid']; + }; + cookie?: never; + }; + requestBody?: components['requestBodies']['TexmlCreateCallStreamingRequest']; + responses: { + 200: components['responses']['TexmlCreateCallStreamingResponse']; + 404: components['responses']['NotFoundResponse']; + }; + }; + UpdateTeXMLCallStreaming: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The id of the account the resource belongs to. */ + account_sid: components['parameters']['AccountSid']; + /** @description The CallSid that identifies the call to update. */ + call_sid: components['parameters']['CallSid']; + /** @description Uniquely identifies the streaming by id. */ + streaming_sid: components['parameters']['StreamingSid']; + }; + cookie?: never; + }; + requestBody?: components['requestBodies']['TexmlUpdateCallStreamingRequest']; + responses: { + 200: components['responses']['TexmlUpdateCallStreamingResponse']; + 404: components['responses']['NotFoundResponse']; + }; + }; + GetTexmlConferences: { + parameters: { + query?: { + /** + * @description The number of the page to be displayed, zero-indexed, should be used in conjuction with PageToken. + * @example 1 + */ + Page?: components['parameters']['Page']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + /** @description Used to request the next page of results. */ + PageToken?: components['parameters']['PageToken']; + /** + * @description Filters conferences by their friendly name. + * @example weekly_review_call + */ + FriendlyName?: components['parameters']['FriendlyName']; + /** + * @description Filters conferences by status. + * @example in-progress + */ + Status?: components['parameters']['ConferenceStatus']; + /** + * @description Filters conferences by the creation date. Expected format is YYYY-MM-DD. Also accepts inequality operators, e.g. DateCreated>=2023-05-22. + * @example >=2023-05-22 + */ + DateCreated?: components['parameters']['DateCreated']; + /** + * @description Filters conferences by the time they were last updated. Expected format is YYYY-MM-DD. Also accepts inequality operators, e.g. DateUpdated>=2023-05-22. + * @example >=2023-05-22 + */ + DateUpdated?: components['parameters']['DateUpdated']; + }; + header?: never; + path: { + /** @description The id of the account the resource belongs to. */ + account_sid: components['parameters']['AccountSid']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['GetConferencesResponse']; + 404: components['responses']['NotFoundResponse']; + }; + }; + GetTexmlConference: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The id of the account the resource belongs to. */ + account_sid: components['parameters']['AccountSid']; + /** @description The ConferenceSid that uniquely identifies a conference. */ + conference_sid: components['parameters']['ConferenceSid']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['GetConferenceResponse']; + 404: components['responses']['NotFoundResponse']; + }; + }; + UpdateTexmlConference: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The id of the account the resource belongs to. */ + account_sid: components['parameters']['AccountSid']; + /** @description The ConferenceSid that uniquely identifies a conference. */ + conference_sid: components['parameters']['ConferenceSid']; + }; + cookie?: never; + }; + /** @description Update Conference request object */ + requestBody: { + content: { + 'application/x-www-form-urlencoded': components['schemas']['UpdateConferenceRequest']; + }; + }; + responses: { + 200: components['responses']['GetConferenceResponse']; + 404: components['responses']['NotFoundResponse']; + }; + }; + GetTexmlConferenceParticipants: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The id of the account the resource belongs to. */ + account_sid: components['parameters']['AccountSid']; + /** @description The ConferenceSid that uniquely identifies a conference. */ + conference_sid: components['parameters']['ConferenceSid']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['GetParticipantsResponse']; + 404: components['responses']['NotFoundResponse']; + }; + }; + DialTexmlConferenceParticipant: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The id of the account the resource belongs to. */ + account_sid: components['parameters']['AccountSid']; + /** @description The ConferenceSid that uniquely identifies a conference. */ + conference_sid: components['parameters']['ConferenceSid']; + }; + cookie?: never; + }; + /** @description Dial Conference Participant request object */ + requestBody: { + content: { + 'application/x-www-form-urlencoded': components['schemas']['DialConferenceParticipantRequest']; + }; + }; + responses: { + 200: components['responses']['DialParticipantResponse']; + 404: components['responses']['NotFoundResponse']; + }; + }; + GetTexmlConferenceParticipant: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The id of the account the resource belongs to. */ + account_sid: components['parameters']['AccountSid']; + /** @description The ConferenceSid that uniquely identifies a conference. */ + conference_sid: components['parameters']['ConferenceSid']; + /** @description The CallSid that identifies the call to update. */ + call_sid: components['parameters']['CallSid']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['GetParticipantResponse']; + 404: components['responses']['NotFoundResponse']; + }; + }; + UpdateTexmlConferenceParticipant: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The id of the account the resource belongs to. */ + account_sid: components['parameters']['AccountSid']; + /** @description The ConferenceSid that uniquely identifies a conference. */ + conference_sid: components['parameters']['ConferenceSid']; + /** @description The CallSid that identifies the call to update. */ + call_sid: components['parameters']['CallSid']; + }; + cookie?: never; + }; + /** @description Update Conference Participant request object */ + requestBody: { + content: { + 'application/x-www-form-urlencoded': components['schemas']['UpdateConferenceParticipantRequest']; + }; + }; + responses: { + 200: components['responses']['GetParticipantResponse']; + 404: components['responses']['NotFoundResponse']; + }; + }; + DeleteTexmlConferenceParticipant: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The id of the account the resource belongs to. */ + account_sid: components['parameters']['AccountSid']; + /** @description The ConferenceSid that uniquely identifies a conference. */ + conference_sid: components['parameters']['ConferenceSid']; + /** @description The CallSid that identifies the call to update. */ + call_sid: components['parameters']['CallSid']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The resource was deleted successfully. */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + 404: components['responses']['NotFoundResponse']; + }; + }; + GetTexmlConferenceRecordings: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The id of the account the resource belongs to. */ + account_sid: components['parameters']['AccountSid']; + /** @description The ConferenceSid that uniquely identifies a conference. */ + conference_sid: components['parameters']['ConferenceSid']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['GetConferenceRecordingsResponse']; + 404: components['responses']['NotFoundResponse']; + }; + }; + FetchTeXMLConferenceRecordings: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The id of the account the resource belongs to. */ + account_sid: components['parameters']['AccountSid']; + /** @description The ConferenceSid that uniquely identifies a conference. */ + conference_sid: components['parameters']['ConferenceSid']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['TexmlGetCallRecordingsResponse']; + 404: components['responses']['NotFoundResponse']; + }; + }; + GetTeXMLCallRecordings: { + parameters: { + query?: { + /** + * @description The number of the page to be displayed, zero-indexed, should be used in conjuction with PageToken. + * @example 1 + */ + Page?: components['parameters']['Page']; + /** + * @description The number of records to be displayed on a page + * @example 10 + */ + PageSize?: components['parameters']['PageSizeTexml']; + /** @description Filters recording by the creation date. Expected format is ISO8601 date or date-time, ie. {YYYY}-{MM}-{DD} or {YYYY}-{MM}-{DD}T{hh}:{mm}:{ss}Z. Also accepts inequality operators, e.g. DateCreated>=2023-05-22. */ + DateCreated?: components['parameters']['TexmlDateCreated']; + }; + header?: never; + path: { + /** @description The id of the account the resource belongs to. */ + account_sid: components['parameters']['AccountSid']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['TexmlGetCallRecordingsResponse']; + 404: components['responses']['NotFoundResponse']; + }; + }; + GetTeXMLCallRecording: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The id of the account the resource belongs to. */ + account_sid: components['parameters']['AccountSid']; + /** @description Uniquely identifies the recording by id. */ + recording_sid: components['parameters']['RecordingSid']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['TexmlGetCallRecordingResponse']; + 404: components['responses']['NotFoundResponse']; + }; + }; + DeleteTeXMLCallRecording: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The id of the account the resource belongs to. */ + account_sid: components['parameters']['AccountSid']; + /** @description Uniquely identifies the recording by id. */ + recording_sid: components['parameters']['RecordingSid']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The resource was deleted successfully. */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + 404: components['responses']['NotFoundResponse']; + }; + }; + GetTeXMLRecordingTranscriptions: { + parameters: { + query?: { + /** @description Used to request the next page of results. */ + PageToken?: components['parameters']['PageToken']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + }; + header?: never; + path: { + /** @description The id of the account the resource belongs to. */ + account_sid: components['parameters']['AccountSid']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['TexmlListRecordingTranscriptionResponse']; + 404: components['responses']['NotFoundResponse']; + }; + }; + GetTeXMLRecordingTranscription: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The id of the account the resource belongs to. */ + account_sid: components['parameters']['AccountSid']; + /** @description Uniquely identifies the recording transcription by id. */ + recording_transcription_sid: components['parameters']['RecordingTranscriptionSid']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['TexmlGetRecordingTranscriptionResponse']; + 404: components['responses']['NotFoundResponse']; + }; + }; + DeleteTeXMLRecordingTranscription: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The id of the account the resource belongs to. */ + account_sid: components['parameters']['AccountSid']; + /** @description Uniquely identifies the recording transcription by id. */ + recording_transcription_sid: components['parameters']['RecordingTranscriptionSid']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The resource was deleted successfully. */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + 404: components['responses']['NotFoundResponse']; + }; + }; + InitiateTexmlCall: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The ID of the TeXML application used for the call. */ + application_id: components['parameters']['ApplicationId']; + }; + cookie?: never; + }; + /** @description Iniatiate Call request object */ + requestBody: { + content: { + 'application/json': components['schemas']['InitiateCallRequest']; + }; + }; + responses: { + 200: components['responses']['InitiateCallResponse']; + }; + }; + UpdateTexmlCall: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The CallSid that identifies the call to update. */ + call_sid: components['parameters']['CallSid']; + }; + cookie?: never; + }; + /** @description Update Call request object */ + requestBody: { + content: { + 'application/json': components['schemas']['UpdateCallRequest']; + }; + }; + responses: { + 200: components['responses']['UpdateTeXMLCallResponse']; + }; + }; + CreateTexmlSecret: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Create TeXML secret request object */ + requestBody: { + content: { + 'application/json': components['schemas']['CreateTeXMLSecretRequest']; + }; + }; + responses: { + 201: components['responses']['CreateTeXMLSecretResponse']; + 422: components['responses']['UnprocessableEntityResponse']; + }; + }; + FindTexmlApplications: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + /** @description If present, applications with friendly_name containing the given value will be returned. Matching is not case-sensitive. Requires at least three characters. */ + 'filter[friendly_name][contains]'?: string; + /** @description Identifies the associated outbound voice profile. */ + 'filter[outbound_voice_profile_id]'?: components['parameters']['FilterOutboundVoiceProfileId']; + /** @description Specifies the sort order for results. By default sorting direction is ascending. To have the results sorted in descending order add the - prefix.

+ * That is:
    + *
  • + * friendly_name: sorts the result by the + * friendly_name field in ascending order. + *
  • + * + *
  • + * -friendly_name: sorts the result by the + * friendly_name field in descending order. + *
  • + *

If not given, results are sorted by created_at in descending order. */ + sort?: components['parameters']['SortApplication']; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['GetAllTexmlApplicationsResponse']; + 400: components['responses']['BadRequestResponse']; + 401: components['responses']['UnauthenticatedResponse']; + 403: components['responses']['UnauthorizedResponse']; + }; + }; + CreateTexmlApplication: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Parameters that can be set when creating a TeXML Application */ + requestBody: { + content: { + 'application/json': components['schemas']['CreateTexmlApplicationRequest']; + }; + }; + responses: { + 201: components['responses']['TexmlApplicationResponse']; + 401: components['responses']['UnauthenticatedResponse']; + 403: components['responses']['UnauthorizedResponse']; + 404: components['responses']['NotFoundResponse']; + 422: components['responses']['UnprocessableEntityResponse']; + }; + }; + GetTexmlApplication: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['id']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['TexmlApplicationResponse']; + 400: components['responses']['BadRequestResponse']; + 401: components['responses']['UnauthenticatedResponse']; + 403: components['responses']['UnauthorizedResponse']; + 404: components['responses']['NotFoundResponse']; + }; + }; + DeleteTexmlApplication: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['id']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['TexmlApplicationResponse']; + 400: components['responses']['BadRequestResponse']; + 401: components['responses']['UnauthenticatedResponse']; + 403: components['responses']['UnauthorizedResponse']; + 404: components['responses']['NotFoundResponse']; + }; + }; + UpdateTexmlApplication: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['id']; + }; + cookie?: never; + }; + /** @description Parameters that can be updated in a TeXML Application */ + requestBody: { + content: { + 'application/json': components['schemas']['UpdateTexmlApplicationRequest']; + }; + }; + responses: { + 200: components['responses']['TexmlApplicationResponse']; + 400: components['responses']['BadRequestResponse']; + 401: components['responses']['UnauthenticatedResponse']; + 403: components['responses']['UnauthorizedResponse']; + 404: components['responses']['NotFoundResponse']; + 422: components['responses']['UnprocessableEntityResponse']; + }; + }; + GetUsageReport: { + parameters: { + query: { + /** @description Telnyx product */ + product: string; + /** @description Breakout by specified product dimensions */ + dimensions: string[]; + /** @description Specified product usage values */ + metrics: string[]; + /** @description The start date for the time range you are interested in. The maximum time range is 31 days. Format: YYYY-MM-DDTHH:mm:ssZ */ + start_date?: string; + /** @description The end date for the time range you are interested in. The maximum time range is 31 days. Format: YYYY-MM-DDTHH:mm:ssZ */ + end_date?: string; + /** @description A more user-friendly way to specify the timespan you want to filter by. More options can be found in the Telnyx API Reference docs. */ + date_range?: string; + /** @description Filter records on dimensions */ + filter?: string; + /** @description Return the aggregations for all Managed Accounts under the user making the request. */ + managed_accounts?: boolean; + 'page[number]'?: number; + 'page[size]'?: number; + /** @description Specifies the sort order for results */ + sort?: string[]; + /** @description Specify the response format (csv or json). JSON is returned by default, even if not specified. */ + format?: 'csv' | 'json'; + }; + header?: { + 'Authorization: Bearer '?: string; + }; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['UsageReportsResponse']; + 'text/csv': string; + }; + }; + /** @description Bad Request */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['ErrorResponse']; + }; + }; + /** @description Internal Server Error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['ErrorResponse']; + }; + }; + }; + }; + ListUsageReportsOptions: { + parameters: { + query?: { + /** @description Options (dimensions and metrics) for a given product. If none specified, all products will be returned. */ + product?: string; + }; + header?: { + 'Authorization: Bearer '?: string; + }; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['UsageReportsOptionsResponse']; + }; + }; + /** @description Bad Request */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['ErrorResponse']; + }; + }; + /** @description Internal Server Error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['ErrorResponse']; + }; + }; + }; + }; + updateLocation: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The ID of the external connection */ + id: string; + /** @description The ID of the location to update */ + location_id: string; + }; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': { + /** + * Format: uuid + * @description A new static emergency address ID to update the location with + */ + static_emergency_address_id: string; + }; + }; + }; + responses: { + /** @description Location successfully updated with no associated orders to process */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['LocationResponse']; + }; + }; + /** @description Location update accepted; associated orders being processed */ + 202: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['LocationResponse']; + }; + }; + /** @description Location or external connection not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['ErrorResponse']; + }; + }; + /** @description Unprocessable Entity - Location already has an accepted emergency address */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['ErrorResponse']; + }; + }; + }; + }; + ListVerifications: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The phone number associated with the verifications to retrieve. */ + phone_number: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Expected verifications response to a valid request. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['ListVerificationsResponse']; + }; + }; + 400: components['responses']['GenericErrorResponse']; + }; + }; + VerifyVerificationCodeByPhoneNumber: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The phone number associated with the verification code being verified. */ + phone_number: string; + }; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['VerifyVerificationCodeRequestByPhoneNumber']; + }; + }; + responses: { + /** @description Expected verify response to a valid request. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['VerifyVerificationCodeResponse']; + }; + }; + 400: components['responses']['GenericErrorResponse']; + }; + }; + CreateVerificationCall: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['CreateVerificationRequestCall']; + }; + }; + responses: { + /** @description Expected verifications response to a valid request. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['CreateVerificationResponse']; + }; + }; + 400: components['responses']['GenericErrorResponse']; + }; + }; + CreateFlashcallVerification: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['CreateVerificationRequestFlashcall']; + }; + }; + responses: { + /** @description Expected verifications response to a valid request. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['CreateVerificationResponse']; + }; + }; + 400: components['responses']['GenericErrorResponse']; + }; + }; + CreateVerificationSms: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['CreateVerificationRequestSMS']; + }; + }; + responses: { + /** @description Expected verifications response to a valid request. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['CreateVerificationResponse']; + }; + }; + 400: components['responses']['GenericErrorResponse']; + }; + }; + RetrieveVerification: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The identifier of the verification to retrieve. */ + verification_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Expected verifications response to a valid request. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['RetrieveVerificationResponse']; + }; + }; + 400: components['responses']['GenericErrorResponse']; + }; + }; + VerifyVerificationCodeById: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The identifier of the verification to retrieve. */ + verification_id: string; + }; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['VerifyVerificationCodeRequestById']; + }; + }; + responses: { + /** @description Expected verify response to a valid request. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['VerifyVerificationCodeResponse']; + }; + }; + 400: components['responses']['GenericErrorResponse']; + }; + }; + ListVerifiedNumbers: { + parameters: { + query?: { + 'page[size]'?: number; + 'page[number]'?: number; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Expected response to a valid request. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['ListVerifiedNumbersResponse']; + }; + }; + 400: components['responses']['GenericErrorResponse']; + 401: components['responses']['UnauthorizedRequestErrorResponse']; + 422: components['responses']['UnprocessableEntityErrorResponse']; + }; + }; + CreateVerifiedNumber: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': { + /** @example +15551234567 */ + phone_number: string; + /** + * @description Verification method. + * @example sms + * @enum {string} + */ + verification_method: 'sms' | 'call'; + }; + }; + }; + responses: { + /** @description Expected response to a valid request. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['CreateVerifiedNumberResponse']; + }; + }; + 400: components['responses']['GenericErrorResponse']; + 401: components['responses']['UnauthorizedRequestErrorResponse']; + 422: components['responses']['UnprocessableEntityErrorResponse']; + }; + }; + GetVerifiedNumber: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The phone number being requested. */ + phone_number: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Expected verifications response to a valid request. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['VerifiedNumberResponseDataWrapper']; + }; + }; + 400: components['responses']['GenericErrorResponse']; + 401: components['responses']['UnauthorizedRequestErrorResponse']; + 404: components['responses']['NotFoundErrorResponse']; + }; + }; + DeleteVerifiedNumber: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The phone number being deleted. */ + phone_number: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Expected verifications response to a valid request. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['VerifiedNumberResponseDataWrapper']; + }; + }; + 400: components['responses']['GenericErrorResponse']; + 401: components['responses']['UnauthorizedRequestErrorResponse']; + 404: components['responses']['NotFoundErrorResponse']; + }; + }; + VerifyVerificationCode: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The phone number being verified. */ + phone_number: string; + }; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': { + /** @example 123456 */ + verification_code: string; + }; + }; + }; + responses: { + /** @description Expected response to a valid request. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['VerifiedNumberResponseDataWrapper']; + }; + }; + 400: components['responses']['GenericErrorResponse']; + 401: components['responses']['UnauthorizedRequestErrorResponse']; + 404: components['responses']['NotFoundErrorResponse']; + 422: components['responses']['UnprocessableEntityErrorResponse']; + }; + }; + ListProfiles: { + parameters: { + query?: { + 'filter[name]'?: string; + 'page[size]'?: number; + 'page[number]'?: number; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Expected Verify profile response to a valid request. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['ListVerifyProfilesResponse']; + }; + }; + 400: components['responses']['GenericErrorResponse']; + }; + }; + CreateVerifyProfile: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': { + /** @example Test Profile */ + name: string; + /** @example http://example.com/webhook */ + webhook_url?: string; + /** @example http://example.com/webhook/failover */ + webhook_failover_url?: string; + sms?: components['schemas']['CreateVerifyProfileSMSRequest']; + call?: components['schemas']['CreateVerifyProfileCallRequest']; + flashcall?: components['schemas']['CreateVerifyProfileFlashcallRequest']; + /** @example en-US */ + language?: string; + }; + }; + }; + responses: { + /** @description Expected Verify profile response to a valid request. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['VerifyProfileResponseDataWrapper']; + }; + }; + 400: components['responses']['GenericErrorResponse']; + }; + }; + ListProfileMessageTemplates: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Expected Verify profile message template response to a valid request. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['ListVerifyProfileMessageTemplateResponse']; + }; + }; + }; + }; + GetVerifyProfile: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The identifier of the Verify profile to retrieve. */ + verify_profile_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Expected Verify profile response to a valid request. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['VerifyProfileResponseDataWrapper']; + }; + }; + 400: components['responses']['GenericErrorResponse']; + }; + }; + DeleteProfile: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The identifier of the Verify profile to delete. */ + verify_profile_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Expected Verify profile response to a valid request. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['VerifyProfileResponseDataWrapper']; + }; + }; + 400: components['responses']['GenericErrorResponse']; + }; + }; + UpdateVerifyProfile: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The identifier of the Verify profile to update. */ + verify_profile_id: string; + }; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': { + /** @example Test Profile */ + name?: string; + /** @example http://example.com/webhook */ + webhook_url?: string; + /** @example http://example.com/webhook/failover */ + webhook_failover_url?: string; + sms?: components['schemas']['UpdateVerifyProfileSMSRequest']; + call?: components['schemas']['UpdateVerifyProfileCallRequest']; + flashcall?: components['schemas']['UpdateVerifyProfileFlashcallRequest']; + /** @example en-US */ + language?: string; + }; + }; + }; + responses: { + /** @description Expected Verify profile response to a valid request. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['VerifyProfileResponseDataWrapper']; + }; + }; + 400: components['responses']['GenericErrorResponse']; + }; + }; + ListVirtualCrossConnects: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + /** @description The associated network id to filter on. */ + 'filter[network_id]'?: string; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['VirtualCrossConnectListResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + CreateVirtualCrossConnect: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['VirtualCrossConnectCreate']; + }; + }; + responses: { + 200: components['responses']['VirtualCrossConnectResponse']; + 422: components['responses']['UnprocessableEntity']; + default: components['responses']['GenericErrorResponse']; + }; + }; + GetVirtualCrossConnect: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['ResourceId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['VirtualCrossConnectResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + DeleteVirtualCrossConnect: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['ResourceId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['VirtualCrossConnectResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + UpdateVirtualCrossConnect: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['ResourceId']; + }; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['VirtualCrossConnectPatch']; + }; + }; + responses: { + 200: components['responses']['VirtualCrossConnectResponse']; + 422: components['responses']['UnprocessableEntity']; + default: components['responses']['GenericErrorResponse']; + }; + }; + ListVirtualCrossConnectCoverage: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + /** + * @description The available bandwidth to filter on. + * @example 50 + */ + 'filters[available_bandwidth][contains]'?: number; + /** @description The Telnyx region code */ + 'filter[cloud_provider]'?: 'aws' | 'azure' | 'gce'; + /** @description The cloud provider region code to filter on */ + 'filter[cloud_provider_region]'?: string; + /** @description The region of associated location to filter on. */ + 'filter[location.region]'?: string; + /** @description The site of associated location to filter on. */ + 'filter[location.site]'?: string; + /** @description The POP of associated location to filter on. */ + 'filter[location.pop]'?: string; + /** @description The code of associated location to filter on. */ + 'filter[location.code]'?: string; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['VirtualCrossConnectCoverageListResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + GetWebhookDeliveries: { + parameters: { + query?: { + /** @description Return only webhook_deliveries matching the given `status` */ + 'filter[status][eq]'?: 'delivered' | 'failed'; + /** @description Return only webhook_deliveries matching the given value of `event_type`. Accepts multiple values separated by a `,`. */ + 'filter[event_type]'?: string; + /** @description Return only webhook deliveries whose `webhook` component contains the given text */ + 'filter[webhook][contains]'?: string; + /** @description Return only webhook_deliveries whose `attempts` component contains the given text */ + 'filter[attempts][contains]'?: string; + /** @description Return only webhook_deliveries whose delivery started later than or at given ISO 8601 datetime */ + 'filter[started_at][gte]'?: string; + /** @description Return only webhook_deliveries whose delivery started earlier than or at given ISO 8601 datetime */ + 'filter[started_at][lte]'?: string; + /** @description Return only webhook_deliveries whose delivery finished later than or at given ISO 8601 datetime */ + 'filter[finished_at][gte]'?: string; + /** @description Return only webhook_deliveries whose delivery finished earlier than or at given ISO 8601 datetime */ + 'filter[finished_at][lte]'?: string; + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['ListWebhookDeliveriesResponse']; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Unprocessable entity */ + 422: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + GetWebhookDelivery: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Uniquely identifies the webhook_delivery. */ + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Webhook delivery record. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + data?: components['schemas']['webhook_delivery']; + }; + }; + }; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description WebhookDelivery not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + ListWireguardInterfaces: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + /** @description The associated network id to filter on. */ + 'filter[network_id]'?: string; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['WireguardInterfaceListResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + CreateWireguardInterface: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['WireguardInterfaceCreate']; + }; + }; + responses: { + 202: components['responses']['WireguardInterfaceResponse']; + 422: components['responses']['UnprocessableEntity']; + default: components['responses']['GenericErrorResponse']; + }; + }; + GetWireguardInterface: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['ResourceId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['WireguardInterfaceResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + DeleteWireguardInterface: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['ResourceId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['WireguardInterfaceResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + ListWireguardPeers: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + /** @description The id of the associated WireGuard interface to filter on. */ + 'filter[wireguard_interface_id]'?: string; + }; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['ResourceId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['WireguardPeerListResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + CreateWireguardPeer: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['ResourceId']; + }; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['WireguardPeerCreate']; + }; + }; + responses: { + 202: components['responses']['WireguardPeerResponse']; + 422: components['responses']['UnprocessableEntity']; + default: components['responses']['GenericErrorResponse']; + }; + }; + GetWireguardPeer: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['ResourceId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['WireguardPeerResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + DeleteWireguardPeer: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['ResourceId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['WireguardPeerResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + UpdateWireguardPeer: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['ResourceId']; + }; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['WireguardPeerPatch']; + }; + }; + responses: { + 200: components['responses']['WireguardPeerResponse']; + 422: components['responses']['UnprocessableEntity']; + default: components['responses']['GenericErrorResponse']; + }; + }; + GetWireguardPeerConfig: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['ResourceId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'text/plain; charset=utf-8': string; + }; + }; + default: components['responses']['GenericErrorResponse']; + }; + }; + GetWdrReports: { + parameters: { + query?: { + /** @description The page number to load */ + 'page[number]'?: components['parameters']['PageNumber']; + /** @description The size of the page */ + 'page[size]'?: components['parameters']['PageSize']; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['GetWdrReportsResponse']; + default: components['responses']['GenericErrorResponse']; + }; + }; + CreateWdrReport: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['WdrReportRequest']; + }; + }; + responses: { + 201: components['responses']['CreateWdrReportResponse']; + 422: components['responses']['UnprocessableEntity']; + default: components['responses']['GenericErrorResponse']; + }; + }; + GetWdrReport: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['ResourceId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['GetWdrReportResponse']; + 404: components['responses']['ResourceNotFound']; + default: components['responses']['GenericErrorResponse']; + }; + }; + DeleteWdrReport: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Identifies the resource. */ + id: components['parameters']['ResourceId']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components['responses']['DeleteWdrReportResponse']; + 404: components['responses']['ResourceNotFound']; + default: components['responses']['GenericErrorResponse']; + }; + }; + ListObjects: { + parameters: { + query?: { + 'list-type'?: 2; + }; + header?: never; + path: { + /** @description The name of the bucket. */ + bucketName: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Success */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'text/xml': components['schemas']['ListObjectsResponse']; + }; + }; + /** @description Bucket does not exist. */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + CreateBucket: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The name of the bucket. */ + bucketName: string; + }; + cookie?: never; + }; + requestBody?: { + content: { + 'text/xml': components['schemas']['CreateBucketRequest']; + }; + }; + responses: { + /** @description Success */ + 200: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description BucketAlreadyExists */ + 409: { + headers: { + [name: string]: unknown; + }; + content: { + 'text/xml': string; + }; + }; + }; + }; + DeleteObjects: { + parameters: { + query: { + delete: true; + }; + header?: never; + path: { + /** @description The bucket name. */ + bucketName: string; + }; + cookie?: never; + }; + requestBody: { + content: { + 'text/xml': components['schemas']['DeleteObjectsRequest']; + }; + }; + responses: { + /** @description Success */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'text/xml': components['schemas']['DeleteObjectsResponse']; + }; + }; + }; + }; + DeleteBucket: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The name of the bucket. */ + bucketName: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Success */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + HeadBucket: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The name of the bucket. */ + bucketName: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Success */ + 200: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description NoSuchBucket */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + GetObject: { + parameters: { + query?: { + uploadId?: string; + }; + header?: never; + path: { + /** @description The bucket name. */ + bucketName: string; + /** @description The object name. */ + objectName: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Success */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + '*/*': string; + }; + }; + /** @description ObjectNotFound */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + PutObject: { + parameters: { + query?: { + partNumber?: string; + uploadId?: string; + }; + header?: { + 'Content-type'?: string; + }; + path: { + /** @description The bucket name. */ + bucketName: string; + /** @description The object name. */ + objectName: string; + }; + cookie?: never; + }; + requestBody: { + content: { + '*/*': string; + }; + }; + responses: { + /** @description Success */ + 200: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + DeleteObject: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The bucket name. */ + bucketName: string; + /** @description The object name. */ + objectName: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Success */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + HeadObject: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The bucket name. */ + bucketName: string; + /** @description The object name. */ + objectName: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Success */ + 200: { + headers: { + Date?: string; + 'Last-Modified'?: string; + 'Content-Length'?: number; + [name: string]: unknown; + }; + content?: never; + }; + /** @description ObjectNotFound */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; +} diff --git a/types/Webhooks.d.ts b/types/Webhooks.d.ts new file mode 100644 index 0000000..3fc96b3 --- /dev/null +++ b/types/Webhooks.d.ts @@ -0,0 +1,26 @@ +type WebhookPayload = string; +type WebhookHeader = string; + +declare module 'telnyx' { + namespace Telnyx { + export class Webhooks { + DEFAULT_TOLERANCE: number; + constructEvent: ( + payload: WebhookPayload, + signatureHeader: WebhookHeader, + timestampHeader: WebhookHeader, + publicKey: string, + tolerance: number, + ) => unknown; + signature: { + verifySignature: ( + payload: string, + signatureHeader: WebhookHeader | undefined, + timestampHeader: WebhookHeader | undefined, + publicKey: string, + tolerance: number, + ) => boolean; + }; + } + } +} diff --git a/types/index.d.ts b/types/index.d.ts new file mode 100644 index 0000000..3ca473e --- /dev/null +++ b/types/index.d.ts @@ -0,0 +1,36 @@ +/* eslint-disable @typescript-eslint/triple-slash-reference */ + +/// +/// +/// +/// + +// Imports: The beginning of the section generated from our OpenAPI spec +/// +// Imports: The end of the section generated from our OpenAPI spec + +declare module 'telnyx' { + // Added to in other modules, referenced above. + export namespace Telnyx {} + + export class Telnyx { + static Telnyx: typeof Telnyx; + + static webhooks: Telnyx.Webhooks; + + constructor(apiKey: string, version?: string); + + TelnyxResource: Telnyx.TelnyxResource; + + // Fields: The beginning of the section generated from our OpenAPI spec + balance: Telnyx.BalanceResource; + // Fields: The end of the section generated from our OpenAPI spec + webhooks: Telnyx.Webhooks; + /** + * API Errors + */ + errors: typeof Telnyx.errors; + } + + export default Telnyx; +} diff --git a/types/lib.d.ts b/types/lib.d.ts new file mode 100644 index 0000000..0260d22 --- /dev/null +++ b/types/lib.d.ts @@ -0,0 +1,44 @@ +import {Agent} from 'http'; + +declare module 'telnyx' { + namespace Telnyx { + type TelnyxResourceClass = typeof TelnyxResource; + + interface TelnyxResourceExtension + extends TelnyxResourceClass { + new (telnyx: Telnyx): TelnyxResource & T; + } + + export class TelnyxResource { + static extend( + spec: T, + ): TelnyxResourceExtension; + static method(spec: { + method: string; + path?: string; + // Please note, methodType === 'list' uses autoPagination + methodType?: 'list' | 'retrieve' | 'create'; + }): (...args: unknown[]) => Response; + static MAX_BUFFERED_REQUEST_METRICS: number; + } + export type HttpAgent = Agent; + export type HttpProtocol = 'http' | 'https'; + + export interface RequestOptions { + auth?: string | null; + + /** + * Specify headers for this request. + */ + headers?: Record; + } + + export type Response = T & { + lastResponse: { + headers: Record; + requestId: string; + statusCode: number; + }; + }; + } +} From 4c45b9239c6ba0a60af997159f7c04df15b0c80b Mon Sep 17 00:00:00 2001 From: Lucas Rosa Date: Tue, 24 Sep 2024 13:18:19 -0300 Subject: [PATCH 03/59] DOTCOM-3584: convert resource files and tests to typescript (#181) * update deps and add typescript default config * convert Telnyx main to typescript * bump version to v2 alpha * update changelog * convert Error and Telnyx method to typescript * update utils * convert autoPagination, makeRequest, TelnyxMethod and Webhooks * convert TelnyxResource * remove extra lint file * add types folder * update code comments on framework naming * specify error types * update eslint rules * add types generated from openapi specs * add TelnyxIncomingHttpHeaders type * add BalanceResource type defs * convert resource files and tests to typescript * update overall test setup * add autoPagination, telnyx, utils and Balance specs * add Webhooks tests * add autoPagination, telnyx.node, TelnyxResource, Webhooks and utils test * add MessagingProfiles resource * remove stale coverage report on README --- .eslintignore | 3 +- .github/workflows/node.js.yml | 2 - .github/workflows/npm-publish.yml | 2 - .npmignore | 6 +- CHANGELOG.md | 4 + README.md | 115 +- examples/webhook-signing/package-lock.json | 327 +- examples/webhook-signing/yarn.lock | 813 ---- jest.config.js | 16 + lib/Error.js | 165 - lib/MultipartDataGenerator.js | 45 - lib/TelnyxMethod.basic.js | 112 - lib/TelnyxMethod.js | 68 - lib/TelnyxResource.js | 479 --- lib/Webhooks.js | 72 - lib/autoPagination.js | 231 -- lib/makeRequest.js | 144 - lib/resources/AI.js | 45 - lib/resources/AccessIpAddress.js | 6 - lib/resources/AccessIpRanges.js | 6 - lib/resources/AccessTokens.js | 6 - lib/resources/Actions.js | 9 - lib/resources/ActionsSimCards.js | 18 - .../ActivateDeactivateBulkCredentials.js | 20 - lib/resources/Addresses.js | 47 - lib/resources/AdvancedOptinoptout.js | 21 - lib/resources/AuthenticationProviders.js | 8 - lib/resources/Autorechargepreferences.js | 15 - lib/resources/AvailablePhoneNumbers.js | 7 - lib/resources/Balance.js | 11 - lib/resources/Billing.js | 15 - lib/resources/BillingGroups.js | 6 - lib/resources/Brands.js | 36 - lib/resources/Bucket.js | 16 - lib/resources/BucketUsage.js | 21 - lib/resources/BulkCreation.js | 52 - lib/resources/BulkCredentials.js | 20 - lib/resources/BulkPhoneNumberCampaigns.js | 25 - lib/resources/BulkPhoneNumberOperations.js | 32 - lib/resources/BulkSoleProprietorCreation.js | 25 - lib/resources/BulkTelephonyCredentials.js | 46 - lib/resources/BusinessIdentity.js | 20 - lib/resources/CallControlApplications.js | 54 - lib/resources/CallEvents.js | 7 - lib/resources/CallInformation.js | 15 - lib/resources/CallRecordings.js | 27 - lib/resources/Calls.js | 73 - lib/resources/Campaign.js | 84 - lib/resources/CampaignBuilder.js | 40 - lib/resources/CdrUsageReports.js | 15 - lib/resources/Channelzones.js | 27 - lib/resources/ClientStateUpdate.js | 6 - lib/resources/Conferences.js | 62 - lib/resources/Connections.js | 8 - lib/resources/CredentialConnections.js | 6 - lib/resources/Credentials.js | 29 - lib/resources/CsvDownloads.js | 20 - lib/resources/CustomerServiceRecord.js | 23 - lib/resources/Debugging.js | 15 - lib/resources/DetailRecords.js | 13 - lib/resources/DialogflowIntegration.js | 15 - lib/resources/DocumentLinks.js | 6 - lib/resources/Documents.js | 50 - lib/resources/DynamicEmergency.js | 10 - lib/resources/DynamicEmergencyAddresses.js | 8 - lib/resources/DynamicEmergencyEndpoints.js | 8 - lib/resources/Events.js | 7 - lib/resources/ExternalConnections.js | 76 - lib/resources/FaxApplications.js | 55 - lib/resources/Faxes.js | 53 - lib/resources/FqdnConnections.js | 55 - lib/resources/Fqdns.js | 55 - lib/resources/GlobalIps.js | 47 - lib/resources/InboundChannels.js | 15 - lib/resources/InventoryCoverage.js | 13 - lib/resources/InventoryLevel.js | 15 - lib/resources/IpAddresses.js | 20 - lib/resources/IpConnections.js | 55 - lib/resources/IpRanges.js | 20 - lib/resources/Ips.js | 55 - lib/resources/ManagedAccounts.js | 57 - lib/resources/MdrDetailReports.js | 24 - lib/resources/MdrUsageReports.js | 24 - lib/resources/MediaStorageApi.js | 23 - lib/resources/Messages.js | 10 - lib/resources/MessagesAlphanumericSenderId.js | 6 - lib/resources/MessagingHostedNumber.js | 30 - lib/resources/MessagingHostedNumberOrders.js | 6 - lib/resources/MessagingHostedNumbers.js | 6 - lib/resources/MessagingPhoneNumbers.js | 7 - lib/resources/MessagingProfileMetrics.js | 7 - lib/resources/MessagingSenderIds.js | 7 - lib/resources/MessagingShortCodes.js | 7 - .../MessagingTollfreeVerification.js | 20 - lib/resources/MessagingUrlDomains.js | 15 - lib/resources/MobileNetworkOperators.js | 15 - lib/resources/MobileOperatorNetworks.js | 8 - lib/resources/Networks.js | 27 - lib/resources/NumberBackgroundJobs.js | 24 - lib/resources/NumberLookup.js | 8 - lib/resources/NumberOrderDocuments.js | 15 - lib/resources/NumberOrders.js | 7 - lib/resources/NumberPortouts.js | 71 - lib/resources/NumberReservations.js | 33 - lib/resources/NumbersFeatures.js | 15 - lib/resources/Object.js | 21 - lib/resources/OtaUpdates.js | 19 - lib/resources/Outbound.js | 55 - lib/resources/OutboundVoiceProfiles.js | 19 - .../PhoneNumberAssignmentByProfile.js | 55 - lib/resources/PhoneNumberBlockOrders.js | 20 - .../PhoneNumberBlocksBackgroundJobs.js | 24 - lib/resources/PhoneNumberCampaigns.js | 19 - lib/resources/PhoneNumberOrderDocuments.js | 20 - .../PhoneNumberRegulatoryRequirements.js | 9 - lib/resources/PhoneNumberSearch.js | 19 - lib/resources/PhoneNumbers.js | 48 - lib/resources/PhoneNumbersInboundChannels.js | 34 - lib/resources/PhoneNumbersMessaging.js | 6 - lib/resources/PhoneNumbersVoice.js | 6 - lib/resources/PortabilityChecks.js | 12 - lib/resources/PortingOrders.js | 107 - lib/resources/PortingPhoneNumbers.js | 8 - lib/resources/PortoutRequests.js | 53 - lib/resources/PresignedObjectUrls.js | 16 - lib/resources/PrivateWirelessGateways.js | 19 - lib/resources/PublicInternetGateways.js | 19 - lib/resources/PublicKey.js | 13 - lib/resources/PushCredentials.js | 20 - lib/resources/Queues.js | 41 - lib/resources/RecordingsCommands.js | 16 - lib/resources/Regions.js | 15 - lib/resources/RegisterCall.js | 6 - lib/resources/RegulatoryRequirements.js | 9 - lib/resources/Reporting.js | 19 - lib/resources/Reports.js | 19 - lib/resources/ReportsMdrs.js | 6 - lib/resources/RequirementTypes.js | 19 - lib/resources/Requirements.js | 19 - lib/resources/RoomCompositions.js | 8 - lib/resources/RoomParticipants.js | 8 - lib/resources/RoomRecordings.js | 20 - lib/resources/RoomSessions.js | 43 - lib/resources/Rooms.js | 6 - lib/resources/RoomsClientToken.js | 18 - lib/resources/RoomsClientTokens.js | 21 - lib/resources/SharedCampaigns.js | 20 - lib/resources/ShortCodes.js | 39 - lib/resources/SimCardActions.js | 27 - lib/resources/SimCardGroupActions.js | 19 - lib/resources/SimCardGroups.js | 55 - lib/resources/SimCardOrders.js | 6 - lib/resources/SimCards.js | 139 - lib/resources/SslCertificates.js | 20 - lib/resources/TeXMLApplication.js | 6 - lib/resources/TelephonyCredentials.js | 55 - lib/resources/UpdateClientState.js | 22 - lib/resources/Verifications.js | 68 - lib/resources/VerifiedCallsDisplayProfile.js | 25 - lib/resources/VerifiedCallsDisplayProfiles.js | 13 - lib/resources/VerifiedNumbers.js | 6 - lib/resources/Verify.js | 55 - lib/resources/VerifyProfiles.js | 61 - lib/resources/VirtualCrossConnects.js | 31 - lib/resources/WdrDetailReports.js | 15 - lib/resources/Webhooks.js | 6 - lib/resources/WireguardInterfaces.js | 39 - lib/resources/WirelessDetailRecordReports.js | 8 - lib/telnyx.js | 425 --- lib/utils.js | 366 -- package-lock.json | 3380 ++++++++++++----- package.json | 28 +- src/Error.ts | 6 + src/TelnyxMethod.basic.ts | 2 +- src/TelnyxMethod.ts | 8 +- src/TelnyxResource.ts | 11 +- src/Types.d.ts | 41 +- src/Webhooks.ts | 58 +- src/autoPagination.ts | 6 +- src/makeRequest.ts | 6 +- src/multipart.ts | 4 +- src/resources/Balance.ts | 2 +- .../resources/MessagingProfiles.ts | 32 +- src/telnyx.node.ts | 2 +- src/telnyx.ts | 26 +- src/test/Error.test.ts | 73 + src/test/TelnyxResource.test.ts | 713 ++++ src/test/Webhook.test.ts | 218 ++ src/test/autoPagination.test.ts | 1008 +++++ src/test/resources/Balance.test.ts | 20 + src/test/telnyx.test.ts | 314 ++ src/test/utils.test.ts | 267 ++ .../test/utils/await.node7.ts | 14 +- .../test/utils/forAwait.node10.ts | 13 +- src/test/utils/index.ts | 136 + src/utils.ts | 44 +- test/.eslintrc.js | 14 - test/Error.spec.js | 48 - test/TelnyxResource.spec.js | 605 --- test/Webhook.spec.js | 149 - test/autoPagination.spec.js | 661 ---- test/mocha.opts | 2 - test/resources/AccessIpAddress.spec.js | 99 - test/resources/AccessIpRanges.spec.js | 118 - test/resources/ActionsSimCards.spec.js | 75 - .../ActivateDeactivateBulkCredentials.spec.js | 41 - test/resources/Addresses.spec.js | 162 - .../resources/AuthenticationProviders.spec.js | 92 - test/resources/AvailablePhoneNumbers.spec.js | 19 - test/resources/Balance.spec.js | 18 - test/resources/BillingGroups.spec.js | 134 - test/resources/BulkCreation.spec.js | 158 - .../BulkTelephonyCredentials.spec.js | 97 - .../resources/CallControlApplications.spec.js | 119 - test/resources/Calls.spec.js | 260 -- test/resources/Campaign.spec.js | 246 -- test/resources/CampaignBuilder.spec.js | 139 - test/resources/ClientStateUpdate.spec.js | 37 - test/resources/Conferences.spec.js | 200 - test/resources/Connections.spec.js | 42 - test/resources/CredentialConnections.spec.js | 127 - test/resources/DetailRecords.spec.js | 23 - test/resources/DocumentLinks.spec.js | 15 - test/resources/Documents.spec.js | 160 - test/resources/DynamicEmergency.spec.js | 119 - test/resources/Events.spec.js | 30 - test/resources/FaxApplications.spec.js | 112 - test/resources/Faxes.spec.js | 107 - test/resources/FqdnConnections.spec.js | 108 - test/resources/Fqdns.spec.js | 110 - test/resources/InventoryCoverage.spec.js | 33 - test/resources/IpConnections.spec.js | 108 - test/resources/Ips.spec.js | 120 - test/resources/ManagedAccounts.spec.js | 205 - test/resources/Messages.spec.js | 66 - test/resources/MessagesSenderIds.spec.js | 41 - .../MessagingHostedNumberOrders.spec.js | 91 - test/resources/MessagingHostedNumbers.spec.js | 19 - test/resources/MessagingPhoneNumbers.spec.js | 61 - .../resources/MessagingProfileMetrics.spec.js | 28 - test/resources/MessagingProfiles.spec.js | 222 -- test/resources/MessagingSenderIds.spec.js | 98 - test/resources/MessagingShortCodes.spec.js | 54 - test/resources/MobileOperatorNetworks.spec.js | 24 - test/resources/Notifications.spec.js | 0 test/resources/NumberBackgroundJobs.spec.js | 63 - test/resources/NumberLookup.spec.js | 19 - test/resources/NumberOrderDocuments.spec.js | 97 - test/resources/NumberOrders.spec.js | 106 - test/resources/NumberPortouts.spec.js | 187 - test/resources/NumberReservations.spec.js | 98 - test/resources/OtaUpdates.spec.js | 50 - test/resources/Outbound.spec.js | 133 - .../PhoneNumberAssignmentByProfile.spec.js | 79 - .../PhoneNumberInboundChannels.spec.js | 47 - test/resources/PhoneNumbers.spec.js | 137 - test/resources/PhoneNumbersMessaging.spec.js | 30 - ...PhoneNumbersRegulatoryRequirements.spec.js | 33 - test/resources/PhoneNumbersVoice.spec.js | 30 - test/resources/PortabilityChecks.spec.js | 32 - test/resources/PortingOrders.spec.js | 176 - test/resources/PortingPhoneNumbers.spec.js | 32 - test/resources/PortoutRequests.spec.js | 161 - .../resources/ProgrammableFaxCommands.spec.js | 175 - test/resources/PublicKey.spec.js | 17 - test/resources/Queues.spec.js | 55 - test/resources/RegisterCall.spec.js | 38 - test/resources/RegulatoryRequirements.spec.js | 53 - test/resources/ReportsMdrs.spec.js | 50 - test/resources/RoomCompositions.spec.js | 169 - test/resources/RoomParticipants.spec.js | 94 - test/resources/RoomSessions.spec.js | 210 - test/resources/Rooms.spec.js | 155 - test/resources/RoomsClientToken.spec.js | 55 - test/resources/ShortCodes.spec.js | 81 - test/resources/SimCardActions.spec.js | 68 - test/resources/SimCardGroups.spec.js | 115 - test/resources/SimCardOrders.spec.js | 92 - test/resources/SimCards.spec.js | 243 -- test/resources/TeXMLApplication.spec.js | 217 -- test/resources/TelephonyCredentials.spec.js | 141 - test/resources/UpdateClientState.spec.js | 31 - .../VerifiedCallsDisplayProfiles.spec.js | 27 - test/resources/Webhooks.spec.js | 40 - .../WirelessDetailRecordReports.spec.js | 78 - test/telnyx.spec.js | 269 -- test/utils.spec.js | 253 -- testUtils/.eslintrc.js | 14 - testUtils/index.js | 145 - tsconfig.json | 13 +- types/MessagingProfilesResource.d.ts | 51 + types/index.d.ts | 2 + types/lib.d.ts | 2 +- 293 files changed, 5746 insertions(+), 17996 deletions(-) delete mode 100644 examples/webhook-signing/yarn.lock create mode 100644 jest.config.js delete mode 100644 lib/Error.js delete mode 100644 lib/MultipartDataGenerator.js delete mode 100644 lib/TelnyxMethod.basic.js delete mode 100644 lib/TelnyxMethod.js delete mode 100644 lib/TelnyxResource.js delete mode 100644 lib/Webhooks.js delete mode 100644 lib/autoPagination.js delete mode 100644 lib/makeRequest.js delete mode 100644 lib/resources/AI.js delete mode 100644 lib/resources/AccessIpAddress.js delete mode 100644 lib/resources/AccessIpRanges.js delete mode 100644 lib/resources/AccessTokens.js delete mode 100644 lib/resources/Actions.js delete mode 100644 lib/resources/ActionsSimCards.js delete mode 100644 lib/resources/ActivateDeactivateBulkCredentials.js delete mode 100644 lib/resources/Addresses.js delete mode 100644 lib/resources/AdvancedOptinoptout.js delete mode 100644 lib/resources/AuthenticationProviders.js delete mode 100644 lib/resources/Autorechargepreferences.js delete mode 100644 lib/resources/AvailablePhoneNumbers.js delete mode 100644 lib/resources/Balance.js delete mode 100644 lib/resources/Billing.js delete mode 100644 lib/resources/BillingGroups.js delete mode 100644 lib/resources/Brands.js delete mode 100644 lib/resources/Bucket.js delete mode 100644 lib/resources/BucketUsage.js delete mode 100644 lib/resources/BulkCreation.js delete mode 100644 lib/resources/BulkCredentials.js delete mode 100644 lib/resources/BulkPhoneNumberCampaigns.js delete mode 100644 lib/resources/BulkPhoneNumberOperations.js delete mode 100644 lib/resources/BulkSoleProprietorCreation.js delete mode 100644 lib/resources/BulkTelephonyCredentials.js delete mode 100644 lib/resources/BusinessIdentity.js delete mode 100644 lib/resources/CallControlApplications.js delete mode 100644 lib/resources/CallEvents.js delete mode 100644 lib/resources/CallInformation.js delete mode 100644 lib/resources/CallRecordings.js delete mode 100644 lib/resources/Calls.js delete mode 100644 lib/resources/Campaign.js delete mode 100644 lib/resources/CampaignBuilder.js delete mode 100644 lib/resources/CdrUsageReports.js delete mode 100644 lib/resources/Channelzones.js delete mode 100644 lib/resources/ClientStateUpdate.js delete mode 100644 lib/resources/Conferences.js delete mode 100644 lib/resources/Connections.js delete mode 100644 lib/resources/CredentialConnections.js delete mode 100644 lib/resources/Credentials.js delete mode 100644 lib/resources/CsvDownloads.js delete mode 100644 lib/resources/CustomerServiceRecord.js delete mode 100644 lib/resources/Debugging.js delete mode 100644 lib/resources/DetailRecords.js delete mode 100644 lib/resources/DialogflowIntegration.js delete mode 100644 lib/resources/DocumentLinks.js delete mode 100644 lib/resources/Documents.js delete mode 100644 lib/resources/DynamicEmergency.js delete mode 100644 lib/resources/DynamicEmergencyAddresses.js delete mode 100644 lib/resources/DynamicEmergencyEndpoints.js delete mode 100644 lib/resources/Events.js delete mode 100644 lib/resources/ExternalConnections.js delete mode 100644 lib/resources/FaxApplications.js delete mode 100644 lib/resources/Faxes.js delete mode 100644 lib/resources/FqdnConnections.js delete mode 100644 lib/resources/Fqdns.js delete mode 100644 lib/resources/GlobalIps.js delete mode 100644 lib/resources/InboundChannels.js delete mode 100644 lib/resources/InventoryCoverage.js delete mode 100644 lib/resources/InventoryLevel.js delete mode 100644 lib/resources/IpAddresses.js delete mode 100644 lib/resources/IpConnections.js delete mode 100644 lib/resources/IpRanges.js delete mode 100644 lib/resources/Ips.js delete mode 100644 lib/resources/ManagedAccounts.js delete mode 100644 lib/resources/MdrDetailReports.js delete mode 100644 lib/resources/MdrUsageReports.js delete mode 100644 lib/resources/MediaStorageApi.js delete mode 100644 lib/resources/Messages.js delete mode 100644 lib/resources/MessagesAlphanumericSenderId.js delete mode 100644 lib/resources/MessagingHostedNumber.js delete mode 100644 lib/resources/MessagingHostedNumberOrders.js delete mode 100644 lib/resources/MessagingHostedNumbers.js delete mode 100644 lib/resources/MessagingPhoneNumbers.js delete mode 100644 lib/resources/MessagingProfileMetrics.js delete mode 100644 lib/resources/MessagingSenderIds.js delete mode 100644 lib/resources/MessagingShortCodes.js delete mode 100644 lib/resources/MessagingTollfreeVerification.js delete mode 100644 lib/resources/MessagingUrlDomains.js delete mode 100644 lib/resources/MobileNetworkOperators.js delete mode 100644 lib/resources/MobileOperatorNetworks.js delete mode 100644 lib/resources/Networks.js delete mode 100644 lib/resources/NumberBackgroundJobs.js delete mode 100644 lib/resources/NumberLookup.js delete mode 100644 lib/resources/NumberOrderDocuments.js delete mode 100644 lib/resources/NumberOrders.js delete mode 100644 lib/resources/NumberPortouts.js delete mode 100644 lib/resources/NumberReservations.js delete mode 100644 lib/resources/NumbersFeatures.js delete mode 100644 lib/resources/Object.js delete mode 100644 lib/resources/OtaUpdates.js delete mode 100644 lib/resources/Outbound.js delete mode 100644 lib/resources/OutboundVoiceProfiles.js delete mode 100644 lib/resources/PhoneNumberAssignmentByProfile.js delete mode 100644 lib/resources/PhoneNumberBlockOrders.js delete mode 100644 lib/resources/PhoneNumberBlocksBackgroundJobs.js delete mode 100644 lib/resources/PhoneNumberCampaigns.js delete mode 100644 lib/resources/PhoneNumberOrderDocuments.js delete mode 100644 lib/resources/PhoneNumberRegulatoryRequirements.js delete mode 100644 lib/resources/PhoneNumberSearch.js delete mode 100644 lib/resources/PhoneNumbers.js delete mode 100644 lib/resources/PhoneNumbersInboundChannels.js delete mode 100644 lib/resources/PhoneNumbersMessaging.js delete mode 100644 lib/resources/PhoneNumbersVoice.js delete mode 100644 lib/resources/PortabilityChecks.js delete mode 100644 lib/resources/PortingOrders.js delete mode 100644 lib/resources/PortingPhoneNumbers.js delete mode 100644 lib/resources/PortoutRequests.js delete mode 100644 lib/resources/PresignedObjectUrls.js delete mode 100644 lib/resources/PrivateWirelessGateways.js delete mode 100644 lib/resources/PublicInternetGateways.js delete mode 100644 lib/resources/PublicKey.js delete mode 100644 lib/resources/PushCredentials.js delete mode 100644 lib/resources/Queues.js delete mode 100644 lib/resources/RecordingsCommands.js delete mode 100644 lib/resources/Regions.js delete mode 100644 lib/resources/RegisterCall.js delete mode 100644 lib/resources/RegulatoryRequirements.js delete mode 100644 lib/resources/Reporting.js delete mode 100644 lib/resources/Reports.js delete mode 100644 lib/resources/ReportsMdrs.js delete mode 100644 lib/resources/RequirementTypes.js delete mode 100644 lib/resources/Requirements.js delete mode 100644 lib/resources/RoomCompositions.js delete mode 100644 lib/resources/RoomParticipants.js delete mode 100644 lib/resources/RoomRecordings.js delete mode 100644 lib/resources/RoomSessions.js delete mode 100644 lib/resources/Rooms.js delete mode 100644 lib/resources/RoomsClientToken.js delete mode 100644 lib/resources/RoomsClientTokens.js delete mode 100644 lib/resources/SharedCampaigns.js delete mode 100644 lib/resources/ShortCodes.js delete mode 100644 lib/resources/SimCardActions.js delete mode 100644 lib/resources/SimCardGroupActions.js delete mode 100644 lib/resources/SimCardGroups.js delete mode 100644 lib/resources/SimCardOrders.js delete mode 100644 lib/resources/SimCards.js delete mode 100644 lib/resources/SslCertificates.js delete mode 100644 lib/resources/TeXMLApplication.js delete mode 100644 lib/resources/TelephonyCredentials.js delete mode 100644 lib/resources/UpdateClientState.js delete mode 100644 lib/resources/Verifications.js delete mode 100644 lib/resources/VerifiedCallsDisplayProfile.js delete mode 100644 lib/resources/VerifiedCallsDisplayProfiles.js delete mode 100644 lib/resources/VerifiedNumbers.js delete mode 100644 lib/resources/Verify.js delete mode 100644 lib/resources/VerifyProfiles.js delete mode 100644 lib/resources/VirtualCrossConnects.js delete mode 100644 lib/resources/WdrDetailReports.js delete mode 100644 lib/resources/Webhooks.js delete mode 100644 lib/resources/WireguardInterfaces.js delete mode 100644 lib/resources/WirelessDetailRecordReports.js delete mode 100644 lib/telnyx.js delete mode 100644 lib/utils.js rename lib/resources/MessagingProfiles.js => src/resources/MessagingProfiles.ts (76%) create mode 100644 src/test/Error.test.ts create mode 100644 src/test/TelnyxResource.test.ts create mode 100644 src/test/Webhook.test.ts create mode 100644 src/test/autoPagination.test.ts create mode 100644 src/test/resources/Balance.test.ts create mode 100644 src/test/telnyx.test.ts create mode 100644 src/test/utils.test.ts rename testUtils/await.node7.js => src/test/utils/await.node7.ts (58%) rename testUtils/forAwait.node10.js => src/test/utils/forAwait.node10.ts (51%) create mode 100644 src/test/utils/index.ts delete mode 100644 test/.eslintrc.js delete mode 100644 test/Error.spec.js delete mode 100644 test/TelnyxResource.spec.js delete mode 100644 test/Webhook.spec.js delete mode 100644 test/autoPagination.spec.js delete mode 100644 test/mocha.opts delete mode 100644 test/resources/AccessIpAddress.spec.js delete mode 100644 test/resources/AccessIpRanges.spec.js delete mode 100644 test/resources/ActionsSimCards.spec.js delete mode 100644 test/resources/ActivateDeactivateBulkCredentials.spec.js delete mode 100644 test/resources/Addresses.spec.js delete mode 100644 test/resources/AuthenticationProviders.spec.js delete mode 100644 test/resources/AvailablePhoneNumbers.spec.js delete mode 100644 test/resources/Balance.spec.js delete mode 100644 test/resources/BillingGroups.spec.js delete mode 100644 test/resources/BulkCreation.spec.js delete mode 100644 test/resources/BulkTelephonyCredentials.spec.js delete mode 100644 test/resources/CallControlApplications.spec.js delete mode 100644 test/resources/Calls.spec.js delete mode 100644 test/resources/Campaign.spec.js delete mode 100644 test/resources/CampaignBuilder.spec.js delete mode 100644 test/resources/ClientStateUpdate.spec.js delete mode 100644 test/resources/Conferences.spec.js delete mode 100644 test/resources/Connections.spec.js delete mode 100644 test/resources/CredentialConnections.spec.js delete mode 100644 test/resources/DetailRecords.spec.js delete mode 100644 test/resources/DocumentLinks.spec.js delete mode 100644 test/resources/Documents.spec.js delete mode 100644 test/resources/DynamicEmergency.spec.js delete mode 100644 test/resources/Events.spec.js delete mode 100644 test/resources/FaxApplications.spec.js delete mode 100644 test/resources/Faxes.spec.js delete mode 100644 test/resources/FqdnConnections.spec.js delete mode 100644 test/resources/Fqdns.spec.js delete mode 100644 test/resources/InventoryCoverage.spec.js delete mode 100644 test/resources/IpConnections.spec.js delete mode 100644 test/resources/Ips.spec.js delete mode 100644 test/resources/ManagedAccounts.spec.js delete mode 100644 test/resources/Messages.spec.js delete mode 100644 test/resources/MessagesSenderIds.spec.js delete mode 100644 test/resources/MessagingHostedNumberOrders.spec.js delete mode 100644 test/resources/MessagingHostedNumbers.spec.js delete mode 100644 test/resources/MessagingPhoneNumbers.spec.js delete mode 100644 test/resources/MessagingProfileMetrics.spec.js delete mode 100644 test/resources/MessagingProfiles.spec.js delete mode 100644 test/resources/MessagingSenderIds.spec.js delete mode 100644 test/resources/MessagingShortCodes.spec.js delete mode 100644 test/resources/MobileOperatorNetworks.spec.js delete mode 100644 test/resources/Notifications.spec.js delete mode 100644 test/resources/NumberBackgroundJobs.spec.js delete mode 100644 test/resources/NumberLookup.spec.js delete mode 100644 test/resources/NumberOrderDocuments.spec.js delete mode 100644 test/resources/NumberOrders.spec.js delete mode 100644 test/resources/NumberPortouts.spec.js delete mode 100644 test/resources/NumberReservations.spec.js delete mode 100644 test/resources/OtaUpdates.spec.js delete mode 100644 test/resources/Outbound.spec.js delete mode 100644 test/resources/PhoneNumberAssignmentByProfile.spec.js delete mode 100644 test/resources/PhoneNumberInboundChannels.spec.js delete mode 100644 test/resources/PhoneNumbers.spec.js delete mode 100644 test/resources/PhoneNumbersMessaging.spec.js delete mode 100644 test/resources/PhoneNumbersRegulatoryRequirements.spec.js delete mode 100644 test/resources/PhoneNumbersVoice.spec.js delete mode 100644 test/resources/PortabilityChecks.spec.js delete mode 100644 test/resources/PortingOrders.spec.js delete mode 100644 test/resources/PortingPhoneNumbers.spec.js delete mode 100644 test/resources/PortoutRequests.spec.js delete mode 100644 test/resources/ProgrammableFaxCommands.spec.js delete mode 100644 test/resources/PublicKey.spec.js delete mode 100644 test/resources/Queues.spec.js delete mode 100644 test/resources/RegisterCall.spec.js delete mode 100644 test/resources/RegulatoryRequirements.spec.js delete mode 100644 test/resources/ReportsMdrs.spec.js delete mode 100644 test/resources/RoomCompositions.spec.js delete mode 100644 test/resources/RoomParticipants.spec.js delete mode 100644 test/resources/RoomSessions.spec.js delete mode 100644 test/resources/Rooms.spec.js delete mode 100644 test/resources/RoomsClientToken.spec.js delete mode 100644 test/resources/ShortCodes.spec.js delete mode 100644 test/resources/SimCardActions.spec.js delete mode 100644 test/resources/SimCardGroups.spec.js delete mode 100644 test/resources/SimCardOrders.spec.js delete mode 100644 test/resources/SimCards.spec.js delete mode 100644 test/resources/TeXMLApplication.spec.js delete mode 100644 test/resources/TelephonyCredentials.spec.js delete mode 100644 test/resources/UpdateClientState.spec.js delete mode 100644 test/resources/VerifiedCallsDisplayProfiles.spec.js delete mode 100644 test/resources/Webhooks.spec.js delete mode 100644 test/resources/WirelessDetailRecordReports.spec.js delete mode 100644 test/telnyx.spec.js delete mode 100644 test/utils.spec.js delete mode 100644 testUtils/.eslintrc.js delete mode 100644 testUtils/index.js create mode 100644 types/MessagingProfilesResource.d.ts diff --git a/.eslintignore b/.eslintignore index 9d7d525..4a71fe2 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,5 +1,4 @@ *.node*.js dist node_modules -tsconfig.json -lib/Error.js \ No newline at end of file +tsconfig.json \ No newline at end of file diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index b110f94..dc06b0f 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -30,5 +30,3 @@ jobs: - run: npm run build --if-present - name: Node ${{ matrix.node-version }} run: npm test - - name: Report - run: npm run report diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 4237372..08b19da 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -34,8 +34,6 @@ jobs: - run: npm run build --if-present - name: Node ${{ matrix.node-version }} run: npm test - - name: Report - run: npm run report publish-npm: needs: [build, test] diff --git a/.npmignore b/.npmignore index ab0a794..b54abc5 100644 --- a/.npmignore +++ b/.npmignore @@ -9,4 +9,8 @@ !/README.md !/VERSION !/package.json -!/lib/**/* +!/src/**/* +!/types/**/* + +# Omit test files +/src/test/**/* \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index a6ac3cf..fac5ea7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,7 +11,11 @@ - Convert SDK files to typescript - Use ES Modules syntax - Update package `main` entrypoint to be compiled version of [src telnyx.ts](./src/telnyx.ts) +- Added `Jest` and create tests in `Typescript` - Make `setApiKey` TelnyxObject prototype method private +- Moved to `moduleResolution` Bundler to support better imports and tests with `Jest` +- Enabled `esModuleInterop` for Jest +- Update files included when publishing ## v1 diff --git a/README.md b/README.md index f4eb05f..68040e1 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Version](https://img.shields.io/npm/v/telnyx.svg)](https://www.npmjs.org/package/telnyx) [![Build Status](https://github.com/team-telnyx/telnyx-node/workflows/CI/badge.svg)](https://github.com/team-telnyx/telnyx-node/actions) -[![Coverage Status](https://coveralls.io/repos/github/team-telnyx/telnyx-node/badge.svg?branch=master)](https://coveralls.io/github/team-telnyx/telnyx-node?branch=master) +Coverage Status: Pending [![Downloads](https://img.shields.io/npm/dm/telnyx.svg)](https://www.npmjs.com/package/telnyx) [![Try on RunKit](https://badge.runkitcdn.com/telnyx.svg)](https://runkit.com/npm/telnyx) [![Join Slack](https://img.shields.io/badge/join-slack-infomational)](https://joinslack.telnyx.com/) @@ -26,25 +26,25 @@ The package needs to be configured with your account's API key which is available in your the [Telnyx Mission Control Portal][api-keys]. Require it with the key's value: -``` js +```js const telnyx = require('telnyx')('KEY123456...'); const messagingProfile = await telnyx.messagingProfiles.create({ - name: 'Summer Campaign' + name: 'Summer Campaign', }); ``` Or with versions of Node.js prior to v7.9: -``` js +```js var telnyx = require('telnyx')('KEY123456...'); telnyx.messagingProfiles.create( - { name: 'Summer Campaign' }, - function(err, messagingProfile) { + {name: 'Summer Campaign'}, + function (err, messagingProfile) { err; // null if no error occurred messagingProfile; // the created messaging profile object - } + }, ); ``` @@ -64,24 +64,23 @@ callback: ```js // Create a new messaging profile and then send a message using that profile: telnyx.MessagingProfiles.create({ - name: 'Summer Campaign' -}).then((messagingProfile) => { - return telnyx.MessagingPhoneNumbers.update( - '+18005554000', - { - 'messaging_profile_id': messagingProfile.data.id - } - ); -}).catch((err) => { - // Deal with an error -}); + name: 'Summer Campaign', +}) + .then((messagingProfile) => { + return telnyx.MessagingPhoneNumbers.update('+18005554000', { + messaging_profile_id: messagingProfile.data.id, + }); + }) + .catch((err) => { + // Deal with an error + }); ``` ### Configuring Timeout Request timeout is configurable (the default is Node's default of 120 seconds): -``` js +```js telnyx.setTimeout(20000); // in ms (this is 20 seconds) ``` @@ -90,7 +89,7 @@ telnyx.setTimeout(20000); // in ms (this is 20 seconds) An [https-proxy-agent][https-proxy-agent] can be configured with `setHttpAgent`. -To use telnyx behind a proxy you can pass to sdk: +To use telnyx behind a proxy you can pass to sdk: ```js if (process.env.http_proxy) { @@ -116,20 +115,20 @@ Some information about the response which generated a resource is available with the `lastResponse` property: ```js -messagingProfile.lastResponse.requestId // see: https://telnyx.com/docs/api/node#request_ids -messagingProfile.lastResponse.statusCode +messagingProfile.lastResponse.requestId; // see: https://telnyx.com/docs/api/node#request_ids +messagingProfile.lastResponse.statusCode; ``` ### `request` and `response` events -The Telnyx object emits `request` and `response` events. You can use them like this: +The Telnyx object emits `request` and `response` events. You can use them like this: ```js const telnyx = require('telnyx')('KEY...'); const onRequest = (request) => { // Do something. -} +}; // Add the event handler function: telnyx.on('request', onRequest); @@ -139,6 +138,7 @@ telnyx.off('request', onRequest); ``` #### `request` object + ```js { method: 'POST', @@ -147,6 +147,7 @@ telnyx.off('request', onRequest); ``` #### `response` object + ```js { method: 'POST', @@ -176,7 +177,7 @@ const event = telnyx.webhooks.constructEvent( webhookRawBody, webhookTelnyxSignatureHeader, webhookTelnyxTimestampHeader, - publicKey + publicKey, ); ``` @@ -194,13 +195,12 @@ try { webhookTelnyxSignatureHeader, webhookTelnyxTimestampHeader, publicKey, - timeToleranceInSeconds + timeToleranceInSeconds, ); } catch (e) { - console.log("Failed to validate the signature") + console.log('Failed to validate the signature'); console.log(e); } - ``` ### Writing a Plugin @@ -222,7 +222,6 @@ This information is passed along when the library makes calls to the Telnyx API. You can auto-paginate list methods. We provide a few different APIs for this to aid with a variety of node versions and styles. - #### Async iterators (`for-await-of`) If you are in a Node environment that has support for [async iteration](https://github.com/tc39/proposal-async-iteration#the-async-iteration-statement-for-await-of), @@ -244,27 +243,33 @@ If you are in a Node environment that has support for `await`, such as Node 7.9 you may pass an async function to `.autoPagingEach`: ```js -await telnyx.messagingProfiles.list().autoPagingEach(async (messagingProfile) => { - await doSomething(messagingProfile); - if (shouldBreak()) { - return false; - } -}) +await telnyx.messagingProfiles + .list() + .autoPagingEach(async (messagingProfile) => { + await doSomething(messagingProfile); + if (shouldBreak()) { + return false; + } + }); console.log('Done iterating.'); ``` Equivalently, without `await`, you may return a Promise, which can resolve to `false` to break: ```js -telnyx.messagingProfiles.list().autoPagingEach((messagingProfile) => { - return doSomething(messagingProfile).then(() => { - if (shouldBreak()) { - return false; - } - }); -}).then(() => { - console.log('Done iterating.'); -}).catch(handleError); +telnyx.messagingProfiles + .list() + .autoPagingEach((messagingProfile) => { + return doSomething(messagingProfile).then(() => { + if (shouldBreak()) { + return false; + } + }); + }) + .then(() => { + console.log('Done iterating.'); + }) + .catch(handleError); ``` If you prefer callbacks to promises, you may also use a `next` callback and a second `onDone` callback: @@ -272,7 +277,7 @@ If you prefer callbacks to promises, you may also use a `next` callback and a se ```js telnyx.messagingProfiles.list().autoPagingEach( function onItem(messagingProfile, next) { - doSomething(messagingProfile, function(err, result) { + doSomething(messagingProfile, function (err, result) { if (shouldStop(result)) { next(false); // Passing `false` breaks out of the loop. } else { @@ -286,8 +291,8 @@ telnyx.messagingProfiles.list().autoPagingEach( } else { console.log('Done iterating.'); } - } -) + }, +); ``` If your `onItem` function does not accept a `next` callback parameter _or_ return a Promise, @@ -302,13 +307,15 @@ to prevent runaway list growth from consuming too much memory. Returns a promise of an array of all items across pages for a list request. ```js -const allMessagingProfiles = await telnyx.messagingProfiles.list() +const allMessagingProfiles = await telnyx.messagingProfiles + .list() .autoPagingToArray({limit: 10000}); ``` ## Development ### Setup + The test suite depends on the [Prism Mock Server](https://github.com/stoplightio/prism). ```bash @@ -321,7 +328,7 @@ Once installed, start the prism mock service with the following command: prism mock https://raw.githubusercontent.com/team-telnyx/openapi/master/openapi/spec3.json ``` --------- +--- One final step -- because the Node SDK originally expected to reach the legacy `telnyx-mock` service at port 12111 (in addition to providing a `/v2/` base path), we need to setup the [Telnyx mock proxy server](https://github.com/team-telnyx/telnyx-mock-server-proxy) to modify the request path and forward along to the prism mock server. @@ -351,16 +358,16 @@ $ TELNYX_MOCK_PORT=12000 npm test Run a single test suite: ```bash -$ npm run mocha -- test/Error.spec.js +$ npm test -- test/Error.spec.js ``` Run a single test (case sensitive): ```bash -$ npm run mocha -- test/Error.spec.js --grep 'Populates with type' +$ npm test -- test/Error.spec.js -t 'Populates with type' ``` -If you wish, you may run tests using your Telnyx *Test* API key by setting the +If you wish, you may run tests using your Telnyx _Test_ API key by setting the environment variable `TELNYX_TEST_API_KEY` before running the tests: ```bash @@ -374,9 +381,9 @@ $ npm test To inspect values in tests first import debug: ```js -var debug = require('debug')('foo'); +const debug = require('debug')('foo'); //... -debug(result) +debug(result); ``` Then run the tests with: diff --git a/examples/webhook-signing/package-lock.json b/examples/webhook-signing/package-lock.json index 2b1ba8c..e863a3d 100644 --- a/examples/webhook-signing/package-lock.json +++ b/examples/webhook-signing/package-lock.json @@ -16,15 +16,11 @@ "telnyx": "^1.25.5" } }, - "node_modules/abbrev": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" - }, "node_modules/accepts": { "version": "1.3.8", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "license": "MIT", "dependencies": { "mime-types": "~2.1.34", "negotiator": "0.6.3" @@ -37,6 +33,7 @@ "version": "3.1.3", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "license": "ISC", "dependencies": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" @@ -48,17 +45,20 @@ "node_modules/array-flatten": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", + "license": "MIT" }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "license": "MIT" }, "node_modules/basic-auth": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz", "integrity": "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==", + "license": "MIT", "dependencies": { "safe-buffer": "5.1.2" }, @@ -69,20 +69,26 @@ "node_modules/basic-auth/node_modules/safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "license": "MIT" }, "node_modules/binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", + "license": "MIT", "engines": { "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/body-parser": { - "version": "1.20.2", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz", - "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==", + "version": "1.20.3", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz", + "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==", + "license": "MIT", "dependencies": { "bytes": "3.1.2", "content-type": "~1.0.5", @@ -92,7 +98,7 @@ "http-errors": "2.0.0", "iconv-lite": "0.4.24", "on-finished": "2.4.1", - "qs": "6.11.0", + "qs": "6.13.0", "raw-body": "2.5.2", "type-is": "~1.6.18", "unpipe": "1.0.0" @@ -106,6 +112,7 @@ "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -115,6 +122,7 @@ "version": "3.0.3", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "license": "MIT", "dependencies": { "fill-range": "^7.1.1" }, @@ -126,6 +134,7 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "license": "MIT", "engines": { "node": ">= 0.8" } @@ -134,6 +143,7 @@ "version": "1.0.7", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", + "license": "MIT", "dependencies": { "es-define-property": "^1.0.0", "es-errors": "^1.3.0", @@ -149,15 +159,10 @@ } }, "node_modules/chokidar": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "license": "MIT", "dependencies": { "anymatch": "~3.1.2", "braces": "~3.0.2", @@ -170,6 +175,9 @@ "engines": { "node": ">= 8.10.0" }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, "optionalDependencies": { "fsevents": "~2.3.2" } @@ -177,12 +185,14 @@ "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "license": "MIT" }, "node_modules/content-disposition": { "version": "0.5.4", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "license": "MIT", "dependencies": { "safe-buffer": "5.2.1" }, @@ -194,6 +204,7 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -202,6 +213,7 @@ "version": "0.6.0", "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==", + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -209,12 +221,14 @@ "node_modules/cookie-signature": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", + "license": "MIT" }, "node_modules/debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", "dependencies": { "ms": "2.0.0" } @@ -223,6 +237,7 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "license": "MIT", "dependencies": { "es-define-property": "^1.0.0", "es-errors": "^1.3.0", @@ -239,6 +254,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "license": "MIT", "engines": { "node": ">= 0.8" } @@ -247,6 +263,7 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "license": "MIT", "engines": { "node": ">= 0.8", "npm": "1.2.8000 || >= 1.4.16" @@ -255,12 +272,14 @@ "node_modules/ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", + "license": "MIT" }, "node_modules/encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", + "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", + "license": "MIT", "engines": { "node": ">= 0.8" } @@ -269,6 +288,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "license": "MIT", "dependencies": { "get-intrinsic": "^1.2.4" }, @@ -280,6 +300,7 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "license": "MIT", "engines": { "node": ">= 0.4" } @@ -287,47 +308,50 @@ "node_modules/escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", + "license": "MIT" }, "node_modules/etag": { "version": "1.8.1", "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "license": "MIT", "engines": { "node": ">= 0.6" } }, "node_modules/express": { - "version": "4.19.2", - "resolved": "https://registry.npmjs.org/express/-/express-4.19.2.tgz", - "integrity": "sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==", + "version": "4.21.0", + "resolved": "https://registry.npmjs.org/express/-/express-4.21.0.tgz", + "integrity": "sha512-VqcNGcj/Id5ZT1LZ/cfihi3ttTn+NJmkli2eZADigjq29qTlWi/hAQ43t/VLPq8+UX06FCEx3ByOYet6ZFblng==", + "license": "MIT", "dependencies": { "accepts": "~1.3.8", "array-flatten": "1.1.1", - "body-parser": "1.20.2", + "body-parser": "1.20.3", "content-disposition": "0.5.4", "content-type": "~1.0.4", "cookie": "0.6.0", "cookie-signature": "1.0.6", "debug": "2.6.9", "depd": "2.0.0", - "encodeurl": "~1.0.2", + "encodeurl": "~2.0.0", "escape-html": "~1.0.3", "etag": "~1.8.1", - "finalhandler": "1.2.0", + "finalhandler": "1.3.1", "fresh": "0.5.2", "http-errors": "2.0.0", - "merge-descriptors": "1.0.1", + "merge-descriptors": "1.0.3", "methods": "~1.1.2", "on-finished": "2.4.1", "parseurl": "~1.3.3", - "path-to-regexp": "0.1.7", + "path-to-regexp": "0.1.10", "proxy-addr": "~2.0.7", - "qs": "6.11.0", + "qs": "6.13.0", "range-parser": "~1.2.1", "safe-buffer": "5.2.1", - "send": "0.18.0", - "serve-static": "1.15.0", + "send": "0.19.0", + "serve-static": "1.16.2", "setprototypeof": "1.2.0", "statuses": "2.0.1", "type-is": "~1.6.18", @@ -342,6 +366,7 @@ "version": "7.1.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "license": "MIT", "dependencies": { "to-regex-range": "^5.0.1" }, @@ -350,12 +375,13 @@ } }, "node_modules/finalhandler": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", - "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.1.tgz", + "integrity": "sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==", + "license": "MIT", "dependencies": { "debug": "2.6.9", - "encodeurl": "~1.0.2", + "encodeurl": "~2.0.0", "escape-html": "~1.0.3", "on-finished": "2.4.1", "parseurl": "~1.3.3", @@ -370,6 +396,7 @@ "version": "0.2.0", "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -378,15 +405,17 @@ "version": "0.5.2", "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "license": "MIT", "engines": { "node": ">= 0.6" } }, "node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", "hasInstallScript": true, + "license": "MIT", "optional": true, "os": [ "darwin" @@ -399,6 +428,7 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -407,6 +437,7 @@ "version": "1.2.4", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", + "license": "MIT", "dependencies": { "es-errors": "^1.3.0", "function-bind": "^1.1.2", @@ -425,6 +456,7 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "license": "ISC", "dependencies": { "is-glob": "^4.0.1" }, @@ -436,6 +468,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "license": "MIT", "dependencies": { "get-intrinsic": "^1.1.3" }, @@ -447,6 +480,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "license": "MIT", "engines": { "node": ">=4" } @@ -455,6 +489,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "license": "MIT", "dependencies": { "es-define-property": "^1.0.0" }, @@ -466,6 +501,7 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", + "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -477,6 +513,7 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -488,6 +525,7 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "license": "MIT", "dependencies": { "function-bind": "^1.1.2" }, @@ -499,6 +537,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "license": "MIT", "dependencies": { "depd": "2.0.0", "inherits": "2.0.4", @@ -514,6 +553,7 @@ "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "license": "MIT", "dependencies": { "safer-buffer": ">= 2.1.2 < 3" }, @@ -524,17 +564,20 @@ "node_modules/ignore-by-default": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", - "integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==" + "integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==", + "license": "ISC" }, "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "license": "ISC" }, "node_modules/ipaddr.js": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "license": "MIT", "engines": { "node": ">= 0.10" } @@ -543,6 +586,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "license": "MIT", "dependencies": { "binary-extensions": "^2.0.0" }, @@ -554,6 +598,7 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -562,6 +607,7 @@ "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "license": "MIT", "dependencies": { "is-extglob": "^2.1.1" }, @@ -573,6 +619,7 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "license": "MIT", "engines": { "node": ">=0.12.0" } @@ -580,25 +627,32 @@ "node_modules/lodash.isplainobject": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", - "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==" + "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==", + "license": "MIT" }, "node_modules/media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "license": "MIT", "engines": { "node": ">= 0.6" } }, "node_modules/merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz", + "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, "node_modules/methods": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -607,6 +661,7 @@ "version": "1.6.0", "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "license": "MIT", "bin": { "mime": "cli.js" }, @@ -618,6 +673,7 @@ "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -626,6 +682,7 @@ "version": "2.1.35", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "license": "MIT", "dependencies": { "mime-db": "1.52.0" }, @@ -637,6 +694,7 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -648,6 +706,7 @@ "version": "1.10.0", "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.10.0.tgz", "integrity": "sha512-AbegBVI4sh6El+1gNwvD5YIck7nSA36weD7xvIxG4in80j/UoK8AEGaWnnz8v1GxonMCltmlNs5ZKbGvl9b1XQ==", + "license": "MIT", "dependencies": { "basic-auth": "~2.0.1", "debug": "2.6.9", @@ -663,6 +722,7 @@ "version": "2.3.0", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", "integrity": "sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==", + "license": "MIT", "dependencies": { "ee-first": "1.1.1" }, @@ -673,12 +733,14 @@ "node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" }, "node_modules/negotiator": { "version": "0.6.3", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -687,13 +749,14 @@ "version": "2.0.22", "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.22.tgz", "integrity": "sha512-B8YqaKMmyuCO7BowF1Z1/mkPqLk6cs/l63Ojtd6otKjMx47Dq1utxfRxcavH1I7VSaL8n5BUaoutadnsX3AAVQ==", + "license": "MIT", "dependencies": { "chokidar": "^3.5.2", "debug": "^3.2.7", "ignore-by-default": "^1.0.1", "minimatch": "^3.1.2", "pstree.remy": "^1.1.8", - "semver": "^7.5.2", + "semver": "^5.7.1", "simple-update-notifier": "^1.0.7", "supports-color": "^5.5.0", "touch": "^3.1.0", @@ -714,6 +777,7 @@ "version": "3.2.7", "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "license": "MIT", "dependencies": { "ms": "^2.1.1" } @@ -721,34 +785,26 @@ "node_modules/nodemon/node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" - }, - "node_modules/nopt": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", - "integrity": "sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg==", - "dependencies": { - "abbrev": "1" - }, - "bin": { - "nopt": "bin/nopt.js" - }, - "engines": { - "node": "*" - } + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" }, "node_modules/normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/object-inspect": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", - "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz", + "integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -757,6 +813,7 @@ "version": "2.4.1", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "license": "MIT", "dependencies": { "ee-first": "1.1.1" }, @@ -768,6 +825,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", + "license": "MIT", "engines": { "node": ">= 0.8" } @@ -776,19 +834,22 @@ "version": "1.3.3", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "license": "MIT", "engines": { "node": ">= 0.8" } }, "node_modules/path-to-regexp": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" + "version": "0.1.10", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.10.tgz", + "integrity": "sha512-7lf7qcQidTku0Gu3YDPc8DJ1q7OOucfa/BSsIwjuh56VU7katFvuM8hULfkwB3Fns/rsVF7PwPKVw1sl5KQS9w==", + "license": "MIT" }, "node_modules/picomatch": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "license": "MIT", "engines": { "node": ">=8.6" }, @@ -800,6 +861,7 @@ "version": "2.0.7", "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "license": "MIT", "dependencies": { "forwarded": "0.2.0", "ipaddr.js": "1.9.1" @@ -811,14 +873,16 @@ "node_modules/pstree.remy": { "version": "1.1.8", "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz", - "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==" + "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==", + "license": "MIT" }, "node_modules/qs": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", - "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", + "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", + "license": "BSD-3-Clause", "dependencies": { - "side-channel": "^1.0.4" + "side-channel": "^1.0.6" }, "engines": { "node": ">=0.6" @@ -831,6 +895,7 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -839,6 +904,7 @@ "version": "2.5.2", "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", + "license": "MIT", "dependencies": { "bytes": "3.1.2", "http-errors": "2.0.0", @@ -853,6 +919,7 @@ "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "license": "MIT", "dependencies": { "picomatch": "^2.2.1" }, @@ -877,25 +944,29 @@ "type": "consulting", "url": "https://feross.org/support" } - ] + ], + "license": "MIT" }, "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "license": "MIT" }, "node_modules/semver": { "version": "5.7.2", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "license": "ISC", "bin": { "semver": "bin/semver" } }, "node_modules/send": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", - "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz", + "integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==", + "license": "MIT", "dependencies": { "debug": "2.6.9", "depd": "2.0.0", @@ -915,20 +986,31 @@ "node": ">= 0.8.0" } }, + "node_modules/send/node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, "node_modules/send/node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" }, "node_modules/serve-static": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", - "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", + "version": "1.16.2", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz", + "integrity": "sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==", + "license": "MIT", "dependencies": { - "encodeurl": "~1.0.2", + "encodeurl": "~2.0.0", "escape-html": "~1.0.3", "parseurl": "~1.3.3", - "send": "0.18.0" + "send": "0.19.0" }, "engines": { "node": ">= 0.8.0" @@ -938,6 +1020,7 @@ "version": "1.2.2", "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "license": "MIT", "dependencies": { "define-data-property": "^1.1.4", "es-errors": "^1.3.0", @@ -953,12 +1036,14 @@ "node_modules/setprototypeof": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", - "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "license": "ISC" }, "node_modules/side-channel": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", + "license": "MIT", "dependencies": { "call-bind": "^1.0.7", "es-errors": "^1.3.0", @@ -976,6 +1061,7 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-1.1.0.tgz", "integrity": "sha512-VpsrsJSUcJEseSbMHkrsrAVSdvVS5I96Qo1QAQ4FxQ9wXFcB+pjj7FB7/us9+GcgfW4ziHtYMc1J0PLczb55mg==", + "license": "MIT", "dependencies": { "semver": "~7.0.0" }, @@ -987,6 +1073,7 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz", "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==", + "license": "ISC", "bin": { "semver": "bin/semver.js" } @@ -995,6 +1082,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "license": "MIT", "engines": { "node": ">= 0.8" } @@ -1003,6 +1091,7 @@ "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "license": "MIT", "dependencies": { "has-flag": "^3.0.0" }, @@ -1011,13 +1100,15 @@ } }, "node_modules/telnyx": { - "version": "1.26.2", - "resolved": "https://registry.npmjs.org/telnyx/-/telnyx-1.26.2.tgz", - "integrity": "sha512-a38cYuXyxIUADqV9A1HIrAiJ3a3rEM5lPZAp0/OyUwpu9lvhkzGwU+UhAaSBmitW21TkL34FryMJ0OB8pPSHVg==", + "version": "1.27.0", + "resolved": "https://registry.npmjs.org/telnyx/-/telnyx-1.27.0.tgz", + "integrity": "sha512-cVbP3jEW4TbmNL5U0UbZc3OkLg+6dHRnMYByYfJnrGw5ZRn0XKb17Hx3fLMWmGgRFow7eqVP4hlCogbIB6T3+w==", + "license": "MIT", "dependencies": { "lodash.isplainobject": "^4.0.6", "qs": "^6.11.2", "safe-buffer": "^5.2.1", + "telnyx": "^1.26.2", "tweetnacl": "^1.0.3", "uuid": "^9.0.1" }, @@ -1025,27 +1116,11 @@ "node": "^6 || >=8" } }, - "node_modules/telnyx/node_modules/qs": { - "version": "6.12.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.12.0.tgz", - "integrity": "sha512-trVZiI6RMOkO476zLGaBIzszOdFPnCCXHPG9kn0yuS1uz6xdVxPfZdB3vUig9pxPFDM9BRAgz/YUIVQ1/vuiUg==", - "version": "6.12.1", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.12.1.tgz", - "integrity": "sha512-zWmv4RSuB9r2mYQw3zxQuHWeU+42aKi1wWig/j4ele4ygELZ7PEO6MM7rim9oAQH2A5MWfsAVf/jPvTPgCbvUQ==", - "dependencies": { - "side-channel": "^1.0.6" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "license": "MIT", "dependencies": { "is-number": "^7.0.0" }, @@ -1057,17 +1132,16 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "license": "MIT", "engines": { "node": ">=0.6" } }, "node_modules/touch": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz", - "integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==", - "dependencies": { - "nopt": "~1.0.10" - }, + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.1.tgz", + "integrity": "sha512-r0eojU4bI8MnHr8c5bNo7lJDdI2qXlWWJk6a9EAFG7vbhTjElYhBVS3/miuE0uOuoLdb8Mc/rVfsmm6eo5o9GA==", + "license": "ISC", "bin": { "nodetouch": "bin/nodetouch.js" } @@ -1075,12 +1149,14 @@ "node_modules/tweetnacl": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz", - "integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==" + "integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==", + "license": "Unlicense" }, "node_modules/type-is": { "version": "1.6.18", "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "license": "MIT", "dependencies": { "media-typer": "0.3.0", "mime-types": "~2.1.24" @@ -1092,12 +1168,14 @@ "node_modules/undefsafe": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz", - "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==" + "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==", + "license": "MIT" }, "node_modules/unpipe": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "license": "MIT", "engines": { "node": ">= 0.8" } @@ -1106,6 +1184,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "license": "MIT", "engines": { "node": ">= 0.4.0" } @@ -1118,6 +1197,7 @@ "https://github.com/sponsors/broofa", "https://github.com/sponsors/ctavan" ], + "license": "MIT", "bin": { "uuid": "dist/bin/uuid" } @@ -1126,6 +1206,7 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "license": "MIT", "engines": { "node": ">= 0.8" } diff --git a/examples/webhook-signing/yarn.lock b/examples/webhook-signing/yarn.lock deleted file mode 100644 index c7c47cb..0000000 --- a/examples/webhook-signing/yarn.lock +++ /dev/null @@ -1,813 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -abbrev@1: - version "1.1.1" - resolved "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz" - integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== - -accepts@~1.3.8: - version "1.3.8" - resolved "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz" - integrity sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw== - dependencies: - mime-types "~2.1.34" - negotiator "0.6.3" - -anymatch@~3.1.2: - version "3.1.3" - resolved "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz" - integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== - dependencies: - normalize-path "^3.0.0" - picomatch "^2.0.4" - -array-flatten@1.1.1: - version "1.1.1" - resolved "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz" - integrity sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg== - -balanced-match@^1.0.0: - version "1.0.2" - resolved "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz" - integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== - -basic-auth@~2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz" - integrity sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg== - dependencies: - safe-buffer "5.1.2" - -binary-extensions@^2.0.0: - version "2.2.0" - resolved "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz" - integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== - -body-parser@1.20.2, body-parser@^1.17.1: - version "1.20.2" - resolved "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz" - integrity sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA== - dependencies: - bytes "3.1.2" - content-type "~1.0.4" - debug "2.6.9" - depd "2.0.0" - destroy "1.2.0" - http-errors "2.0.0" - iconv-lite "0.4.24" - on-finished "2.4.1" - qs "6.11.0" - raw-body "2.5.1" - type-is "~1.6.18" - unpipe "1.0.0" - -body-parser@^1.17.1: - version "1.20.2" - resolved "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz" - integrity sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA== - dependencies: - bytes "3.1.2" - content-type "~1.0.5" - debug "2.6.9" - depd "2.0.0" - destroy "1.2.0" - http-errors "2.0.0" - iconv-lite "0.4.24" - on-finished "2.4.1" - qs "6.11.0" - raw-body "2.5.2" - type-is "~1.6.18" - unpipe "1.0.0" - -brace-expansion@^1.1.7: - version "1.1.11" - resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz" - integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== - dependencies: - balanced-match "^1.0.0" - concat-map "0.0.1" - -braces@~3.0.2: - version "3.0.3" - resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789" - integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA== - dependencies: - fill-range "^7.1.1" - -bytes@3.1.2: - version "3.1.2" - resolved "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz" - integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg== - -call-bind@^1.0.0: - version "1.0.2" - resolved "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz" - integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== - dependencies: - function-bind "^1.1.1" - get-intrinsic "^1.0.2" - -call-bind@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.7.tgz#06016599c40c56498c18769d2730be242b6fa3b9" - integrity sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w== - dependencies: - es-define-property "^1.0.0" - es-errors "^1.3.0" - function-bind "^1.1.2" - get-intrinsic "^1.2.4" - set-function-length "^1.2.1" - -chokidar@^3.5.2: - version "3.5.3" - resolved "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz" - integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== - dependencies: - anymatch "~3.1.2" - braces "~3.0.2" - glob-parent "~5.1.2" - is-binary-path "~2.1.0" - is-glob "~4.0.1" - normalize-path "~3.0.0" - readdirp "~3.6.0" - optionalDependencies: - fsevents "~2.3.2" - -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" - integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== - -content-disposition@0.5.4: - version "0.5.4" - resolved "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz" - integrity sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ== - dependencies: - safe-buffer "5.2.1" - -content-type@~1.0.4, content-type@~1.0.5: - version "1.0.5" - resolved "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz" - integrity sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA== - -cookie-signature@1.0.6: - version "1.0.6" - resolved "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz" - integrity sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ== - -cookie@0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.6.0.tgz#2798b04b071b0ecbff0dbb62a505a8efa4e19051" - integrity sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw== - -debug@2.6.9: - version "2.6.9" - resolved "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz" - integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== - dependencies: - ms "2.0.0" - -debug@2.6.9: - version "2.6.9" - resolved "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz" - integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== - dependencies: - ms "2.0.0" - -debug@^3.2.7: - version "3.2.7" - resolved "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz" - integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== - dependencies: - ms "^2.1.1" - -define-data-property@^1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.4.tgz#894dc141bb7d3060ae4366f6a0107e68fbe48c5e" - integrity sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A== - dependencies: - es-define-property "^1.0.0" - es-errors "^1.3.0" - gopd "^1.0.1" - -depd@2.0.0, depd@~2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz" - integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== - -destroy@1.2.0: - version "1.2.0" - resolved "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz" - integrity sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg== - -ee-first@1.1.1: - version "1.1.1" - resolved "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz" - integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow== - -encodeurl@~1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz" - integrity sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w== - -es-define-property@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.0.tgz#c7faefbdff8b2696cf5f46921edfb77cc4ba3845" - integrity sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ== - dependencies: - get-intrinsic "^1.2.4" - -es-errors@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f" - integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== - -escape-html@~1.0.3: - version "1.0.3" - resolved "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz" - integrity sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow== - -etag@~1.8.1: - version "1.8.1" - resolved "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz" - integrity sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg== - -express@^4.15.2: - version "4.19.2" - resolved "https://registry.yarnpkg.com/express/-/express-4.19.2.tgz#e25437827a3aa7f2a827bc8171bbbb664a356465" - integrity sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q== - dependencies: - accepts "~1.3.8" - array-flatten "1.1.1" - body-parser "1.20.2" - content-disposition "0.5.4" - content-type "~1.0.4" - cookie "0.6.0" - cookie-signature "1.0.6" - debug "2.6.9" - depd "2.0.0" - encodeurl "~1.0.2" - escape-html "~1.0.3" - etag "~1.8.1" - finalhandler "1.2.0" - fresh "0.5.2" - http-errors "2.0.0" - merge-descriptors "1.0.1" - methods "~1.1.2" - on-finished "2.4.1" - parseurl "~1.3.3" - path-to-regexp "0.1.7" - proxy-addr "~2.0.7" - qs "6.11.0" - range-parser "~1.2.1" - safe-buffer "5.2.1" - send "0.18.0" - serve-static "1.15.0" - setprototypeof "1.2.0" - statuses "2.0.1" - type-is "~1.6.18" - utils-merge "1.0.1" - vary "~1.1.2" - -fill-range@^7.1.1: - version "7.1.1" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292" - integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg== - dependencies: - to-regex-range "^5.0.1" - -finalhandler@1.2.0: - version "1.2.0" - resolved "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz" - integrity sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg== - dependencies: - debug "2.6.9" - encodeurl "~1.0.2" - escape-html "~1.0.3" - on-finished "2.4.1" - parseurl "~1.3.3" - statuses "2.0.1" - unpipe "~1.0.0" - -forwarded@0.2.0: - version "0.2.0" - resolved "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz" - integrity sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow== - -fresh@0.5.2: - version "0.5.2" - resolved "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz" - integrity sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q== - -fsevents@~2.3.2: - version "2.3.2" - resolved "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz" - integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== - -function-bind@^1.1.1: - version "1.1.1" - resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz" - integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== - -function-bind@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c" - integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== - -get-intrinsic@^1.0.2: - version "1.2.1" - resolved "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz" - integrity sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw== - dependencies: - function-bind "^1.1.1" - has "^1.0.3" - has-proto "^1.0.1" - has-symbols "^1.0.3" - -get-intrinsic@^1.1.3, get-intrinsic@^1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.4.tgz#e385f5a4b5227d449c3eabbad05494ef0abbeadd" - integrity sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ== - dependencies: - es-errors "^1.3.0" - function-bind "^1.1.2" - has-proto "^1.0.1" - has-symbols "^1.0.3" - hasown "^2.0.0" - -glob-parent@~5.1.2: - version "5.1.2" - resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz" - integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== - dependencies: - is-glob "^4.0.1" - -gopd@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c" - integrity sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA== - dependencies: - get-intrinsic "^1.1.3" - -has-flag@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz" - integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw== - -has-property-descriptors@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz#963ed7d071dc7bf5f084c5bfbe0d1b6222586854" - integrity sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg== - dependencies: - es-define-property "^1.0.0" - -has-proto@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz" - integrity sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg== - -has-symbols@^1.0.3: - version "1.0.3" - resolved "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz" - integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== - -has@^1.0.3: - version "1.0.3" - resolved "https://registry.npmjs.org/has/-/has-1.0.3.tgz" - integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== - dependencies: - function-bind "^1.1.1" - -hasown@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003" - integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ== - dependencies: - function-bind "^1.1.2" - -http-errors@2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz" - integrity sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ== - dependencies: - depd "2.0.0" - inherits "2.0.4" - setprototypeof "1.2.0" - statuses "2.0.1" - toidentifier "1.0.1" - -iconv-lite@0.4.24: - version "0.4.24" - resolved "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz" - integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== - dependencies: - safer-buffer ">= 2.1.2 < 3" - -ignore-by-default@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz" - integrity sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA== - -inherits@2.0.4: - version "2.0.4" - resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz" - integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== - -ipaddr.js@1.9.1: - version "1.9.1" - resolved "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz" - integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== - -is-binary-path@~2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz" - integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== - dependencies: - binary-extensions "^2.0.0" - -is-extglob@^2.1.1: - version "2.1.1" - resolved "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz" - integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== - -is-glob@^4.0.1, is-glob@~4.0.1: - version "4.0.3" - resolved "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz" - integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== - dependencies: - is-extglob "^2.1.1" - -is-number@^7.0.0: - version "7.0.0" - resolved "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz" - integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== - -lodash.isplainobject@^4.0.6: - version "4.0.6" - resolved "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz" - integrity sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA== - -media-typer@0.3.0: - version "0.3.0" - resolved "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz" - integrity sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ== - -merge-descriptors@1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz" - integrity sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w== - -methods@~1.1.2: - version "1.1.2" - resolved "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz" - integrity sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w== - -mime-db@1.52.0: - version "1.52.0" - resolved "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz" - integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== - -mime-types@~2.1.24, mime-types@~2.1.34: - version "2.1.35" - resolved "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz" - integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== - dependencies: - mime-db "1.52.0" - -mime@1.6.0: - version "1.6.0" - resolved "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz" - integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== - -minimatch@^3.1.2: - version "3.1.2" - resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz" - integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== - dependencies: - brace-expansion "^1.1.7" - -morgan@^1.8.1: - version "1.10.0" - resolved "https://registry.npmjs.org/morgan/-/morgan-1.10.0.tgz" - integrity sha512-AbegBVI4sh6El+1gNwvD5YIck7nSA36weD7xvIxG4in80j/UoK8AEGaWnnz8v1GxonMCltmlNs5ZKbGvl9b1XQ== - dependencies: - basic-auth "~2.0.1" - debug "2.6.9" - depd "~2.0.0" - on-finished "~2.3.0" - on-headers "~1.0.2" - -ms@2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz" - integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A== - -ms@2.1.3, ms@^2.1.1: - version "2.1.3" - resolved "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz" - integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== - -negotiator@0.6.3: - version "0.6.3" - resolved "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz" - integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== - -nodemon@^2.0.15: - version "2.0.22" - resolved "https://registry.npmjs.org/nodemon/-/nodemon-2.0.22.tgz" - integrity sha512-B8YqaKMmyuCO7BowF1Z1/mkPqLk6cs/l63Ojtd6otKjMx47Dq1utxfRxcavH1I7VSaL8n5BUaoutadnsX3AAVQ== - dependencies: - chokidar "^3.5.2" - debug "^3.2.7" - ignore-by-default "^1.0.1" - minimatch "^3.1.2" - pstree.remy "^1.1.8" - semver "^5.7.1" - simple-update-notifier "^1.0.7" - supports-color "^5.5.0" - touch "^3.1.0" - undefsafe "^2.0.5" - -nopt@~1.0.10: - version "1.0.10" - resolved "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz" - integrity sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg== - dependencies: - abbrev "1" - -normalize-path@^3.0.0, normalize-path@~3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz" - integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== - -object-inspect@^1.13.1: - version "1.13.1" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.1.tgz#b96c6109324ccfef6b12216a956ca4dc2ff94bc2" - integrity sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ== - -object-inspect@^1.9.0: - version "1.12.3" - resolved "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz" - integrity sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g== - -on-finished@2.4.1: - version "2.4.1" - resolved "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz" - integrity sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg== - dependencies: - ee-first "1.1.1" - -on-finished@~2.3.0: - version "2.3.0" - resolved "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz" - integrity sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww== - dependencies: - ee-first "1.1.1" - -on-headers@~1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz" - integrity sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA== - -parseurl@~1.3.3: - version "1.3.3" - resolved "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz" - integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== - -path-to-regexp@0.1.7: - version "0.1.7" - resolved "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz" - integrity sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ== - -picomatch@^2.0.4, picomatch@^2.2.1: - version "2.3.1" - resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz" - integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== - -proxy-addr@~2.0.7: - version "2.0.7" - resolved "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz" - integrity sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg== - dependencies: - forwarded "0.2.0" - ipaddr.js "1.9.1" - -pstree.remy@^1.1.8: - version "1.1.8" - resolved "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz" - integrity sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w== - -qs@6.11.0: - version "6.11.0" - resolved "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz" - integrity sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q== - dependencies: - side-channel "^1.0.4" - -qs@^6.11.2: - version "6.12.1" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.12.1.tgz#39422111ca7cbdb70425541cba20c7d7b216599a" - integrity sha512-zWmv4RSuB9r2mYQw3zxQuHWeU+42aKi1wWig/j4ele4ygELZ7PEO6MM7rim9oAQH2A5MWfsAVf/jPvTPgCbvUQ== - dependencies: - side-channel "^1.0.6" - -range-parser@~1.2.1: - version "1.2.1" - resolved "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz" - integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== - -raw-body@2.5.2: - version "2.5.2" - resolved "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz" - integrity sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA== - dependencies: - bytes "3.1.2" - http-errors "2.0.0" - iconv-lite "0.4.24" - unpipe "1.0.0" - -readdirp@~3.6.0: - version "3.6.0" - resolved "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz" - integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== - dependencies: - picomatch "^2.2.1" - -safe-buffer@5.1.2: - version "5.1.2" - resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz" - integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== - -safe-buffer@5.2.1, safe-buffer@^5.2.1: - version "5.2.1" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" - integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== - -"safer-buffer@>= 2.1.2 < 3": - version "2.1.2" - resolved "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz" - integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== - -semver@^5.7.1: - version "5.7.2" - resolved "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz" - integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g== - -semver@~7.0.0: - version "7.0.0" - resolved "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz" - integrity sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A== - -send@0.18.0: - version "0.18.0" - resolved "https://registry.npmjs.org/send/-/send-0.18.0.tgz" - integrity sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg== - dependencies: - debug "2.6.9" - depd "2.0.0" - destroy "1.2.0" - encodeurl "~1.0.2" - escape-html "~1.0.3" - etag "~1.8.1" - fresh "0.5.2" - http-errors "2.0.0" - mime "1.6.0" - ms "2.1.3" - on-finished "2.4.1" - range-parser "~1.2.1" - statuses "2.0.1" - -serve-static@1.15.0: - version "1.15.0" - resolved "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz" - integrity sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g== - dependencies: - encodeurl "~1.0.2" - escape-html "~1.0.3" - parseurl "~1.3.3" - send "0.18.0" - -set-function-length@^1.2.1: - version "1.2.2" - resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.2.tgz#aac72314198eaed975cf77b2c3b6b880695e5449" - integrity sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg== - dependencies: - define-data-property "^1.1.4" - es-errors "^1.3.0" - function-bind "^1.1.2" - get-intrinsic "^1.2.4" - gopd "^1.0.1" - has-property-descriptors "^1.0.2" - -setprototypeof@1.2.0: - version "1.2.0" - resolved "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz" - integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw== - -side-channel@^1.0.4: - version "1.0.4" - resolved "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz" - integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw== - dependencies: - call-bind "^1.0.0" - get-intrinsic "^1.0.2" - object-inspect "^1.9.0" - -side-channel@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.6.tgz#abd25fb7cd24baf45466406b1096b7831c9215f2" - integrity sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA== - dependencies: - call-bind "^1.0.7" - es-errors "^1.3.0" - get-intrinsic "^1.2.4" - object-inspect "^1.13.1" - -simple-update-notifier@^1.0.7: - version "1.1.0" - resolved "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-1.1.0.tgz" - integrity sha512-VpsrsJSUcJEseSbMHkrsrAVSdvVS5I96Qo1QAQ4FxQ9wXFcB+pjj7FB7/us9+GcgfW4ziHtYMc1J0PLczb55mg== - dependencies: - semver "~7.0.0" - -statuses@2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz" - integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== - -supports-color@^5.5.0: - version "5.5.0" - resolved "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz" - integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== - dependencies: - has-flag "^3.0.0" - -telnyx@^1.25.5: - version "1.26.2" - resolved "https://registry.yarnpkg.com/telnyx/-/telnyx-1.2621.tgz#7db7766d2651ae5ca06d818b57a8ae2d852dc6f2" - integrity sha512-a38cYuXyxIUADqV9A1HIrAiJ3a3rEM5lPZAp0/OyUwpu9lvhkzGwU+UhAaSBmitW21TkL34FryMJ0OB8pPSHVg== - dependencies: - lodash.isplainobject "^4.0.6" - qs "^6.11.2" - safe-buffer "^5.2.1" - tweetnacl "^1.0.3" - uuid "^9.0.1" - -to-regex-range@^5.0.1: - version "5.0.1" - resolved "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz" - integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== - dependencies: - is-number "^7.0.0" - -toidentifier@1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz" - integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA== - -touch@^3.1.0: - version "3.1.0" - resolved "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz" - integrity sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA== - dependencies: - nopt "~1.0.10" - -tweetnacl@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-1.0.3.tgz#ac0af71680458d8a6378d0d0d050ab1407d35596" - integrity sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw== - -type-is@~1.6.18: - version "1.6.18" - resolved "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz" - integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== - dependencies: - media-typer "0.3.0" - mime-types "~2.1.24" - -undefsafe@^2.0.5: - version "2.0.5" - resolved "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz" - integrity sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA== - -unpipe@1.0.0, unpipe@~1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz" - integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ== - -utils-merge@1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz" - integrity sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA== - -uuid@^9.0.1: - version "9.0.1" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.1.tgz#e188d4c8853cc722220392c424cd637f32293f30" - integrity sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA== - -vary@~1.1.2: - version "1.1.2" - resolved "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz" - integrity sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg== diff --git a/jest.config.js b/jest.config.js new file mode 100644 index 0000000..09da12f --- /dev/null +++ b/jest.config.js @@ -0,0 +1,16 @@ +/** @type {import('ts-jest').JestConfigWithTsJest} **/ +export default { + testEnvironment: 'node', + transform: { + '^.+.ts$': ['ts-jest', {}], + }, + collectCoverage: true, + coveragePathIgnorePatterns: [ + '/node_modules/', + '/test/', + '/TelnyxMethod.basic/', + ], + coverageDirectory: 'coverage', + reporters: ['default', ['github-actions', {silent: false}], 'summary'], + roots: ['/src/'], +}; diff --git a/lib/Error.js b/lib/Error.js deleted file mode 100644 index 9d7d7a1..0000000 --- a/lib/Error.js +++ /dev/null @@ -1,165 +0,0 @@ -'use strict'; - -var utils = require('./utils'); - -module.exports = _Error; - -/** - * Generic Error klass to wrap any errors returned by telnyx-node - */ -function _Error(raw) { - this.populate.apply(this, arguments); - this.stack = new Error(this.message).stack; -} - -function buildMessage(raw) { - return `${statusString(raw)}${idString(raw)}${message(raw.errors)}${otherErrorsMessage(raw.errors)}`; -} - -function otherErrorsMessage(errors) { - var count = errorCount(errors); - if (count > 2) { - return ` plus ${count} other errors.`; - } else if (count == 2) { - return ' plus 1 other error.'; - } - - return ''; -} - -function errorCount(errors) { - if (Array.isArray(errors)) { - return errors.len; - } else { - return 1; - } -} - -function message(errors) { - if (Array.isArray(errors)) { - return errors[0] && ` ${errors[0].title || errors[0].detail}`; - } else { - return ` ${errors}`; - } -} - -function statusString(raw) { - if (raw.statusCode) { - return `(Status ${raw.statusCode})`; - } else { - return ''; - } -} - -function idString(raw) { - if (raw.requestId) { - return ` (Request ${raw.requestId})`; - } else { - return ''; - } -} - -// Extend Native Error -_Error.prototype = Object.create(Error.prototype); - -_Error.prototype.type = 'GenericError'; -_Error.prototype.populate = function (type, message) { - this.type = type; - this.message = message; -}; - -_Error.extend = utils.protoExtend; - -/** - * Create subclass of internal Error klass - * (Specifically for errors returned from Telnyx's REST API) - */ -var TelnyxError = (_Error.TelnyxError = _Error.extend({ - type: 'TelnyxError', - populate: function (raw) { - var message; - if (raw.message) { - message = raw.message; - } else { - message = buildMessage(raw); - } - // Move from prototype def (so it appears in stringified obj) - this.type = this.type; - this.stack = new Error(message).stack; - this.message = message; - this.raw = raw; - this.headers = raw.headers; - this.requestId = raw.requestId; - this.statusCode = raw.statusCode; - this.responseBody = raw.responseBody; - }, -})); - -/** - * Helper factory which takes raw telnyx errors and outputs wrapping instances - */ -TelnyxError.generate = function (rawTelnyxError) { - switch (rawTelnyxError.statusCode) { - case 400: - return new _Error.TelnyxInvalidRequestError(rawTelnyxError); - case 401: - return new _Error.TelnyxAuthenticationError(rawTelnyxError); - case 403: - return new _Error.TelnyxPermissionError(rawTelnyxError); - case 404: - return new _Error.TelnyxResourceNotFoundError(rawTelnyxError); - case 405: - return new _Error.TelnyxMethodNotSupportedError(rawTelnyxError); - case 408: - return new _Error.TelnyxTimeoutError(rawTelnyxError); - case 415: - return new _Error.TelnyxUnsupportedMediaTypeError(rawTelnyxError); - case 422: - return new _Error.TelnyxInvalidParametersError(rawTelnyxError); - case 429: - return new _Error.TelnyxRateLimitError(rawTelnyxError); - case 500: - return new _Error.TelnyxAPIError(rawTelnyxError); - case 503: - return new _Error.TelnyxServiceUnavailableError(rawTelnyxError); - } - return new _Error('Generic', 'Unknown Error'); -}; - -// Specific Telnyx Error types: -_Error.TelnyxInvalidRequestError = TelnyxError.extend({ - type: 'TelnyxInvalidRequestError', -}); // 400 -_Error.TelnyxAuthenticationError = TelnyxError.extend({ - type: 'TelnyxAuthenticationError', -}); // 401 -_Error.TelnyxPermissionError = TelnyxError.extend({ - type: 'TelnyxPermissionError', -}); // 403 -_Error.TelnyxResourceNotFoundError = TelnyxError.extend({ - type: 'TelnyxResourceNotFoundError', -}); // 404 -_Error.TelnyxMethodNotSupportedError = TelnyxError.extend({ - type: 'TelnyxMethodNotSupportedError', -}); // 405 -_Error.TelnyxTimeoutError = TelnyxError.extend({type: 'TelnyxTimeoutError'}); // 408 -_Error.TelnyxUnsupportedMediaTypeError = TelnyxError.extend({ - type: 'TelnyxUnsupportedMediaTypeError', -}); // 415 -_Error.TelnyxInvalidParametersError = TelnyxError.extend({ - type: 'TelnyxInvalidParametersError', -}); // 422 -_Error.TelnyxRateLimitError = TelnyxError.extend({ - type: 'TelnyxRateLimitError', -}); // 429 -_Error.TelnyxAPIError = TelnyxError.extend({type: 'TelnyxAPIError'}); // 500 -_Error.TelnyxServiceUnavailableError = TelnyxError.extend({ - type: 'TelnyxServiceUnavailableError', -}); // 503 - -_Error.TelnyxConnectionError = TelnyxError.extend({ - type: 'TelnyxConnectionError', -}); -_Error.TelnyxSignatureVerificationError = TelnyxError.extend({ - type: 'TelnyxSignatureVerificationError', -}); diff --git a/lib/MultipartDataGenerator.js b/lib/MultipartDataGenerator.js deleted file mode 100644 index 321820a..0000000 --- a/lib/MultipartDataGenerator.js +++ /dev/null @@ -1,45 +0,0 @@ -'use strict'; - -var Buffer = require('safe-buffer').Buffer; - -// Method for formatting HTTP body for the multipart/form-data specification -// Mostly taken from Fermata.js -// https://github.com/natevw/fermata/blob/5d9732a33d776ce925013a265935facd1626cc88/fermata.js#L315-L343 -function multipartDataGenerator(method, data, headers) { - var segno = (Math.round(Math.random() * 1e16) + Math.round(Math.random() * 1e16)).toString(); - headers['Content-Type'] = ('multipart/form-data; boundary=' + segno); - var buffer = Buffer.alloc(0); - - function push(l) { - var prevBuffer = buffer; - var newBuffer = (l instanceof Buffer) ? l : Buffer.from(l); - buffer = Buffer.alloc(prevBuffer.length + newBuffer.length + 2); - prevBuffer.copy(buffer); - newBuffer.copy(buffer, prevBuffer.length); - buffer.write('\r\n', buffer.length - 2); - } - - function q(s) { - return '"' + s.replace(/"|"/g, '%22').replace(/\r\n|\r|\n/g, ' ') + '"'; - } - - for (var k in data) { - var v = data[k]; - push('--' + segno); - if (v.hasOwnProperty('data')) { - push('Content-Disposition: form-data; name=' + q(k) + '; filename=' + q(v.name || 'blob')); - push('Content-Type: ' + (v.type || 'application/octet-stream')); - push(''); - push(v.data); - } else { - push('Content-Disposition: form-data; name=' + q(k)); - push(''); - push(v); - } - } - push('--' + segno + '--'); - - return buffer; -} - -module.exports = multipartDataGenerator; diff --git a/lib/TelnyxMethod.basic.js b/lib/TelnyxMethod.basic.js deleted file mode 100644 index e4e7e8b..0000000 --- a/lib/TelnyxMethod.basic.js +++ /dev/null @@ -1,112 +0,0 @@ -'use strict'; - -var isPlainObject = require('lodash.isplainobject'); -var telnyxMethod = require('./TelnyxMethod'); -var utils = require('./utils'); - -module.exports = { - - create: telnyxMethod({ - method: 'POST', - }), - - list: telnyxMethod({ - method: 'GET', - methodType: 'list', - }), - - retrieve: telnyxMethod({ - method: 'GET', - path: '/{id}', - urlParams: ['id'], - }), - - update: telnyxMethod({ - method: 'PATCH', - path: '{id}', - urlParams: ['id'], - }), - - // Avoid 'delete' keyword in JS - del: telnyxMethod({ - method: 'DELETE', - path: '{id}', - urlParams: ['id'], - }), - - setMetadata: function(id, key, value, auth, cb) { - var self = this; - var data = key; - var isObject = isPlainObject(key); - // We assume null for an empty object - var isNull = data === null || (isObject && !Object.keys(data).length); - - // Allow optional passing of auth & cb: - if ((isNull || isObject) && typeof value == 'string') { - auth = value; - } else if (typeof auth != 'string') { - if (!cb && typeof auth == 'function') { - cb = auth; - } - auth = null; - } - - var urlData = this.createUrlData(); - var path = this.createFullPath('/' + id, urlData); - - return utils.callbackifyPromiseWithTimeout(new Promise((function(resolve, reject) { - if (isNull) { - // Reset metadata: - sendMetadata(null, auth); - } else if (!isObject) { - // Set individual metadata property: - var metadata = {}; - metadata[key] = value; - sendMetadata(metadata, auth); - } else { - // Set entire metadata object after resetting it: - this._request('POST', null, path, { - metadata: null, - }, auth, {}, function(err, response) { - if (err) { - return reject(err); - } - sendMetadata(data, auth); - }); - } - - function sendMetadata(metadata, auth) { - self._request('POST', null, path, { - metadata: metadata, - }, auth, {}, function(err, response) { - if (err) { - reject(err); - } else { - resolve(response.metadata); - } - }); - } - }).bind(this)), cb); - }, - - getMetadata: function(id, auth, cb) { - if (!cb && typeof auth == 'function') { - cb = auth; - auth = null; - } - - var urlData = this.createUrlData(); - var path = this.createFullPath('/' + id, urlData); - - return utils.callbackifyPromiseWithTimeout(new Promise((function(resolve, reject) { - this._request('GET', null, path, {}, auth, {}, function(err, response) { - if (err) { - reject(err); - } else { - resolve(response.metadata); - } - }); - }).bind(this)), cb); - }, - -}; diff --git a/lib/TelnyxMethod.js b/lib/TelnyxMethod.js deleted file mode 100644 index fff9965..0000000 --- a/lib/TelnyxMethod.js +++ /dev/null @@ -1,68 +0,0 @@ -'use strict'; - -var utils = require('./utils'); -var makeRequest = require('./makeRequest'); -var makeAutoPaginationMethods = require('./autoPagination').makeAutoPaginationMethods; - -/** - * Create an API method from the declared spec. - * - * @param [spec.method='GET'] Request Method (POST, GET, DELETE, PUT, PATCH) - * @param [spec.path=''] Path to be appended to the API BASE_PATH, joined with - * the instance's path (e.g. 'messaging_profiles' or 'available_phone_numbers') - * @param [spec.urlParams=[]] Array of required arguments in the order that they - * must be passed by the consumer of the API. Subsequent optional arguments are - * optionally passed through a hash (Object) as the penultimate argument - * (preceding the also-optional callback argument - * @param [spec.paramsNames=[]] Array of required arguments in the order that they - * are to be used instead of being passed by the consumer of the API. Useful for nested resources - * in a manner that consumer doesn't need to provide path arguments - * @param [spec.paramsValues=[]] Array of substitute require arguments in `paramsNames` values - * @param [spec.encode] Function for mutating input parameters to a method. - * Usefully for applying transforms to data on a per-method basis. - * @param [spec.host] Hostname for the request. - * @param [spec.transformResponseData] mutates response data to decorate with any util functions or info. - */ -function telnyxMethod(spec) { - return function() { - var self = this; - var args = [].slice.call(arguments); - - if (spec.paramsValues) { - populateUrlParamsWithResource(self, args, spec); - } - - var callback = typeof args[args.length - 1] == 'function' && args.pop(); - - var requestPromise = utils.callbackifyPromiseWithTimeout(makeRequest(self, args, spec, {}), callback) - - if (spec.methodType === 'list') { - var autoPaginationMethods = makeAutoPaginationMethods(self, args, spec, requestPromise); - Object.assign(requestPromise, autoPaginationMethods); - } - - return requestPromise; - }; -} - -/** - * Populate nested method URL params with resource object attributes that match the param name. - * This allows you to do things like setting the `call_control_id` attribute from an existing call object on a new instance of `telnyx.calls`. - */ -function populateUrlParamsWithResource(self, args, spec) { - // if url params is not in resource response data. - if (!spec.paramsValues[0]) { - const paramsValues = spec.paramsNames.reduce(function(result, name) { - if (self[name]) { - result.push(self[name]); - } - return result; - }, []); - - args.unshift(paramsValues); - } else { - args.unshift(spec.paramsValues); - } -} - -module.exports = telnyxMethod; diff --git a/lib/TelnyxResource.js b/lib/TelnyxResource.js deleted file mode 100644 index caea003..0000000 --- a/lib/TelnyxResource.js +++ /dev/null @@ -1,479 +0,0 @@ -'use strict'; - -var http = require('http'); -var https = require('https'); -var path = require('path'); - -var utils = require('./utils'); -var Error = require('./Error'); -var Buffer = require('safe-buffer').Buffer; - -var hasOwn = {}.hasOwnProperty; - -// Provide extension mechanism for Telnyx Resource Sub-Classes -TelnyxResource.extend = utils.protoExtend; -// Expose method-creator & prepared (basic) methods -TelnyxResource.method = require('./TelnyxMethod'); -TelnyxResource.BASIC_METHODS = require('./TelnyxMethod.basic'); - -TelnyxResource.MAX_BUFFERED_REQUEST_METRICS = 100; - -/** - * Encapsulates request logic for a Telnyx Resource - */ -function TelnyxResource(telnyx, urlData) { - this._telnyx = telnyx; - this._urlData = urlData || {}; - - this.basePath = utils.makeURLInterpolator( - this.basePath || telnyx.getApiField('basePath') - ); - this.resourcePath = this.path; - this.path = utils.makeURLInterpolator(this.path); - - if (this.includeBasic) { - this.includeBasic.forEach(function (methodName) { - this[methodName] = TelnyxResource.BASIC_METHODS[methodName]; - }, this); - } - - if (this.nestedResources) { - for (var resource in this.nestedResources) { - this[utils.pascalToCamelCase(resource)] = new this.nestedResources[ - resource - ](telnyx); - } - } - - if (this.instanceMethods) { - Object.assign(this, this.instanceMethods); - } - - this.initialize.apply(this, arguments); -} - -TelnyxResource.prototype = { - path: '', - - // Methods that don't use the API's default '/v1' path can override it with this setting. - basePath: null, - - initialize: function () {}, - - // Function to override the default data processor. This allows full control - // over how a TelnyxResource's request data will get converted into an HTTP - // body. This is useful for non-standard HTTP requests. The function should - // take method name, data, and headers as arguments. - requestDataProcessor: null, - - // Function to add a validation checks before sending the request, errors should - // be thrown, and they will be passed to the callback/promise. - validateRequest: null, - - createFullPath: function (commandPath, urlData) { - return path - .join( - this.basePath(urlData), - this.path(urlData), - typeof commandPath == 'function' ? commandPath(urlData) : commandPath - ) - .replace(/\\/g, '/'); // ugly workaround for Windows - }, - - // Creates a relative resource path with symbols left in (unlike - // createFullPath which takes some data to replace them with). For example it - // might produce: /invoices/{id} - createResourcePathWithSymbols: function (pathWithSymbols) { - return ( - '/' + - path.join(this.resourcePath, pathWithSymbols || '').replace(/\\/g, '/') - ); // ugly workaround for Windows - }, - - createUrlData: function () { - var urlData = {}; - // Merge in baseData - for (var i in this._urlData) { - if (hasOwn.call(this._urlData, i)) { - urlData[i] = this._urlData[i]; - } - } - return urlData; - }, - - _timeoutHandler: function (timeout, req, callback) { - var self = this; - return function () { - var timeoutErr = new Error('ETIMEDOUT'); - timeoutErr.code = 'ETIMEDOUT'; - - req._isAborted = true; - req.abort(); - - callback.call( - self, - new Error.TelnyxConnectionError({ - message: - 'Request aborted due to timeout being reached (' + timeout + 'ms)', - detail: timeoutErr, - }), - null - ); - }; - }, - - _responseHandler: function (req, callback) { - var self = this; - return function (res) { - var response = ''; - - res.setEncoding('utf8'); - res.on('data', function (chunk) { - response += chunk; - }); - res.on('end', function () { - var headers = res.headers || {}; - // NOTE: Telnyx responds with lowercase header names/keys. - - // For convenience, make Request-Id easily accessible on - // lastResponse. - res.requestId = headers['request-id'] || headers['x-request-id'] || ''; - - var requestDurationMs = Date.now() - req._requestStart; - - var responseEvent = utils.removeEmpty({ - method: req._requestEvent.method, - path: req._requestEvent.path, - status: res.statusCode, - request_id: res.requestId, - elapsed: requestDurationMs, - }); - - self._telnyx._emitter.emit('response', responseEvent); - - try { - response = utils.tryParseJSON(response); - - if (response.errors) { - var error = {}; - - error.errors = response.errors; - - error.headers = headers; - error.statusCode = res.statusCode; - error.requestId = res.requestId; - - var err = self._buildError(error, res.statusCode); - - return callback.call(self, err, null); - } - } catch (e) { - return callback.call( - self, - new Error.TelnyxAPIError({ - message: 'Invalid JSON received from the Telnyx API', - response: response, - exception: e, - requestId: res.requestId, - }), - null - ); - } - - // Expose res object - Object.defineProperty(response, 'lastResponse', { - enumerable: false, - writable: false, - value: res, - }); - callback.call(self, null, response); - }); - }; - }, - - _buildError: function (error, statusCode) { - var err; - switch (statusCode) { - case 400: - err = new Error.TelnyxInvalidRequestError(error); - break; - case 401: - err = new Error.TelnyxAuthenticationError(error); - break; - case 403: - err = new Error.TelnyxPermissionError(error); - break; - case 404: - err = new Error.TelnyxResourceNotFoundError(error); - break; - case 405: - err = new Error.TelnyxMethodNotSupportedError(error); - break; - case 408: - err = new Error.TelnyxTimeoutError(error); - break; - case 415: - err = new Error.TelnyxUnsupportedMediaTypeError(error); - break; - case 422: - err = new Error.TelnyxInvalidParametersError(error); - break; - case 429: - err = new Error.TelnyxRateLimitError(error); - break; - case 500: - err = new Error.TelnyxAPIError(error); - break; - case 503: - err = new Error.TelnyxServiceUnavailableError(error); - break; - default: - err = new Error.TelnyxAPIError(error); - } - - return err; - }, - - _generateConnectionErrorMessage: function (requestRetries) { - return ( - 'An error occurred with our connection to Telnyx.' + - (requestRetries > 0 - ? ' Request was retried ' + requestRetries + ' times.' - : '') - ); - }, - - _errorHandler: function (req, requestRetries, callback) { - var self = this; - return function (error) { - if (req._isAborted) { - // already handled - return; - } - callback.call( - self, - new Error.TelnyxConnectionError({ - message: self._generateConnectionErrorMessage(requestRetries), - responseBody: error, - }), - null - ); - }; - }, - - _shouldRetry: function (res, numRetries) { - // Do not retry if we are out of retries. - if (numRetries >= this._telnyx.getMaxNetworkRetries()) { - return false; - } - - // Retry on connection error. - if (!res) { - return true; - } - - // Retry on conflict and availability errors. - if (res.statusCode === 409 || res.statusCode === 503) { - return true; - } - - // Retry on 5xx's, except POST's as that may not be safe. - if (res.statusCode >= 500 && res.req._requestEvent.method !== 'POST') { - return true; - } - - return false; - }, - - _getSleepTimeInMS: function (numRetries) { - var initialNetworkRetryDelay = this._telnyx.getInitialNetworkRetryDelay(); - var maxNetworkRetryDelay = this._telnyx.getMaxNetworkRetryDelay(); - - // Apply exponential backoff with initialNetworkRetryDelay on the - // number of numRetries so far as inputs. Do not allow the number to exceed - // maxNetworkRetryDelay. - var sleepSeconds = Math.min( - initialNetworkRetryDelay * Math.pow(numRetries - 1, 2), - maxNetworkRetryDelay - ); - - // Apply some jitter by randomizing the value in the range of - // (sleepSeconds / 2) to (sleepSeconds). - sleepSeconds *= 0.5 * (1 + Math.random()); - - // But never sleep less than the base sleep seconds. - sleepSeconds = Math.max(initialNetworkRetryDelay, sleepSeconds); - - return sleepSeconds * 1000; - }, - - _defaultHeaders: function (auth, requestData) { - var userAgentString = - 'Telnyx/v1 NodeBindings/' + this._telnyx.getConstant('PACKAGE_VERSION'); - - if (this._telnyx._appInfo) { - userAgentString += ' ' + this._telnyx.getAppInfoAsString(); - } - - var headers = { - // Use specified auth token or use default from this telnyx instance: - Authorization: auth ? 'Bearer ' + auth : this._telnyx.getApiField('auth'), - Accept: '*/*', - 'Content-Type': 'application/json', - 'Content-Length': Buffer.byteLength(requestData), - 'User-Agent': userAgentString, - }; - - return headers; - }, - - _request: function (method, host, path, data, auth, options, callback) { - var self = this; - var requestData; - - function makeRequestWithData(error, data) { - var headers; - - if (error) { - return callback(error); - } - - if (method == 'GET') { - if (data != '' && data != null) { - path = path + '?' + data; - requestData = ''; - } else { - requestData = ''; - } - } else if (utils.isJsonString(data)) { - requestData = data; - } else if (data != '' && data != null) { - path = path + '?' + encodeURI(data); - requestData = ''; - } else { - requestData = ''; - } - - headers = self._defaultHeaders(auth, requestData); - self._telnyx.getClientUserAgent(function (cua) { - headers['X-Telnyx-Client-User-Agent'] = cua; - - if (options.headers) { - Object.assign(headers, options.headers); - } - - makeRequest(headers); - }); - } - - if (self.requestDataProcessor) { - self.requestDataProcessor( - method, - data, - options.headers, - makeRequestWithData - ); - } else if (method == 'GET') { - makeRequestWithData(null, data ? utils.stringifyRequestData(data) : ''); - } else { - let parameters; - if (data) { - if (data.filter && Object.keys(data.filter).length) { - parameters = utils.stringifyRequestData(data); - } else { - parameters = JSON.stringify(data); - if (parameters === '{}') { - parameters = ''; - } - } - } else { - parameters = ''; - } - makeRequestWithData(null, parameters); - } - - function retryRequest(requestFn, headers, requestRetries) { - requestRetries += 1; - - return setTimeout( - requestFn, - self._getSleepTimeInMS(requestRetries), - headers, - requestRetries - ); - } - - function makeRequest(headers, numRetries) { - var timeout = self._telnyx.getApiField('timeout'); - var isInsecureConnection = self._telnyx.getApiField('protocol') == 'http'; - var agent = isInsecureConnection - ? self._telnyx.getApiField('http_agent') - : self._telnyx.getApiField('https_agent'); - - if (headers['Content-Length'] === 0) { - delete headers['Content-Length']; - delete headers['Content-Type']; - } - - var req = (isInsecureConnection ? http : https).request({ - host: self._telnyx.getApiField('host') || '127.0.0.1', - port: self._telnyx.getApiField('port'), - path: path, - method: method, - agent: agent, - headers: headers, - ciphers: 'DEFAULT:!aNULL:!eNULL:!LOW:!EXPORT:!SSLv2:!MD5', - }); - - var requestEvent = utils.removeEmpty({ - method: method, - path: path, - }); - - var requestRetries = numRetries || 0; - - req._requestEvent = requestEvent; - - req._requestStart = Date.now(); - - self._telnyx._emitter.emit('request', requestEvent); - - req.setTimeout(timeout, self._timeoutHandler(timeout, req, callback)); - - req.on('response', function (res) { - if (self._shouldRetry(res, requestRetries)) { - return retryRequest(makeRequest, headers, requestRetries); - } else { - return self._responseHandler(req, callback)(res); - } - }); - - req.on('error', function (error) { - if (self._shouldRetry(null, requestRetries)) { - return retryRequest(makeRequest, headers, requestRetries); - } else { - return self._errorHandler(req, requestRetries, callback)(error); - } - }); - - req.on('socket', function (socket) { - if (socket.connecting) { - socket.on( - isInsecureConnection ? 'connect' : 'secureConnect', - function () { - // Send payload; we're safe: - req.write(requestData); - req.end(); - } - ); - } else { - // we're already connected - req.write(requestData); - req.end(); - } - }); - } - }, -}; - -module.exports = TelnyxResource; diff --git a/lib/Webhooks.js b/lib/Webhooks.js deleted file mode 100644 index 5a3ef13..0000000 --- a/lib/Webhooks.js +++ /dev/null @@ -1,72 +0,0 @@ -'use strict'; - -var Buffer = require('safe-buffer').Buffer; -var nacl = require('tweetnacl'); - -var Error = require('./Error'); - -var Webhook = { - DEFAULT_TOLERANCE: 300, // 5 minutes - - constructEvent: function(payload, signatureHeader, timestampHeader, publicKey, tolerance) { - this.signature.verifySignature(payload, signatureHeader, timestampHeader, publicKey, tolerance || Webhook.DEFAULT_TOLERANCE); - - var jsonPayload = JSON.parse(payload); - return jsonPayload; - }, -}; - -var signature = { - verifySignature: function(payload, signatureHeader = '', timestampHeader = '', publicKey, tolerance) { - payload = Buffer.isBuffer(payload) ? payload.toString('utf8') : payload; - timestampHeader = Buffer.isBuffer(timestampHeader) ? timestampHeader.toString('utf8') : timestampHeader; - - var payloadBuffer = Buffer.from(`${timestampHeader}|${payload}`, 'utf8'); - - var verification; - - try { - verification = nacl.sign.detached.verify( - payloadBuffer, - Buffer.from(signatureHeader, 'base64'), - Buffer.from(publicKey, 'base64') - ); - } catch (err) { - throwSignatureVerificationError(payload, signatureHeader, timestampHeader); - } - - if (!verification) { - throwSignatureVerificationError(payload, signatureHeader, timestampHeader); - } - - var timestampAge = Math.floor(Date.now() / 1000) - parseInt(timestampHeader, 10); - - if (tolerance > 0 && timestampAge > tolerance) { - throw new Error.TelnyxSignatureVerificationError({ - message: 'Timestamp outside the tolerance zone', - detail: { - signatureHeader: signatureHeader, - timestampHeader: timestampHeader, - payload: payload, - }, - }); - } - - return true; - }, -}; - -function throwSignatureVerificationError(payload, signatureHeader, timestampHeader) { - throw new Error.TelnyxSignatureVerificationError({ - message: 'Signature is invalid and does not match the payload', - detail: { - signatureHeader: signatureHeader, - timestampHeader: timestampHeader, - payload: payload, - }, - }); -} - -Webhook.signature = signature; - -module.exports = Webhook; diff --git a/lib/autoPagination.js b/lib/autoPagination.js deleted file mode 100644 index a9590e0..0000000 --- a/lib/autoPagination.js +++ /dev/null @@ -1,231 +0,0 @@ -'use strict'; - -var makeRequest = require('./makeRequest'); -var utils = require('./utils'); - -function makeAutoPaginationMethods(self, requestArgs, spec, firstPagePromise) { - var promiseCache = {currentPromise: null}; - var listPromise = firstPagePromise; - var i = 0; - - function iterate(listResult) { - if (!(listResult && listResult.data && typeof listResult.data.length === 'number')) { - throw Error('Unexpected: Telnyx API response does not have a well-formed `data` array.'); - } - - if (i < listResult.data.length) { - var value = listResult.data[i]; - i += 1; - return {value: value, done: false}; - } else if (hasMore(listResult)) { - // Reset counter, request next page, and recurse. - i = 0; - var nextPageNumber = getNextPageNumber(listResult); - var pageSize = getPageSize(listResult); - listPromise = makeRequest(self, requestArgs, spec, {page: {number: nextPageNumber, size: pageSize}}); - return listPromise.then(iterate); - } - return {value: undefined, done: true}; - } - - function hasMore(listResult) { - return listResult.data.length && listResult.meta.page_number && listResult.meta.total_pages && listResult.meta.total_pages > listResult.meta.page_number; - } - - function getNextPageNumber(listResult) { - return listResult.meta.page_number + 1; - } - - function getPageSize(listResult) { - return listResult.meta.page_size; - } - - // function getNextPageToken(listResult) { - // return listResult.meta.next_page_token; - // } - - function asyncIteratorNext() { - return memoizedPromise(promiseCache, function(resolve, reject) { - return listPromise - .then(iterate) - .then(resolve) - .catch(reject); - }); - } - - var autoPagingEach = makeAutoPagingEach(asyncIteratorNext); - var autoPagingToArray = makeAutoPagingToArray(autoPagingEach); - - var autoPaginationMethods = { - autoPagingEach: autoPagingEach, - autoPagingToArray: autoPagingToArray, - - // Async iterator functions: - next: asyncIteratorNext, - return: function() { - // This is required for `break`. - return {}; - }, - [getAsyncIteratorSymbol()]: function() { - return autoPaginationMethods; - } - }; - return autoPaginationMethods; -} - -module.exports.makeAutoPaginationMethods = makeAutoPaginationMethods; - -/** - * ---------------- - * Private Helpers: - * ---------------- - */ - -function getAsyncIteratorSymbol() { - if (typeof Symbol !== 'undefined' && Symbol.asyncIterator) { - return Symbol.asyncIterator; - } - // Follow the convention from libraries like iterall: https://github.com/leebyron/iterall#asynciterator-1 - return '@@asyncIterator'; -} - -function getDoneCallback(args) { - if (args.length < 2) { - return undefined; - } - var onDone = args[1]; - if (typeof onDone !== 'function') { - throw Error('The second argument to autoPagingEach, if present, must be a callback function; receieved ' + typeof onDone); - } - return onDone; -} - -/** - * We allow four forms of the `onItem` callback (the middle two being equivalent), - * - * 1. `.autoPagingEach((item) => { doSomething(item); return false; });` - * 2. `.autoPagingEach(async (item) => { await doSomething(item); return false; });` - * 3. `.autoPagingEach((item) => doSomething(item).then(() => false));` - * 4. `.autoPagingEach((item, next) => { doSomething(item); next(false); });` - * - * In addition to standard validation, this helper - * coalesces the former forms into the latter form. - */ -function getItemCallback(args) { - if (args.length === 0) { - return undefined; - } - var onItem = args[0]; - if (typeof onItem !== 'function') { - throw Error('The first argument to autoPagingEach, if present, must be a callback function; receieved ' + typeof onItem); - } - - // 4. `.autoPagingEach((item, next) => { doSomething(item); next(false); });` - if (onItem.length === 2) { - return onItem; - } - - if (onItem.length > 2) { - throw Error('The `onItem` callback function passed to autoPagingEach must accept at most two arguments; got ' + onItem); - } - - // This magically handles all three of these usecases (the latter two being functionally identical): - // 1. `.autoPagingEach((item) => { doSomething(item); return false; });` - // 2. `.autoPagingEach(async (item) => { await doSomething(item); return false; });` - // 3. `.autoPagingEach((item) => doSomething(item).then(() => false));` - return function _onItem(item, next) { - var shouldContinue = onItem(item); - next(shouldContinue); - }; -} - -// function getLastId(listResult) { -// var lastIdx = listResult.data.length - 1; -// var lastItem = listResult.data[lastIdx]; -// var lastId = lastItem && lastItem.id; -// if (!lastId) { -// throw Error('Unexpected: No `id` found on the last item while auto-paging a list.'); -// } -// return lastId; -// } - -/** - * If a user calls `.next()` multiple times in parallel, - * return the same result until something has resolved - * to prevent page-turning race conditions. - */ -function memoizedPromise(promiseCache, cb) { - if (promiseCache.currentPromise) { - return promiseCache.currentPromise; - } - promiseCache.currentPromise = new Promise(cb).then(function(ret) { - promiseCache.currentPromise = undefined; - return ret; - }); - return promiseCache.currentPromise; -} - -function makeAutoPagingEach(asyncIteratorNext) { - return function autoPagingEach(/* onItem?, onDone? */) { - var args = [].slice.call(arguments); - var onItem = getItemCallback(args); - var onDone = getDoneCallback(args); - if (args.length > 2) { - throw Error('autoPagingEach takes up to two arguments; received:', args); - } - - var autoPagePromise = wrapAsyncIteratorWithCallback(asyncIteratorNext, onItem); - return utils.callbackifyPromiseWithTimeout(autoPagePromise, onDone); - } -} - -function makeAutoPagingToArray(autoPagingEach) { - return function autoPagingToArray(opts, onDone) { - var limit = opts && opts.limit; - if (!limit) { - throw Error('You must pass a `limit` option to autoPagingToArray, eg; `autoPagingToArray({limit: 1000});`.'); - } - if (limit > 10000) { - throw Error('You cannot specify a limit of more than 10,000 items to fetch in `autoPagingToArray`; use `autoPagingEach` to iterate through longer lists.'); - } - var promise = new Promise(function(resolve, reject) { - var items = []; - autoPagingEach(function(item) { - items.push(item); - if (items.length >= limit) { - return false; - } - }).then(function() { - resolve(items); - }).catch(reject); - }); - return utils.callbackifyPromiseWithTimeout(promise, onDone); - } -} - -function wrapAsyncIteratorWithCallback(asyncIteratorNext, onItem) { - return new Promise(function(resolve, reject) { - function handleIteration(iterResult) { - if (iterResult.done) { - resolve(); - return; - } - - var item = iterResult.value; - return new Promise(function(next) { - // Bit confusing, perhaps; we pass a `resolve` fn - // to the user, so they can decide when and if to continue. - // They can return false, or a promise which resolves to false, to break. - onItem(item, next); - }).then(function(shouldContinue) { - if (shouldContinue === false) { - return handleIteration({done: true}); - } else { - return asyncIteratorNext().then(handleIteration); - } - }); - } - - asyncIteratorNext().then(handleIteration).catch(reject); - }); -} diff --git a/lib/makeRequest.js b/lib/makeRequest.js deleted file mode 100644 index b891699..0000000 --- a/lib/makeRequest.js +++ /dev/null @@ -1,144 +0,0 @@ -'use strict'; - -var utils = require('./utils'); -var OPTIONAL_REGEX = /^optional!/; - -function getRequestOpts(self, requestArgs, spec, overrideData) { - // Extract spec values with defaults. - var commandPath = - typeof spec.path == 'function' - ? spec.path - : utils.makeURLInterpolator(spec.path || ''); - var requestMethod = (spec.method || 'GET').toUpperCase(); - var urlParams = spec.urlParams || []; - var encode = - spec.encode || - function (data) { - return data; - }; - var host = spec.host; - - // Don't mutate args externally. - var args = [].slice.call(requestArgs); - - // Generate and validate url params. - var urlData = self.createUrlData(); - for (var i = 0, l = urlParams.length; i < l; ++i) { - var path; - - // Note that we shift the args array after every iteration so this just - // grabs the "next" argument for use as a URL parameter. - var arg = args[0]; - - var param = urlParams[i]; - - var isOptional = OPTIONAL_REGEX.test(param); - param = param.replace(OPTIONAL_REGEX, ''); - - if (param == 'id' && typeof arg !== 'string') { - path = self.createResourcePathWithSymbols(spec.path); - throw new Error( - 'Telnyx: "id" must be a string, but got: ' + - typeof arg + - ' (on API request to `' + - requestMethod + - ' ' + - path + - '`)' - ); - } - - if (!arg) { - if (isOptional) { - urlData[param] = ''; - continue; - } - - path = self.createResourcePathWithSymbols(spec.path); - throw new Error( - 'Telnyx: Argument "' + - urlParams[i] + - '" required, but got: ' + - arg + - ' (on API request to `' + - requestMethod + - ' ' + - path + - '`)' - ); - } - - urlData[param] = args.shift(); - } - - // Pull request data and options (headers, auth) from args. - var dataFromArgs = utils.getDataFromArgs(args); - var data = encode(Object.assign({}, dataFromArgs, overrideData)); - var options = utils.getOptionsFromArgs(args); - - // Validate that there are no more args. - if (args.length) { - path = self.createResourcePathWithSymbols(spec.path); - throw new Error( - 'Telnyx: Unknown arguments (' + - args + - '). Did you mean to pass an options ' + - 'object? (on API request to ' + - requestMethod + - ' `' + - path + - '`)' - ); - } - - var requestPath = self.createFullPath(commandPath, urlData); - var headers = Object.assign(options.headers, spec.headers); - - if (spec.validator) { - spec.validator(data, {headers: headers}); - } - - return { - requestMethod: requestMethod, - requestPath: requestPath, - data: data, - auth: options.auth, - headers: headers, - host: host, - }; -} - -function makeRequest(self, requestArgs, spec, overrideData) { - return new Promise(function (resolve, reject) { - try { - var opts = getRequestOpts(self, requestArgs, spec, overrideData); - } catch (err) { - reject(err); - return; - } - - function requestCallback(err, response) { - if (err) { - reject(err); - } else { - resolve( - spec.transformResponseData && response.data - ? spec.transformResponseData(response, self._telnyx) - : response - ); - } - } - - self._request( - opts.requestMethod, - opts.host, - opts.requestPath, - opts.data, - opts.auth, - {headers: opts.headers}, - requestCallback - ); - }); -} - -module.exports = makeRequest; diff --git a/lib/resources/AI.js b/lib/resources/AI.js deleted file mode 100644 index 053c413..0000000 --- a/lib/resources/AI.js +++ /dev/null @@ -1,45 +0,0 @@ -'use strict'; - -const TelnyxResource = require('../TelnyxResource'); -const telnyxMethod = TelnyxResource.method; - -module.exports = TelnyxResource.extend({ - path: 'public_endpoints', - includeBasic: ['list','retrieve','create','delete'], - - GetEmbeddingTask: telnyxMethod({ - method: 'GET', - path: '/ai/embeddings/{task/id}', - urlParams: ['task_id'], - }), - PostEmbedding: telnyxMethod({ - method: 'POST', - path: '/ai/embeddings', - }), - embedding_bucket_files_public_embedding_buckets__bucket_name__delete: telnyxMethod({ - method: 'DELETE', - path: '/ai/embeddings_buckets/{bucket_name}', - urlParams: ['bucket_name'], - }), - PostInferenceStream: telnyxMethod({ - method: 'POST', - path: '/ai/generate/stream', - }), - PostInference: telnyxMethod({ - method: 'POST', - path: '/ai/generate', - }), - PostSummary: telnyxMethod({ - method: 'POST', - path: '/ai/summarize', - }), - PostEmbeddingSimilaritySearch: telnyxMethod({ - method: 'POST', - path: '/ai/embeddings/similarity-search', - }), - GetEmbeddingBuckets: telnyxMethod({ - method: 'GET', - path: '/ai/embeddings_buckets', - }), - -}); diff --git a/lib/resources/AccessIpAddress.js b/lib/resources/AccessIpAddress.js deleted file mode 100644 index 400273c..0000000 --- a/lib/resources/AccessIpAddress.js +++ /dev/null @@ -1,6 +0,0 @@ -'use strict'; - -module.exports = require('../TelnyxResource').extend({ - path: 'access_ip_address', - includeBasic: ['list', 'create', 'retrieve', 'del'], -}); diff --git a/lib/resources/AccessIpRanges.js b/lib/resources/AccessIpRanges.js deleted file mode 100644 index e981df8..0000000 --- a/lib/resources/AccessIpRanges.js +++ /dev/null @@ -1,6 +0,0 @@ -'use strict'; - -module.exports = require('../TelnyxResource').extend({ - path: 'access_ip_ranges', - includeBasic: ['list', 'create', 'retrieve', 'del'], -}); diff --git a/lib/resources/AccessTokens.js b/lib/resources/AccessTokens.js deleted file mode 100644 index 7afaaea..0000000 --- a/lib/resources/AccessTokens.js +++ /dev/null @@ -1,6 +0,0 @@ -'use strict'; - -module.exports = require('../TelnyxResource').extend({ - path: 'access_ip_ranges', - includeBasic: ['create'], -}); diff --git a/lib/resources/Actions.js b/lib/resources/Actions.js deleted file mode 100644 index 01fe726..0000000 --- a/lib/resources/Actions.js +++ /dev/null @@ -1,9 +0,0 @@ -'use strict'; - -module.exports = require('../TelnyxResource').extend({ - path: 'actions', - - nestedResources: { - SimCards: require('./ActionsSimCards') - }, -}); diff --git a/lib/resources/ActionsSimCards.js b/lib/resources/ActionsSimCards.js deleted file mode 100644 index ed4ce4b..0000000 --- a/lib/resources/ActionsSimCards.js +++ /dev/null @@ -1,18 +0,0 @@ -'use strict'; - -var TelnyxResource = require('../TelnyxResource'); -var telnyxMethod = TelnyxResource.method; - -module.exports = TelnyxResource.extend({ - path: 'actions', - - register: telnyxMethod({ - method: 'POST', - path: '/register/sim_cards', - }), - - bulkNetworkPreferences: telnyxMethod({ - method: 'PUT', - path: '/network_preferences/sim_cards', - }), -}); diff --git a/lib/resources/ActivateDeactivateBulkCredentials.js b/lib/resources/ActivateDeactivateBulkCredentials.js deleted file mode 100644 index b3b43e3..0000000 --- a/lib/resources/ActivateDeactivateBulkCredentials.js +++ /dev/null @@ -1,20 +0,0 @@ -'use strict'; - -var TelnyxResource = require('../TelnyxResource'); -var utils = require('../utils'); -var telnyxMethod = TelnyxResource.method; - -function transformResponseData(response, telnyx) { - return utils.addResourceToResponseData(response, telnyx, 'actions', {}); -} - -module.exports = TelnyxResource.extend({ - path: 'actions', - - create: telnyxMethod({ - method: 'POST', - path: '/{action}/telephony_credentials', - urlParams: ['action'], - transformResponseData: transformResponseData, - }), -}); diff --git a/lib/resources/Addresses.js b/lib/resources/Addresses.js deleted file mode 100644 index 10ef588..0000000 --- a/lib/resources/Addresses.js +++ /dev/null @@ -1,47 +0,0 @@ -'use strict'; - -var TelnyxResource = require('../TelnyxResource'); -var utils = require('../utils'); -var telnyxMethod = TelnyxResource.method; - -function transformResponseData(response, telnyx) { - return utils.addResourceToResponseData(response, telnyx, 'addresses', { - del: telnyxMethod({ - method: 'DELETE', - path: '/{addressId}', - urlParams: ['addressId'], - paramsValues: [response.data.id], - paramsNames: ['id'], - }), - }); -} - -module.exports = TelnyxResource.extend({ - path: 'account/addresses', - - list: telnyxMethod({ - method: 'GET', - methodType: 'list', - - transformResponseData: transformResponseData, - }), - - create: telnyxMethod({ - method: 'POST', - - transformResponseData: transformResponseData, - }), - - retrieve: telnyxMethod({ - method: 'GET', - path: '/{id}', - urlParams: ['id'], - - transformResponseData: transformResponseData, - }), - - validate: telnyxMethod({ - method: 'POST', - path: '/actions/validate', - }), -}); diff --git a/lib/resources/AdvancedOptinoptout.js b/lib/resources/AdvancedOptinoptout.js deleted file mode 100644 index ccc7ecc..0000000 --- a/lib/resources/AdvancedOptinoptout.js +++ /dev/null @@ -1,21 +0,0 @@ -'use strict'; - -const TelnyxResource = require('../TelnyxResource'); -const telnyxMethod = TelnyxResource.method; - -module.exports = TelnyxResource.extend({ - path: 'advanced_optinoptout', - includeBasic: ['delete','list','retrieve'], - - DeleteAutorespConfig: telnyxMethod({ - method: 'DELETE', - path: '/messaging_profiles/{profile_id}/autoresp_configs/{autoresp_cfg_id}', - urlParams: ['profile_id', 'autoresp_cfg_id'], - }), - GetAutorespConfigs: telnyxMethod({ - method: 'GET', - path: '/messaging_profiles/{profile/id}/autoresp_configs', - urlParams: ['profile_id'], - }), - -}); diff --git a/lib/resources/AuthenticationProviders.js b/lib/resources/AuthenticationProviders.js deleted file mode 100644 index 84619e9..0000000 --- a/lib/resources/AuthenticationProviders.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict'; - -var TelnyxResource = require('../TelnyxResource'); - -module.exports = TelnyxResource.extend({ - path: 'authentication_providers', - includeBasic: ['list', 'create', 'retrieve', 'update', 'del'], -}); diff --git a/lib/resources/Autorechargepreferences.js b/lib/resources/Autorechargepreferences.js deleted file mode 100644 index 1ec539b..0000000 --- a/lib/resources/Autorechargepreferences.js +++ /dev/null @@ -1,15 +0,0 @@ -'use strict'; - -const TelnyxResource = require('../TelnyxResource'); -const telnyxMethod = TelnyxResource.method; - -module.exports = TelnyxResource.extend({ - path: 'autorechargepreferences', - includeBasic: ['list','retrieve'], - - GetAutoRechargePrefs: telnyxMethod({ - method: 'GET', - path: '/payment/auto/recharge/prefs', - }), - -}); diff --git a/lib/resources/AvailablePhoneNumbers.js b/lib/resources/AvailablePhoneNumbers.js deleted file mode 100644 index 725f8a7..0000000 --- a/lib/resources/AvailablePhoneNumbers.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict'; - -module.exports = require('../TelnyxResource').extend({ - path: 'available_phone_numbers', - includeBasic: ['list', 'retrieve'], -}); - diff --git a/lib/resources/Balance.js b/lib/resources/Balance.js deleted file mode 100644 index f8db2c9..0000000 --- a/lib/resources/Balance.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict'; - -var TelnyxResource = require('../TelnyxResource'); - -module.exports = TelnyxResource.extend({ - path: 'balance', - - retrieve: TelnyxResource.method({ - method: 'GET', - }) -}); diff --git a/lib/resources/Billing.js b/lib/resources/Billing.js deleted file mode 100644 index 6052607..0000000 --- a/lib/resources/Billing.js +++ /dev/null @@ -1,15 +0,0 @@ -'use strict'; - -const TelnyxResource = require('../TelnyxResource'); -const telnyxMethod = TelnyxResource.method; - -module.exports = TelnyxResource.extend({ - path: 'billing', - includeBasic: ['list','retrieve'], - - GetUserBalance: telnyxMethod({ - method: 'GET', - path: '/balance', - }), - -}); diff --git a/lib/resources/BillingGroups.js b/lib/resources/BillingGroups.js deleted file mode 100644 index ef59466..0000000 --- a/lib/resources/BillingGroups.js +++ /dev/null @@ -1,6 +0,0 @@ -'use strict'; - -module.exports = require('../TelnyxResource').extend({ - path: 'billing_groups', - includeBasic: ['list', 'create', 'retrieve', 'del', 'update'], -}); diff --git a/lib/resources/Brands.js b/lib/resources/Brands.js deleted file mode 100644 index 3880ca2..0000000 --- a/lib/resources/Brands.js +++ /dev/null @@ -1,36 +0,0 @@ -'use strict'; - -const TelnyxResource = require('../TelnyxResource'); -const telnyxMethod = TelnyxResource.method; - -module.exports = TelnyxResource.extend({ - path: 'brand', - basePath: '/10dlc/', - includeBasic: ['create', 'list','retrieve','update','delete'], - - ListExternalVettings: telnyxMethod({ - method: 'GET', - path: '/brand/{brandId}/externalVetting', - urlParams: ['brandId'], - }), - GetBrands: telnyxMethod({ - method: 'GET', - path: '/brand', - }), - RevetBrand: telnyxMethod({ - method: 'PUT', - path: '/brand/{brandId}/revet', - urlParams: ['brandId'], - }), - DeleteBrand: telnyxMethod({ - method: 'DELETE', - path: '/brand/{brandId}', - urlParams: ['brandId'], - }), - GetBrandFeedbackById: telnyxMethod({ - method: 'GET', - path: '/brand/feedback/{brandId}', - urlParams: ['brandId'], - }), - -}); diff --git a/lib/resources/Bucket.js b/lib/resources/Bucket.js deleted file mode 100644 index 2f73db7..0000000 --- a/lib/resources/Bucket.js +++ /dev/null @@ -1,16 +0,0 @@ -'use strict'; - -const TelnyxResource = require('../TelnyxResource'); -const telnyxMethod = TelnyxResource.method; - -module.exports = TelnyxResource.extend({ - path: 'bucket', - includeBasic: ['delete'], - - DeleteBucket: telnyxMethod({ - method: 'DELETE', - path: '/{bucketName}', - urlParams: ['bucketName'], - }), - -}); diff --git a/lib/resources/BucketUsage.js b/lib/resources/BucketUsage.js deleted file mode 100644 index d6ef767..0000000 --- a/lib/resources/BucketUsage.js +++ /dev/null @@ -1,21 +0,0 @@ -'use strict'; - -const TelnyxResource = require('../TelnyxResource'); -const telnyxMethod = TelnyxResource.method; - -module.exports = TelnyxResource.extend({ - path: 'bucket_usage', - includeBasic: ['list','retrieve'], - - GetBucketSnapshot: telnyxMethod({ - method: 'GET', - path: '/storage/buckets/{bucketName}/snapshot', - urlParams: ['bucketName'], - }), - GetBucketUsage: telnyxMethod({ - method: 'GET', - path: '/storage/buckets/{bucketName}/usage', - urlParams: ['bucketName'], - }), - -}); diff --git a/lib/resources/BulkCreation.js b/lib/resources/BulkCreation.js deleted file mode 100644 index 7d3aa9d..0000000 --- a/lib/resources/BulkCreation.js +++ /dev/null @@ -1,52 +0,0 @@ -'use strict'; - -var TelnyxResource = require('../TelnyxResource'); -var utils = require('../utils'); -var telnyxMethod = TelnyxResource.method; - -function transformResponseData(response, telnyx) { - return utils.addResourceToResponseData(response, telnyx, 'bulkCreation', { - del: telnyxMethod({ - method: 'DELETE', - path: '/bulkCreation', - urlParams: ['bulkCreation'], - paramsValues: [response.data.id], - paramsNames: ['id'], - }), - - update: telnyxMethod({ - method: 'PATCH', - path: '/bulkCreation', - urlParams: ['bulkCreation'], - paramsValues: [response.data.id], - paramsNames: ['id'], - }), - }); -} - -module.exports = TelnyxResource.extend({ - path: 'bulkCreation', - list: telnyxMethod({ - method: 'GET', - transformResponseData: transformResponseData, - }), - create: telnyxMethod({ - method: 'POST', - transformResponseData: transformResponseData, - }), - - retrieveTaskStatus: telnyxMethod({ - method: 'GET', - path: '/{taskId}', - urlParams: ['taskId'], - - transformResponseData: transformResponseData, - }), - retrieveDetailedTaskStatus: telnyxMethod({ - method: 'GET', - path: '/{taskId}/detailedStatus', - urlParams: ['taskId'], - - transformResponseData: transformResponseData, - }), -}); diff --git a/lib/resources/BulkCredentials.js b/lib/resources/BulkCredentials.js deleted file mode 100644 index 89417b8..0000000 --- a/lib/resources/BulkCredentials.js +++ /dev/null @@ -1,20 +0,0 @@ -'use strict'; - -const TelnyxResource = require('../TelnyxResource'); -const telnyxMethod = TelnyxResource.method; - -module.exports = TelnyxResource.extend({ - path: 'bulk_credentials', - includeBasic: ['create','delete'], - - BulkCredentialAction: telnyxMethod({ - method: 'POST', - path: '/actions/{action}/telephony_credentials', - urlParams: ['action'], - }), - DeleteTelephonyCredentials: telnyxMethod({ - method: 'DELETE', - path: '/actions/bulk/telephony_credentials', - }), - -}); diff --git a/lib/resources/BulkPhoneNumberCampaigns.js b/lib/resources/BulkPhoneNumberCampaigns.js deleted file mode 100644 index fcc19dd..0000000 --- a/lib/resources/BulkPhoneNumberCampaigns.js +++ /dev/null @@ -1,25 +0,0 @@ -'use strict'; - -const TelnyxResource = require('../TelnyxResource'); -const telnyxMethod = TelnyxResource.method; - -module.exports = TelnyxResource.extend({ - path: 'bulk_phone_number_campaigns', - includeBasic: ['list','retrieve','create'], - - GetPhoneNumberStatus: telnyxMethod({ - method: 'GET', - path: '/phoneNumberAssignmentByProfile/{taskId}/phoneNumbers', - urlParams: ['taskId'], - }), - GetAssignmentTaskStatus: telnyxMethod({ - method: 'GET', - path: '/phoneNumberAssignmentByProfile/{taskId}', - urlParams: ['taskId'], - }), - PostAssignMessagingProfileToCampaign: telnyxMethod({ - method: 'POST', - path: '/phoneNumberAssignmentByProfile', - }), - -}); diff --git a/lib/resources/BulkPhoneNumberOperations.js b/lib/resources/BulkPhoneNumberOperations.js deleted file mode 100644 index a11d1b0..0000000 --- a/lib/resources/BulkPhoneNumberOperations.js +++ /dev/null @@ -1,32 +0,0 @@ -'use strict'; - -const TelnyxResource = require('../TelnyxResource'); -const telnyxMethod = TelnyxResource.method; - -module.exports = TelnyxResource.extend({ - path: 'bulk_phone_number_operations', - includeBasic: ['list','retrieve','create'], - - RetrievePhoneNumbersJob: telnyxMethod({ - method: 'GET', - path: '/phone_numbers_jobs/{id}', - urlParams: ['id'], - }), - CreateUpdatePhoneNumbersJob: telnyxMethod({ - method: 'POST', - path: '/phone_numbers_jobs/update/phone_numbers', - }), - ListPhoneNumbersJobs: telnyxMethod({ - method: 'GET', - path: '/phone_numbers_jobs', - }), - CreateDeletePhoneNumbersJob: telnyxMethod({ - method: 'POST', - path: '/phone_numbers_jobs/delete/phone_numbers', - }), - CreatePhoneNumbersJobUpdateEmergencySettings: telnyxMethod({ - method: 'POST', - path: '/phone_numbers_jobs/update/emergency_settings', - }), - -}); diff --git a/lib/resources/BulkSoleProprietorCreation.js b/lib/resources/BulkSoleProprietorCreation.js deleted file mode 100644 index a18bc4c..0000000 --- a/lib/resources/BulkSoleProprietorCreation.js +++ /dev/null @@ -1,25 +0,0 @@ -'use strict'; - -const TelnyxResource = require('../TelnyxResource'); -const telnyxMethod = TelnyxResource.method; - -module.exports = TelnyxResource.extend({ - path: 'bulk_sole_proprietor_creation', - includeBasic: ['list','retrieve'], - - GetBulkCreationTaskStatus: telnyxMethod({ - method: 'GET', - path: '/bulkCreation/{taskId}', - urlParams: ['taskId'], - }), - GetAllTasks: telnyxMethod({ - method: 'GET', - path: '/bulkCreation', - }), - GetTaskDetailedStatus: telnyxMethod({ - method: 'GET', - path: '/bulkCreation/{taskId}/detailedStatus', - urlParams: ['taskId'], - }), - -}); diff --git a/lib/resources/BulkTelephonyCredentials.js b/lib/resources/BulkTelephonyCredentials.js deleted file mode 100644 index 2dc70c1..0000000 --- a/lib/resources/BulkTelephonyCredentials.js +++ /dev/null @@ -1,46 +0,0 @@ -'use strict'; - -var TelnyxResource = require('../TelnyxResource'); -var utils = require('../utils'); -var telnyxMethod = TelnyxResource.method; - -function transformResponseData(response, telnyx) { - return utils.addResourceToResponseData( - response, - telnyx, - 'bulkTelephonyCredentials', - { - del: telnyxMethod({ - method: 'DELETE', - path: 'actions/bulk/telephony_credentials', - urlParams: ['bulkTelephonyCredentials'], - paramsValues: [response.data.id], - paramsNames: ['id'], - }), - - update: telnyxMethod({ - method: 'PATCH', - path: 'actions/bulk/telephony_credentials', - urlParams: ['bulkTelephonyCredentials'], - paramsValues: [response.data.id], - paramsNames: ['id'], - }), - } - ); -} - -module.exports = TelnyxResource.extend({ - path: 'actions/bulk/telephony_credentials', - updateCredentials: telnyxMethod({ - method: 'PATCH', - transformResponseData: transformResponseData, - }), - deleteCredentials: telnyxMethod({ - method: 'DELETE', - transformResponseData: transformResponseData, - }), - create: telnyxMethod({ - method: 'POST', - transformResponseData: transformResponseData, - }), -}); diff --git a/lib/resources/BusinessIdentity.js b/lib/resources/BusinessIdentity.js deleted file mode 100644 index 38ae2eb..0000000 --- a/lib/resources/BusinessIdentity.js +++ /dev/null @@ -1,20 +0,0 @@ -'use strict'; - -const TelnyxResource = require('../TelnyxResource'); -const telnyxMethod = TelnyxResource.method; - -module.exports = TelnyxResource.extend({ - path: 'business_identity', - includeBasic: ['list','retrieve','delete'], - - ListBusinessIdentities: telnyxMethod({ - method: 'GET', - path: '/business/identities', - }), - DeleteBusinessIdentity: telnyxMethod({ - method: 'DELETE', - path: '/business/identities/{id}', - urlParams: ['id'], - }), - -}); diff --git a/lib/resources/CallControlApplications.js b/lib/resources/CallControlApplications.js deleted file mode 100644 index 8e72196..0000000 --- a/lib/resources/CallControlApplications.js +++ /dev/null @@ -1,54 +0,0 @@ -'use strict'; - -var TelnyxResource = require('../TelnyxResource'); -var utils = require('../utils'); -var telnyxMethod = TelnyxResource.method; - -function transformResponseData(response, telnyx) { - return utils.addResourceToResponseData( - response, - telnyx, - 'callControlApplications', - { - del: telnyxMethod({ - method: 'DELETE', - path: '/{callControlId}', - urlParams: ['callControlId'], - paramsValues: [response.data.id], - paramsNames: ['id'], - }), - - update: telnyxMethod({ - method: 'PATCH', - path: '/{callControlId}', - urlParams: ['callControlId'], - paramsValues: [response.data.id], - paramsNames: ['id'], - }), - } - ); -} - -module.exports = require('../TelnyxResource').extend({ - path: 'call_control_applications', - - list: telnyxMethod({ - method: 'GET', - methodType: 'list', - - transformResponseData: transformResponseData, - }), - - create: telnyxMethod({ - method: 'POST', - transformResponseData: transformResponseData, - }), - - retrieve: telnyxMethod({ - method: 'GET', - path: '/{id}', - urlParams: ['id'], - - transformResponseData: transformResponseData, - }), -}); diff --git a/lib/resources/CallEvents.js b/lib/resources/CallEvents.js deleted file mode 100644 index 3f46ff9..0000000 --- a/lib/resources/CallEvents.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict'; - -module.exports = require('../TelnyxResource').extend({ - path: 'call_events', - includeBasic: ['list'], -}); - diff --git a/lib/resources/CallInformation.js b/lib/resources/CallInformation.js deleted file mode 100644 index 92c54dd..0000000 --- a/lib/resources/CallInformation.js +++ /dev/null @@ -1,15 +0,0 @@ -'use strict'; - -const TelnyxResource = require('../TelnyxResource'); -const telnyxMethod = TelnyxResource.method; - -module.exports = TelnyxResource.extend({ - path: 'call_information', - includeBasic: ['list','retrieve'], - - ListConnectionActiveCalls: telnyxMethod({ - method: 'GET', - path: '/connections/{connection/id}/active_calls', - }), - -}); diff --git a/lib/resources/CallRecordings.js b/lib/resources/CallRecordings.js deleted file mode 100644 index 1ba807a..0000000 --- a/lib/resources/CallRecordings.js +++ /dev/null @@ -1,27 +0,0 @@ -'use strict'; - -const TelnyxResource = require('../TelnyxResource'); -const telnyxMethod = TelnyxResource.method; - -module.exports = TelnyxResource.extend({ - path: 'recordings', - includeBasic: ['list', 'retrieve', 'del'], - - GetRecordings: telnyxMethod({ - method: 'GET', - path: '/recordings', - }), - DeleteRecording: telnyxMethod({ - method: 'DELETE', - path: '/recordings/{recording/id}', - }), - DeleteRecordings: telnyxMethod({ - method: 'DELETE', - path: '/recordings/actions/delete', - }), - DeleteCustomStorageCredentials: telnyxMethod({ - method: 'DELETE', - path: '/custom/storage/credentials/{connection/id}', - }), - -}); diff --git a/lib/resources/Calls.js b/lib/resources/Calls.js deleted file mode 100644 index d4db6df..0000000 --- a/lib/resources/Calls.js +++ /dev/null @@ -1,73 +0,0 @@ -'use strict'; - -var TelnyxResource = require('../TelnyxResource'); -var utils = require('../utils'); -var telnyxMethod = TelnyxResource.method; - -var CALL_COMMANDS = [ - 'answer', - 'reject', - 'hangup', - 'bridge', - 'speak', - 'fork_start', - 'fork_stop', - 'gather', - 'gather_using_audio', - 'gather_using_speak', - 'gather_stop', - 'playback_start', - 'playback_stop', - 'record_start', - 'record_stop', - 'record_pause', - 'record_resume', - 'refer', - 'send_dtmf', - 'streaming_start', - 'streaming_stop', - 'suppression_start', - 'suppression_stop', - 'transfer', - 'transcription_start', - 'transcription_stop', - 'enqueue', - 'leave_queue' -]; - -function getSpec(callControlId) { - return function(methodName) { - return { - method: 'POST', - path: `/{call_control_id}/actions/${methodName}`, - urlParams: ['call_control_id'], - paramsValues: [callControlId], - paramsNames: ['call_control_id'], - methodType: 'create', - } - } -} - -module.exports = require('../TelnyxResource').extend({ - path: 'calls', - includeBasic: ['retrieve'], // status method - - create: telnyxMethod({ // dial method - method: 'POST', - - transformResponseData: function(response, telnyx) { - return utils.addResourceToResponseData( - response, - telnyx, - 'calls', - utils.createNestedMethods( - telnyxMethod, - CALL_COMMANDS, - getSpec(response.data.call_control_id) - ) - ); - }, - }), - - instanceMethods: utils.createNestedMethods(telnyxMethod, CALL_COMMANDS, getSpec()) -}); diff --git a/lib/resources/Campaign.js b/lib/resources/Campaign.js deleted file mode 100644 index b973140..0000000 --- a/lib/resources/Campaign.js +++ /dev/null @@ -1,84 +0,0 @@ -'use strict'; - -var TelnyxResource = require('../TelnyxResource'); -var utils = require('../utils'); -var telnyxMethod = TelnyxResource.method; - -function transformResponseData(response, telnyx) { - return utils.addResourceToResponseData(response, telnyx, '/campaign', { - del: telnyxMethod({ - method: 'DELETE', - path: '/campaign', - urlParams: ['campaign'], - paramsValues: [response.data.id], - paramsNames: ['id'], - }), - - update: telnyxMethod({ - method: 'PATCH', - path: '/campaign', - urlParams: ['campaign'], - paramsValues: [response.data.id], - paramsNames: ['id'], - }), - }); -} - -module.exports = TelnyxResource.extend({ - path: 'campaign', - includeBasic: ['create', 'list'], - - acceptShareCampaign: telnyxMethod({ - method: 'POST', - transformResponseData: transformResponseData, - path: '/acceptSharing/{campaignId}', - }), - getCampaignCost: telnyxMethod({ - method: 'GET', - transformResponseData: transformResponseData, - path: '/usecase/cost', - }), - retrieveCampaignId: telnyxMethod({ - method: 'GET', - path: '/{campaignId}', - urlParams: ['campaignId'], - - transformResponseData: transformResponseData, - }), - updateCampaignId: telnyxMethod({ - method: 'PATCH', - path: '/{campaignId}', - urlParams: ['campaignId'], - transformResponseData: transformResponseData, - }), - deactivateCampaignId: telnyxMethod({ - method: 'DELETE', - path: '/{campaignId}', - urlParams: ['campaignId'], - transformResponseData: transformResponseData, - }), - retrieveMnoMetadata: telnyxMethod({ - method: 'GET', - path: '/{campaignId}/mnoMetadata', - urlParams: ['campaignId'], - - transformResponseData: transformResponseData, - }), - retrieveOperationStatus: telnyxMethod({ - method: 'GET', - path: '/{campaignId}/operationStatus', - urlParams: ['campaignId'], - - transformResponseData: transformResponseData, - }), - retrieveOsrCampaignAttributes: telnyxMethod({ - method: 'GET', - path: '/{campaignId}/osr/attributes', - urlParams: ['campaignId'], - }), - retrieveSharingStatus: telnyxMethod({ - method: 'GET', - path: '/{campaignId}/sharing', - urlParams: ['campaignId'], - }), -}); diff --git a/lib/resources/CampaignBuilder.js b/lib/resources/CampaignBuilder.js deleted file mode 100644 index 6a4c3e3..0000000 --- a/lib/resources/CampaignBuilder.js +++ /dev/null @@ -1,40 +0,0 @@ -'use strict'; - -var TelnyxResource = require('../TelnyxResource'); -var utils = require('../utils'); -var telnyxMethod = TelnyxResource.method; - -function transformResponseData(response, telnyx) { - return utils.addResourceToResponseData(response, telnyx, '/campaignBuilder', { - del: telnyxMethod({ - method: 'DELETE', - path: '/campaignBuilder', - urlParams: ['campaignBuilder'], - paramsValues: [response.data.id], - paramsNames: ['id'], - }), - - update: telnyxMethod({ - method: 'PATCH', - path: '/campaignBuilder', - urlParams: ['campaignBuilder'], - paramsValues: [response.data.id], - paramsNames: ['id'], - }), - }); -} - -module.exports = TelnyxResource.extend({ - path: '/campaignBuilder', - basePath: '/10dlc/', - create: telnyxMethod({ - method: 'POST', - transformResponseData: transformResponseData, - }), - retrieveQualifyByUsecase: telnyxMethod({ - method: 'GET', - path: '/brand/{brandId}/usecase/{usecase}', - urlParams: ['brandId', 'usecase'], - transformResponseData: transformResponseData, - }), -}); diff --git a/lib/resources/CdrUsageReports.js b/lib/resources/CdrUsageReports.js deleted file mode 100644 index 1895a3b..0000000 --- a/lib/resources/CdrUsageReports.js +++ /dev/null @@ -1,15 +0,0 @@ -'use strict'; - -const TelnyxResource = require('../TelnyxResource'); -const telnyxMethod = TelnyxResource.method; - -module.exports = TelnyxResource.extend({ - path: 'cdr_usage_reports', - includeBasic: ['list','retrieve'], - - GetUsageReportSync: telnyxMethod({ - method: 'GET', - path: '/reports/cdr_usage_reports/sync', - }), - -}); diff --git a/lib/resources/Channelzones.js b/lib/resources/Channelzones.js deleted file mode 100644 index 601aa2f..0000000 --- a/lib/resources/Channelzones.js +++ /dev/null @@ -1,27 +0,0 @@ -'use strict'; - -const TelnyxResource = require('../TelnyxResource'); -const telnyxMethod = TelnyxResource.method; - -module.exports = TelnyxResource.extend({ - path: 'channelzones', - includeBasic: ['list','retrieve','delete'], - - GetChannelZone: telnyxMethod({ - method: 'GET', - path: '/channel_zones/{channel/zone/id}', - }), - UnassignPhoneNumber: telnyxMethod({ - method: 'DELETE', - path: '/channel_zones/{channel/zone/id}/channel_zone_phone_numbers/{phone_number}', - }), - GetChannelZones: telnyxMethod({ - method: 'GET', - path: '/channel/zones', - }), - GetPhoneNumbers: telnyxMethod({ - method: 'GET', - path: '/channel_zones/{channel_zone_id}/channel_zone_phone_numbers', - }), - -}); diff --git a/lib/resources/ClientStateUpdate.js b/lib/resources/ClientStateUpdate.js deleted file mode 100644 index 4901a99..0000000 --- a/lib/resources/ClientStateUpdate.js +++ /dev/null @@ -1,6 +0,0 @@ -'use strict'; - -module.exports = require('../TelnyxResource').extend({ - path: '/actions/client_state_update', - includeBasic: ['update'], -}); diff --git a/lib/resources/Conferences.js b/lib/resources/Conferences.js deleted file mode 100644 index 325dc73..0000000 --- a/lib/resources/Conferences.js +++ /dev/null @@ -1,62 +0,0 @@ -'use strict'; - -var TelnyxResource = require('../TelnyxResource'); -var utils = require('../utils'); -var telnyxMethod = TelnyxResource.method; - -var CONFERENCES = [ - 'join', - 'mute', - 'unmute', - 'hold', - 'unhold', - 'speak', - 'play', - 'stop', - 'record_start', - 'record_stop', - 'update', - 'leave', - 'dial_participant', - 'resume', -]; - -function getSpec(conferenceId) { - return function(methodName) { - return { - method: 'POST', - path: `/{conferenceId}/actions/${methodName}`, - urlParams: ['conferenceId'], - paramsValues: [conferenceId], - paramsNames: ['id'], - methodType: 'create', - } - } -} - -module.exports = require('../TelnyxResource').extend({ - path: 'conferences', - includeBasic: ['list', 'retrieve'], - - create: telnyxMethod({ - method: 'POST', - - transformResponseData: function(response, telnyx) { - return utils.addResourceToResponseData( - response, - telnyx, - 'conferences', - utils.createNestedMethods(telnyxMethod, CONFERENCES, getSpec(response.data.id)) - ); - }, - }), - - participants: telnyxMethod({ - method: 'GET', - - path: '/{conferenceId}/participants', - urlParams: ['conferenceId'], - }), - - instanceMethods: utils.createNestedMethods(telnyxMethod, CONFERENCES, getSpec()) -}); diff --git a/lib/resources/Connections.js b/lib/resources/Connections.js deleted file mode 100644 index 4bb97ba..0000000 --- a/lib/resources/Connections.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict'; - -var TelnyxResource = require('../TelnyxResource'); - -module.exports = TelnyxResource.extend({ - path: 'connections', - includeBasic: ['list', 'retrieve'], -}); diff --git a/lib/resources/CredentialConnections.js b/lib/resources/CredentialConnections.js deleted file mode 100644 index 131b39d..0000000 --- a/lib/resources/CredentialConnections.js +++ /dev/null @@ -1,6 +0,0 @@ -'use strict'; - -module.exports = require('../TelnyxResource').extend({ - path: 'credential_connections', - includeBasic: ['list', 'create', 'retrieve', 'del', 'update'], -}); diff --git a/lib/resources/Credentials.js b/lib/resources/Credentials.js deleted file mode 100644 index 4b91f2e..0000000 --- a/lib/resources/Credentials.js +++ /dev/null @@ -1,29 +0,0 @@ -'use strict'; - -const TelnyxResource = require('../TelnyxResource'); -const telnyxMethod = TelnyxResource.method; - -module.exports = TelnyxResource.extend({ - path: 'credentials', - includeBasic: ['create','list','retrieve','delete'], - - PerformCredentialAction: telnyxMethod({ - method: 'POST', - path: '/telephony_credentials/{id}/actions/{action}', - urlParams: ['id', 'action'], - }), - FindTelephonyCredentials: telnyxMethod({ - method: 'GET', - path: '/telephony_credentials', - }), - ListTags: telnyxMethod({ - method: 'GET', - path: '/telephony/credentials/tags', - }), - DeleteTelephonyCredential: telnyxMethod({ - method: 'DELETE', - path: '/telephony_credentials/{id}', - urlParams: ['id'], - }), - -}); diff --git a/lib/resources/CsvDownloads.js b/lib/resources/CsvDownloads.js deleted file mode 100644 index a8c080b..0000000 --- a/lib/resources/CsvDownloads.js +++ /dev/null @@ -1,20 +0,0 @@ -'use strict'; - -const TelnyxResource = require('../TelnyxResource'); -const telnyxMethod = TelnyxResource.method; - -module.exports = TelnyxResource.extend({ - path: 'csv_downloads', - includeBasic: ['list','retrieve'], - - GetCsvDownload: telnyxMethod({ - method: 'GET', - path: '/phone_numbers_csv_downloads/{id}', - urlParams: ['id'], - }), - ListCsvDownloads: telnyxMethod({ - method: 'GET', - path: '/phone_numbers_csv_downloads', - }), - -}); diff --git a/lib/resources/CustomerServiceRecord.js b/lib/resources/CustomerServiceRecord.js deleted file mode 100644 index 6eca9b8..0000000 --- a/lib/resources/CustomerServiceRecord.js +++ /dev/null @@ -1,23 +0,0 @@ -'use strict'; - -const TelnyxResource = require('../TelnyxResource'); -const telnyxMethod = TelnyxResource.method; - -module.exports = TelnyxResource.extend({ - path: 'customer_service_record', - includeBasic: ['list','retrieve','create'], - - ListCustomerServiceRecords: telnyxMethod({ - method: 'GET', - path: '/customer_service_records', - }), - VerifyPhoneNumberCoverage: telnyxMethod({ - method: 'POST', - path: '/customer_service_records/phone_number-coverages', - }), - GetCustomerServiceRecord: telnyxMethod({ - method: 'GET', - path: '/customer_service_records/{customer_service_record_id}', - }), - -}); diff --git a/lib/resources/Debugging.js b/lib/resources/Debugging.js deleted file mode 100644 index 3db7b1a..0000000 --- a/lib/resources/Debugging.js +++ /dev/null @@ -1,15 +0,0 @@ -'use strict'; - -const TelnyxResource = require('../TelnyxResource'); -const telnyxMethod = TelnyxResource.method; - -module.exports = TelnyxResource.extend({ - path: 'debugging', - includeBasic: ['list','retrieve'], - - ListCallEvents: telnyxMethod({ - method: 'GET', - path: '/call_events', - }), - -}); diff --git a/lib/resources/DetailRecords.js b/lib/resources/DetailRecords.js deleted file mode 100644 index d9cfcc0..0000000 --- a/lib/resources/DetailRecords.js +++ /dev/null @@ -1,13 +0,0 @@ -'use strict'; - -var TelnyxResource = require('../TelnyxResource'); -var telnyxMethod = TelnyxResource.method; - -module.exports = TelnyxResource.extend({ - path: 'detail_records', - - query: telnyxMethod({ - method: 'GET', - methodType: 'list', - }), -}); diff --git a/lib/resources/DialogflowIntegration.js b/lib/resources/DialogflowIntegration.js deleted file mode 100644 index ad901c6..0000000 --- a/lib/resources/DialogflowIntegration.js +++ /dev/null @@ -1,15 +0,0 @@ -'use strict'; - -const TelnyxResource = require('../TelnyxResource'); -const telnyxMethod = TelnyxResource.method; - -module.exports = TelnyxResource.extend({ - path: 'dialogflow_integration', - includeBasic: ['delete'], - - DeleteDialogflowConnection: telnyxMethod({ - method: 'DELETE', - path: '/dialogflow_connections/{connection_id}', - }), - -}); diff --git a/lib/resources/DocumentLinks.js b/lib/resources/DocumentLinks.js deleted file mode 100644 index bb59ac1..0000000 --- a/lib/resources/DocumentLinks.js +++ /dev/null @@ -1,6 +0,0 @@ -'use strict'; - -module.exports = require('../TelnyxResource').extend({ - path: '/document_links', - includeBasic: ['list'], -}); diff --git a/lib/resources/Documents.js b/lib/resources/Documents.js deleted file mode 100644 index e701366..0000000 --- a/lib/resources/Documents.js +++ /dev/null @@ -1,50 +0,0 @@ -'use strict'; - -var TelnyxResource = require('../TelnyxResource'); -var utils = require('../utils'); -var telnyxMethod = TelnyxResource.method; - -function transformResponseData(response, telnyx) { - return utils.addResourceToResponseData(response, telnyx, 'documents', {}); -} - -module.exports = TelnyxResource.extend({ - path: 'documents', - list: telnyxMethod({ - method: 'GET', - transformResponseData: transformResponseData, - }), - update: telnyxMethod({ - method: 'PATCH', - path: '/{id}', - urlParams: ['id'], - transformResponseData: transformResponseData, - }), - del: telnyxMethod({ - method: 'DELETE', - path: '{id}', - urlParams: ['id'], - transformResponseData: transformResponseData, - }), - upload: telnyxMethod({ - method: 'POST', - transformResponseData: transformResponseData, - }), - retrieveDocumentId: telnyxMethod({ - method: 'GET', - path: '/{id}', - urlParams: ['id'], - - transformResponseData: transformResponseData, - }), - retrieveDownloadDocument: telnyxMethod({ - method: 'GET', - path: '/{id}/download', - urlParams: ['id'], - headers: { - 'Content-Type': '*', - }, - - transformResponseData: transformResponseData, - }), -}); diff --git a/lib/resources/DynamicEmergency.js b/lib/resources/DynamicEmergency.js deleted file mode 100644 index b67751a..0000000 --- a/lib/resources/DynamicEmergency.js +++ /dev/null @@ -1,10 +0,0 @@ -'use strict'; - -var TelnyxResource = require('../TelnyxResource'); - -module.exports = TelnyxResource.extend({ - nestedResources: { - Addresses: require('./DynamicEmergencyAddresses'), - Endpoints: require('./DynamicEmergencyEndpoints'), - } -}); diff --git a/lib/resources/DynamicEmergencyAddresses.js b/lib/resources/DynamicEmergencyAddresses.js deleted file mode 100644 index 4268696..0000000 --- a/lib/resources/DynamicEmergencyAddresses.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict'; - -var TelnyxResource = require('../TelnyxResource'); - -module.exports = TelnyxResource.extend({ - path: 'dynamic_emergency_addresses', - includeBasic: ['list', 'retrieve', 'create', 'del'], -}); diff --git a/lib/resources/DynamicEmergencyEndpoints.js b/lib/resources/DynamicEmergencyEndpoints.js deleted file mode 100644 index 25d7b4a..0000000 --- a/lib/resources/DynamicEmergencyEndpoints.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict'; - -var TelnyxResource = require('../TelnyxResource'); - -module.exports = TelnyxResource.extend({ - path: 'dynamic_emergency_endpoints', - includeBasic: ['list', 'retrieve', 'create', 'del'], -}); diff --git a/lib/resources/Events.js b/lib/resources/Events.js deleted file mode 100644 index ef10236..0000000 --- a/lib/resources/Events.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict'; - -module.exports = require('../TelnyxResource').extend({ - path: 'events', - includeBasic: ['list', 'retrieve'], -}); - diff --git a/lib/resources/ExternalConnections.js b/lib/resources/ExternalConnections.js deleted file mode 100644 index 3ea2e52..0000000 --- a/lib/resources/ExternalConnections.js +++ /dev/null @@ -1,76 +0,0 @@ -'use strict'; - -const TelnyxResource = require('../TelnyxResource'); -const telnyxMethod = TelnyxResource.method; - -module.exports = TelnyxResource.extend({ - path: 'external_connections', - includeBasic: ['list','retrieve','create','delete'], - - GetExternalConnectionUploadsStatus: telnyxMethod({ - method: 'GET', - path: '/external_connections/{id}/uploads/status', - }), - ListExternalConnectionReleases: telnyxMethod({ - method: 'GET', - path: '/external_connections/{id}/releases', - }), - RetryUpload: telnyxMethod({ - method: 'POST', - path: '/external_connections/{id}/uploads/{ticketIid}/retry', - }), - DeleteExternalConnection: telnyxMethod({ - method: 'DELETE', - path: '/external_connections/{id}', - }), - updateLocation: telnyxMethod({ - method: 'PATCH', - path: '/v2/external_connections/{id}/locations/{location_id}', - urlParams: ['id', 'location_id'], - }), - DeleteExternalConnectionLogMessage: telnyxMethod({ - method: 'DELETE', - path: '/external_connections/log/messages/{id}', - }), - GetExternalConnectionCivicAddress: telnyxMethod({ - method: 'GET', - path: '/external_connections/{id}/civic/addresses/{address_id}', - }), - ListExternalConnectionPhoneNumbers: telnyxMethod({ - method: 'GET', - path: '/external_connections/{id}/phone/numbers', - }), - ListExternalConnections: telnyxMethod({ - method: 'GET', - path: '/external_connections', - }), - GetExternalConnectionPhoneNumber: telnyxMethod({ - method: 'GET', - path: '/external_connections/{id}/phone/numbers/{phone_number_id}', - }), - ListCivicAddresses: telnyxMethod({ - method: 'GET', - path: '/external_connections/{id}/civic_addresses', - }), - ListExternalConnectionLogMessages: telnyxMethod({ - method: 'GET', - path: '/external_connections/log/messages', - }), - GetExternalConnectionUpload: telnyxMethod({ - method: 'GET', - path: '/external_connections/{id}/uploads/{ticket_id}', - }), - RefreshExternalConnectionUploads: telnyxMethod({ - method: 'POST', - path: '/external_connections/{id}/uploads/refresh', - }), - GetExternalConnectionRelease: telnyxMethod({ - method: 'GET', - path: '/external_connections/{id}/releases/{release_id}', - }), - ListExternalConnectionUploads: telnyxMethod({ - method: 'GET', - path: '/external_connections/{id}/uploads', - }), - -}); diff --git a/lib/resources/FaxApplications.js b/lib/resources/FaxApplications.js deleted file mode 100644 index 996133d..0000000 --- a/lib/resources/FaxApplications.js +++ /dev/null @@ -1,55 +0,0 @@ -'use strict'; - -var TelnyxResource = require('../TelnyxResource'); -var utils = require('../utils'); -var telnyxMethod = TelnyxResource.method; - -function transformResponseData(response, telnyx) { - return utils.addResourceToResponseData( - response, - telnyx, - 'faxApplications', - { - del: telnyxMethod({ - method: 'DELETE', - path: '/{faxApplicationId}', - urlParams: ['faxApplicationId'], - paramsValues: [response.data.id], - paramsNames: ['id'], - }), - - update: telnyxMethod({ - method: 'PATCH', - path: '/{faxApplicationId}', - urlParams: ['faxApplicationId'], - paramsValues: [response.data.id], - paramsNames: ['id'], - }), - } - ); -} - -module.exports = TelnyxResource.extend({ - path: 'fax_applications', - - list: telnyxMethod({ - method: 'GET', - methodType: 'list', - - transformResponseData: transformResponseData, - }), - - create: telnyxMethod({ - method: 'POST', - - transformResponseData: transformResponseData, - }), - - retrieve: telnyxMethod({ - method: 'GET', - path: '/{id}', - urlParams: ['id'], - - transformResponseData: transformResponseData, - }), -}); diff --git a/lib/resources/Faxes.js b/lib/resources/Faxes.js deleted file mode 100644 index 0c84a66..0000000 --- a/lib/resources/Faxes.js +++ /dev/null @@ -1,53 +0,0 @@ -'use strict'; - -var TelnyxResource = require('../TelnyxResource'); -var utils = require('../utils'); -var telnyxMethod = TelnyxResource.method; - -function transformResponseData(response, telnyx) { - return utils.addResourceToResponseData( - response, - telnyx, - 'faxes', - { - del: telnyxMethod({ - method: 'DELETE', - path: '/{faxId}', - urlParams: ['faxId'], - paramsValues: [response.data.id], - paramsNames: ['id'], - }), - } - ); -} - -module.exports = TelnyxResource.extend({ - path: 'faxes', - - list: telnyxMethod({ - method: 'GET', - methodType: 'list', - - transformResponseData: transformResponseData, - }), - - create: telnyxMethod({ - method: 'POST', - - transformResponseData: transformResponseData, - }), - - send: telnyxMethod({ - method: 'POST', - - transformResponseData: transformResponseData, - }), - - retrieve: telnyxMethod({ - method: 'GET', - path: '/{id}', - urlParams: ['id'], - - transformResponseData: transformResponseData, - }), -}); diff --git a/lib/resources/FqdnConnections.js b/lib/resources/FqdnConnections.js deleted file mode 100644 index 62dd479..0000000 --- a/lib/resources/FqdnConnections.js +++ /dev/null @@ -1,55 +0,0 @@ -'use strict'; - -var TelnyxResource = require('../TelnyxResource'); -var utils = require('../utils'); -var telnyxMethod = TelnyxResource.method; - -function transformResponseData(response, telnyx) { - return utils.addResourceToResponseData( - response, - telnyx, - 'fqdnConnections', - { - del: telnyxMethod({ - method: 'DELETE', - path: '/{fqdnConnectionId}', - urlParams: ['fqdnConnectionId'], - paramsValues: [response.data.id], - paramsNames: ['id'], - }), - - update: telnyxMethod({ - method: 'PATCH', - path: '/{fqdnConnectionId}', - urlParams: ['fqdnConnectionId'], - paramsValues: [response.data.id], - paramsNames: ['id'], - }), - } - ); -} - -module.exports = TelnyxResource.extend({ - path: 'fqdn_connections', - - list: telnyxMethod({ - method: 'GET', - methodType: 'list', - - transformResponseData: transformResponseData, - }), - - create: telnyxMethod({ - method: 'POST', - - transformResponseData: transformResponseData, - }), - - retrieve: telnyxMethod({ - method: 'GET', - path: '/{id}', - urlParams: ['id'], - - transformResponseData: transformResponseData, - }), -}); diff --git a/lib/resources/Fqdns.js b/lib/resources/Fqdns.js deleted file mode 100644 index 1756d43..0000000 --- a/lib/resources/Fqdns.js +++ /dev/null @@ -1,55 +0,0 @@ -'use strict'; - -var TelnyxResource = require('../TelnyxResource'); -var utils = require('../utils'); -var telnyxMethod = TelnyxResource.method; - -function transformResponseData(response, telnyx) { - return utils.addResourceToResponseData( - response, - telnyx, - 'fqdns', - { - del: telnyxMethod({ - method: 'DELETE', - path: '/{fqdnId}', - urlParams: ['fqdnId'], - paramsValues: [response.data.id], - paramsNames: ['id'], - }), - - update: telnyxMethod({ - method: 'PATCH', - path: '/{fqdnId}', - urlParams: ['fqdnId'], - paramsValues: [response.data.id], - paramsNames: ['id'], - }), - } - ); -} - -module.exports = TelnyxResource.extend({ - path: 'fqdns', - - list: telnyxMethod({ - method: 'GET', - methodType: 'list', - - transformResponseData: transformResponseData, - }), - - create: telnyxMethod({ - method: 'POST', - - transformResponseData: transformResponseData, - }), - - retrieve: telnyxMethod({ - method: 'GET', - path: '/{id}', - urlParams: ['id'], - - transformResponseData: transformResponseData, - }), -}); diff --git a/lib/resources/GlobalIps.js b/lib/resources/GlobalIps.js deleted file mode 100644 index b24686b..0000000 --- a/lib/resources/GlobalIps.js +++ /dev/null @@ -1,47 +0,0 @@ -'use strict'; - -const TelnyxResource = require('../TelnyxResource'); -const telnyxMethod = TelnyxResource.method; - -module.exports = TelnyxResource.extend({ - path: 'global_ips', - includeBasic: ['delete','list','retrieve'], - - DeleteGlobalIpAssignment: telnyxMethod({ - method: 'DELETE', - path: '/global_ip_assignments/{id}', - }), - DeleteGlobalIpHealthCheck: telnyxMethod({ - method: 'DELETE', - path: '/global_ip_health/checks/{id}', - }), - DeleteGlobalIp: telnyxMethod({ - method: 'DELETE', - path: '/global/ips/{id}', - }), - ListGlobalIpAssignments: telnyxMethod({ - method: 'GET', - path: '/global_ip_assignments', - }), - ListGlobalIpProtocols: telnyxMethod({ - method: 'GET', - path: '/global_ip_protocols', - }), - ListGlobalIps: telnyxMethod({ - method: 'GET', - path: '/global/ips', - }), - ListGlobalIpHealthChecks: telnyxMethod({ - method: 'GET', - path: '/global_ip_health/checks', - }), - ListGlobalIpAllowedPorts: telnyxMethod({ - method: 'GET', - path: '/global_ip_allowed/ports', - }), - ListGlobalIpHealthCheckTypes: telnyxMethod({ - method: 'GET', - path: '/global_ip_health/check/types', - }), - -}); diff --git a/lib/resources/InboundChannels.js b/lib/resources/InboundChannels.js deleted file mode 100644 index 5672535..0000000 --- a/lib/resources/InboundChannels.js +++ /dev/null @@ -1,15 +0,0 @@ -'use strict'; - -const TelnyxResource = require('../TelnyxResource'); -const telnyxMethod = TelnyxResource.method; - -module.exports = TelnyxResource.extend({ - path: 'inbound_channels', - includeBasic: ['list','retrieve'], - - ListInboundChannels: telnyxMethod({ - method: 'GET', - path: '/phone_numbers/inbound_channels', - }), - -}); diff --git a/lib/resources/InventoryCoverage.js b/lib/resources/InventoryCoverage.js deleted file mode 100644 index bd9d38a..0000000 --- a/lib/resources/InventoryCoverage.js +++ /dev/null @@ -1,13 +0,0 @@ -'use strict'; - -var TelnyxResource = require('../TelnyxResource'); -var telnyxMethod = TelnyxResource.method; - -module.exports = TelnyxResource.extend({ - path: 'inventory_coverage', - - request: telnyxMethod({ - method: 'GET', - methodType: 'list' - }) -}); diff --git a/lib/resources/InventoryLevel.js b/lib/resources/InventoryLevel.js deleted file mode 100644 index 97cb1c7..0000000 --- a/lib/resources/InventoryLevel.js +++ /dev/null @@ -1,15 +0,0 @@ -'use strict'; - -const TelnyxResource = require('../TelnyxResource'); -const telnyxMethod = TelnyxResource.method; - -module.exports = TelnyxResource.extend({ - path: 'inventory_level', - includeBasic: ['list','retrieve'], - - CreateInventoryCoverage: telnyxMethod({ - method: 'GET', - path: '/inventory_coverage', - }), - -}); diff --git a/lib/resources/IpAddresses.js b/lib/resources/IpAddresses.js deleted file mode 100644 index b62b429..0000000 --- a/lib/resources/IpAddresses.js +++ /dev/null @@ -1,20 +0,0 @@ -'use strict'; - -const TelnyxResource = require('../TelnyxResource'); -const telnyxMethod = TelnyxResource.method; - -module.exports = TelnyxResource.extend({ - path: 'ip_addresses', - includeBasic: ['list','retrieve','delete'], - - ListAccessIpAddresses: telnyxMethod({ - method: 'GET', - path: '/access_ip_address', - }), - DeleteAccessIpAddress: telnyxMethod({ - method: 'DELETE', - path: '/access_ip_address_{access_ip_address_id}', - urlParams: ['access_ip_address_id'], - }), - -}); diff --git a/lib/resources/IpConnections.js b/lib/resources/IpConnections.js deleted file mode 100644 index a544a5f..0000000 --- a/lib/resources/IpConnections.js +++ /dev/null @@ -1,55 +0,0 @@ -'use strict'; - -var TelnyxResource = require('../TelnyxResource'); -var utils = require('../utils'); -var telnyxMethod = TelnyxResource.method; - -function transformResponseData(response, telnyx) { - return utils.addResourceToResponseData( - response, - telnyx, - 'ipConnections', - { - del: telnyxMethod({ - method: 'DELETE', - path: '/{ipConnectionId}', - urlParams: ['ipConnectionId'], - paramsValues: [response.data.id], - paramsNames: ['id'], - }), - - update: telnyxMethod({ - method: 'PATCH', - path: '/{ipConnectionId}', - urlParams: ['ipConnectionId'], - paramsValues: [response.data.id], - paramsNames: ['id'], - }), - } - ); -} - -module.exports = TelnyxResource.extend({ - path: 'ip_connections', - - list: telnyxMethod({ - method: 'GET', - methodType: 'list', - - transformResponseData: transformResponseData, - }), - - create: telnyxMethod({ - method: 'POST', - - transformResponseData: transformResponseData, - }), - - retrieve: telnyxMethod({ - method: 'GET', - path: '/{id}', - urlParams: ['id'], - - transformResponseData: transformResponseData, - }), -}); diff --git a/lib/resources/IpRanges.js b/lib/resources/IpRanges.js deleted file mode 100644 index fc5ada2..0000000 --- a/lib/resources/IpRanges.js +++ /dev/null @@ -1,20 +0,0 @@ -'use strict'; - -const TelnyxResource = require('../TelnyxResource'); -const telnyxMethod = TelnyxResource.method; - -module.exports = TelnyxResource.extend({ - path: 'ip_ranges', - includeBasic: ['list','retrieve','delete'], - - ListAccessIpRanges: telnyxMethod({ - method: 'GET', - path: '/access_ip_ranges', - }), - undefined: telnyxMethod({ - method: 'DELETE', - path: '/access_ip_ranges/{access_ip_range_id}', - urlParams: ['access_ip_range_id'], - }), - -}); diff --git a/lib/resources/Ips.js b/lib/resources/Ips.js deleted file mode 100644 index fa2e639..0000000 --- a/lib/resources/Ips.js +++ /dev/null @@ -1,55 +0,0 @@ -'use strict'; - -var TelnyxResource = require('../TelnyxResource'); -var utils = require('../utils'); -var telnyxMethod = TelnyxResource.method; - -function transformResponseData(response, telnyx) { - return utils.addResourceToResponseData( - response, - telnyx, - 'ips', - { - del: telnyxMethod({ - method: 'DELETE', - path: '/{ipId}', - urlParams: ['ipId'], - paramsValues: [response.data.id], - paramsNames: ['id'], - }), - - update: telnyxMethod({ - method: 'PATCH', - path: '/{ipId}', - urlParams: ['ipId'], - paramsValues: [response.data.id], - paramsNames: ['id'], - }), - } - ); -} - -module.exports = TelnyxResource.extend({ - path: 'ips', - - list: telnyxMethod({ - method: 'GET', - methodType: 'list', - - transformResponseData: transformResponseData, - }), - - create: telnyxMethod({ - method: 'POST', - - transformResponseData: transformResponseData, - }), - - retrieve: telnyxMethod({ - method: 'GET', - path: '/{id}', - urlParams: ['id'], - - transformResponseData: transformResponseData, - }), -}); diff --git a/lib/resources/ManagedAccounts.js b/lib/resources/ManagedAccounts.js deleted file mode 100644 index e476452..0000000 --- a/lib/resources/ManagedAccounts.js +++ /dev/null @@ -1,57 +0,0 @@ -'use strict'; - -var TelnyxResource = require('../TelnyxResource'); -var utils = require('../utils'); -var telnyxMethod = TelnyxResource.method; - -function transformResponseData(response, telnyx) { - return utils.addResourceToResponseData(response, telnyx, 'managedAccounts', { - update: telnyxMethod({ - method: 'PATCH', - path: '/managed_accounts/{id}', - paramsValues: [response.data.id], - paramsNames: ['id'], - }), - }); -} - -module.exports = TelnyxResource.extend({ - path: '/managed_accounts', - list: telnyxMethod({ - method: 'GET', - transformResponseData: transformResponseData, - }), - create: telnyxMethod({ - method: 'POST', - - transformResponseData: transformResponseData, - }), - retrieveManagedAccount: telnyxMethod({ - method: 'GET', - path: '/{id}', - urlParams: ['id'], - - transformResponseData: transformResponseData, - }), - updateManagedAccount: telnyxMethod({ - method: 'PATCH', - path: '/{id}', - urlParams: ['id'], - - transformResponseData: transformResponseData, - }), - disableAccount: telnyxMethod({ - method: 'POST', - path: '/{id}/actions/disable', - urlParams: ['id'], - - transformResponseData: transformResponseData, - }), - enableAccount: telnyxMethod({ - method: 'POST', - path: '/{id}/actions/enable', - urlParams: ['id'], - - transformResponseData: transformResponseData, - }), -}); diff --git a/lib/resources/MdrDetailReports.js b/lib/resources/MdrDetailReports.js deleted file mode 100644 index 475449d..0000000 --- a/lib/resources/MdrDetailReports.js +++ /dev/null @@ -1,24 +0,0 @@ -'use strict'; - -const TelnyxResource = require('../TelnyxResource'); -const telnyxMethod = TelnyxResource.method; - -module.exports = TelnyxResource.extend({ - path: 'mdr_detail_reports', - includeBasic: ['list','retrieve','delete'], - - GetCdrRequests: telnyxMethod({ - method: 'GET', - path: '/reports/batch_mdr_reports', - }), - GetPaginatedMdrs: telnyxMethod({ - method: 'GET', - path: '/reports/mdrs', - }), - DeleteMdrRequest: telnyxMethod({ - method: 'DELETE', - path: '/reports/batch_mdr_reports/{id}', - urlParams: ['id'], - }), - -}); diff --git a/lib/resources/MdrUsageReports.js b/lib/resources/MdrUsageReports.js deleted file mode 100644 index a4252a6..0000000 --- a/lib/resources/MdrUsageReports.js +++ /dev/null @@ -1,24 +0,0 @@ -'use strict'; - -const TelnyxResource = require('../TelnyxResource'); -const telnyxMethod = TelnyxResource.method; - -module.exports = TelnyxResource.extend({ - path: 'mdr_usage_reports', - includeBasic: ['delete','list','retrieve'], - - DeleteUsageReport: telnyxMethod({ - method: 'DELETE', - path: '/reports/mdr_/usage_reports/{id}', - urlParams: ['id'], - }), - GetUsageReportSync: telnyxMethod({ - method: 'GET', - path: '/reports/mdr_/usage_reports/sync', - }), - GetUsageReports: telnyxMethod({ - method: 'GET', - path: '/reports/mdr_/usage_reports', - }), - -}); diff --git a/lib/resources/MediaStorageApi.js b/lib/resources/MediaStorageApi.js deleted file mode 100644 index 1de6bfe..0000000 --- a/lib/resources/MediaStorageApi.js +++ /dev/null @@ -1,23 +0,0 @@ -'use strict'; - -const TelnyxResource = require('../TelnyxResource'); -const telnyxMethod = TelnyxResource.method; - -module.exports = TelnyxResource.extend({ - path: 'media_storage_api', - includeBasic: ['delete','list','retrieve'], - - DeleteMediaStorage: telnyxMethod({ - method: 'DELETE', - path: '/media/{media/name}', - }), - DownloadMedia: telnyxMethod({ - method: 'GET', - path: '/media/{media_name}/download', - }), - ListMediaStorage: telnyxMethod({ - method: 'GET', - path: '/media', - }), - -}); diff --git a/lib/resources/Messages.js b/lib/resources/Messages.js deleted file mode 100644 index 9d64178..0000000 --- a/lib/resources/Messages.js +++ /dev/null @@ -1,10 +0,0 @@ -'use strict'; - -module.exports = require('../TelnyxResource').extend({ - path: 'messages', - includeBasic: ['create', 'retrieve'], - - nestedResources: { - AlphanumericSenderId: require('./MessagesAlphanumericSenderId') - }, -}); diff --git a/lib/resources/MessagesAlphanumericSenderId.js b/lib/resources/MessagesAlphanumericSenderId.js deleted file mode 100644 index 14b2d30..0000000 --- a/lib/resources/MessagesAlphanumericSenderId.js +++ /dev/null @@ -1,6 +0,0 @@ -'use strict'; - -module.exports = require('../TelnyxResource').extend({ - path: 'messages/alphanumeric_sender_id', - includeBasic: ['create'], -}); diff --git a/lib/resources/MessagingHostedNumber.js b/lib/resources/MessagingHostedNumber.js deleted file mode 100644 index 3e63956..0000000 --- a/lib/resources/MessagingHostedNumber.js +++ /dev/null @@ -1,30 +0,0 @@ -'use strict'; - -const TelnyxResource = require('../TelnyxResource'); -const telnyxMethod = TelnyxResource.method; - -module.exports = TelnyxResource.extend({ - path: 'messaging_hosted_number', - includeBasic: ['list','retrieve','delete','create'], - - ListMessagingHostedNumberOrders: telnyxMethod({ - method: 'GET', - path: '/messaging_hosted_number_orders', - }), - DeleteMessagingHostedNumber: telnyxMethod({ - method: 'DELETE', - path: '/messaging_hosted_numbers/{id}', - urlParams: ['id'], - }), - GetMessagingHostedNumberOrder: telnyxMethod({ - method: 'GET', - path: '/messaging_hosted_number_orders/{id}', - urlParams: ['id'], - }), - UploadMessagingHostedNumberOrderFile: telnyxMethod({ - method: 'POST', - path: '/messaging_hosted_number_orders/{id}/actions/file_upload', - urlParams: ['id'], - }), - -}); diff --git a/lib/resources/MessagingHostedNumberOrders.js b/lib/resources/MessagingHostedNumberOrders.js deleted file mode 100644 index e70630f..0000000 --- a/lib/resources/MessagingHostedNumberOrders.js +++ /dev/null @@ -1,6 +0,0 @@ -'use strict'; - -module.exports = require('../TelnyxResource').extend({ - path: 'messaging_hosted_number_orders', - includeBasic: ['list', 'retrieve', 'create', 'del'], -}); diff --git a/lib/resources/MessagingHostedNumbers.js b/lib/resources/MessagingHostedNumbers.js deleted file mode 100644 index 11e5782..0000000 --- a/lib/resources/MessagingHostedNumbers.js +++ /dev/null @@ -1,6 +0,0 @@ -'use strict'; - -module.exports = require('../TelnyxResource').extend({ - path: '../id/actions/file_upload', - includeBasic: ['retrieve'], -}); diff --git a/lib/resources/MessagingPhoneNumbers.js b/lib/resources/MessagingPhoneNumbers.js deleted file mode 100644 index 8b7e65d..0000000 --- a/lib/resources/MessagingPhoneNumbers.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict'; - -module.exports = require('../TelnyxResource').extend({ - path: 'messaging_phone_numbers', - includeBasic: ['list', 'retrieve', 'update'], -}); - diff --git a/lib/resources/MessagingProfileMetrics.js b/lib/resources/MessagingProfileMetrics.js deleted file mode 100644 index c09127f..0000000 --- a/lib/resources/MessagingProfileMetrics.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict'; - -module.exports = require('../TelnyxResource').extend({ - path: 'messaging_profile_metrics', - includeBasic: ['list'], -}); - diff --git a/lib/resources/MessagingSenderIds.js b/lib/resources/MessagingSenderIds.js deleted file mode 100644 index 31926b3..0000000 --- a/lib/resources/MessagingSenderIds.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict'; - -module.exports = require('../TelnyxResource').extend({ - path: 'alphanumeric_sender_ids', // THIS URL DOES NOT EXISTS ON DOCS - includeBasic: ['list', 'retrieve', 'create','del'], -}); - diff --git a/lib/resources/MessagingShortCodes.js b/lib/resources/MessagingShortCodes.js deleted file mode 100644 index a19352a..0000000 --- a/lib/resources/MessagingShortCodes.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict'; - -module.exports = require('../TelnyxResource').extend({ - path: 'short_codes', - includeBasic: ['list', 'retrieve', 'update'], -}); - diff --git a/lib/resources/MessagingTollfreeVerification.js b/lib/resources/MessagingTollfreeVerification.js deleted file mode 100644 index 9dfaeb8..0000000 --- a/lib/resources/MessagingTollfreeVerification.js +++ /dev/null @@ -1,20 +0,0 @@ -'use strict'; - -const TelnyxResource = require('../TelnyxResource'); -const telnyxMethod = TelnyxResource.method; - -module.exports = TelnyxResource.extend({ - path: 'messaging/tollfree_verification', - includeBasic: ['list','retrieve','delete'], - - ListVerificationRequests: telnyxMethod({ - method: 'GET', - path: '/messaging/tollfree_verification_requests', - }), - DeleteVerificationRequest: telnyxMethod({ - method: 'DELETE', - path: '/messaging/tollfree_verification_requests_{id}', - urlParams: ['id'], - }), - -}); diff --git a/lib/resources/MessagingUrlDomains.js b/lib/resources/MessagingUrlDomains.js deleted file mode 100644 index c9d02eb..0000000 --- a/lib/resources/MessagingUrlDomains.js +++ /dev/null @@ -1,15 +0,0 @@ -'use strict'; - -const TelnyxResource = require('../TelnyxResource'); -const telnyxMethod = TelnyxResource.method; - -module.exports = TelnyxResource.extend({ - path: 'messaging/url_domains', - includeBasic: ['list','retrieve'], - - ListMessagingUrlDomains: telnyxMethod({ - method: 'GET', - path: '/messaging/url_domains', - }), - -}); diff --git a/lib/resources/MobileNetworkOperators.js b/lib/resources/MobileNetworkOperators.js deleted file mode 100644 index 134b4b5..0000000 --- a/lib/resources/MobileNetworkOperators.js +++ /dev/null @@ -1,15 +0,0 @@ -'use strict'; - -const TelnyxResource = require('../TelnyxResource'); -const telnyxMethod = TelnyxResource.method; - -module.exports = TelnyxResource.extend({ - path: 'mobile_network_operators', - includeBasic: ['list','retrieve'], - - GetMobileNetworkOperators: telnyxMethod({ - method: 'GET', - path: '/mobile_network_operators', - }), - -}); diff --git a/lib/resources/MobileOperatorNetworks.js b/lib/resources/MobileOperatorNetworks.js deleted file mode 100644 index b7c14e2..0000000 --- a/lib/resources/MobileOperatorNetworks.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict'; - -var TelnyxResource = require('../TelnyxResource'); - -module.exports = TelnyxResource.extend({ - path: 'mobile_operator_networks', - includeBasic: ['list'], -}); diff --git a/lib/resources/Networks.js b/lib/resources/Networks.js deleted file mode 100644 index 186060d..0000000 --- a/lib/resources/Networks.js +++ /dev/null @@ -1,27 +0,0 @@ -'use strict'; - -const TelnyxResource = require('../TelnyxResource'); -const telnyxMethod = TelnyxResource.method; - -module.exports = TelnyxResource.extend({ - path: 'networks', - includeBasic: ['delete','list','retrieve'], - - DeleteNetwork: telnyxMethod({ - method: 'DELETE', - path: '/networks/{id}', - }), - ListNetworkInterfaces: telnyxMethod({ - method: 'GET', - path: '/networks/{id}/network_interfaces', - }), - ListNetworks: telnyxMethod({ - method: 'GET', - path: '/networks', - }), - DeleteDefaultGateway: telnyxMethod({ - method: 'DELETE', - path: '/networks/{id}/default_gateway', - }), - -}); diff --git a/lib/resources/NumberBackgroundJobs.js b/lib/resources/NumberBackgroundJobs.js deleted file mode 100644 index f99df6c..0000000 --- a/lib/resources/NumberBackgroundJobs.js +++ /dev/null @@ -1,24 +0,0 @@ -'use strict'; - -var TelnyxResource = require('../TelnyxResource'); -var telnyxMethod = TelnyxResource.method; - -module.exports = require('../TelnyxResource').extend({ - path: 'phone_numbers/jobs', - includeBasic: ['list', 'retrieve'], - - updateEmergencySettings: telnyxMethod({ - method: 'POST', - path: '/update_emergency_settings' - }), - - updateNumbers: telnyxMethod({ - method: 'POST', - path: '/update_phone_numbers' - }), - - deleteNumbers: telnyxMethod({ - method: 'POST', - path: '/delete_phone_numbers' - }), -}); diff --git a/lib/resources/NumberLookup.js b/lib/resources/NumberLookup.js deleted file mode 100644 index 5de31b4..0000000 --- a/lib/resources/NumberLookup.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict'; - -var TelnyxResource = require('../TelnyxResource'); - -module.exports = TelnyxResource.extend({ - path: 'number_lookup', - includeBasic: ['retrieve'], -}); diff --git a/lib/resources/NumberOrderDocuments.js b/lib/resources/NumberOrderDocuments.js deleted file mode 100644 index d1d2952..0000000 --- a/lib/resources/NumberOrderDocuments.js +++ /dev/null @@ -1,15 +0,0 @@ -'use strict'; - -var TelnyxResource = require('../TelnyxResource'); -var telnyxMethod = TelnyxResource.method; - -module.exports = TelnyxResource.extend({ - path: 'number_order_documents', - includeBasic: ['list', 'retrieve', 'update'], - - upload: telnyxMethod({ - method: 'POST', - methodType: 'create', - }), -}); - diff --git a/lib/resources/NumberOrders.js b/lib/resources/NumberOrders.js deleted file mode 100644 index 665efea..0000000 --- a/lib/resources/NumberOrders.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict'; - -module.exports = require('../TelnyxResource').extend({ - path: 'number_orders', - includeBasic: ['list', 'retrieve', 'create', 'update'], -}); - diff --git a/lib/resources/NumberPortouts.js b/lib/resources/NumberPortouts.js deleted file mode 100644 index 4d1e494..0000000 --- a/lib/resources/NumberPortouts.js +++ /dev/null @@ -1,71 +0,0 @@ -'use strict'; - -var TelnyxResource = require('../TelnyxResource'); -var utils = require('../utils'); -var telnyxMethod = TelnyxResource.method; - -function transformResponseData(response, telnyx) { - return utils.addResourceToResponseData(response, telnyx, 'numberPortouts', { - del: telnyxMethod({ - method: 'DELETE', - path: '/portouts', - urlParams: ['portouts'], - paramsValues: [response.data.id], - paramsNames: ['id'], - }), - - update: telnyxMethod({ - method: 'PATCH', - path: '/portouts', - urlParams: ['portouts'], - paramsValues: [response.data.id], - paramsNames: ['id'], - }), - }); -} - -module.exports = TelnyxResource.extend({ - path: 'portouts', - list: telnyxMethod({ - method: 'GET', - transformResponseData: transformResponseData, - }), - retrieve: telnyxMethod({ - method: 'GET', - path: '/{id}', - urlParams: ['id'], - - transformResponseData: transformResponseData, - }), - retrieveComments: telnyxMethod({ - method: 'GET', - path: '/{id}/comments', - urlParams: ['id'], - - transformResponseData: transformResponseData, - }), - create: telnyxMethod({ - path: '/{id}/comments', - urlParams: ['id'], - method: 'POST', - transformResponseData: transformResponseData, - }), - listSupportingDocuments: telnyxMethod({ - method: 'GET', - path: '/{id}/supporting_documents', - urlParams: ['id'], - transformResponseData: transformResponseData, - }), - createListOfSupportingDocuments: telnyxMethod({ - method: 'POST', - path: '/{id}/supporting_documents', - urlParams: ['id'], - transformResponseData: transformResponseData, - }), - updateStatus: telnyxMethod({ - method: 'PATCH', - path: '/{id}/{status}', - urlParams: ['id'], - transformResponseData: transformResponseData, - }), -}); diff --git a/lib/resources/NumberReservations.js b/lib/resources/NumberReservations.js deleted file mode 100644 index 620e031..0000000 --- a/lib/resources/NumberReservations.js +++ /dev/null @@ -1,33 +0,0 @@ -'use strict'; - -var TelnyxResource = require('../TelnyxResource'); -var utils = require('../utils'); -var telnyxMethod = TelnyxResource.method; - -module.exports = require('../TelnyxResource').extend({ - path: 'number_reservations', - includeBasic: ['list', 'retrieve'], - - create: telnyxMethod({ - method: 'POST', - - transformResponseData: function(response, telnyx) { - return utils.addResourceToResponseData( - response, - telnyx, - 'numberReservations', - { - extend: telnyxMethod({ - method: 'POST', - path: '/{numberReservationId}/actions/extend', - urlParams: ['numberReservationId'], - paramsValues: [response.data.id], - paramsNames: ['id'], - methodType: 'create', - }), - } - ); - }, - }) -}); - diff --git a/lib/resources/NumbersFeatures.js b/lib/resources/NumbersFeatures.js deleted file mode 100644 index cdd77dc..0000000 --- a/lib/resources/NumbersFeatures.js +++ /dev/null @@ -1,15 +0,0 @@ -'use strict'; - -const TelnyxResource = require('../TelnyxResource'); -const telnyxMethod = TelnyxResource.method; - -module.exports = TelnyxResource.extend({ - path: 'numbers_features', - includeBasic: ['create'], - - PostNumbersFeatures: telnyxMethod({ - method: 'POST', - path: '/numbers_features', - }), - -}); diff --git a/lib/resources/Object.js b/lib/resources/Object.js deleted file mode 100644 index a95b336..0000000 --- a/lib/resources/Object.js +++ /dev/null @@ -1,21 +0,0 @@ -'use strict'; - -const TelnyxResource = require('../TelnyxResource'); -const telnyxMethod = TelnyxResource.method; - -module.exports = TelnyxResource.extend({ - path: 'object', - includeBasic: ['delete'], - - DeleteObject: telnyxMethod({ - method: 'DELETE', - path: '/{bucketName}/{objectName}', - urlParams: ['bucketName', 'objectName'], - }), - DeleteBucket: telnyxMethod({ - method: 'DELETE', - path: '/{bucketName}', - urlParams: ['bucketName'], - }), - -}); diff --git a/lib/resources/OtaUpdates.js b/lib/resources/OtaUpdates.js deleted file mode 100644 index 140fca7..0000000 --- a/lib/resources/OtaUpdates.js +++ /dev/null @@ -1,19 +0,0 @@ -'use strict'; - -const TelnyxResource = require('../TelnyxResource'); -const telnyxMethod = TelnyxResource.method; - -module.exports = TelnyxResource.extend({ - path: 'ota_updates', - includeBasic: ['list','retrieve'], - - GetOtaUpdate: telnyxMethod({ - method: 'GET', - path: '/ota_updates/{id}', - }), - ListOtaUpdates: telnyxMethod({ - method: 'GET', - path: '/ota_updates', - }), - -}); diff --git a/lib/resources/Outbound.js b/lib/resources/Outbound.js deleted file mode 100644 index 2d2d35e..0000000 --- a/lib/resources/Outbound.js +++ /dev/null @@ -1,55 +0,0 @@ -'use strict'; - -var TelnyxResource = require('../TelnyxResource'); -var utils = require('../utils'); -var telnyxMethod = TelnyxResource.method; - -function transformResponseData(response, telnyx) { - return utils.addResourceToResponseData( - response, - telnyx, - 'outboundVoiceProfiles', - { - del: telnyxMethod({ - method: 'DELETE', - path: '/{outboundId}', - urlParams: ['outboundId'], - paramsValues: [response.data.id], - paramsNames: ['id'], - }), - - update: telnyxMethod({ - method: 'PATCH', - path: '/{outboundId}', - urlParams: ['outboundId'], - paramsValues: [response.data.id], - paramsNames: ['id'], - }), - } - ); -} - -module.exports = require('../TelnyxResource').extend({ - path: 'outbound_voice_profiles', - - list: telnyxMethod({ - method: 'GET', - methodType: 'list', - - transformResponseData: transformResponseData, - }), - - create: telnyxMethod({ - method: 'POST', - - transformResponseData: transformResponseData, - }), - - retrieve: telnyxMethod({ - method: 'GET', - path: '/{id}', - urlParams: ['id'], - - transformResponseData: transformResponseData, - }), -}); diff --git a/lib/resources/OutboundVoiceProfiles.js b/lib/resources/OutboundVoiceProfiles.js deleted file mode 100644 index d068b5e..0000000 --- a/lib/resources/OutboundVoiceProfiles.js +++ /dev/null @@ -1,19 +0,0 @@ -'use strict'; - -const TelnyxResource = require('../TelnyxResource'); -const telnyxMethod = TelnyxResource.method; - -module.exports = TelnyxResource.extend({ - path: 'outbound_voice_profiles', - includeBasic: ['list','retrieve','delete'], - - ListOutboundVoiceProfiles: telnyxMethod({ - method: 'GET', - path: '/outbound_voice_profiles', - }), - DeleteOutboundVoiceProfile: telnyxMethod({ - method: 'DELETE', - path: '/outbound_voice_profiles/{id}', - }), - -}); diff --git a/lib/resources/PhoneNumberAssignmentByProfile.js b/lib/resources/PhoneNumberAssignmentByProfile.js deleted file mode 100644 index 449ac6e..0000000 --- a/lib/resources/PhoneNumberAssignmentByProfile.js +++ /dev/null @@ -1,55 +0,0 @@ -'use strict'; - -var TelnyxResource = require('../TelnyxResource'); -var utils = require('../utils'); -var telnyxMethod = TelnyxResource.method; - -function transformResponseData(response, telnyx) { - return utils.addResourceToResponseData( - response, - telnyx, - 'phoneNumberAssignmentByProfile', - { - del: telnyxMethod({ - method: 'DELETE', - path: '/{phoneNumberAssignmentByProfileId}', - urlParams: ['phoneNumberAssignmentByProfileId'], - paramsValues: [response.data.id], - paramsNames: ['id'], - }), - - update: telnyxMethod({ - method: 'PATCH', - path: '/{phoneNumberAssignmentByProfileId}', - urlParams: ['phoneNumberAssignmentByProfileId'], - paramsValues: [response.data.id], - paramsNames: ['id'], - }), - } - ); -} - -module.exports = TelnyxResource.extend({ - path: 'phoneNumberAssignmentByProfile', - - create: telnyxMethod({ - method: 'POST', - transformResponseData: transformResponseData, - }), - - retrieveTaskStatus: telnyxMethod({ - method: 'GET', - path: '/{taskId}', - urlParams: ['taskId'], - - transformResponseData: transformResponseData, - }), - - retrievePhoneNumberStatus: telnyxMethod({ - method: 'GET', - path: '/{taskId}/phoneNumbers', - urlParams: ['taskId'], - - transformResponseData: transformResponseData, - }), -}); diff --git a/lib/resources/PhoneNumberBlockOrders.js b/lib/resources/PhoneNumberBlockOrders.js deleted file mode 100644 index 1dcdb4c..0000000 --- a/lib/resources/PhoneNumberBlockOrders.js +++ /dev/null @@ -1,20 +0,0 @@ -'use strict'; - -const TelnyxResource = require('../TelnyxResource'); -const telnyxMethod = TelnyxResource.method; - -module.exports = TelnyxResource.extend({ - path: 'phone_number_block_orders', - includeBasic: ['list','retrieve'], - - RetrieveNumberBlockOrder: telnyxMethod({ - method: 'GET', - path: '/number_block_orders/{number_block_order_id}', - urlParams: ['number_block_order_id'], - }), - ListNumberBlockOrders: telnyxMethod({ - method: 'GET', - path: '/number_block_orders', - }), - -}); diff --git a/lib/resources/PhoneNumberBlocksBackgroundJobs.js b/lib/resources/PhoneNumberBlocksBackgroundJobs.js deleted file mode 100644 index d8775d6..0000000 --- a/lib/resources/PhoneNumberBlocksBackgroundJobs.js +++ /dev/null @@ -1,24 +0,0 @@ -'use strict'; - -const TelnyxResource = require('../TelnyxResource'); -const telnyxMethod = TelnyxResource.method; - -module.exports = TelnyxResource.extend({ - path: 'phone_number_blocks_background_jobs', - includeBasic: ['create','list','retrieve'], - - CreatePhoneNumberBlockDeletionJob: telnyxMethod({ - method: 'POST', - path: 'phone_number_blocks_jobs/delete/phone_number_block', - }), - GetPhoneNumberBlocksJob: telnyxMethod({ - method: 'GET', - path: 'phone_number_blocks_jobs{id}', - urlParams: ['id'], - }), - ListPhoneNumberBlocksJobs: telnyxMethod({ - method: 'GET', - path: '/phone_number_blocks_jobs', - }), - -}); diff --git a/lib/resources/PhoneNumberCampaigns.js b/lib/resources/PhoneNumberCampaigns.js deleted file mode 100644 index 59b1414..0000000 --- a/lib/resources/PhoneNumberCampaigns.js +++ /dev/null @@ -1,19 +0,0 @@ -'use strict'; - -const TelnyxResource = require('../TelnyxResource'); -const telnyxMethod = TelnyxResource.method; - -module.exports = TelnyxResource.extend({ - path: 'phone_number_campaigns', - includeBasic: ['delete','list','retrieve'], - - DeletePhoneNumberCampaign: telnyxMethod({ - method: 'DELETE', - path: '/phone_number_campaigns/{phoneNumber}', - urlParams: ['phoneNumber'], - }), - GetAllPhoneNumberCampaigns: telnyxMethod({ - method: 'GET', - path: '/phone_number_campaigns', - }), -}); diff --git a/lib/resources/PhoneNumberOrderDocuments.js b/lib/resources/PhoneNumberOrderDocuments.js deleted file mode 100644 index 9575ac7..0000000 --- a/lib/resources/PhoneNumberOrderDocuments.js +++ /dev/null @@ -1,20 +0,0 @@ -'use strict'; - -const TelnyxResource = require('../TelnyxResource'); -const telnyxMethod = TelnyxResource.method; - -module.exports = TelnyxResource.extend({ - path: 'phone_number_order_documents', - includeBasic: ['list','retrieve'], - - ListNumberOrderDocuments: telnyxMethod({ - method: 'GET', - path: '/number_order_documents', - }), - RetrieveNumberOrderDocument: telnyxMethod({ - method: 'GET', - path: '/number_order_documents/{number_order_document_id}', - urlParams: ['number_order_document_id'], - }), - -}); diff --git a/lib/resources/PhoneNumberRegulatoryRequirements.js b/lib/resources/PhoneNumberRegulatoryRequirements.js deleted file mode 100644 index 822068d..0000000 --- a/lib/resources/PhoneNumberRegulatoryRequirements.js +++ /dev/null @@ -1,9 +0,0 @@ -'use strict'; - -var TelnyxResource = require('../TelnyxResource'); - -module.exports = TelnyxResource.extend({ - path: 'phone_numbers_regulatory_requirements', - - includeBasic: ['list'], -}); diff --git a/lib/resources/PhoneNumberSearch.js b/lib/resources/PhoneNumberSearch.js deleted file mode 100644 index b553c4e..0000000 --- a/lib/resources/PhoneNumberSearch.js +++ /dev/null @@ -1,19 +0,0 @@ -'use strict'; - -const TelnyxResource = require('../TelnyxResource'); -const telnyxMethod = TelnyxResource.method; - -module.exports = TelnyxResource.extend({ - path: 'phone_number_search', - includeBasic: ['list','retrieve'], - - ListAvailablePhoneNumbers: telnyxMethod({ - method: 'GET', - path: '/available_phone_numbers', - }), - ListAvailablePhoneNumberBlocks: telnyxMethod({ - method: 'GET', - path: '/available_phone_number_blocks', - }), - -}); diff --git a/lib/resources/PhoneNumbers.js b/lib/resources/PhoneNumbers.js deleted file mode 100644 index e60ed9d..0000000 --- a/lib/resources/PhoneNumbers.js +++ /dev/null @@ -1,48 +0,0 @@ -'use strict'; - -var TelnyxResource = require('../TelnyxResource'); -var telnyxMethod = TelnyxResource.method; - -module.exports = require('../TelnyxResource').extend({ - path: 'phone_numbers', - includeBasic: ['list', 'retrieve', 'update', 'del'], - - nestedResources: { - Messaging: require('./PhoneNumbersMessaging'), - Voice: require('./PhoneNumbersVoice'), - Inbound: require('./PhoneNumbersInboundChannels'), - }, - - retrieveVoiceSettings: telnyxMethod({ - method: 'GET', - path: '/{id}/voice', - urlParams: ['id'], - methodType: 'retrieve', - }), - - updateVoiceSettings: telnyxMethod({ - method: 'PATCH', - path: '/{id}/voice', - urlParams: ['id'], - }), - - retrieveMessagingSettings: telnyxMethod({ - method: 'GET', - path: '/{id}/messaging', - urlParams: ['id'], - methodType: 'retrieve', - }), - - updateMessagingSettings: telnyxMethod({ - method: 'PATCH', - path: '/{id}/messaging', - urlParams: ['id'], - }), - - setEmergencySettings: telnyxMethod({ - method: 'POST', - path: '/{id}/actions/enable_emergency', - urlParams: ['id'], - }), - -}); diff --git a/lib/resources/PhoneNumbersInboundChannels.js b/lib/resources/PhoneNumbersInboundChannels.js deleted file mode 100644 index 7444b92..0000000 --- a/lib/resources/PhoneNumbersInboundChannels.js +++ /dev/null @@ -1,34 +0,0 @@ -'use strict'; - -var TelnyxResource = require('../TelnyxResource'); -var utils = require('../utils'); -var telnyxMethod = TelnyxResource.method; - -function transformResponseData(response, telnyx) { - return utils.addResourceToResponseData( - response, - telnyx, - 'phoneNumbersInboundChannels', - { - update: telnyxMethod({ - method: 'PATCH', - path: '', - urlParams: ['channels'], - paramsValues: [response.data.id], - paramsNames: ['channels'], - }), - } - ); -} - -module.exports = require('../TelnyxResource').extend({ - path: 'phone_numbers/inbound_channels', - - retrieve: telnyxMethod({ - method: 'GET', - path: '', - urlParams: [], - - transformResponseData: transformResponseData, - }), -}); diff --git a/lib/resources/PhoneNumbersMessaging.js b/lib/resources/PhoneNumbersMessaging.js deleted file mode 100644 index e66575c..0000000 --- a/lib/resources/PhoneNumbersMessaging.js +++ /dev/null @@ -1,6 +0,0 @@ -'use strict'; - -module.exports = require('../TelnyxResource').extend({ - path: 'phone_numbers/messaging', - includeBasic: ['list'], -}); diff --git a/lib/resources/PhoneNumbersVoice.js b/lib/resources/PhoneNumbersVoice.js deleted file mode 100644 index 3129b53..0000000 --- a/lib/resources/PhoneNumbersVoice.js +++ /dev/null @@ -1,6 +0,0 @@ -'use strict'; - -module.exports = require('../TelnyxResource').extend({ - path: 'phone_numbers/voice', - includeBasic: ['list'], -}); diff --git a/lib/resources/PortabilityChecks.js b/lib/resources/PortabilityChecks.js deleted file mode 100644 index 0c6b0b8..0000000 --- a/lib/resources/PortabilityChecks.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -var TelnyxResource = require('../TelnyxResource'); -var telnyxMethod = TelnyxResource.method; - -module.exports = TelnyxResource.extend({ - path: 'portability_checks', - - run: telnyxMethod({ - method: 'POST' - }), -}); diff --git a/lib/resources/PortingOrders.js b/lib/resources/PortingOrders.js deleted file mode 100644 index 84a939e..0000000 --- a/lib/resources/PortingOrders.js +++ /dev/null @@ -1,107 +0,0 @@ -'use strict'; - -var TelnyxResource = require('../TelnyxResource'); -var utils = require('../utils'); -var telnyxMethod = TelnyxResource.method; - -function transformResponseData(response, telnyx) { - return utils.addResourceToResponseData( - response, - telnyx, - 'portingOrders', - { - del: telnyxMethod({ - method: 'DELETE', - path: '/{portingOrderId}', - urlParams: ['portingOrderId'], - paramsValues: [response.data.id], - paramsNames: ['id'], - }), - - update: telnyxMethod({ - method: 'PATCH', - path: '/{portingOrderId}', - urlParams: ['portingOrderId'], - paramsValues: [response.data.id], - paramsNames: ['id'], - }), - } - ); -} - -module.exports = TelnyxResource.extend({ - path: 'porting_orders', - - list: telnyxMethod({ - method: 'GET', - methodType: 'list', - - transformResponseData: transformResponseData, - }), - - create: telnyxMethod({ - method: 'POST', - methodType: 'create', - - transformResponseData: transformResponseData, - }), - - // include_phone_numbers query param - retrieve: telnyxMethod({ - method: 'GET', - path: '/{id}', - urlParams: ['id'], - - transformResponseData: transformResponseData, - }), - - listExceptionTypes: telnyxMethod({ - method: 'GET', - path: '/exception_types', - methodType: 'list', - }), - - listActivationJobs: telnyxMethod({ - method: 'GET', - path: '/{id}/activation_jobs', - methodType: 'list', - urlParams: ['id'] - }), - - cancelOrder: telnyxMethod({ - method: 'POST', - path: '/{id}/actions/cancel', - urlParams: ['id'] - }), - - listAllowedFocWindows: telnyxMethod({ - method: 'GET', - path: '/{id}/allowed_foc_windows', - methodType: 'list', - urlParams: ['id'] - }), - - retrieveLoaTemplate: telnyxMethod({ - method: 'GET', - path: '/{id}/loa_template', - urlParams: ['id'], - }), - - confirmOrder: telnyxMethod({ - method: 'POST', - path: '/{id}/actions/confirm', - urlParams: ['id'], - }), - createComment: telnyxMethod({ - method: 'POST', - path: '/{id}/comments', - methodType: 'create', - urlParams: ['id'] - }), - listComments: telnyxMethod({ - method: 'GET', - path: '/{id}/comments', - methodType: 'list', - urlParams: ['id'] - }) -}); diff --git a/lib/resources/PortingPhoneNumbers.js b/lib/resources/PortingPhoneNumbers.js deleted file mode 100644 index cbed57c..0000000 --- a/lib/resources/PortingPhoneNumbers.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict'; - -var TelnyxResource = require('../TelnyxResource'); - -module.exports = TelnyxResource.extend({ - path: 'porting_phone_numbers', - includeBasic: ['list'] -}); diff --git a/lib/resources/PortoutRequests.js b/lib/resources/PortoutRequests.js deleted file mode 100644 index 526a99c..0000000 --- a/lib/resources/PortoutRequests.js +++ /dev/null @@ -1,53 +0,0 @@ -'use strict'; - -var TelnyxResource = require('../TelnyxResource'); -var telnyxMethod = TelnyxResource.method; - -module.exports = TelnyxResource.extend({ - path: 'portouts', - includeBasic: ['list', 'retrieve'], - - updateStatus: telnyxMethod({ - method: 'PATCH', - path: '/{id}/{status}', - urlParams: ['id', 'status'], - }), - - listComments: telnyxMethod({ - method: 'GET', - path: '/{id}/comments', - urlParams: ['id'], - methodType: 'list', - }), - - createComment: telnyxMethod({ - method: 'POST', - path: '/{id}/comments', - urlParams: ['id'], - methodType: 'create', - }), - retrieveRequest: telnyxMethod({ - method: 'GET', - path: '/{id}', - urlParams: ['id'], - methodType: 'retrieve', - }), - retrieveComment: telnyxMethod({ - method: 'GET', - path: '/{id}/comments', - urlParams: ['id'], - methodType: 'retrieve', - }), - listDocuments: telnyxMethod({ - method: 'GET', - path: '/{id}/supporting_documents', - urlParams: ['id'], - methodType: 'list', - }), - createDocuments: telnyxMethod({ - method: 'POST', - path: '/{id}/supporting_documents', - urlParams: ['id'], - methodType: 'create', - }), -}); diff --git a/lib/resources/PresignedObjectUrls.js b/lib/resources/PresignedObjectUrls.js deleted file mode 100644 index c4d7ff6..0000000 --- a/lib/resources/PresignedObjectUrls.js +++ /dev/null @@ -1,16 +0,0 @@ -'use strict'; - -const TelnyxResource = require('../TelnyxResource'); -const telnyxMethod = TelnyxResource.method; - -module.exports = TelnyxResource.extend({ - path: 'presigned_object_urls', - includeBasic: ['create'], - - GetPresignedObjectUrl: telnyxMethod({ - method: 'POST', - path: '/storage_buckets/{bucketName}/{objectName}/presigned_url', - urlParams: ['bucketName', 'objectName'], - }), - -}); diff --git a/lib/resources/PrivateWirelessGateways.js b/lib/resources/PrivateWirelessGateways.js deleted file mode 100644 index 4a51d47..0000000 --- a/lib/resources/PrivateWirelessGateways.js +++ /dev/null @@ -1,19 +0,0 @@ -'use strict'; - -const TelnyxResource = require('../TelnyxResource'); -const telnyxMethod = TelnyxResource.method; - -module.exports = TelnyxResource.extend({ - path: 'private_wireless_gateways', - includeBasic: ['list','retrieve','delete'], - - GetPrivateWirelessGateways: telnyxMethod({ - method: 'GET', - path: '/private_wireless_gateways', - }), - DeleteWirelessGateway: telnyxMethod({ - method: 'DELETE', - path: '/private_wireless_gateways/{id}', - }), - -}); diff --git a/lib/resources/PublicInternetGateways.js b/lib/resources/PublicInternetGateways.js deleted file mode 100644 index fb8a498..0000000 --- a/lib/resources/PublicInternetGateways.js +++ /dev/null @@ -1,19 +0,0 @@ -'use strict'; - -const TelnyxResource = require('../TelnyxResource'); -const telnyxMethod = TelnyxResource.method; - -module.exports = TelnyxResource.extend({ - path: 'public_internet_gateways', - includeBasic: ['delete','list','retrieve'], - - DeletePublicInternetGateway: telnyxMethod({ - method: 'DELETE', - path: '/public_internet_gateways/{id}', - }), - ListPublicInternetGateways: telnyxMethod({ - method: 'GET', - path: '/public_internet_gateways', - }), - -}); diff --git a/lib/resources/PublicKey.js b/lib/resources/PublicKey.js deleted file mode 100644 index 83b1086..0000000 --- a/lib/resources/PublicKey.js +++ /dev/null @@ -1,13 +0,0 @@ -'use strict'; - -var TelnyxResource = require('../TelnyxResource'); -var telnyxMethod = TelnyxResource.method; - -module.exports = TelnyxResource.extend({ - - path: 'public_key', - - retrieve: telnyxMethod({ - method: 'GET', - }) -}); diff --git a/lib/resources/PushCredentials.js b/lib/resources/PushCredentials.js deleted file mode 100644 index 73681d3..0000000 --- a/lib/resources/PushCredentials.js +++ /dev/null @@ -1,20 +0,0 @@ -'use strict'; - -const TelnyxResource = require('../TelnyxResource'); -const telnyxMethod = TelnyxResource.method; - -module.exports = TelnyxResource.extend({ - path: 'push_credentials', - includeBasic: ['list','retrieve','delete'], - - ListPushCredentials: telnyxMethod({ - method: 'GET', - path: '/mobile_push_credentials', - }), - DeletePushCredentialById: telnyxMethod({ - method: 'DELETE', - path: '/mobile_push_credentials/{push/credential/id}', - urlParams: ['push_credential_id'], - }), - -}); diff --git a/lib/resources/Queues.js b/lib/resources/Queues.js deleted file mode 100644 index ba8f2b2..0000000 --- a/lib/resources/Queues.js +++ /dev/null @@ -1,41 +0,0 @@ -'use strict'; - -var TelnyxResource = require('../TelnyxResource'); -var utils = require('../utils'); -var telnyxMethod = TelnyxResource.method; - -function transformResponseData(response, telnyx) { - return utils.addResourceToResponseData( - response, - telnyx, - 'queues' - ); -} - -module.exports = TelnyxResource.extend({ - path: 'queues', - - retrieve: telnyxMethod({ - method: 'GET', - path: '/{id}', - urlParams: ['id'], - - transformResponseData: transformResponseData, - }), - - list_calls: telnyxMethod({ - method: 'GET', - path: '/{id}/calls', - urlParams: ['id'], - - transformResponseData: transformResponseData, - }), - - retrieve_call: telnyxMethod({ - method: 'GET', - path: '/{id}/calls/{callControlID}', - urlParams: ['id','callControlID'], - - transformResponseData: transformResponseData, - }), -}); diff --git a/lib/resources/RecordingsCommands.js b/lib/resources/RecordingsCommands.js deleted file mode 100644 index 41307d1..0000000 --- a/lib/resources/RecordingsCommands.js +++ /dev/null @@ -1,16 +0,0 @@ -'use strict'; - -const TelnyxResource = require('../TelnyxResource'); -const telnyxMethod = TelnyxResource.method; - -module.exports = TelnyxResource.extend({ - path: 'recordings_commands', - includeBasic: ['list','retrieve'], - - RetrieveRecording: telnyxMethod({ - method: 'GET', - path: '/recordings/{id}', - urlParams: ['id'], - }), - -}); diff --git a/lib/resources/Regions.js b/lib/resources/Regions.js deleted file mode 100644 index b6f309e..0000000 --- a/lib/resources/Regions.js +++ /dev/null @@ -1,15 +0,0 @@ -'use strict'; - -const TelnyxResource = require('../TelnyxResource'); -const telnyxMethod = TelnyxResource.method; - -module.exports = TelnyxResource.extend({ - path: 'regions', - includeBasic: ['list','retrieve'], - - ListRegions: telnyxMethod({ - method: 'GET', - path: '/regions', - }), - -}); diff --git a/lib/resources/RegisterCall.js b/lib/resources/RegisterCall.js deleted file mode 100644 index 7a3e117..0000000 --- a/lib/resources/RegisterCall.js +++ /dev/null @@ -1,6 +0,0 @@ -'use strict'; - -module.exports = require('../TelnyxResource').extend({ - path: '/calls/register', - includeBasic: ['create'], -}); diff --git a/lib/resources/RegulatoryRequirements.js b/lib/resources/RegulatoryRequirements.js deleted file mode 100644 index bfae631..0000000 --- a/lib/resources/RegulatoryRequirements.js +++ /dev/null @@ -1,9 +0,0 @@ -'use strict'; - -var TelnyxResource = require('../TelnyxResource'); - -module.exports = TelnyxResource.extend({ - path: 'regulatory_requirements', - - includeBasic: ['list', 'retrieve'], -}); diff --git a/lib/resources/Reporting.js b/lib/resources/Reporting.js deleted file mode 100644 index 5a35d1b..0000000 --- a/lib/resources/Reporting.js +++ /dev/null @@ -1,19 +0,0 @@ -'use strict'; - -const TelnyxResource = require('../TelnyxResource'); -const telnyxMethod = TelnyxResource.method; - -module.exports = TelnyxResource.extend({ - path: 'reporting', - includeBasic: ['list','retrieve','delete'], - - GetWdrReports: telnyxMethod({ - method: 'GET', - path: '/wireless_detail_records/reports', - }), - DeleteWdrReport: telnyxMethod({ - method: 'DELETE', - path: '/wireless_detail_records/reports/{id}', - }), - -}); diff --git a/lib/resources/Reports.js b/lib/resources/Reports.js deleted file mode 100644 index c0d5de7..0000000 --- a/lib/resources/Reports.js +++ /dev/null @@ -1,19 +0,0 @@ -'use strict'; - -const TelnyxResource = require('../TelnyxResource'); -const telnyxMethod = TelnyxResource.method; - -module.exports = TelnyxResource.extend({ - path: 'reports', - includeBasic: ['list','retrieve','create'], - - GetBillingGroupReport: telnyxMethod({ - method: 'GET', - path: '/ledger/billing_group/reports/{id}', - }), - CreateBillingGroupReport: telnyxMethod({ - method: 'POST', - path: '/ledger/billing_group/reports', - }), - -}); diff --git a/lib/resources/ReportsMdrs.js b/lib/resources/ReportsMdrs.js deleted file mode 100644 index 2577574..0000000 --- a/lib/resources/ReportsMdrs.js +++ /dev/null @@ -1,6 +0,0 @@ -'use strict'; - -module.exports = require('../TelnyxResource').extend({ - path: '/reports/mdrs', - includeBasic: ['list'], -}); diff --git a/lib/resources/RequirementTypes.js b/lib/resources/RequirementTypes.js deleted file mode 100644 index 9dace89..0000000 --- a/lib/resources/RequirementTypes.js +++ /dev/null @@ -1,19 +0,0 @@ -'use strict'; - -const TelnyxResource = require('../TelnyxResource'); -const telnyxMethod = TelnyxResource.method; - -module.exports = TelnyxResource.extend({ - path: 'requirement_types', - includeBasic: ['list','retrieve'], - - RetrieveRequirementType: telnyxMethod({ - method: 'GET', - path: '/requirement_types/{id}', - }), - ListRequirementTypes: telnyxMethod({ - method: 'GET', - path: '/requirement_types', - }), - -}); diff --git a/lib/resources/Requirements.js b/lib/resources/Requirements.js deleted file mode 100644 index ca2d514..0000000 --- a/lib/resources/Requirements.js +++ /dev/null @@ -1,19 +0,0 @@ -'use strict'; - -const TelnyxResource = require('../TelnyxResource'); -const telnyxMethod = TelnyxResource.method; - -module.exports = TelnyxResource.extend({ - path: 'requirements', - includeBasic: ['list','retrieve'], - - ListRequirements: telnyxMethod({ - method: 'GET', - path: '/requirements', - }), - RetrieveDocumentRequirements: telnyxMethod({ - method: 'GET', - path: '/requirements/{id}', - }), - -}); diff --git a/lib/resources/RoomCompositions.js b/lib/resources/RoomCompositions.js deleted file mode 100644 index 8213c6f..0000000 --- a/lib/resources/RoomCompositions.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict'; - -var TelnyxResource = require('../TelnyxResource'); - -module.exports = TelnyxResource.extend({ - path: '/room_compositions', - includeBasic: ['list', 'retrieve', 'create', 'del'], -}); diff --git a/lib/resources/RoomParticipants.js b/lib/resources/RoomParticipants.js deleted file mode 100644 index eb2759d..0000000 --- a/lib/resources/RoomParticipants.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict'; - -var TelnyxResource = require('../TelnyxResource'); - -module.exports = TelnyxResource.extend({ - path: '/room_participants', - includeBasic: ['list', 'retrieve'], -}); diff --git a/lib/resources/RoomRecordings.js b/lib/resources/RoomRecordings.js deleted file mode 100644 index 44fcc50..0000000 --- a/lib/resources/RoomRecordings.js +++ /dev/null @@ -1,20 +0,0 @@ -'use strict'; - -const TelnyxResource = require('../TelnyxResource'); -const telnyxMethod = TelnyxResource.method; - -module.exports = TelnyxResource.extend({ - path: 'room_recordings', - includeBasic: ['delete'], - - DeleteRoomRecording: telnyxMethod({ - method: 'DELETE', - path: '/room_recordings/{room/recording/id}', - urlParams: ['room_recording_id'], - }), - DeleteRoomRecordings: telnyxMethod({ - method: 'DELETE', - path: '/room_recordings', - }), - -}); diff --git a/lib/resources/RoomSessions.js b/lib/resources/RoomSessions.js deleted file mode 100644 index 2523336..0000000 --- a/lib/resources/RoomSessions.js +++ /dev/null @@ -1,43 +0,0 @@ -'use strict'; - -var TelnyxResource = require('../TelnyxResource'); -var telnyxMethod = TelnyxResource.method; - -module.exports = TelnyxResource.extend({ - path: '/room_sessions', - - list: telnyxMethod({ - method: 'GET', - }), - - retrieveRoomSessionId: telnyxMethod({ - method: 'GET', - path: '/{room_session_id}', - urlParams: ['room_session_id'], - }), - muteSession: telnyxMethod({ - method: 'POST', - path: '/{room_session_id}/actions/mute', - urlParams: ['room_session_id'], - }), - unmuteSession: telnyxMethod({ - method: 'POST', - path: '/{room_session_id}/actions/unmute', - urlParams: ['room_session_id'], - }), - kickParticipant: telnyxMethod({ - method: 'POST', - path: '/{room_session_id}/actions/kick', - urlParams: ['room_session_id'], - }), - endSession: telnyxMethod({ - method: 'POST', - path: '/{room_session_id}/actions/end', - urlParams: ['room_session_id'], - }), - retrieveParticipants: telnyxMethod({ - method: 'GET', - path: '/{room_session_id}/participants', - urlParams: ['room_session_id'], - }), -}); diff --git a/lib/resources/Rooms.js b/lib/resources/Rooms.js deleted file mode 100644 index 7131198..0000000 --- a/lib/resources/Rooms.js +++ /dev/null @@ -1,6 +0,0 @@ -'use strict'; - -module.exports = require('../TelnyxResource').extend({ - path: 'rooms', - includeBasic: ['list', 'create', 'retrieve', 'update', 'del'], -}); diff --git a/lib/resources/RoomsClientToken.js b/lib/resources/RoomsClientToken.js deleted file mode 100644 index a4a5b3e..0000000 --- a/lib/resources/RoomsClientToken.js +++ /dev/null @@ -1,18 +0,0 @@ -'use strict'; - -var TelnyxResource = require('../TelnyxResource'); -var telnyxMethod = TelnyxResource.method; - -module.exports = TelnyxResource.extend({ - path: 'rooms/{room_id}/actions', - retrieveGenerateJoinClientToken: telnyxMethod({ - method: 'POST', - path: '/generate_join_client_token', - urlParams: ['room_id'], - }), - retrieveRefreshClientToken: telnyxMethod({ - method: 'POST', - path: '/refresh_client_token', - urlParams: ['room_id'], - }), -}); diff --git a/lib/resources/RoomsClientTokens.js b/lib/resources/RoomsClientTokens.js deleted file mode 100644 index c7a6fab..0000000 --- a/lib/resources/RoomsClientTokens.js +++ /dev/null @@ -1,21 +0,0 @@ -'use strict'; - -const TelnyxResource = require('../TelnyxResource'); -const telnyxMethod = TelnyxResource.method; - -module.exports = TelnyxResource.extend({ - path: 'rooms_client_tokens', - includeBasic: ['create'], - - RefreshRoomClientToken: telnyxMethod({ - method: 'POST', - path: '/rooms/{room/id}/actions/refresh/client_token', - urlParams: ['room_id'], - }), - CreateRoomClientToken: telnyxMethod({ - method: 'POST', - path: '/rooms/{room/id}/actions/generate/join/client_token', - urlParams: ['room_id'], - }), - -}); diff --git a/lib/resources/SharedCampaigns.js b/lib/resources/SharedCampaigns.js deleted file mode 100644 index d54e604..0000000 --- a/lib/resources/SharedCampaigns.js +++ /dev/null @@ -1,20 +0,0 @@ -'use strict'; - -const TelnyxResource = require('../TelnyxResource'); -const telnyxMethod = TelnyxResource.method; - -module.exports = TelnyxResource.extend({ - path: 'shared_campaigns', - includeBasic: ['list','retrieve'], - - GetPartnerCampaignsSharedByUser: telnyxMethod({ - method: 'GET', - path: '/partnerCampaign/sharedByMe', - }), - GetCampaignSharingStatus: telnyxMethod({ - method: 'GET', - path: '/partnerCampaign/{campaignId}/sharing', - urlParams: ['campaignId'], - }), - -}); diff --git a/lib/resources/ShortCodes.js b/lib/resources/ShortCodes.js deleted file mode 100644 index dc1b916..0000000 --- a/lib/resources/ShortCodes.js +++ /dev/null @@ -1,39 +0,0 @@ -'use strict'; - -var TelnyxResource = require('../TelnyxResource'); -var utils = require('../utils'); -var telnyxMethod = TelnyxResource.method; - -function transformResponseData(response, telnyx) { - return utils.addResourceToResponseData( - response, - telnyx, - 'shortCodes', - { - update: telnyxMethod({ - method: 'PATCH', - path: '/{shortCodeId}', - urlParams: ['shortCodeId'], - paramsValues: [response.data.id], - paramsNames: ['id'], - }), - } - ); -} - -module.exports = TelnyxResource.extend({ - path: 'short_codes', - - list: telnyxMethod({ - method: 'GET', - methodType: 'list', - }), - - retrieve: telnyxMethod({ - method: 'GET', - path: '/{id}', - urlParams: ['id'], - - transformResponseData: transformResponseData, - }), -}); diff --git a/lib/resources/SimCardActions.js b/lib/resources/SimCardActions.js deleted file mode 100644 index 00b9b0c..0000000 --- a/lib/resources/SimCardActions.js +++ /dev/null @@ -1,27 +0,0 @@ -'use strict'; - -const TelnyxResource = require('../TelnyxResource'); -const telnyxMethod = TelnyxResource.method; - -module.exports = TelnyxResource.extend({ - path: 'sim_card_actions', - includeBasic: ['list','retrieve'], - - ListSimCardActions: telnyxMethod({ - method: 'GET', - path: '/sim/card/actions', - }), - ListBulkSimCardActions: telnyxMethod({ - method: 'GET', - path: '/bulk/sim/card/actions', - }), - GetBulkSimCardAction: telnyxMethod({ - method: 'GET', - path: '/bulk/sim/card/actions/{id}', - }), - GetSimCardAction: telnyxMethod({ - method: 'GET', - path: '/sim/card/actions/{id}', - }), - -}); diff --git a/lib/resources/SimCardGroupActions.js b/lib/resources/SimCardGroupActions.js deleted file mode 100644 index 3658d36..0000000 --- a/lib/resources/SimCardGroupActions.js +++ /dev/null @@ -1,19 +0,0 @@ -'use strict'; - -const TelnyxResource = require('../TelnyxResource'); -const telnyxMethod = TelnyxResource.method; - -module.exports = TelnyxResource.extend({ - path: 'sim_card_group_actions', - includeBasic: ['list','retrieve'], - - GetSimCardGroupAction: telnyxMethod({ - method: 'GET', - path: '/sim_card_group/actions/{id}', - }), - GetSimCardGroupActions: telnyxMethod({ - method: 'GET', - path: '/sim_card_group/actions', - }), - -}); diff --git a/lib/resources/SimCardGroups.js b/lib/resources/SimCardGroups.js deleted file mode 100644 index 6313e21..0000000 --- a/lib/resources/SimCardGroups.js +++ /dev/null @@ -1,55 +0,0 @@ -'use strict'; - -var TelnyxResource = require('../TelnyxResource'); -var utils = require('../utils'); -var telnyxMethod = TelnyxResource.method; - -function transformResponseData(response, telnyx) { - return utils.addResourceToResponseData( - response, - telnyx, - 'simCardGroups', - { - del: telnyxMethod({ - method: 'DELETE', - path: '/{simCardGroupId}', - urlParams: ['simCardGroupId'], - paramsValues: [response.data.id], - paramsNames: ['id'], - }), - - update: telnyxMethod({ - method: 'PATCH', - path: '/{simCardGroupId}', - urlParams: ['simCardGroupId'], - paramsValues: [response.data.id], - paramsNames: ['id'], - }), - } - ); -} - -module.exports = TelnyxResource.extend({ - path: 'sim_card_groups', - - list: telnyxMethod({ - method: 'GET', - methodType: 'list', - - transformResponseData: transformResponseData, - }), - - create: telnyxMethod({ - method: 'POST', - - transformResponseData: transformResponseData, - }), - - retrieve: telnyxMethod({ - method: 'GET', - path: '/{id}', - urlParams: ['id'], - - transformResponseData: transformResponseData, - }), -}); diff --git a/lib/resources/SimCardOrders.js b/lib/resources/SimCardOrders.js deleted file mode 100644 index 6c74f44..0000000 --- a/lib/resources/SimCardOrders.js +++ /dev/null @@ -1,6 +0,0 @@ -'use strict'; - -module.exports = require('../TelnyxResource').extend({ - path: 'sim_card_orders', - includeBasic: ['list', 'retrieve'], -}); diff --git a/lib/resources/SimCards.js b/lib/resources/SimCards.js deleted file mode 100644 index 9ebde04..0000000 --- a/lib/resources/SimCards.js +++ /dev/null @@ -1,139 +0,0 @@ -'use strict'; - -var TelnyxResource = require('../TelnyxResource'); -var utils = require('../utils'); -var telnyxMethod = TelnyxResource.method; - -function transformResponseData(response, telnyx) { - return utils.addResourceToResponseData(response, telnyx, 'simCards', { - del: telnyxMethod({ - method: 'DELETE', - path: '/{sim_card_id}', - urlParams: ['sim_card_id'], - paramsValues: [response.data.id], - paramsNames: ['id'], - }), - - save: telnyxMethod({ - method: 'PATCH', - path: '/{sim_card_id}', - urlParams: ['sim_card_id'], - paramsValues: [response.data.id], - paramsNames: ['id'], - }), - - activate: telnyxMethod({ - method: 'POST', - path: '/{sim_card_id}/actions/enable', - urlParams: ['sim_card_id'], - paramsValues: [response.data.id], - paramsNames: ['id'], - }), - - deactivate: telnyxMethod({ - method: 'POST', - path: '/{sim_card_id}/actions/disable', - urlParams: ['sim_card_id'], - paramsValues: [response.data.id], - paramsNames: ['id'], - }), - - enable: telnyxMethod({ - method: 'POST', - path: '/{sim_card_id}/actions/enable', - urlParams: ['sim_card_id'], - paramsValues: [response.data.id], - paramsNames: ['id'], - }), - - disable: telnyxMethod({ - method: 'POST', - path: '/{sim_card_id}/actions/disable', - urlParams: ['sim_card_id'], - paramsValues: [response.data.id], - paramsNames: ['id'], - }), - - setStandby: telnyxMethod({ - method: 'POST', - path: '/{sim_card_id}/actions/set_standby', - urlParams: ['sim_card_id'], - paramsValues: [response.data.id], - paramsNames: ['id'], - }), - - retrieveNetworkPreferences: telnyxMethod({ - method: 'GET', - path: '/{sim_card_id}/network_preferences', - urlParams: ['sim_card_id'], - paramsValues: [response.data.id], - paramsNames: ['id'], - }), - - setNetworkPreferences: telnyxMethod({ - method: 'PUT', - path: '/{sim_card_id}/network_preferences', - urlParams: ['sim_card_id'], - paramsValues: [response.data.id], - paramsNames: ['id'], - }), - - deleteNetworkPreferences: telnyxMethod({ - method: 'DELETE', - path: '/{sim_card_id}/network_preferences', - urlParams: ['sim_card_id'], - paramsValues: [response.data.id], - paramsNames: ['id'], - }), - - retrievePublicIP: telnyxMethod({ - method: 'GET', - path: '/{sim_card_id}/public_ip', - urlParams: ['sim_card_id'], - paramsValues: [response.data.id], - paramsNames: ['id'], - }), - - setPublicIP: telnyxMethod({ - method: 'POST', - path: '/{sim_card_id}/public_ip', - urlParams: ['sim_card_id'], - paramsValues: [response.data.id], - paramsNames: ['id'], - }), - - deletePublicIP: telnyxMethod({ - method: 'DELETE', - path: '/{sim_card_id}/public_ip', - urlParams: ['sim_card_id'], - paramsValues: [response.data.id], - paramsNames: ['id'], - }), - }); -} - -module.exports = TelnyxResource.extend({ - path: 'sim_cards', - includeBasic: ['update'], - - list: telnyxMethod({ - method: 'GET', - methodType: 'list', - - transformResponseData: transformResponseData, - }), - - create: telnyxMethod({ - method: 'POST', - - transformResponseData: transformResponseData, - }), - - retrieve: telnyxMethod({ - method: 'GET', - path: '/{id}', - urlParams: ['id'], - - transformResponseData: transformResponseData, - }), -}); diff --git a/lib/resources/SslCertificates.js b/lib/resources/SslCertificates.js deleted file mode 100644 index b35fa72..0000000 --- a/lib/resources/SslCertificates.js +++ /dev/null @@ -1,20 +0,0 @@ -'use strict'; - -const TelnyxResource = require('../TelnyxResource'); -const telnyxMethod = TelnyxResource.method; - -module.exports = TelnyxResource.extend({ - path: 'ssl_certificates', - includeBasic: ['delete','list','retrieve'], - - RemoveStorageSSLCertificate: telnyxMethod({ - method: 'DELETE', - path: '/storage/ssl_certificates/{ssl/certificate/id}', - urlParams: ['ssl_certificate_id'], - }), - GetStorageSSLCertificates: telnyxMethod({ - method: 'GET', - path: '/storage/ssl_certificates', - }), - -}); diff --git a/lib/resources/TeXMLApplication.js b/lib/resources/TeXMLApplication.js deleted file mode 100644 index 43818f1..0000000 --- a/lib/resources/TeXMLApplication.js +++ /dev/null @@ -1,6 +0,0 @@ -'use strict'; - -module.exports = require('../TelnyxResource').extend({ - path: 'texml_applications', - includeBasic: ['list', 'create', 'retrieve', 'del', 'update'], -}); diff --git a/lib/resources/TelephonyCredentials.js b/lib/resources/TelephonyCredentials.js deleted file mode 100644 index 4099181..0000000 --- a/lib/resources/TelephonyCredentials.js +++ /dev/null @@ -1,55 +0,0 @@ -'use strict'; - -var TelnyxResource = require('../TelnyxResource'); -var utils = require('../utils'); -var telnyxMethod = TelnyxResource.method; - -function transformResponseData(response, telnyx) { - return utils.addResourceToResponseData( - response, - telnyx, - 'telephonyCredentials', - { - del: telnyxMethod({ - method: 'DELETE', - path: '/{telephony_credential_id}', - urlParams: ['telephony_credential_id'], - paramsValues: [response.data.id], - paramsNames: ['id'], - }), - } - ); -} - -var telephonyCredentialResource = { - path: 'telephony_credentials', - - includeBasic: ['del', 'list', 'update'], - - create: telnyxMethod({ - method: 'POST', - - transformResponseData: transformResponseData, - }), - - retrieve: telnyxMethod({ - method: 'POST', - path: '/{id}/token', - urlParams: ['id'], - - transformResponseData: transformResponseData, - }), - - retrieveCredential: telnyxMethod({ - method: 'GET', - path: '/{id}', - urlParams: ['id'], - - transformResponseData: transformResponseData, - }), - -}; - -telephonyCredentialResource.generateAccessTokenFromCredential = telephonyCredentialResource.retrieve; - -module.exports = TelnyxResource.extend(telephonyCredentialResource); diff --git a/lib/resources/UpdateClientState.js b/lib/resources/UpdateClientState.js deleted file mode 100644 index deb3734..0000000 --- a/lib/resources/UpdateClientState.js +++ /dev/null @@ -1,22 +0,0 @@ -'use strict'; - -var TelnyxResource = require('../TelnyxResource'); -var utils = require('../utils'); -var telnyxMethod = TelnyxResource.method; - -function transformResponseData(response, telnyx) { - return utils.addResourceToResponseData( - response, - telnyx, - 'updateClientState', - {} - ); -} -module.exports = TelnyxResource.extend({ - path: 'calls/{call_control_id}/actions/client_state_update', - update: telnyxMethod({ - urlParams: ['call_control_id'], - method: 'PUT', - transformResponseData: transformResponseData, - }), -}); diff --git a/lib/resources/Verifications.js b/lib/resources/Verifications.js deleted file mode 100644 index 0342985..0000000 --- a/lib/resources/Verifications.js +++ /dev/null @@ -1,68 +0,0 @@ -'use strict'; - -const TelnyxResource = require('../TelnyxResource'); -var utils = require('../utils'); -const telnyxMethod = TelnyxResource.method; - -function transformResponseData(response, telnyx) { - return utils.addResourceToResponseData(response, telnyx, 'verification', { - sms: telnyxMethod({ - method: 'POST', - path: '/sms', - - transformResponseData: transformResponseData, - }), - - call: telnyxMethod({ - method: 'POST', - path: '/call', - - transformResponseData: transformResponseData, - }), - - flashcall: telnyxMethod({ - method: 'POST', - path: '/flashcall', - - transformResponseData: transformResponseData, - }), - - byPhoneNumber: telnyxMethod({ - method: 'GET', - path: '/verifications/by_phone_number/{phone_number}', - urlParams: ['phone_number'], - paramsValues: [response.data.id], - paramsNames: ['id'], - }), - - verifyVerificationCodeByPhoneNumber: telnyxMethod({ - method: 'POST', - path: '/by_phone_number/{phone_number}/actions/verify', - urlParams: ['phone_number'], - paramsValues: [response.data.id], - paramsNames: ['id'], - }), - - verifyVerificationCodeById: telnyxMethod({ - method: 'POST', - path: '/by_phone_number/{verification_id}/actions/verify', - urlParams: ['verification_id'], - paramsValues: [response.data.id], - paramsNames: ['id'], - }), - - }); -} - -module.exports = TelnyxResource.extend({ - path: 'verifications', - includeBasic: ['update'], - - retrieve: telnyxMethod({ - method: 'GET', - path: '/{verification_id}', - urlParams: ['verification_id'], - - transformResponseData: transformResponseData, - }), -}); diff --git a/lib/resources/VerifiedCallsDisplayProfile.js b/lib/resources/VerifiedCallsDisplayProfile.js deleted file mode 100644 index 9c74cb8..0000000 --- a/lib/resources/VerifiedCallsDisplayProfile.js +++ /dev/null @@ -1,25 +0,0 @@ -'use strict'; - -const TelnyxResource = require('../TelnyxResource'); -const telnyxMethod = TelnyxResource.method; - -module.exports = TelnyxResource.extend({ - path: 'verified_calls_display_profile', - includeBasic: ['delete','list','retrieve','create'], - - DeleteProfile: telnyxMethod({ - method: 'DELETE', - path: '/verified_calls_display_profiles/{id}', - urlParams: ['id'], - }), - ListProfiles: telnyxMethod({ - method: 'GET', - path: '/verified_calls_display_profiles', - }), - CreateProfileVerificationRequest: telnyxMethod({ - method: 'POST', - path: '/verified_calls_display_profiles/{id}/verification_request', - urlParams: ['id'], - }), - -}); diff --git a/lib/resources/VerifiedCallsDisplayProfiles.js b/lib/resources/VerifiedCallsDisplayProfiles.js deleted file mode 100644 index d2cdb70..0000000 --- a/lib/resources/VerifiedCallsDisplayProfiles.js +++ /dev/null @@ -1,13 +0,0 @@ -'use strict'; - -var TelnyxResource = require('../TelnyxResource'); - -module.exports = TelnyxResource.extend({ - path: 'verified_calls_display_profiles', - - create: TelnyxResource.method({ - method: 'POST', - path: '/{id}/verification_request', - urlParams: ['id'], - }), -}); diff --git a/lib/resources/VerifiedNumbers.js b/lib/resources/VerifiedNumbers.js deleted file mode 100644 index a52ef22..0000000 --- a/lib/resources/VerifiedNumbers.js +++ /dev/null @@ -1,6 +0,0 @@ -'use strict'; - -module.exports = require('../TelnyxResource').extend({ - path: 'verified_numbers', - includeBasic: ['list', 'retrieve', 'del'], -}); diff --git a/lib/resources/Verify.js b/lib/resources/Verify.js deleted file mode 100644 index 8442482..0000000 --- a/lib/resources/Verify.js +++ /dev/null @@ -1,55 +0,0 @@ -'use strict'; - -const TelnyxResource = require('../TelnyxResource'); -const telnyxMethod = TelnyxResource.method; - -module.exports = TelnyxResource.extend({ - path: 'verify', - includeBasic: ['list','retrieve','create','delete'], - - RetrieveVerification: telnyxMethod({ - method: 'GET', - path: '/verifications/{verification/id}', - urlParams: ['verification_id'], - }), - CreateFlashcallVerification: telnyxMethod({ - method: 'POST', - path: '/verifications/flashcall', - }), - VerifyVerificationCode: telnyxMethod({ - method: 'POST', - path: '/verifications/by_phone_number/{phone/number}/actions/verify', - urlParams: ['phone_number'], - }), - CreateVerificationSms: telnyxMethod({ - method: 'POST', - path: '/verifications/sms', - }), - CreateVerificationPsd2: telnyxMethod({ - method: 'POST', - path: '/verifications/psd2', - }), - ListVerifications: telnyxMethod({ - method: 'GET', - path: '/verifications/by_phone_number/{phone/number}', - urlParams: ['phone_number'], - }), - ListProfiles: telnyxMethod({ - method: 'GET', - path: '/verify_profiles', - }), - CreateVerificationWhatsapp: telnyxMethod({ - method: 'POST', - path: '/verifications/whatsapp', - }), - DeleteProfile: telnyxMethod({ - method: 'DELETE', - path: '/verify_profiles/{verify/profile/id}', - urlParams: ['verify_profile_id'], - }), - CreateVerificationCall: telnyxMethod({ - method: 'POST', - path: '/verifications/call', - }), - -}); diff --git a/lib/resources/VerifyProfiles.js b/lib/resources/VerifyProfiles.js deleted file mode 100644 index 2ab3a8f..0000000 --- a/lib/resources/VerifyProfiles.js +++ /dev/null @@ -1,61 +0,0 @@ -'use strict'; - -var TelnyxResource = require('../TelnyxResource'); -var utils = require('../utils'); -var telnyxMethod = TelnyxResource.method; - -function transformResponseData(response, telnyx) { - return utils.addResourceToResponseData(response, telnyx, 'verifyProfiles', { - - - retrieveVerifyProfileMessageTemplates: telnyxMethod({ - method: 'GET', - path: '/verify_profiles/templates', - }), - }); -} - -module.exports = TelnyxResource.extend({ - path: 'sim_cards', - includeBasic: ['update'], - - delete: telnyxMethod({ - method: 'DELETE', - path: '/{verify_profile_id}', - urlParams: ['verify_profile_id'], - paramsNames: ['id'], - - transformResponseData: transformResponseData, - }), - - save: telnyxMethod({ - method: 'PATCH', - path: '/{verify_profile_id}', - urlParams: ['verify_profile_id'], - paramsNames: ['id'], - - transformResponseData: transformResponseData, - }), - - retrieve: telnyxMethod({ - method: 'GET', - path: '/{verify_profile_id}', - urlParams: ['verify_profile_id'], - paramsNames: ['id'], - - transformResponseData: transformResponseData, - }), - - list: telnyxMethod({ - method: 'GET', - methodType: 'list', - - transformResponseData: transformResponseData, - }), - - create: telnyxMethod({ - method: 'POST', - - transformResponseData: transformResponseData, - }), -}); diff --git a/lib/resources/VirtualCrossConnects.js b/lib/resources/VirtualCrossConnects.js deleted file mode 100644 index 66e2824..0000000 --- a/lib/resources/VirtualCrossConnects.js +++ /dev/null @@ -1,31 +0,0 @@ -'use strict'; - -const TelnyxResource = require('../TelnyxResource'); -const telnyxMethod = TelnyxResource.method; - -module.exports = TelnyxResource.extend({ - path: 'virtual_cross_connects', - includeBasic: ['list','retrieve','delete','create'], - - ListVirtualCrossConnectRegions: telnyxMethod({ - method: 'GET', - path: '/virtual_cross_connect/regions', - }), - DeleteVirtualCrossConnect: telnyxMethod({ - method: 'DELETE', - path: '/virtual_cross_connects/{id}', - }), - GetVirtualCrossConnectRegion: telnyxMethod({ - method: 'GET', - path: '/virtual_cross_connect/regions/{id}', - }), - ListVirtualCrossConnects: telnyxMethod({ - method: 'GET', - path: '/virtual_cross_connects', - }), - ProvisionVirtualCrossConnect: telnyxMethod({ - method: 'POST', - path: '/virtual_cross_connects/{id}/actions/provision', - }), - -}); diff --git a/lib/resources/WdrDetailReports.js b/lib/resources/WdrDetailReports.js deleted file mode 100644 index 7868173..0000000 --- a/lib/resources/WdrDetailReports.js +++ /dev/null @@ -1,15 +0,0 @@ -'use strict'; - -const TelnyxResource = require('../TelnyxResource'); -const telnyxMethod = TelnyxResource.method; - -module.exports = TelnyxResource.extend({ - path: 'wdr_detail_reports', - includeBasic: ['list','retrieve'], - - GetPaginatedWdrs: telnyxMethod({ - method: 'GET', - path: '/reports/wdrs', - }), - -}); diff --git a/lib/resources/Webhooks.js b/lib/resources/Webhooks.js deleted file mode 100644 index 0b50cc5..0000000 --- a/lib/resources/Webhooks.js +++ /dev/null @@ -1,6 +0,0 @@ -'use strict'; - -module.exports = require('../TelnyxResource').extend({ - path: 'webhook_deliveries', - includeBasic: ['list', 'retrieve'], -}); diff --git a/lib/resources/WireguardInterfaces.js b/lib/resources/WireguardInterfaces.js deleted file mode 100644 index a6e9aef..0000000 --- a/lib/resources/WireguardInterfaces.js +++ /dev/null @@ -1,39 +0,0 @@ -'use strict'; - -const TelnyxResource = require('../TelnyxResource'); -const telnyxMethod = TelnyxResource.method; - -module.exports = TelnyxResource.extend({ - path: 'wireguard_interfaces', - includeBasic: ['list','retrieve','delete'], - - GetWireguardPeerAllowedIp: telnyxMethod({ - method: 'GET', - path: '/wireguard_peers/{id}/allowed_ips/{child_id}', - }), - DeleteWireguardInterface: telnyxMethod({ - method: 'DELETE', - path: '/wireguard_interfaces/{id}', - }), - DeleteWireguardPeer: telnyxMethod({ - method: 'DELETE', - path: '/wireguard_peers/{id}', - }), - ListWireguardPeers: telnyxMethod({ - method: 'GET', - path: '/wireguard_peers', - }), - GetWireguardPeerConfig: telnyxMethod({ - method: 'GET', - path: '/wireguard_peers/{id}/config', - }), - ListWireguardInterfaces: telnyxMethod({ - method: 'GET', - path: '/wireguard_interfaces', - }), - ListWireguardPeerAllowedIps: telnyxMethod({ - method: 'GET', - path: '/wireguard_peers/{id}/allowed_ips', - }), - -}); diff --git a/lib/resources/WirelessDetailRecordReports.js b/lib/resources/WirelessDetailRecordReports.js deleted file mode 100644 index 1f80045..0000000 --- a/lib/resources/WirelessDetailRecordReports.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict'; - -var TelnyxResource = require('../TelnyxResource'); - -module.exports = TelnyxResource.extend({ - path: 'wireless/detail_records_reports', - includeBasic: ['list', 'retrieve', 'create', 'del'], -}); diff --git a/lib/telnyx.js b/lib/telnyx.js deleted file mode 100644 index 8f5a729..0000000 --- a/lib/telnyx.js +++ /dev/null @@ -1,425 +0,0 @@ -'use strict'; - -Telnyx.DEFAULT_HOST = process.env.TELNYX_API_BASE || 'api.telnyx.com'; -Telnyx.DEFAULT_PORT = '443'; -Telnyx.DEFAULT_BASE_PATH = '/v2/'; - -// Use node's default timeout: -Telnyx.DEFAULT_TIMEOUT = require('http').createServer().timeout; - -Telnyx.PACKAGE_VERSION = require('../package.json').version; - -Telnyx.USER_AGENT = { - bindings_version: Telnyx.PACKAGE_VERSION, - lang: 'node', - lang_version: process.version, - platform: process.platform, - publisher: 'telnyx', - uname: null, -}; - -Telnyx.USER_AGENT_SERIALIZED = null; - -Telnyx.MAX_NETWORK_RETRY_DELAY_SEC = 2; -Telnyx.INITIAL_NETWORK_RETRY_DELAY_SEC = 0.5; - -var APP_INFO_PROPERTIES = ['name', 'version', 'url', 'partner_id']; - -var http = require('http'); -var https = require('https'); - -var EventEmitter = require('events').EventEmitter; -var exec = require('child_process').exec; -var utils = require('./utils'); - -var resources = { - ActivateDeactivateBulkCredentials: require('./resources/ActivateDeactivateBulkCredentials'), - AccessIpAddress: require('./resources/AccessIpAddress'), - AccessIpRanges: require('./resources/AccessIpRanges'), - Actions: require('./resources/Actions'), - AccessTokens: require('./resources/AccessTokens'), - ActionsSimCards: require('./resources/ActionsSimCards'), - Addresses: require('./resources/Addresses'), - AI: require('./resources/AI'), - Autorechargepreferences: require('./resources/Autorechargepreferences'), - AuthenticationProviders: require('./resources/AuthenticationProviders'), - AvailablePhoneNumbers: require('./resources/AvailablePhoneNumbers'), - Balance: require('./resources/Balance'), - Billing: require('./resources/Billing'), - BillingGroups: require('./resources/BillingGroups'), - Brands: require('./resources/Brands'), - BulkCreation: require('./resources/BulkCreation'), - BulkCredentials: require('./resources/BulkCredentials'), - BulkPhoneNumberCampaigns: require('./resources/BulkPhoneNumberCampaigns'), - BulkPhoneNumberOperations: require('./resources/BulkPhoneNumberOperations'), - BulkSoleProprietorCreation: require('./resources/BulkSoleProprietorCreation'), - BulkTelephonyCredentials: require('./resources/BulkTelephonyCredentials'), - Bucket: require('./resources/Bucket'), - BucketUsage: require('./resources/BucketUsage'), - BusinessIdentity: require('./resources/BusinessIdentity'), - CallControlApplications: require('./resources/CallControlApplications'), - CallEvents: require('./resources/CallEvents'), - CallInformation: require('./resources/CallInformation'), - CallRecordings: require('./resources/CallRecordings'), - Calls: require('./resources/Calls'), - Campaign: require('./resources/Campaign'), - CampaignBuilder: require('./resources/CampaignBuilder'), - CdrUsageReports: require('./resources/CdrUsageReports'), - Channelzones: require('./resources/Channelzones'), - ClientStateUpdate: require('./resources/ClientStateUpdate'), - Connections: require('./resources/Connections'), - Conferences: require('./resources/Conferences'), - CredentialConnections: require('./resources/CredentialConnections'), - Credentials: require('./resources/Credentials'), - CsvDownloads: require('./resources/CsvDownloads'), - CustomerServiceRecord: require('./resources/CustomerServiceRecord'), - Debugging: require('./resources/Debugging'), - DetailRecords: require('./resources/DetailRecords'), - DialogflowIntegration: require('./resources/DialogflowIntegration'), - DocumentLinks: require('./resources/DocumentLinks'), - Documents: require('./resources/Documents'), - DynamicEmergency: require('./resources/DynamicEmergency'), - DynamicEmergencyAddresses: require('./resources/DynamicEmergencyAddresses'), - DynamicEmergencyEndpoints: require('./resources/DynamicEmergencyEndpoints'), - Events: require('./resources/Events'), - ExternalConnections: require('./resources/ExternalConnections'), - FaxApplications: require('./resources/FaxApplications'), - Faxes: require('./resources/Faxes'), - FqdnConnections: require('./resources/FqdnConnections'), - Fqdns: require('./resources/Fqdns'), - GlobalIps: require('./resources/GlobalIps'), - IpAddresses: require('./resources/IpAddresses'), - IpConnections: require('./resources/IpConnections'), - IpRanges: require('./resources/IpRanges'), - Ips: require('./resources/Ips'), - InventoryCoverage: require('./resources/InventoryCoverage'), - InventoryLevel: require('./resources/InventoryLevel'), - InboundChannels: require('./resources/InboundChannels'), - ManagedAccounts: require('./resources/ManagedAccounts'), - MediaStorageApi: require('./resources/MediaStorageApi'), - MessagingHostedNumber: require('./resources/MessagingHostedNumber'), - MessagingHostedNumberOrders: require('./resources/MessagingHostedNumberOrders'), - MessagingHostedNumbers: require('./resources/MessagingHostedNumbers'), - MessagingPhoneNumbers: require('./resources/MessagingPhoneNumbers'), - MessagingProfileMetrics: require('./resources/MessagingProfileMetrics'), - MessagingProfiles: require('./resources/MessagingProfiles'), - MessagingSenderIds: require('./resources/MessagingSenderIds'), - MessagingShortCodes: require('./resources/MessagingShortCodes'), - MessagingTollfreeVerification: require('./resources/MessagingTollfreeVerification'), - MessagingUrlDomains: require('./resources/MessagingUrlDomains'), - Messages: require('./resources/Messages'), - MessagesAlphanumericSenderId: require('./resources/MessagesAlphanumericSenderId'), - MdrDetailReports: require('./resources/MdrDetailReports'), - MdrUsageReports: require('./resources/MdrUsageReports'), - MobileNetworkOperators: require('./resources/MobileNetworkOperators'), - MobileOperatorNetworks: require('./resources/MobileOperatorNetworks'), - Networks: require('./resources/Networks'), - NumberBackgroundJobs: require('./resources/NumberBackgroundJobs'), - NumberLookup: require('./resources/NumberLookup'), - NumberOrderDocuments: require('./resources/NumberOrderDocuments'), - NumberOrders: require('./resources/NumberOrders'), - NumberPortouts: require('./resources/NumberPortouts'), - NumberReservations: require('./resources/NumberReservations'), - NumbersFeatures: require('./resources/NumbersFeatures'), - Object: require('./resources/Object'), - OtaUpdates: require('./resources/OtaUpdates'), - Outbound: require('./resources/Outbound'), - OutboundVoiceProfiles: require('./resources/OutboundVoiceProfiles'), - PhoneNumberAssignmentByProfile: require('./resources/PhoneNumberAssignmentByProfile'), - PhoneNumberBlockOrders: require('./resources/PhoneNumberBlockOrders'), - PhoneNumberBlocksBackgroundJobs: require('./resources/PhoneNumberBlocksBackgroundJobs'), - PhoneNumberCampaigns: require('./resources/PhoneNumberCampaigns'), - PhoneNumberOrderDocuments: require('./resources/PhoneNumberOrderDocuments'), - PhoneNumberRegulatoryRequirements: require('./resources/PhoneNumberRegulatoryRequirements'), - PhoneNumberSearch: require('./resources/PhoneNumberSearch'), - PhoneNumbers: require('./resources/PhoneNumbers'), - PhoneNumbersInboundChannels: require('./resources/PhoneNumbersInboundChannels'), - PhoneNumbersMessaging: require('./resources/PhoneNumbersMessaging'), - PhoneNumbersVoice: require('./resources/PhoneNumbersVoice'), - PortabilityChecks: require('./resources/PortabilityChecks'), - PortingOrders: require('./resources/PortingOrders'), - PortingPhoneNumbers: require('./resources/PortingPhoneNumbers'), - PortoutRequests: require('./resources/PortoutRequests'), - PresignedObjectUrls: require('./resources/PresignedObjectUrls'), - PrivateWirelessGateways: require('./resources/PrivateWirelessGateways'), - PublicInternetGateways: require('./resources/PublicInternetGateways'), - PublicKey: require('./resources/PublicKey'), - PushCredentials: require('./resources/PushCredentials'), - Queues: require('./resources/Queues'), - Regions: require('./resources/Regions'), - RegisterCall: require('./resources/RegisterCall'), - RegulatoryRequirements: require('./resources/RegulatoryRequirements'), - RequirementTypes: require('./resources/RequirementTypes'), - Requirements: require('./resources/Requirements'), - Reporting: require('./resources/Reporting'), - Reports: require('./resources/Reports'), - ReportsMdrs: require('./resources/ReportsMdrs'), - RoomClientToken: require('./resources/RoomsClientToken'), - RoomCompositions: require('./resources/RoomCompositions'), - RoomParticipants: require('./resources/RoomParticipants'), - RoomRecordings: require('./resources/RoomRecordings'), - RoomSessions: require('./resources/RoomSessions'), - Rooms: require('./resources/Rooms'), - RoomsClientToken: require('./resources/RoomsClientToken'), - RoomsClientTokens: require('./resources/RoomsClientTokens'), - SharedCampaigns: require('./resources/SharedCampaigns'), - ShortCodes: require('./resources/ShortCodes'), - SimCardActions: require('./resources/SimCardActions'), - SimCardGroupActions: require('./resources/SimCardGroupActions'), - SimCardGroups: require('./resources/SimCardGroups'), - SimCardOrders: require('./resources/SimCardOrders'), - SimCards: require('./resources/SimCards'), - SslCertificates: require('./resources/SslCertificates'), - TelephonyCredentials: require('./resources/TelephonyCredentials'), - TeXMLApplication: require('./resources/TeXMLApplication'), - UpdateClientState: require('./resources/UpdateClientState'), - VerifiedCallsDisplayProfile: require('./resources/VerifiedCallsDisplayProfile'), - VerifiedCallsDisplayProfiles: require('./resources/VerifiedCallsDisplayProfiles'), - VerifiedNumbers: require('./resources/VerifiedNumbers'), - Verifications: require('./resources/Verifications'), - VerifyProfiles: require('./resources/VerifyProfiles'), - VirtualCrossConnects: require('./resources/VirtualCrossConnects'), - WebhooksApi: require('./resources/Webhooks'), - WdrDetailReports: require('./resources/WdrDetailReports'), - WireguardInterfaces: require('./resources/WireguardInterfaces'), - WirelessDetailRecordReports: require('./resources/WirelessDetailRecordReports'), -}; - -Telnyx.TelnyxResource = require('./TelnyxResource'); -Telnyx.resources = resources; - -function Telnyx(key, version) { - if (!(this instanceof Telnyx)) { - return new Telnyx(key, version); - } - - Object.defineProperty(this, '_emitter', { - value: new EventEmitter(), - enumerable: false, - configurable: false, - writeable: false, - }); - - this.on = this._emitter.on.bind(this._emitter); - this.off = this._emitter.removeListener.bind(this._emitter); - - this._api = { - auth: null, - host: Telnyx.DEFAULT_HOST, - port: Telnyx.DEFAULT_PORT, - basePath: Telnyx.DEFAULT_BASE_PATH, - timeout: Telnyx.DEFAULT_TIMEOUT, - http_agent: this._buildDefaultAgent('http'), - https_agent: this._buildDefaultAgent('https'), - dev: false, - maxNetworkRetries: 0, - }; - - this.setApiKey(key); - this._prepResources(); - - this.errors = require('./Error'); - this.webhooks = require('./Webhooks'); - - this._prevRequestMetrics = []; -} - -Telnyx.errors = require('./Error'); -Telnyx.webhooks = require('./Webhooks'); - -Telnyx.prototype = { - setHost: function (host, port, protocol) { - this._setApiField('host', host); - if (port) { - this.setPort(port); - } - if (protocol) { - this.setProtocol(protocol); - } - }, - - setProtocol: function (protocol) { - this._setApiField('protocol', protocol.toLowerCase()); - }, - - setPort: function (port) { - this._setApiField('port', port); - }, - - setApiKey: function (key) { - if (key) { - this._setApiField('auth', 'Bearer ' + key); - } - }, - - setTimeout: function (timeout) { - this._setApiField( - 'timeout', - timeout == null ? Telnyx.DEFAULT_TIMEOUT : timeout - ); - }, - - setAppInfo: function (info) { - if (info && typeof info !== 'object') { - throw new Error('AppInfo must be an object.'); - } - - if (info && !info.name) { - throw new Error('AppInfo.name is required'); - } - - info = info || {}; - - var appInfo = APP_INFO_PROPERTIES.reduce(function (accum, prop) { - if (typeof info[prop] == 'string') { - accum = accum || {}; - - accum[prop] = info[prop]; - } - - return accum; - }, undefined); - - // Kill the cached UA string because it may no longer be valid - Telnyx.USER_AGENT_SERIALIZED = undefined; - - this._appInfo = appInfo; - }, - - setHttpAgent: function (agent) { - if (agent instanceof https.Agent) { - this._setApiField('https_agent', agent); - } else { - this._setApiField('http_agent', agent); - } - }, - - _setApiField: function (key, value) { - this._api[key] = value; - }, - - getApiField: function (key) { - return this._api[key]; - }, - - setClientId: function (clientId) { - this._clientId = clientId; - }, - - getClientId: function () { - return this._clientId; - }, - - getConstant: function (c) { - return Telnyx[c]; - }, - - getMaxNetworkRetries: function () { - return this.getApiField('maxNetworkRetries'); - }, - - setMaxNetworkRetries: function (maxNetworkRetries) { - if ( - (maxNetworkRetries && typeof maxNetworkRetries !== 'number') || - arguments.length < 1 - ) { - throw new Error('maxNetworkRetries must be a number.'); - } - - this._setApiField('maxNetworkRetries', maxNetworkRetries); - }, - - getMaxNetworkRetryDelay: function () { - return this.getConstant('MAX_NETWORK_RETRY_DELAY_SEC'); - }, - - getInitialNetworkRetryDelay: function () { - return this.getConstant('INITIAL_NETWORK_RETRY_DELAY_SEC'); - }, - - // Gets a JSON version of a User-Agent and uses a cached version for a slight - // speed advantage. - getClientUserAgent: function (cb) { - if (Telnyx.USER_AGENT_SERIALIZED) { - return cb(Telnyx.USER_AGENT_SERIALIZED); - } - this.getClientUserAgentSeeded(Telnyx.USER_AGENT, function (cua) { - Telnyx.USER_AGENT_SERIALIZED = cua; - cb(Telnyx.USER_AGENT_SERIALIZED); - }); - }, - - // Gets a JSON version of a User-Agent by encoding a seeded object and - // fetching a uname from the system. - getClientUserAgentSeeded: function (seed, cb) { - var self = this; - - exec('uname -a', function (err, uname) { - var userAgent = {}; - for (var field in seed) { - userAgent[field] = encodeURIComponent(seed[field]); - } - - // URI-encode in case there are unusual characters in the system's uname. - userAgent.uname = encodeURIComponent(uname) || 'UNKNOWN'; - - if (self._appInfo) { - userAgent.application = self._appInfo; - } - - cb(JSON.stringify(userAgent)); - }); - }, - - getAppInfoAsString: function () { - if (!this._appInfo) { - return ''; - } - - var formatted = this._appInfo.name; - - if (this._appInfo.version) { - formatted += '/' + this._appInfo.version; - } - - if (this._appInfo.url) { - formatted += ' (' + this._appInfo.url + ')'; - } - - return formatted; - }, - - _buildDefaultAgent: function (protocol) { - var httpLib = protocol === 'http' ? http : https; - return new httpLib.Agent({keepAlive: true}); - }, - - _prepResources: function () { - for (var name in resources) { - this._instantiateResource(name, this); - - this[utils.toSingular(name)] = this._createConstructor(name, this); - } - }, - - _instantiateResource: function (name, self) { - var camelCaseName = utils.pascalToCamelCase(name); - - self[camelCaseName] = new resources[name](self); - - return self[camelCaseName]; - }, - - _createConstructor: function (resourceName, self) { - return function (args) { - return Object.assign( - self._instantiateResource(resourceName, self), - args || {} - ); - }; - }, -}; - -module.exports = Telnyx; -// expose constructor as a named property to enable mocking with Sinon.JS -module.exports.Telnyx = Telnyx; diff --git a/lib/utils.js b/lib/utils.js deleted file mode 100644 index 08383a0..0000000 --- a/lib/utils.js +++ /dev/null @@ -1,366 +0,0 @@ -'use strict'; - -var Buffer = require('safe-buffer').Buffer; -var EventEmitter = require('events').EventEmitter; -var qs = require('qs'); -var crypto = require('crypto'); - -var hasOwn = {}.hasOwnProperty; -var isPlainObject = require('lodash.isplainobject'); - -var OPTIONS_KEYS = ['api_key']; - -var utils = (module.exports = { - isJsonString: function (str) { - try { - if (!str || str.includes('filter[tag]=')) { - return false; - } - JSON.parse(str); - } catch (e) { - return false; - } - return true; - }, - - isAuthKey: function (key) { - return ( - typeof key == 'string' && /^KEY[A-Z0-9]{32}_[a-zA-Z0-9]{22}$/.test(key) - ); - }, - - isOptionsHash: function (o) { - return ( - isPlainObject(o) && - OPTIONS_KEYS.some(function (key) { - return hasOwn.call(o, key); - }) - ); - }, - - /** - * Stringifies an Object, accommodating nested objects - * (forming the conventional key 'parent[child]=value') - */ - stringifyRequestData: function (data) { - return ( - qs - .stringify(data, {arrayFormat: 'brackets'}) - // Don't use strict form encoding by changing the square bracket control - // characters back to their literals. This is fine by the server, and - // makes these parameter strings easier to read. - .replace(/%5B/g, '[') - .replace(/%5D/g, ']') - ); - }, - - /** - * Outputs a new function with interpolated object property values. - * Use like so: - * var fn = makeURLInterpolator('some/url/{param1}/{param2}'); - * fn({ param1: 123, param2: 456 }); // => 'some/url/123/456' - */ - makeURLInterpolator: (function () { - var rc = { - '\n': '\\n', - '"': '\\"', - '\u2028': '\\u2028', - '\u2029': '\\u2029', - }; - return function makeURLInterpolator(str) { - var cleanString = str.replace(/["\n\r\u2028\u2029]/g, function ($0) { - return rc[$0]; - }); - return function (outputs) { - return cleanString.replace(/\{([\s\S]+?)\}/g, function ($0, $1) { - return encodeURIComponent(outputs[$1] || ''); - }); - }; - }; - }()), - - /** - * Return the data argument from a list of arguments - */ - getDataFromArgs: function (args) { - if (args.length < 1 || !isPlainObject(args[0])) { - return {}; - } - - if (!utils.isOptionsHash(args[0])) { - return args.shift(); - } - - var argKeys = Object.keys(args[0]); - - var optionKeysInArgs = argKeys.filter(function (key) { - return OPTIONS_KEYS.indexOf(key) > -1; - }); - - // In some cases options may be the provided as the first argument. - // Here we're detecting a case where there are two distinct arguments - // (the first being args and the second options) and with known - // option keys in the first so that we can warn the user about it. - if ( - optionKeysInArgs.length > 0 && - optionKeysInArgs.length !== argKeys.length - ) { - emitWarning( - 'Options found in arguments (' + - optionKeysInArgs.join(', ') + - '). Did you mean to pass an options ' + - 'object? See https://github.com/telnyx/telnyx-node/wiki/Passing-Options.' - ); - } - - return {}; - }, - - /** - * Return the options hash from a list of arguments - */ - getOptionsFromArgs: function (args) { - var opts = { - auth: null, - headers: {}, - }; - if (args.length > 0) { - var arg = args[args.length - 1]; - if (utils.isAuthKey(arg)) { - opts.auth = args.pop(); - } else if (utils.isOptionsHash(arg)) { - var params = args.pop(); - - var extraKeys = Object.keys(params).filter(function (key) { - return OPTIONS_KEYS.indexOf(key) == -1; - }); - - if (extraKeys.length) { - emitWarning( - 'Invalid options found (' + extraKeys.join(', ') + '); ignoring.' - ); - } - - if (params.api_key) { - opts.auth = params.api_key; - } - } - } - return opts; - }, - - /** - * Provide simple "Class" extension mechanism - */ - protoExtend: function (sub) { - var Super = this; - var Constructor = hasOwn.call(sub, 'constructor') - ? sub.constructor - : function () { - Super.apply(this, arguments); - }; - - // This initialization logic is somewhat sensitive to be compatible with - // divergent JS implementations like the one found in Qt. See here for more - // context: - // - // https://github.com/telnyx/telnyx-node/pull/334 - Object.assign(Constructor, Super); - Constructor.prototype = Object.create(Super.prototype); - Object.assign(Constructor.prototype, sub); - - return Constructor; - }, - - /** - * Secure compare, from https://github.com/freewil/scmp - */ - secureCompare: function (a, b) { - a = Buffer.from(a); - b = Buffer.from(b); - - // return early here if buffer lengths are not equal since timingSafeEqual - // will throw if buffer lengths are not equal - if (a.length !== b.length) { - return false; - } - - // use crypto.timingSafeEqual if available (since Node.js v6.6.0), - // otherwise use our own scmp-internal function. - if (crypto.timingSafeEqual) { - return crypto.timingSafeEqual(a, b); - } - - var len = a.length; - var result = 0; - - for (var i = 0; i < len; ++i) { - result |= a[i] ^ b[i]; - } - return result === 0; - }, - - /** - * Remove empty values from an object - */ - removeEmpty: function (obj) { - if (typeof obj !== 'object') { - throw new Error('Argument must be an object'); - } - - Object.keys(obj).forEach(function (key) { - if (obj[key] === null || obj[key] === undefined) { - delete obj[key]; - } - }); - - return obj; - }, - - /** - * Determine if file data is a derivative of EventEmitter class. - * https://nodejs.org/api/events.html#events_events - */ - checkForStream: function (obj) { - if (obj.file && obj.file.data) { - return obj.file.data instanceof EventEmitter; - } - return false; - }, - - callbackifyPromiseWithTimeout: function (promise, callback) { - if (callback) { - // Ensure callback is called outside of promise stack. - return promise.then( - function (res) { - setTimeout(function () { - callback(null, res); - }, 0); - }, - function (err) { - setTimeout(function () { - callback(err, null); - }, 0); - } - ); - } - - return promise; - }, - - /** - * Allow for special capitalization cases (such as OAuth) - */ - pascalToCamelCase: function (name) { - return name[0].toLowerCase() + name.substring(1); - }, - - /** - * snake_case to camelCase - */ - snakeToCamelCase: function (name) { - const words = name.split('_'); - - return words.reduce(function (acc, nextWord) { - return acc + nextWord.charAt(0).toUpperCase() + nextWord.slice(1); - }); - }, - - /** - * remove final `s` from names - */ - toSingular: function (name) { - if (name.endsWith('s')) { - return name.slice(0, -1); - } - }, - - /** - * Add TelnyxResource to API response data - * - * @param [response] Resource response object - * @param [telnyx] Telnyx SDK - * @param [resourceName] Resource name in camelCase - * @param [methods] resource methods to include - */ - addResourceToResponseData: function ( - response, - telnyx, - resourceName, - methods - ) { - if (response && response.data && typeof response.data === 'object') { - - /* - * make nested methods. e.g.: call.bridge(); - * nested methods should be used from basic methods response. See specs for an example - */ - var resourceFulData = telnyx[resourceName]; - - Object.assign(resourceFulData, response.data, methods); - - response.data = resourceFulData; - } - - return response; - }, - - /** - * Create multiple nested methods, in camelCase and snakeCase, using spec and method names - * - * @param [telnyxMethod] TelnyxResource Method telnyxMethod creator - * @param [names=[]] Array of method names - * @param [spec] telnyxMethod spec creator by method name - */ - createNestedMethods: function (telnyxMethod, names, spec) { - var methods = {}; - - names.forEach(function (name) { - methods[name] = methods[utils.snakeToCamelCase(name)] = telnyxMethod( - spec(name) - ); - }); - - return methods; - }, - - emitWarning: emitWarning, - - tryParseJSON: tryParseJSON, -}); - -function emitWarning(warning) { - if (typeof process.emitWarning !== 'function') { - return console.warn( - 'Telnyx: ' + warning - ); /* eslint-disable-line no-console */ - } - - return process.emitWarning(warning, 'Telnyx'); -} - -/** - * tryParseJSON used to only parse JSON response, - * if it is not a JSON response sends the value inside a data object to keep the standard. - * - * @param [jsonString] Response object - */ -function tryParseJSON(jsonString) { - try { - if (jsonString === '') { - const defaultValue = { - data: jsonString, - }; - - return defaultValue; - } - - return JSON.parse(jsonString); - } catch (e) { - const defaultValue = { - data: jsonString, - }; - - return defaultValue; - } -} diff --git a/package-lock.json b/package-lock.json index 1f4b109..2dfff6b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,22 +14,21 @@ "devDependencies": { "@eslint/js": "^9.10.0", "@types/eslint__js": "^8.42.3", + "@types/jest": "^29.5.13", "@types/qs": "^6.9.15", - "chai": "~4.4.1", - "chai-as-promised": "~7.1.1", - "coveralls": "^3.1.1", "debug": "^4.3.4", "eslint": "^8.57.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-chai-friendly": "^0.7.4", "eslint-plugin-prettier": "^5.2.1", - "mocha": "^10.3.0", + "jest": "^29.7.0", "nock": "^13.5.4", "nyc": "^15.1.0", "prettier": "^3.0.0", "qs": "^6.11.2", - "safe-buffer": "^5.2.1", "telnyx": "^1.26.2", + "ts-jest": "^29.2.5", + "ts-node": "^10.9.2", "tweetnacl": "^1.0.3", "typescript": "^5.6.2", "typescript-eslint": "^8.5.0", @@ -79,6 +78,7 @@ "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.25.2.tgz", "integrity": "sha512-BBt3opiCOxUr9euZ5/ro/Xv8/V7yJ5bjYMqG/C1YAo8MIKAnumZalCN+msbci3Pigy4lIQfPUpfMM27HMGaYEA==", "dev": true, + "license": "MIT", "dependencies": { "@ampproject/remapping": "^2.2.0", "@babel/code-frame": "^7.24.7", @@ -172,6 +172,15 @@ "@babel/core": "^7.0.0" } }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.24.8", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.8.tgz", + "integrity": "sha512-FFWx5142D8h2Mgr/iPVGH5G7w6jDn4jUSpZTyDnQO0Yn7Ks2Kuz6Pci8H6MPCoUJegd/UZQ3tAvfLCxQSnWWwg==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@babel/helper-simple-access": { "version": "7.24.7", "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.24.7.tgz", @@ -326,6 +335,228 @@ "node": ">=6.0.0" } }, + "node_modules/@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-bigint": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", + "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-class-properties": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", + "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-class-static-block": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", + "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-import-attributes": { + "version": "7.25.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.25.6.tgz", + "integrity": "sha512-sXaDXaJN9SNLymBdlWFA+bjzBhFD617ZaFiY13dGt7TVslVvVgA6fkZOP7Ki3IGElC45lwHdOTrCtKZGVAWeLQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.8" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-import-meta": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", + "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-jsx": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.24.7.tgz", + "integrity": "sha512-6ddciUPe/mpMnOKv/U+RSd2vvVy+Yw/JfBB0ZHYjEZt9NLHmCUylNYlsbqCCS1Bffjlb0fCwC9Vqz+sBz6PsiQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-private-property-in-object": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", + "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-top-level-await": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", + "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-typescript": { + "version": "7.25.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.25.4.tgz", + "integrity": "sha512-uMOCoHVU52BsSWxPOMVv5qKRdeSlPuImUCB2dlPuBSU+W2/ROE7/Zg8F2Kepbk+8yBa68LlRKxO+xgEVWorsDg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.8" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, "node_modules/@babel/template": { "version": "7.25.0", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.25.0.tgz", @@ -381,6 +612,36 @@ "node": ">=6.9.0" } }, + "node_modules/@bcoe/v8-coverage": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", + "dev": true + }, + "node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/trace-mapping": "0.3.9" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, "node_modules/@eslint-community/eslint-utils": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", @@ -577,112 +838,561 @@ "node": ">=8" } }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", - "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", + "node_modules/@jest/console": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.7.0.tgz", + "integrity": "sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==", "dev": true, "dependencies": { - "@jridgewell/set-array": "^1.2.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.24" + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "slash": "^3.0.0" }, "engines": { - "node": ">=6.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", - "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "node_modules/@jest/core": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.7.0.tgz", + "integrity": "sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg==", "dev": true, + "dependencies": { + "@jest/console": "^29.7.0", + "@jest/reporters": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-changed-files": "^29.7.0", + "jest-config": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-resolve-dependencies": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "jest-watcher": "^29.7.0", + "micromatch": "^4.0.4", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "strip-ansi": "^6.0.0" + }, "engines": { - "node": ">=6.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } } }, - "node_modules/@jridgewell/set-array": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", - "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", + "node_modules/@jest/environment": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz", + "integrity": "sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==", "dev": true, + "dependencies": { + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-mock": "^29.7.0" + }, "engines": { - "node": ">=6.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", - "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", - "dev": true - }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.25", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", - "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "node_modules/@jest/expect": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==", "dev": true, "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" + "expect": "^29.7.0", + "jest-snapshot": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "node_modules/@jest/expect-utils": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.7.0.tgz", + "integrity": "sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==", "dev": true, "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" + "jest-get-type": "^29.6.3" }, "engines": { - "node": ">= 8" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "node_modules/@jest/fake-timers": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.7.0.tgz", + "integrity": "sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==", "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "@sinonjs/fake-timers": "^10.0.2", + "@types/node": "*", + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" + }, "engines": { - "node": ">= 8" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "node_modules/@jest/globals": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.7.0.tgz", + "integrity": "sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==", "dev": true, + "license": "MIT", "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/types": "^29.6.3", + "jest-mock": "^29.7.0" }, "engines": { - "node": ">= 8" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@pkgr/core": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.1.1.tgz", - "integrity": "sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==", + "node_modules/@jest/reporters": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.7.0.tgz", + "integrity": "sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==", "dev": true, + "dependencies": { + "@bcoe/v8-coverage": "^0.2.3", + "@jest/console": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", + "@types/node": "*", + "chalk": "^4.0.0", + "collect-v8-coverage": "^1.0.0", + "exit": "^0.1.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-instrument": "^6.0.0", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.1.3", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", + "slash": "^3.0.0", + "string-length": "^4.0.1", + "strip-ansi": "^6.0.0", + "v8-to-istanbul": "^9.0.1" + }, "engines": { - "node": "^12.20.0 || ^14.18.0 || >=16.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" }, - "funding": { - "url": "https://opencollective.com/unts" + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } } }, - "node_modules/@types/eslint": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-9.6.1.tgz", - "integrity": "sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag==", + "node_modules/@jest/reporters/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", "dev": true, "dependencies": { - "@types/estree": "*", - "@types/json-schema": "*" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/@types/eslint__js": { + "node_modules/@jest/reporters/node_modules/istanbul-lib-instrument": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.3.tgz", + "integrity": "sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q==", + "dev": true, + "dependencies": { + "@babel/core": "^7.23.9", + "@babel/parser": "^7.23.9", + "@istanbuljs/schema": "^0.1.3", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^7.5.4" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@jest/reporters/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@jest/schemas": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", + "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", + "dev": true, + "dependencies": { + "@sinclair/typebox": "^0.27.8" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/source-map": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.6.3.tgz", + "integrity": "sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.18", + "callsites": "^3.0.0", + "graceful-fs": "^4.2.9" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/test-result": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.7.0.tgz", + "integrity": "sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==", + "dev": true, + "dependencies": { + "@jest/console": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "collect-v8-coverage": "^1.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/test-sequencer": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz", + "integrity": "sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==", + "dev": true, + "dependencies": { + "@jest/test-result": "^29.7.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/transform": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz", + "integrity": "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==", + "dev": true, + "dependencies": { + "@babel/core": "^7.11.6", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", + "babel-plugin-istanbul": "^6.1.1", + "chalk": "^4.0.0", + "convert-source-map": "^2.0.0", + "fast-json-stable-stringify": "^2.1.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", + "micromatch": "^4.0.4", + "pirates": "^4.0.4", + "slash": "^3.0.0", + "write-file-atomic": "^4.0.2" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/transform/node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true + }, + "node_modules/@jest/transform/node_modules/write-file-atomic": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", + "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", + "dev": true, + "dependencies": { + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.7" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/@jest/types": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", + "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", + "dev": true, + "dependencies": { + "@jest/schemas": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", + "dev": true, + "dependencies": { + "@jridgewell/set-array": "^1.2.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", + "dev": true + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@pkgr/core": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.1.1.tgz", + "integrity": "sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==", + "dev": true, + "engines": { + "node": "^12.20.0 || ^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts" + } + }, + "node_modules/@sinclair/typebox": { + "version": "0.27.8", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", + "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", + "dev": true + }, + "node_modules/@sinonjs/commons": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", + "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", + "dev": true, + "dependencies": { + "type-detect": "4.0.8" + } + }, + "node_modules/@sinonjs/commons/node_modules/type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/@sinonjs/fake-timers": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", + "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", + "dev": true, + "dependencies": { + "@sinonjs/commons": "^3.0.0" + } + }, + "node_modules/@tsconfig/node10": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz", + "integrity": "sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", + "dev": true, + "license": "MIT" + }, + "node_modules/@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", + "dev": true, + "license": "MIT" + }, + "node_modules/@tsconfig/node16": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", + "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/babel__core": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", + "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", + "dev": true, + "dependencies": { + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" + } + }, + "node_modules/@types/babel__generator": { + "version": "7.6.8", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.8.tgz", + "integrity": "sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==", + "dev": true, + "dependencies": { + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__template": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", + "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", + "dev": true, + "dependencies": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__traverse": { + "version": "7.20.6", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.6.tgz", + "integrity": "sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg==", + "dev": true, + "dependencies": { + "@babel/types": "^7.20.7" + } + }, + "node_modules/@types/eslint": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-9.6.1.tgz", + "integrity": "sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag==", + "dev": true, + "dependencies": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, + "node_modules/@types/eslint__js": { "version": "8.42.3", "resolved": "https://registry.npmjs.org/@types/eslint__js/-/eslint__js-8.42.3.tgz", "integrity": "sha512-alfG737uhmPdnvkrLdZLcEKJ/B8s9Y4hrZ+YAdzUeoArBlSUERA2E87ROfOaS4jd/C45fzOoZzidLc1IPwLqOw==", @@ -698,6 +1408,50 @@ "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", "dev": true }, + "node_modules/@types/graceful-fs": { + "version": "4.1.9", + "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz", + "integrity": "sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/istanbul-lib-coverage": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", + "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", + "dev": true + }, + "node_modules/@types/istanbul-lib-report": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz", + "integrity": "sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==", + "dev": true, + "dependencies": { + "@types/istanbul-lib-coverage": "*" + } + }, + "node_modules/@types/istanbul-reports": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz", + "integrity": "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==", + "dev": true, + "dependencies": { + "@types/istanbul-lib-report": "*" + } + }, + "node_modules/@types/jest": { + "version": "29.5.13", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.13.tgz", + "integrity": "sha512-wd+MVEZCHt23V0/L642O5APvspWply/rGY5BcW4SUETo2UzPU3Z26qr8jC2qxpimI2jjx9h7+2cj2FwIr01bXg==", + "dev": true, + "license": "MIT", + "dependencies": { + "expect": "^29.0.0", + "pretty-format": "^29.0.0" + } + }, "node_modules/@types/json-schema": { "version": "7.0.15", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", @@ -718,6 +1472,27 @@ "integrity": "sha512-uXHQKES6DQKKCLh441Xv/dwxOq1TVS3JPUMlEqoEglvlhR6Mxnlew/Xq/LRVHpLyk7iK3zODe1qYHIMltO7XGg==", "dev": true }, + "node_modules/@types/stack-utils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz", + "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==", + "dev": true + }, + "node_modules/@types/yargs": { + "version": "17.0.33", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.33.tgz", + "integrity": "sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA==", + "dev": true, + "dependencies": { + "@types/yargs-parser": "*" + } + }, + "node_modules/@types/yargs-parser": { + "version": "21.0.3", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz", + "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==", + "dev": true + }, "node_modules/@typescript-eslint/eslint-plugin": { "version": "8.5.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.5.0.tgz", @@ -963,6 +1738,19 @@ "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, + "node_modules/acorn-walk": { + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz", + "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "acorn": "^8.11.0" + }, + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/aggregate-error": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", @@ -992,13 +1780,31 @@ "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/ansi-colors": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", - "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", + "node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", "dev": true, + "dependencies": { + "type-fest": "^0.21.3" + }, "engines": { - "node": ">=6" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-escapes/node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/ansi-regex": { @@ -1056,6 +1862,13 @@ "integrity": "sha512-Xg+9RwCg/0p32teKdGMPTPnVXKD0w3DfHnFTficozsAgsvq2XenPJq/MYpzzQ/v8zrOyJn6Ds39VA4JIDwFfqw==", "dev": true }, + "node_modules/arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true, + "license": "MIT" + }, "node_modules/argparse": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", @@ -1065,87 +1878,130 @@ "sprintf-js": "~1.0.2" } }, - "node_modules/asn1": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", - "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", + "node_modules/async": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz", + "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==", "dev": true, - "dependencies": { - "safer-buffer": "~2.1.0" - } + "license": "MIT" }, - "node_modules/assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==", + "node_modules/babel-jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz", + "integrity": "sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==", "dev": true, + "license": "MIT", + "dependencies": { + "@jest/transform": "^29.7.0", + "@types/babel__core": "^7.1.14", + "babel-plugin-istanbul": "^6.1.1", + "babel-preset-jest": "^29.6.3", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "slash": "^3.0.0" + }, "engines": { - "node": ">=0.8" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.8.0" } }, - "node_modules/assertion-error": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", - "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "node_modules/babel-plugin-istanbul": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", + "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.0.0", + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-instrument": "^5.0.4", + "test-exclude": "^6.0.0" + }, "engines": { - "node": "*" + "node": ">=8" } }, - "node_modules/asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", - "dev": true - }, - "node_modules/aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==", + "node_modules/babel-plugin-istanbul/node_modules/istanbul-lib-instrument": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", + "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==", "dev": true, + "dependencies": { + "@babel/core": "^7.12.3", + "@babel/parser": "^7.14.7", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^6.3.0" + }, "engines": { - "node": "*" + "node": ">=8" } }, - "node_modules/aws4": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.13.2.tgz", - "integrity": "sha512-lHe62zvbTB5eEABUVi/AwVh0ZKY9rMMDhmm+eeyuuUQbQ3+J+fONVQOZyj+DdrvD4BY33uYniyRJ4UJIaSKAfw==", - "dev": true - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true - }, - "node_modules/bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", + "node_modules/babel-plugin-jest-hoist": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz", + "integrity": "sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==", "dev": true, "dependencies": { - "tweetnacl": "^0.14.3" + "@babel/template": "^7.3.3", + "@babel/types": "^7.3.3", + "@types/babel__core": "^7.1.14", + "@types/babel__traverse": "^7.0.6" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/bcrypt-pbkdf/node_modules/tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", - "dev": true + "node_modules/babel-preset-current-node-syntax": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.1.0.tgz", + "integrity": "sha512-ldYss8SbBlWva1bs28q78Ju5Zq1F+8BrqBZZ0VFhLBvhh6lCpC2o3gDJi/5DRLs9FgYZCnmPYIVFU4lRXCkyUw==", + "dev": true, + "dependencies": { + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-bigint": "^7.8.3", + "@babel/plugin-syntax-class-properties": "^7.12.13", + "@babel/plugin-syntax-class-static-block": "^7.14.5", + "@babel/plugin-syntax-import-attributes": "^7.24.7", + "@babel/plugin-syntax-import-meta": "^7.10.4", + "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.10.4", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5", + "@babel/plugin-syntax-top-level-await": "^7.14.5" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } }, - "node_modules/binary-extensions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", - "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", + "node_modules/babel-preset-jest": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz", + "integrity": "sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==", "dev": true, + "dependencies": { + "babel-plugin-jest-hoist": "^29.6.3", + "babel-preset-current-node-syntax": "^1.0.0" + }, "engines": { - "node": ">=8" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "peerDependencies": { + "@babel/core": "^7.0.0" } }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -1168,12 +2024,6 @@ "node": ">=8" } }, - "node_modules/browser-stdout": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", - "dev": true - }, "node_modules/browserslist": { "version": "4.23.3", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.3.tgz", @@ -1206,6 +2056,34 @@ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, + "node_modules/bs-logger": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/bs-logger/-/bs-logger-0.2.6.tgz", + "integrity": "sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-json-stable-stringify": "2.x" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/bser": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", + "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", + "dev": true, + "dependencies": { + "node-int64": "^0.4.0" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true + }, "node_modules/caching-transform": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-4.0.0.tgz", @@ -1278,42 +2156,6 @@ } ] }, - "node_modules/caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==", - "dev": true - }, - "node_modules/chai": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.4.1.tgz", - "integrity": "sha512-13sOfMv2+DWduEU+/xbun3LScLoqN17nBeTLUsmDfKdoiC1fr0n9PU4guu4AhRcOVFk/sW8LyZWHuhWtQZiF+g==", - "dev": true, - "dependencies": { - "assertion-error": "^1.1.0", - "check-error": "^1.0.3", - "deep-eql": "^4.1.3", - "get-func-name": "^2.0.2", - "loupe": "^2.3.6", - "pathval": "^1.1.1", - "type-detect": "^4.0.8" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/chai-as-promised": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/chai-as-promised/-/chai-as-promised-7.1.2.tgz", - "integrity": "sha512-aBDHZxRzYnUYuIAIPBH2s511DjlKPzXNlXSGFC8CwmroWQLfrW0LtE1nK3MAwwNhJPa9raEjNCmRoFpG0Hurdw==", - "dev": true, - "dependencies": { - "check-error": "^1.0.2" - }, - "peerDependencies": { - "chai": ">= 2.1.2 < 6" - } - }, "node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -1330,53 +2172,35 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/check-error": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz", - "integrity": "sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==", + "node_modules/char-regex": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", + "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", "dev": true, - "dependencies": { - "get-func-name": "^2.0.2" - }, "engines": { - "node": "*" + "node": ">=10" } }, - "node_modules/chokidar": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", - "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "node_modules/ci-info": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", + "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", "dev": true, - "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], "engines": { - "node": ">= 8.10.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" + "node": ">=8" } }, - "node_modules/chokidar/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } + "node_modules/cjs-module-lexer": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.4.1.tgz", + "integrity": "sha512-cuSVIHi9/9E/+821Qjdvngor+xpnlwnuwIyZOaLmHBVdXL+gP+I6QQB9VkO7RI77YIcTV+S1W9AreJ5eN63JBA==", + "dev": true }, "node_modules/clean-stack": { "version": "2.2.0", @@ -1387,17 +2211,22 @@ "node": ">=6" } }, - "node_modules/cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "node_modules/co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", "dev": true, - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" + "engines": { + "iojs": ">= 1.0.0", + "node": ">= 0.12.0" } }, + "node_modules/collect-v8-coverage": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz", + "integrity": "sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==", + "dev": true + }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -1416,18 +2245,6 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, - "node_modules/combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dev": true, - "dependencies": { - "delayed-stream": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/commondir": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", @@ -1446,31 +2263,34 @@ "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", "dev": true }, - "node_modules/core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==", - "dev": true - }, - "node_modules/coveralls": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/coveralls/-/coveralls-3.1.1.tgz", - "integrity": "sha512-+dxnG2NHncSD1NrqbSM3dn/lE57O6Qf/koe9+I7c+wzkqRmEvcp0kgJdxKInzYzkICKkFMZsX3Vct3++tsF9ww==", + "node_modules/create-jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz", + "integrity": "sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==", "dev": true, "dependencies": { - "js-yaml": "^3.13.1", - "lcov-parse": "^1.0.0", - "log-driver": "^1.2.7", - "minimist": "^1.2.5", - "request": "^2.88.2" + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "prompts": "^2.0.1" }, "bin": { - "coveralls": "bin/coveralls.js" + "create-jest": "bin/create-jest.js" }, "engines": { - "node": ">=6" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, + "node_modules/create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "dev": true, + "license": "MIT" + }, "node_modules/cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -1485,18 +2305,6 @@ "node": ">= 8" } }, - "node_modules/dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", - "dev": true, - "dependencies": { - "assert-plus": "^1.0.0" - }, - "engines": { - "node": ">=0.10" - } - }, "node_modules/debug": { "version": "4.3.6", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz", @@ -1523,16 +2331,18 @@ "node": ">=0.10.0" } }, - "node_modules/deep-eql": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.4.tgz", - "integrity": "sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg==", + "node_modules/dedent": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.5.3.tgz", + "integrity": "sha512-NHQtfOOW68WD8lgypbLA5oT+Bt0xXJhiYvoR6SmmNXZfpzOGXwdKWmcwG8N7PwVVWV3eF/68nmD9BaJSsTBhyQ==", "dev": true, - "dependencies": { - "type-detect": "^4.0.0" + "peerDependencies": { + "babel-plugin-macros": "^3.1.0" }, - "engines": { - "node": ">=6" + "peerDependenciesMeta": { + "babel-plugin-macros": { + "optional": true + } } }, "node_modules/deep-is": { @@ -1541,6 +2351,15 @@ "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true }, + "node_modules/deepmerge": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/default-require-extensions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-3.0.1.tgz", @@ -1573,22 +2392,22 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "node_modules/detect-newline": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", + "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", "dev": true, "engines": { - "node": ">=0.4.0" + "node": ">=8" } }, - "node_modules/diff": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", - "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", + "node_modules/diff-sequences": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", + "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", "dev": true, "engines": { - "node": ">=0.3.1" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/doctrine": { @@ -1603,14 +2422,20 @@ "node": ">=6.0.0" } }, - "node_modules/ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", + "node_modules/ejs": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz", + "integrity": "sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==", "dev": true, + "license": "Apache-2.0", "dependencies": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" + "jake": "^10.8.5" + }, + "bin": { + "ejs": "bin/cli.js" + }, + "engines": { + "node": ">=0.10.0" } }, "node_modules/electron-to-chromium": { @@ -1619,12 +2444,33 @@ "integrity": "sha512-lbBcvtIJ4J6sS4tb5TLp1b4LyfCdMkwStzXPyAgVgTRAsep4bvrAGaBOP7ZJtQMNJpSQ9SqG4brWOroNaQtm7Q==", "dev": true }, + "node_modules/emittery": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", + "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sindresorhus/emittery?sponsor=1" + } + }, "node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, "node_modules/es-define-property": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", @@ -1910,20 +2756,53 @@ "node": ">=0.10.0" } }, - "node_modules/extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "dev": true + "node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } }, - "node_modules/extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==", + "node_modules/exit": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", + "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", "dev": true, - "engines": [ - "node >=0.6.0" - ] + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/expect": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==", + "dev": true, + "dependencies": { + "@jest/expect-utils": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } }, "node_modules/fast-deep-equal": { "version": "3.1.3", @@ -1986,6 +2865,15 @@ "reusify": "^1.0.4" } }, + "node_modules/fb-watchman": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", + "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==", + "dev": true, + "dependencies": { + "bser": "2.1.1" + } + }, "node_modules/file-entry-cache": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", @@ -1998,21 +2886,54 @@ "node": "^10.12.0 || >=12.0.0" } }, - "node_modules/fill-range": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", - "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "node_modules/filelist": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz", + "integrity": "sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==", "dev": true, + "license": "Apache-2.0", "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" + "minimatch": "^5.0.1" } }, - "node_modules/find-cache-dir": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", + "node_modules/filelist/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/filelist/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-cache-dir": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", "dev": true, "dependencies": { @@ -2043,15 +2964,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/flat": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", - "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", - "dev": true, - "bin": { - "flat": "cli.js" - } - }, "node_modules/flat-cache": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", @@ -2085,29 +2997,6 @@ "node": ">=8.0.0" } }, - "node_modules/forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", - "dev": true, - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 0.12" - } - }, "node_modules/fromentries": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/fromentries/-/fromentries-1.3.2.tgz", @@ -2175,15 +3064,6 @@ "node": "6.* || 8.* || >= 10.*" } }, - "node_modules/get-func-name": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", - "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", - "dev": true, - "engines": { - "node": "*" - } - }, "node_modules/get-intrinsic": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", @@ -2212,33 +3092,16 @@ "node": ">=8.0.0" } }, - "node_modules/getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", - "dev": true, - "dependencies": { - "assert-plus": "^1.0.0" - } - }, - "node_modules/glob": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", - "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", - "deprecated": "Glob versions prior to v9 are no longer supported", + "node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^5.0.1", - "once": "^1.3.0" - }, "engines": { - "node": ">=12" + "node": ">=10" }, "funding": { - "url": "https://github.com/sponsors/isaacs" + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/glob-parent": { @@ -2253,27 +3116,6 @@ "node": ">=10.13.0" } }, - "node_modules/glob/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/glob/node_modules/minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", - "dev": true, - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/globals": { "version": "13.24.0", "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", @@ -2313,29 +3155,6 @@ "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", "dev": true }, - "node_modules/har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/har-validator": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", - "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", - "deprecated": "this library is no longer supported", - "dev": true, - "dependencies": { - "ajv": "^6.12.3", - "har-schema": "^2.0.0" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -2418,34 +3237,19 @@ "node": ">= 0.4" } }, - "node_modules/he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", - "dev": true, - "bin": { - "he": "bin/he" - } - }, "node_modules/html-escaper": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", "dev": true }, - "node_modules/http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==", + "node_modules/human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", "dev": true, - "dependencies": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - }, "engines": { - "node": ">=0.8", - "npm": ">=1.3.7" + "node": ">=10.17.0" } }, "node_modules/ignore": { @@ -2473,6 +3277,25 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/import-local": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.2.0.tgz", + "integrity": "sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==", + "dev": true, + "dependencies": { + "pkg-dir": "^4.2.0", + "resolve-cwd": "^3.0.0" + }, + "bin": { + "import-local-fixture": "fixtures/cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", @@ -2508,16 +3331,25 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true + }, + "node_modules/is-core-module": { + "version": "2.15.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.1.tgz", + "integrity": "sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==", "dev": true, "dependencies": { - "binary-extensions": "^2.0.0" + "hasown": "^2.0.2" }, "engines": { - "node": ">=8" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/is-extglob": { @@ -2538,6 +3370,15 @@ "node": ">=8" } }, + "node_modules/is-generator-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", + "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", @@ -2568,15 +3409,6 @@ "node": ">=8" } }, - "node_modules/is-plain-obj": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", - "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/is-stream": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", @@ -2595,18 +3427,6 @@ "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", "dev": true }, - "node_modules/is-unicode-supported": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", - "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/is-windows": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", @@ -2622,12 +3442,6 @@ "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", "dev": true }, - "node_modules/isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==", - "dev": true - }, "node_modules/istanbul-lib-coverage": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", @@ -2709,9 +3523,669 @@ "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", "dev": true, - "dependencies": { - "semver": "^7.5.3" - }, + "dependencies": { + "semver": "^7.5.3" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/istanbul-lib-report/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-source-maps": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", + "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", + "dev": true, + "dependencies": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0", + "source-map": "^0.6.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-reports": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", + "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", + "dev": true, + "dependencies": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jake": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/jake/-/jake-10.9.2.tgz", + "integrity": "sha512-2P4SQ0HrLQ+fw6llpLnOaGAvN2Zu6778SJMrCUwns4fOoG9ayrTiZk3VV8sCPkVZF8ab0zksVpS8FDY5pRCNBA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "async": "^3.2.3", + "chalk": "^4.0.2", + "filelist": "^1.0.4", + "minimatch": "^3.1.2" + }, + "bin": { + "jake": "bin/cli.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz", + "integrity": "sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/core": "^29.7.0", + "@jest/types": "^29.6.3", + "import-local": "^3.0.2", + "jest-cli": "^29.7.0" + }, + "bin": { + "jest": "bin/jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/jest-changed-files": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.7.0.tgz", + "integrity": "sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==", + "dev": true, + "dependencies": { + "execa": "^5.0.0", + "jest-util": "^29.7.0", + "p-limit": "^3.1.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-circus": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.7.0.tgz", + "integrity": "sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==", + "dev": true, + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "co": "^4.6.0", + "dedent": "^1.0.0", + "is-generator-fn": "^2.0.0", + "jest-each": "^29.7.0", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "p-limit": "^3.1.0", + "pretty-format": "^29.7.0", + "pure-rand": "^6.0.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-cli": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.7.0.tgz", + "integrity": "sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==", + "dev": true, + "dependencies": { + "@jest/core": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "create-jest": "^29.7.0", + "exit": "^0.1.2", + "import-local": "^3.0.2", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "yargs": "^17.3.1" + }, + "bin": { + "jest": "bin/jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/jest-cli/node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/jest-cli/node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/jest-cli/node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/jest-config": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz", + "integrity": "sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==", + "dev": true, + "dependencies": { + "@babel/core": "^7.11.6", + "@jest/test-sequencer": "^29.7.0", + "@jest/types": "^29.6.3", + "babel-jest": "^29.7.0", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "deepmerge": "^4.2.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-circus": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "micromatch": "^4.0.4", + "parse-json": "^5.2.0", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@types/node": "*", + "ts-node": ">=9.0.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "ts-node": { + "optional": true + } + } + }, + "node_modules/jest-config/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/jest-diff": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz", + "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==", + "dev": true, + "dependencies": { + "chalk": "^4.0.0", + "diff-sequences": "^29.6.3", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-docblock": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.7.0.tgz", + "integrity": "sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==", + "dev": true, + "dependencies": { + "detect-newline": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-each": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.7.0.tgz", + "integrity": "sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "jest-get-type": "^29.6.3", + "jest-util": "^29.7.0", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-environment-node": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.7.0.tgz", + "integrity": "sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==", + "dev": true, + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-get-type": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz", + "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", + "dev": true, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-haste-map": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.7.0.tgz", + "integrity": "sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "@types/graceful-fs": "^4.1.3", + "@types/node": "*", + "anymatch": "^3.0.3", + "fb-watchman": "^2.0.0", + "graceful-fs": "^4.2.9", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", + "micromatch": "^4.0.4", + "walker": "^1.0.8" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "optionalDependencies": { + "fsevents": "^2.3.2" + } + }, + "node_modules/jest-leak-detector": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz", + "integrity": "sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==", + "dev": true, + "dependencies": { + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-matcher-utils": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz", + "integrity": "sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==", + "dev": true, + "dependencies": { + "chalk": "^4.0.0", + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-message-util": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz", + "integrity": "sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.12.13", + "@jest/types": "^29.6.3", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-mock": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz", + "integrity": "sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-pnp-resolver": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", + "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", + "dev": true, + "engines": { + "node": ">=6" + }, + "peerDependencies": { + "jest-resolve": "*" + }, + "peerDependenciesMeta": { + "jest-resolve": { + "optional": true + } + } + }, + "node_modules/jest-regex-util": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz", + "integrity": "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==", + "dev": true, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-resolve": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.7.0.tgz", + "integrity": "sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==", + "dev": true, + "dependencies": { + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-pnp-resolver": "^1.2.2", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "resolve": "^1.20.0", + "resolve.exports": "^2.0.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-resolve-dependencies": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz", + "integrity": "sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA==", + "dev": true, + "dependencies": { + "jest-regex-util": "^29.6.3", + "jest-snapshot": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-runner": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.7.0.tgz", + "integrity": "sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==", + "dev": true, + "dependencies": { + "@jest/console": "^29.7.0", + "@jest/environment": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "emittery": "^0.13.1", + "graceful-fs": "^4.2.9", + "jest-docblock": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-leak-detector": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-resolve": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-util": "^29.7.0", + "jest-watcher": "^29.7.0", + "jest-worker": "^29.7.0", + "p-limit": "^3.1.0", + "source-map-support": "0.5.13" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-runtime": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.7.0.tgz", + "integrity": "sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==", + "dev": true, + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/globals": "^29.7.0", + "@jest/source-map": "^29.6.3", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "cjs-module-lexer": "^1.0.0", + "collect-v8-coverage": "^1.0.0", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "slash": "^3.0.0", + "strip-bom": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-runtime/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/jest-snapshot": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz", + "integrity": "sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==", + "dev": true, + "dependencies": { + "@babel/core": "^7.11.6", + "@babel/generator": "^7.7.2", + "@babel/plugin-syntax-jsx": "^7.7.2", + "@babel/plugin-syntax-typescript": "^7.7.2", + "@babel/types": "^7.3.3", + "@jest/expect-utils": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "babel-preset-current-node-syntax": "^1.0.0", + "chalk": "^4.0.0", + "expect": "^29.7.0", + "graceful-fs": "^4.2.9", + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "natural-compare": "^1.4.0", + "pretty-format": "^29.7.0", + "semver": "^7.5.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-snapshot/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/jest-util": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz", + "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-validate": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz", + "integrity": "sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "camelcase": "^6.2.0", + "chalk": "^4.0.0", + "jest-get-type": "^29.6.3", + "leven": "^3.1.0", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-validate/node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true, "engines": { "node": ">=10" }, @@ -2719,43 +4193,53 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/istanbul-lib-report/node_modules/semver": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", - "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "node_modules/jest-watcher": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.7.0.tgz", + "integrity": "sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==", "dev": true, - "bin": { - "semver": "bin/semver.js" + "dependencies": { + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "emittery": "^0.13.1", + "jest-util": "^29.7.0", + "string-length": "^4.0.1" }, "engines": { - "node": ">=10" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/istanbul-lib-source-maps": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", - "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", + "node_modules/jest-worker": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", + "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", "dev": true, "dependencies": { - "debug": "^4.1.1", - "istanbul-lib-coverage": "^3.0.0", - "source-map": "^0.6.1" + "@types/node": "*", + "jest-util": "^29.7.0", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" }, "engines": { - "node": ">=10" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/istanbul-reports": { - "version": "3.1.7", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", - "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", + "node_modules/jest-worker/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, "dependencies": { - "html-escaper": "^2.0.0", - "istanbul-lib-report": "^3.0.0" + "has-flag": "^4.0.0" }, "engines": { - "node": ">=8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" } }, "node_modules/js-tokens": { @@ -2777,12 +4261,6 @@ "js-yaml": "bin/js-yaml.js" } }, - "node_modules/jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==", - "dev": true - }, "node_modules/jsesc": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", @@ -2801,10 +4279,10 @@ "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", "dev": true }, - "node_modules/json-schema": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", - "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", "dev": true }, "node_modules/json-schema-traverse": { @@ -2837,21 +4315,6 @@ "node": ">=6" } }, - "node_modules/jsprim": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", - "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", - "dev": true, - "dependencies": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.4.0", - "verror": "1.10.0" - }, - "engines": { - "node": ">=0.6.0" - } - }, "node_modules/keyv": { "version": "4.5.4", "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", @@ -2861,13 +4324,22 @@ "json-buffer": "3.0.1" } }, - "node_modules/lcov-parse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lcov-parse/-/lcov-parse-1.0.0.tgz", - "integrity": "sha512-aprLII/vPzuQvYZnDRU78Fns9I2Ag3gi4Ipga/hxnVMCZC8DnR2nI7XBqrPoywGfxqIx/DgarGvDJZAD3YBTgQ==", + "node_modules/kleur": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", + "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", "dev": true, - "bin": { - "lcov-parse": "bin/cli.js" + "engines": { + "node": ">=6" + } + }, + "node_modules/leven": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", + "dev": true, + "engines": { + "node": ">=6" } }, "node_modules/levn": { @@ -2883,6 +4355,12 @@ "node": ">= 0.8.0" } }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true + }, "node_modules/locate-path": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", @@ -2910,46 +4388,19 @@ "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==", "dev": true }, + "node_modules/lodash.memoize": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", + "integrity": "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==", + "dev": true, + "license": "MIT" + }, "node_modules/lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true }, - "node_modules/log-driver": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/log-driver/-/log-driver-1.2.7.tgz", - "integrity": "sha512-U7KCmLdqsGHBLeWqYlFA0V0Sl6P08EE1ZrmA9cxjUE0WVqT9qnyVDPz1kzpFEP0jdJuFnasWIfSd7fsaNXkpbg==", - "dev": true, - "engines": { - "node": ">=0.8.6" - } - }, - "node_modules/log-symbols": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", - "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", - "dev": true, - "dependencies": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/loupe": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.7.tgz", - "integrity": "sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==", - "dev": true, - "dependencies": { - "get-func-name": "^2.0.1" - } - }, "node_modules/lru-cache": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", @@ -2974,6 +4425,28 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true, + "license": "ISC" + }, + "node_modules/makeerror": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", + "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", + "dev": true, + "dependencies": { + "tmpl": "1.0.5" + } + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, "node_modules/merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", @@ -2996,25 +4469,13 @@ "node": ">=8.6" } }, - "node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", "dev": true, - "dependencies": { - "mime-db": "1.52.0" - }, "engines": { - "node": ">= 0.6" + "node": ">=6" } }, "node_modules/minimatch": { @@ -3029,110 +4490,6 @@ "node": "*" } }, - "node_modules/minimist": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", - "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/mocha": { - "version": "10.7.3", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.7.3.tgz", - "integrity": "sha512-uQWxAu44wwiACGqjbPYmjo7Lg8sFrS3dQe7PP2FQI+woptP4vZXSMcfMyFL/e1yFEeEpV4RtyTpZROOKmxis+A==", - "dev": true, - "dependencies": { - "ansi-colors": "^4.1.3", - "browser-stdout": "^1.3.1", - "chokidar": "^3.5.3", - "debug": "^4.3.5", - "diff": "^5.2.0", - "escape-string-regexp": "^4.0.0", - "find-up": "^5.0.0", - "glob": "^8.1.0", - "he": "^1.2.0", - "js-yaml": "^4.1.0", - "log-symbols": "^4.1.0", - "minimatch": "^5.1.6", - "ms": "^2.1.3", - "serialize-javascript": "^6.0.2", - "strip-json-comments": "^3.1.1", - "supports-color": "^8.1.1", - "workerpool": "^6.5.1", - "yargs": "^16.2.0", - "yargs-parser": "^20.2.9", - "yargs-unparser": "^2.0.0" - }, - "bin": { - "_mocha": "bin/_mocha", - "mocha": "bin/mocha.js" - }, - "engines": { - "node": ">= 14.0.0" - } - }, - "node_modules/mocha/node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, - "node_modules/mocha/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/mocha/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/mocha/node_modules/minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", - "dev": true, - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/mocha/node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - }, - "node_modules/mocha/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, "node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -3159,6 +4516,12 @@ "node": ">= 10.13" } }, + "node_modules/node-int64": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", + "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", + "dev": true + }, "node_modules/node-preload": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/node-preload/-/node-preload-0.2.1.tgz", @@ -3186,6 +4549,18 @@ "node": ">=0.10.0" } }, + "node_modules/npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/nyc": { "version": "15.1.0", "resolved": "https://registry.npmjs.org/nyc/-/nyc-15.1.0.tgz", @@ -3375,15 +4750,6 @@ "node": ">=6" } }, - "node_modules/oauth-sign": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", - "dev": true, - "engines": { - "node": "*" - } - }, "node_modules/object-inspect": { "version": "1.13.2", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz", @@ -3405,6 +4771,21 @@ "wrappy": "1" } }, + "node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/optionator": { "version": "0.9.4", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", @@ -3500,6 +4881,24 @@ "node": ">=6" } }, + "node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -3527,19 +4926,10 @@ "node": ">=8" } }, - "node_modules/pathval": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", - "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==", + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, "node_modules/picocolors": { @@ -3560,6 +4950,15 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/pirates": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", + "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, "node_modules/pkg-dir": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", @@ -3660,6 +5059,32 @@ "node": ">=6.0.0" } }, + "node_modules/pretty-format": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", + "dev": true, + "dependencies": { + "@jest/schemas": "^29.6.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, "node_modules/process-on-spawn": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/process-on-spawn/-/process-on-spawn-1.0.0.tgz", @@ -3672,6 +5097,19 @@ "node": ">=8" } }, + "node_modules/prompts": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", + "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", + "dev": true, + "dependencies": { + "kleur": "^3.0.3", + "sisteransi": "^1.0.5" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/propagate": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/propagate/-/propagate-2.0.1.tgz", @@ -3681,12 +5119,6 @@ "node": ">= 8" } }, - "node_modules/psl": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", - "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==", - "dev": true - }, "node_modules/punycode": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", @@ -3696,6 +5128,22 @@ "node": ">=6" } }, + "node_modules/pure-rand": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.1.0.tgz", + "integrity": "sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/dubzzz" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fast-check" + } + ] + }, "node_modules/qs": { "version": "6.13.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", @@ -3731,26 +5179,11 @@ } ] }, - "node_modules/randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, - "dependencies": { - "safe-buffer": "^5.1.0" - } - }, - "node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } + "node_modules/react-is": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", + "dev": true }, "node_modules/release-zalgo": { "version": "1.0.0", @@ -3764,57 +5197,6 @@ "node": ">=4" } }, - "node_modules/request": { - "version": "2.88.2", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", - "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", - "deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142", - "dev": true, - "dependencies": { - "aws-sign2": "~0.7.0", - "aws4": "^1.8.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "form-data": "~2.3.2", - "har-validator": "~5.1.3", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.19", - "oauth-sign": "~0.9.0", - "performance-now": "^2.1.0", - "qs": "~6.5.2", - "safe-buffer": "^5.1.2", - "tough-cookie": "~2.5.0", - "tunnel-agent": "^0.6.0", - "uuid": "^3.3.2" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/request/node_modules/qs": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", - "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", - "dev": true, - "engines": { - "node": ">=0.6" - } - }, - "node_modules/request/node_modules/uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", - "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", - "dev": true, - "bin": { - "uuid": "bin/uuid" - } - }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -3830,6 +5212,44 @@ "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", "dev": true }, + "node_modules/resolve": { + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", + "dev": true, + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-cwd": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", + "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", + "dev": true, + "dependencies": { + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve-cwd/node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/resolve-from": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", @@ -3839,6 +5259,15 @@ "node": ">=4" } }, + "node_modules/resolve.exports": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.2.tgz", + "integrity": "sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==", + "dev": true, + "engines": { + "node": ">=10" + } + }, "node_modules/reusify": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", @@ -3927,13 +5356,8 @@ "type": "consulting", "url": "https://feross.org/support" } - ] - }, - "node_modules/safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true + ], + "license": "MIT" }, "node_modules/semver": { "version": "6.3.1", @@ -3944,15 +5368,6 @@ "semver": "bin/semver.js" } }, - "node_modules/serialize-javascript": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", - "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", - "dev": true, - "dependencies": { - "randombytes": "^2.1.0" - } - }, "node_modules/set-blocking": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", @@ -4021,6 +5436,21 @@ "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", "dev": true }, + "node_modules/sisteransi": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", + "dev": true + }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -4030,6 +5460,16 @@ "node": ">=0.10.0" } }, + "node_modules/source-map-support": { + "version": "0.5.13", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", + "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", + "dev": true, + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, "node_modules/spawn-wrap": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-2.0.0.tgz", @@ -4053,36 +5493,39 @@ "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", "dev": true }, - "node_modules/sshpk": { - "version": "1.18.0", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.18.0.tgz", - "integrity": "sha512-2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ==", + "node_modules/stack-utils": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", + "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", "dev": true, "dependencies": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" - }, - "bin": { - "sshpk-conv": "bin/sshpk-conv", - "sshpk-sign": "bin/sshpk-sign", - "sshpk-verify": "bin/sshpk-verify" + "escape-string-regexp": "^2.0.0" }, "engines": { - "node": ">=0.10.0" + "node": ">=10" } }, - "node_modules/sshpk/node_modules/tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", - "dev": true + "node_modules/stack-utils/node_modules/escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-length": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", + "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", + "dev": true, + "dependencies": { + "char-regex": "^1.0.2", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + } }, "node_modules/string-width": { "version": "4.2.3", @@ -4119,6 +5562,15 @@ "node": ">=8" } }, + "node_modules/strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", @@ -4143,6 +5595,18 @@ "node": ">=8" } }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/synckit": { "version": "0.9.1", "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.9.1.tgz", @@ -4217,6 +5681,12 @@ "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", "dev": true }, + "node_modules/tmpl": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", + "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", + "dev": true + }, "node_modules/to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", @@ -4238,19 +5708,6 @@ "node": ">=8.0" } }, - "node_modules/tough-cookie": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", - "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", - "dev": true, - "dependencies": { - "psl": "^1.1.28", - "punycode": "^2.1.1" - }, - "engines": { - "node": ">=0.8" - } - }, "node_modules/ts-api-utils": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz", @@ -4263,24 +5720,138 @@ "typescript": ">=4.2.0" } }, - "node_modules/tslib": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.7.0.tgz", - "integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==", - "dev": true + "node_modules/ts-jest": { + "version": "29.2.5", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.2.5.tgz", + "integrity": "sha512-KD8zB2aAZrcKIdGk4OwpJggeLcH1FgrICqDSROWqlnJXGCXK4Mn6FcdK2B6670Xr73lHMG1kHw8R87A0ecZ+vA==", + "dev": true, + "license": "MIT", + "dependencies": { + "bs-logger": "^0.2.6", + "ejs": "^3.1.10", + "fast-json-stable-stringify": "^2.1.0", + "jest-util": "^29.0.0", + "json5": "^2.2.3", + "lodash.memoize": "^4.1.2", + "make-error": "^1.3.6", + "semver": "^7.6.3", + "yargs-parser": "^21.1.1" + }, + "bin": { + "ts-jest": "cli.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" + }, + "peerDependencies": { + "@babel/core": ">=7.0.0-beta.0 <8", + "@jest/transform": "^29.0.0", + "@jest/types": "^29.0.0", + "babel-jest": "^29.0.0", + "jest": "^29.0.0", + "typescript": ">=4.3 <6" + }, + "peerDependenciesMeta": { + "@babel/core": { + "optional": true + }, + "@jest/transform": { + "optional": true + }, + "@jest/types": { + "optional": true + }, + "babel-jest": { + "optional": true + }, + "esbuild": { + "optional": true + } + } + }, + "node_modules/ts-jest/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/ts-jest/node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=12" + } }, - "node_modules/tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", + "node_modules/ts-node": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", + "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", "dev": true, + "license": "MIT", "dependencies": { - "safe-buffer": "^5.0.1" + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" }, + "bin": { + "ts-node": "dist/bin.js", + "ts-node-cwd": "dist/bin-cwd.js", + "ts-node-esm": "dist/bin-esm.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + }, + "peerDependencies": { + "@swc/core": ">=1.2.50", + "@swc/wasm": ">=1.2.50", + "@types/node": "*", + "typescript": ">=2.7" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "@swc/wasm": { + "optional": true + } + } + }, + "node_modules/ts-node/node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true, + "license": "BSD-3-Clause", "engines": { - "node": "*" + "node": ">=0.3.1" } }, + "node_modules/tslib": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.7.0.tgz", + "integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==", + "dev": true + }, "node_modules/tweetnacl": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz", @@ -4299,15 +5870,6 @@ "node": ">= 0.8.0" } }, - "node_modules/type-detect": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.1.0.tgz", - "integrity": "sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/type-fest": { "version": "0.20.2", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", @@ -4424,18 +5986,40 @@ "uuid": "dist/bin/uuid" } }, - "node_modules/verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==", + "node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "dev": true, + "license": "MIT" + }, + "node_modules/v8-to-istanbul": { + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz", + "integrity": "sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.12", + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^2.0.0" + }, + "engines": { + "node": ">=10.12.0" + } + }, + "node_modules/v8-to-istanbul/node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true + }, + "node_modules/walker": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", + "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", "dev": true, - "engines": [ - "node >=0.6.0" - ], "dependencies": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" + "makeerror": "1.0.12" } }, "node_modules/which": { @@ -4468,12 +6052,6 @@ "node": ">=0.10.0" } }, - "node_modules/workerpool": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.5.1.tgz", - "integrity": "sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA==", - "dev": true - }, "node_modules/wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", @@ -4524,70 +6102,14 @@ "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", "dev": true }, - "node_modules/yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", - "dev": true, - "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs-parser": { - "version": "20.2.9", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", - "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs-unparser": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", - "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", - "dev": true, - "dependencies": { - "camelcase": "^6.0.0", - "decamelize": "^4.0.0", - "flat": "^5.0.2", - "is-plain-obj": "^2.1.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs-unparser/node_modules/camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/yargs-unparser/node_modules/decamelize": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", - "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", + "node_modules/yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", "dev": true, + "license": "MIT", "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=6" } }, "node_modules/yocto-queue": { diff --git a/package.json b/package.json index 012ab74..0c44276 100644 --- a/package.json +++ b/package.json @@ -29,26 +29,25 @@ }, "main": "dist/telnyx.node.js", "type": "module", - "types": "types/index.d.ts", + "types": "dist/types/index.d.ts", "devDependencies": { "@eslint/js": "^9.10.0", "@types/eslint__js": "^8.42.3", + "@types/jest": "^29.5.13", "@types/qs": "^6.9.15", - "chai": "~4.4.1", - "chai-as-promised": "~7.1.1", - "coveralls": "^3.1.1", "debug": "^4.3.4", "eslint": "^8.57.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-chai-friendly": "^0.7.4", "eslint-plugin-prettier": "^5.2.1", - "mocha": "^10.3.0", + "jest": "^29.7.0", "nock": "^13.5.4", "nyc": "^15.1.0", "prettier": "^3.0.0", "qs": "^6.11.2", - "safe-buffer": "^5.2.1", "telnyx": "^1.26.2", + "ts-jest": "^29.2.5", + "ts-node": "^10.9.2", "tweetnacl": "^1.0.3", "typescript": "^5.6.2", "typescript-eslint": "^8.5.0", @@ -59,21 +58,12 @@ }, "license": "MIT", "scripts": { - "build": "tsc", + "prebuild": "rm -rf ./dist", + "build": "tsc && cp -r types dist/types", "clean": "rm -rf ./.nyc_output ./node_modules/.cache ./coverage ./dist", "prepack": "npm install && npm run build", - "mocha": "nyc mocha", - "test": "npm run lint && npm run mocha", + "test": "jest", "lint": "rm -rf ./dist && eslint .", - "fix": "npm run lint --fix", - "report": "nyc -r text -r lcov report", - "coveralls": "cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js" - }, - "nyc": { - "exclude": [ - "testUtils/**/*", - "test/**/*", - "src/TelnyxMethod.basic.js" - ] + "fix": "npm run lint --fix" } } diff --git a/src/Error.ts b/src/Error.ts index c8ea4df..28e8db1 100644 --- a/src/Error.ts +++ b/src/Error.ts @@ -11,6 +11,12 @@ export interface TelnyxRawError { code: string; detail: string; title: string; + meta?: { + url: string; + }; + source?: { + pointer: string; + }; }>; } diff --git a/src/TelnyxMethod.basic.ts b/src/TelnyxMethod.basic.ts index 89c216e..bfdef0c 100644 --- a/src/TelnyxMethod.basic.ts +++ b/src/TelnyxMethod.basic.ts @@ -1,4 +1,4 @@ -import telnyxMethod from './TelnyxMethod.js'; +import telnyxMethod from './TelnyxMethod'; export const create = telnyxMethod({ method: 'POST', diff --git a/src/TelnyxMethod.ts b/src/TelnyxMethod.ts index ad734e4..da317c1 100644 --- a/src/TelnyxMethod.ts +++ b/src/TelnyxMethod.ts @@ -1,7 +1,7 @@ -import {MethodSpec, TelnyxResourceObject} from './Types.js'; -import * as utils from './utils.js'; -import makeRequest from './makeRequest.js'; -import {makeAutoPaginationMethods} from './autoPagination.js'; +import {MethodSpec, TelnyxResourceObject} from './Types'; +import * as utils from './utils'; +import makeRequest from './makeRequest'; +import {makeAutoPaginationMethods} from './autoPagination'; /** * Create an API method from the declared spec. diff --git a/src/TelnyxResource.ts b/src/TelnyxResource.ts index b517ce1..1f52f57 100644 --- a/src/TelnyxResource.ts +++ b/src/TelnyxResource.ts @@ -1,12 +1,11 @@ import * as http from 'http'; import * as https from 'https'; import * as path from 'path'; -import {Buffer} from 'safe-buffer'; -import * as utils from './utils.js'; -import * as TelnyxError from './Error.js'; -import TelnyxMethod from './TelnyxMethod.js'; -import * as basicMethods from './TelnyxMethod.basic.js'; +import * as utils from './utils'; +import * as TelnyxError from './Error'; +import TelnyxMethod from './TelnyxMethod'; +import * as basicMethods from './TelnyxMethod.basic'; import { MethodSpec, ReqHandler, @@ -20,7 +19,7 @@ import { TelnyxIncomingHttpHeaders, TelnyxObject, TelnyxResourceObject, -} from './Types.js'; +} from './Types'; const hasOwn = {}.hasOwnProperty; diff --git a/src/Types.d.ts b/src/Types.d.ts index 125a5ca..20f09b0 100644 --- a/src/Types.d.ts +++ b/src/Types.d.ts @@ -6,9 +6,10 @@ import { IncomingMessage, } from 'http'; import {Agent as HttpsAgent} from 'https'; -import {TelnyxRawError} from './Error.ts'; +import {TelnyxRawError} from './Error'; +import Webhooks from './Webhooks'; -export type AppInfo = {name: string; version: string; url: string} & Record< +export type AppInfo = {name?: string; version?: string; url?: string} & Record< string, unknown >; @@ -70,7 +71,7 @@ export type TelnyxObject = { self: TelnyxObject, ) => (args: Record) => Record; _setApiKey: (apiKey: string) => void; - _setAppInfo: (appInfo: AppInfo) => void; + _setAppInfo: (appInfo?: AppInfo) => void; getClientUserAgentSeeded: ( seed: Record, callback: (userAgent: string) => void, @@ -83,21 +84,27 @@ export type TelnyxObject = { getConstant: (name: string) => T; _setApiField: ( name: K, - value: TelnyxObject['_api'][K], + value: TelnyxObject['_api'][K] | null, ) => void; getApiField: ( key: K, ) => TelnyxObject['_api'][K]; + setHost: (host: string, port: string, protocol: string) => void; setPort: (port: string) => void; setProtocol: (protocol: string) => void; + setHttpAgent: (agent: HttpAgent | HttpsAgent) => void; + setTimeout: (timeout: number | null | undefined) => void; + setMaxNetworkRetries: (maxNetworkRetries: number) => void; _appInfo: AppInfo; _clientId?: string; - on: unknown; - off: unknown; + on: (event: string, listener: (...args: Array) => void) => void; + off: (event: string, listener: (...args: Array) => void) => void; once: unknown; VERSION: string; + REQUESTS: Array; + LAST_REQUEST: unknown; errors: unknown; - webhooks: unknown; + webhooks: typeof Webhooks; }; export type RequestHeaders = Record; @@ -117,13 +124,19 @@ type RequestCallback = ( type RequestCallbackReturn = unknown; export type RequestData = Record; export type RequestOptions = { - auth: string | null; + auth?: string | null; headers: RequestHeaders; }; -export type ResponsePayload = IncomingMessage & { - [key: string]: unknown; - requestId: string; -} & {req: ReqTimeoutHandler}; +export type ResponsePayload< + T = { + [key: string]: unknown; + }, +> = IncomingMessage & + T & { + data: T & {}; + requestId: string; + req: ReqTimeoutHandler; + }; export type ResponseHeaderValue = string | string[]; export type ResponseHeaders = Record; type PromiseCache = { @@ -160,8 +173,8 @@ export type TelnyxResourceObject = { requestPath: MethodSpec['path'], requestData: RequestData, auth: RequestOptions['auth'], - options: {headers?: RequestOptions['headers']}, - callback: (err: unknown, response: ResponsePayload | null) => void, + options: RequestOptions, + callback: RequestCallback, ) => void; _buildError: (error: TelnyxRawError, statusCode: number | undefined) => Error; _generateConnectionErrorMessage: ( diff --git a/src/Webhooks.ts b/src/Webhooks.ts index 22ed3d3..b627733 100644 --- a/src/Webhooks.ts +++ b/src/Webhooks.ts @@ -1,9 +1,8 @@ -import {Buffer} from 'safe-buffer'; import nacl from 'tweetnacl'; -import * as TelnyxError from './Error.js'; +import * as TelnyxError from './Error'; -type WebhookPayload = string; -type WebhookHeader = string; +type WebhookPayload = string | Uint8Array; +type WebhookHeader = string | Uint8Array; const Webhooks = { DEFAULT_TOLERANCE: 300, // 5 minutes @@ -13,7 +12,7 @@ const Webhooks = { signatureHeader: WebhookHeader, timestampHeader: WebhookHeader, publicKey: string, - tolerance: number, + tolerance?: number, ) { this.signature.verifySignature( payload, @@ -23,17 +22,21 @@ const Webhooks = { tolerance || Webhooks.DEFAULT_TOLERANCE, ); - const jsonPayload = JSON.parse(payload); + const jsonPayload = + payload instanceof Uint8Array + ? JSON.parse(new TextDecoder('utf8').decode(payload)) + : JSON.parse(payload); + return jsonPayload; }, signature: { verifySignature: function ( - payload: string, + payload: WebhookPayload, signatureHeader: WebhookHeader = '', timestampHeader: WebhookHeader = '', publicKey: string, - tolerance: number, + tolerance?: number, ) { payload = Buffer.isBuffer(payload) ? payload.toString('utf8') : payload; timestampHeader = Buffer.isBuffer(timestampHeader) @@ -48,12 +51,25 @@ const Webhooks = { let verification; try { - // TODO: this cast is a workaround as the types are not compatible and this `method` is outdated - verification = nacl.sign.detached.verify( - payloadBuffer as unknown as Uint8Array, - Buffer.from(signatureHeader, 'base64') as unknown as Uint8Array, - Buffer.from(publicKey, 'base64') as unknown as Uint8Array, - ); + // https://bun.sh/guides/binary/buffer-to-typedarray + if (signatureHeader instanceof Uint8Array) { + // TODO: this cast is a workaround as the types are not compatible and this `method` is outdated + verification = nacl.sign.detached.verify( + payloadBuffer, + Buffer.from( + new TextDecoder('utf8').decode(signatureHeader), + 'base64', + ), + Buffer.from(publicKey, 'base64'), + ); + } else { + // TODO: this cast is a workaround as the types are not compatible and this `method` is outdated + verification = nacl.sign.detached.verify( + payloadBuffer, + Buffer.from(signatureHeader, 'base64'), + Buffer.from(publicKey, 'base64'), + ); + } } catch (_e) { throwSignatureVerificationError( payload, @@ -71,9 +87,15 @@ const Webhooks = { } const timestampAge = - Math.floor(Date.now() / 1000) - parseInt(timestampHeader, 10); + Math.floor(Date.now() / 1000) - + parseInt( + timestampHeader instanceof Uint8Array + ? new TextDecoder('utf8').decode(timestampHeader) + : timestampHeader, + 10, + ); - if (tolerance > 0 && timestampAge > tolerance) { + if (tolerance && tolerance > 0 && timestampAge > tolerance) { throw new TelnyxError.TelnyxSignatureVerificationError({ message: 'Timestamp outside the tolerance zone', detail: { @@ -91,8 +113,8 @@ const Webhooks = { function throwSignatureVerificationError( payload: unknown, - signatureHeader: string, - timestampHeader: string, + signatureHeader: WebhookHeader, + timestampHeader: WebhookHeader, ) { throw new TelnyxError.TelnyxSignatureVerificationError({ message: 'Signature is invalid and does not match the payload', diff --git a/src/autoPagination.ts b/src/autoPagination.ts index 3cc3a47..8e1e655 100644 --- a/src/autoPagination.ts +++ b/src/autoPagination.ts @@ -4,9 +4,9 @@ import { PromiseCache, RequestArgs, TelnyxResourceObject, -} from './Types.js'; -import makeRequest from './makeRequest.js'; -import * as utils from './utils.js'; +} from './Types'; +import makeRequest from './makeRequest'; +import * as utils from './utils'; type IterationResult = { done: boolean; diff --git a/src/makeRequest.ts b/src/makeRequest.ts index d0f3d93..bf29538 100644 --- a/src/makeRequest.ts +++ b/src/makeRequest.ts @@ -4,8 +4,8 @@ import { RequestData, ResponsePayload, TelnyxResourceObject, -} from './Types.js'; -import * as utils from './utils.js'; +} from './Types'; +import * as utils from './utils'; const OPTIONAL_REGEX = /^optional!/; function _getRequestOpts( @@ -135,7 +135,7 @@ function makeRequest( function requestCallback( err: unknown, - response: ResponsePayload | null, + response?: ResponsePayload | null, ): void { if (err) { reject(err); diff --git a/src/multipart.ts b/src/multipart.ts index f57826a..f9a93bf 100644 --- a/src/multipart.ts +++ b/src/multipart.ts @@ -4,8 +4,8 @@ import { RequestHeaders, TelnyxResourceObject, TypedData, -} from './Types.js'; -import {flattenAndStringify, stringifyRequestData} from './utils.js'; +} from './Types'; +import {flattenAndStringify, stringifyRequestData} from './utils'; type MultipartCallbackReturn = unknown; type MultipartCallback = ( diff --git a/src/resources/Balance.ts b/src/resources/Balance.ts index 8a70158..2e5e3d6 100644 --- a/src/resources/Balance.ts +++ b/src/resources/Balance.ts @@ -1,4 +1,4 @@ -import TelnyxResource from '../TelnyxResource.js'; +import TelnyxResource from '../TelnyxResource'; export const Balance = TelnyxResource.extend({ path: 'balance', diff --git a/lib/resources/MessagingProfiles.js b/src/resources/MessagingProfiles.ts similarity index 76% rename from lib/resources/MessagingProfiles.js rename to src/resources/MessagingProfiles.ts index 093eb49..581cdfb 100644 --- a/lib/resources/MessagingProfiles.js +++ b/src/resources/MessagingProfiles.ts @@ -1,18 +1,19 @@ -'use strict'; +import telnyx from 'telnyx'; +import TelnyxResource from '../TelnyxResource'; +import {ResponsePayload, TelnyxObject} from '../Types'; +import * as utils from '../utils'; -var TelnyxResource = require('../TelnyxResource'); -var utils = require('../utils'); -var telnyxMethod = TelnyxResource.method; +const telnyxMethod = TelnyxResource.method; -var ACTIONS = [ +const ACTIONS = [ 'phone_numbers', 'alphanumeric_sender_ids', 'short_codes', 'metrics', ]; -function getSpec(messagingProfileId) { - return function (methodName) { +function getSpec(messagingProfileId: string) { + return function (methodName: string) { return { method: 'GET', path: `/{messagingProfileId}/${methodName}`, @@ -24,18 +25,21 @@ function getSpec(messagingProfileId) { }; } -function transformResponseData(response, telnyx) { +const transformResponseData = ( + response: ResponsePayload, + telnyx: TelnyxObject, +) => { const methods = utils.createNestedMethods( telnyxMethod, ACTIONS, - getSpec(response.data.id) + getSpec(response.data.id as string), ); methods.del = telnyxMethod({ method: 'DELETE', path: '/{messagingProfileId}', urlParams: ['messagingProfileId'], - paramsValues: [response.data.id], + paramsValues: [response.data.id as string], paramsNames: ['id'], }); @@ -43,13 +47,13 @@ function transformResponseData(response, telnyx) { response, telnyx, 'messagingProfiles', - methods + methods, ); -} +}; -module.exports = require('../TelnyxResource').extend({ +export const MessagingProfiles = TelnyxResource.extend({ path: 'messaging_profiles', - includeBasic: ['list', 'del', 'update'], + includeBasic: ['list', 'del'], create: telnyxMethod({ method: 'POST', diff --git a/src/telnyx.node.ts b/src/telnyx.node.ts index c834676..62adb81 100644 --- a/src/telnyx.node.ts +++ b/src/telnyx.node.ts @@ -1,4 +1,4 @@ -import {createTelnyx} from './telnyx.js'; +import {createTelnyx} from './telnyx'; export const Telnyx = createTelnyx(); diff --git a/src/telnyx.ts b/src/telnyx.ts index 7e54e82..d7e14b1 100644 --- a/src/telnyx.ts +++ b/src/telnyx.ts @@ -2,14 +2,17 @@ import * as http from 'http'; import * as https from 'https'; import {EventEmitter} from 'events'; import {exec} from 'child_process'; -import {version} from '../package.json'; -import {AppInfo, TelnyxObject} from './Types.js'; -import * as utils from './utils.js'; +import {AppInfo, TelnyxObject} from './Types'; +import * as utils from './utils'; + // TODO: convert other resources to ts -import {Balance} from './resources/Balance.js'; -import TelnyxResource from './TelnyxResource.js'; -import * as _Error from './Error.js'; -import Webhooks from './Webhooks.js'; +import {Balance} from './resources/Balance'; +import {MessagingProfiles} from './resources/MessagingProfiles'; +// + +import TelnyxResource from './TelnyxResource'; +import * as _Error from './Error'; +import Webhooks from './Webhooks'; export function createTelnyx() { Telnyx.DEFAULT_HOST = process.env.TELNYX_API_BASE || 'api.telnyx.com'; @@ -19,7 +22,9 @@ export function createTelnyx() { // Use node's default timeout: Telnyx.DEFAULT_TIMEOUT = http.createServer().timeout; - Telnyx.PACKAGE_VERSION = version; + Telnyx.PACKAGE_VERSION = process.env.npm_package_version || '2.x'; + Telnyx.REQUESTS = [] as Array; + Telnyx.LAST_REQUEST = null as unknown; Telnyx.USER_AGENT = { bindings_version: Telnyx.PACKAGE_VERSION, @@ -37,9 +42,12 @@ export function createTelnyx() { const APP_INFO_PROPERTIES = ['name', 'version', 'url', 'partner_id']; + // TODO: convert other resources to ts const resources = { Balance, + MessagingProfiles, }; + // Telnyx.TelnyxResource = TelnyxResource; Telnyx.resources = resources; @@ -101,6 +109,8 @@ export function createTelnyx() { _emitter: null!, _requestSender: null!, _platformFunctions: null!, + REQUESTS: null!, + LAST_REQUEST: null!, setHost: function (host: string, port: string, protocol: string) { this._setApiField('host', host); diff --git a/src/test/Error.test.ts b/src/test/Error.test.ts new file mode 100644 index 0000000..8673c44 --- /dev/null +++ b/src/test/Error.test.ts @@ -0,0 +1,73 @@ +import * as TelnyxErrors from '../Error'; +import './utils'; + +describe('Error', function () { + test('Populates with type and message params', function () { + const e = new TelnyxErrors.TelnyxError( + {message: 'Foo happened'}, + 'FooError', + ); + expect(e).toHaveProperty('type', 'FooError'); + expect(e).toHaveProperty('message', 'Foo happened'); + expect(e).toHaveProperty('stack'); + }); + + describe('TelnyxError', function () { + test('Pulls in headers', function () { + const headers = {'Request-Id': '123'}; + const e = TelnyxErrors.TelnyxError.generate({ + errors: [ + { + title: 'A terrible mistake has been made', + code: '123', + detail: 'foo', + }, + ], + headers: headers, + statusCode: 400, + }); + expect(e).toHaveProperty('headers', headers); + }); + + test('Pulls in request IDs', function () { + const e = TelnyxErrors.TelnyxError.generate({ + errors: [{title: 'Oops', code: '123', detail: 'foo'}], + requestId: 'foo', + statusCode: 400, + }); + expect(e).toHaveProperty('requestId', 'foo'); + }); + + test('Pulls in HTTP status code', function () { + const e = TelnyxErrors.TelnyxError.generate({ + errors: [{title: 'Oops', code: '123', detail: 'foo'}], + statusCode: 400, + }); + expect(e).toHaveProperty('statusCode', 400); + }); + + test('Builds errors based on status code', function () { + expect( + TelnyxErrors.TelnyxError.generate({ + errors: [{title: 'Oops', code: '123', detail: 'foo'}], + statusCode: 400, + }), + ).toBeInstanceOf(TelnyxErrors.TelnyxInvalidRequestError); + expect( + TelnyxErrors.TelnyxError.generate({ + errors: [{title: 'Oops', code: '123', detail: 'foo'}], + statusCode: 401, + }), + ).toBeInstanceOf(TelnyxErrors.TelnyxAuthenticationError); + expect( + TelnyxErrors.TelnyxError.generate({ + errors: [{title: 'Oops', code: '123', detail: 'foo'}], + statusCode: 403, + }), + ).toBeInstanceOf(TelnyxErrors.TelnyxPermissionError); + // expect(TelnyxErrors.TelnyxError.generate({errors: [{title: 'Oops'}], statusCode: 404})).toBeInstanceOf( + // TelnyxErrors.ResourceNotFoundError + // ); + }); + }); +}); diff --git a/src/test/TelnyxResource.test.ts b/src/test/TelnyxResource.test.ts new file mode 100644 index 0000000..f2d756b --- /dev/null +++ b/src/test/TelnyxResource.test.ts @@ -0,0 +1,713 @@ +import nock from 'nock'; +import {utils as testUtils} from './utils'; +import TelnyxNode from '../telnyx.node'; +import {ResponsePayload} from '../Types'; + +// Use a real instance of telnyx as we're mocking the http.request responses. +// eslint-disable-next-line @typescript-eslint/no-explicit-any +const realTelnyx: (typeof TelnyxNode)['prototype'] = new (TelnyxNode as any)( + testUtils.getUserTelnyxKey(), +); + +const telnyx = testUtils.getSpyableTelnyx(); + +describe('TelnyxResource', function () { + describe('createResourcePathWithSymbols', function () { + test('Generates a path', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + telnyx.messagingProfiles.create({}); + const path = // @ts-expect-error TODO: import .d.ts files under src/test folder + telnyx.messagingProfiles.createResourcePathWithSymbols('{id}'); + expect(path).toBe('/messaging_profiles/{id}'); + }); + }); + + describe('_defaultHeaders', function () { + test('sets the Authorization header with Bearer auth using the global API key', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + const headers = telnyx.messagingProfiles._defaultHeaders(null, ''); + expect(headers.Authorization).toBe('Bearer fakeAuthToken'); + }); + test('sets the Authorization header with Bearer auth using the specified API key', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + const headers = telnyx.messagingProfiles._defaultHeaders( + 'anotherFakeAuthToken', + '', + ); + expect(headers.Authorization).toBe('Bearer anotherFakeAuthToken'); + }); + + test('sets the content length for empty body', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + const headers = telnyx.messagingProfiles._defaultHeaders(null, ''); + expect(headers['Content-Length']).toBe(0); + }); + + test('sets the content length for UTF-8 body', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + const headers = telnyx.messagingProfiles._defaultHeaders( + null, + '"{"messaging_profile_id":"uuid","text":"Hi There! This is Collin with Polling ","to":"+18332784547"}"', + ); + expect(headers['Content-Length']).toBe(101); + }); + + test('sets the content length for UTF-8 body with multi-bytes chars', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + const headers = telnyx.messagingProfiles._defaultHeaders( + null, + '"{"messaging_profile_id":"uuid","text":"Hi There! This is Collin with Polling – ‣","to":"+18332784547"}"', + ); + expect(headers['Content-Length']).toBe(108); + }); + }); + + describe('Parameter encoding', function () { + beforeAll(() => { + nock.disableNetConnect(); + }); + + afterAll(function () { + nock.cleanAll(); + nock.enableNetConnect(); + }); + + describe('_request', function () { + test('encodes the query string in GET requests', function (done) { + const options = { + host: telnyx.getConstant('DEFAULT_HOST'), + path: '/v2/messaging_profiles', + data: { + page: {size: 10, number: 5}, + }, + }; + + const scope = nock('https://' + options.host + ':443') + .get(options.path) + .query(options.data) + .reply(200, {data: [{record_type: 'messaging_profile'}]}); + + // @ts-expect-error TODO: import .d.ts files under src/test folder + realTelnyx.messagingProfiles.list( + options.data, + function (_err: unknown, _response: unknown) { + done(); + scope.done(); + }, + ); + }); + + test('encodes the body in PATCH requests', function (done) { + const options = { + host: telnyx.getConstant('DEFAULT_HOST'), + path: '/v2/messaging_profiles/123', + data: { + name: 'Winter Campaign', + }, + body: {name: 'Winter Campaign'}, + }; + + // PATCH https://api.telnyx.com:443/v2/messaging_profiles/123 + const scope = nock('https://' + options.host + ':443') + .patch(options.path, options.body) + .reply(200, {data: {record_type: 'messaging_profile'}}); + + // @ts-expect-error TODO: import .d.ts files under src/test folder + realTelnyx.messagingProfiles.update( + '123', + options.data, + function (_err: unknown, _response: unknown) { + done(); + scope.done(); + }, + ); + }); + + test('encodes the body in POST requests', function (done) { + const options = { + host: telnyx.getConstant('DEFAULT_HOST'), + path: '/v2/messaging_profiles', + data: { + name: 'Winter Campaign', + }, + body: {name: 'Winter Campaign'}, + }; + + const scope = nock('https://' + options.host + ':443') + .post(options.path, options.body) + .reply(200, '{ data: {}}'); + + // @ts-expect-error TODO: import .d.ts files under src/test folder + realTelnyx.messagingProfiles.create( + options.data, + function (_err: unknown, _response: unknown) { + done(); + scope.done(); + }, + ); + }); + }); + }); + + describe('Retry Network Requests', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder// Override the sleep timer to speed up tests + realTelnyx.messagingProfiles._getSleepTimeInMS = function () { + return 0; + }; + + const options = { + host: telnyx.getConstant('DEFAULT_HOST'), + path: '/v2/messaging_profiles', + data: { + name: 'Summer Campaign', + }, + }; + + afterEach(function () { + realTelnyx.setMaxNetworkRetries(0); + telnyx.setMaxNetworkRetries(0); + }); + + beforeAll(() => { + nock.disableNetConnect(); + }); + + afterAll(function () { + nock.cleanAll(); + nock.enableNetConnect(); + }); + + describe('_request', function () { + test('throws an error on connection failure', function (done) { + // Mock the connection error. + nock('https://' + options.host) + .post(options.path, options.data) + .replyWithError('bad stuff'); + + // @ts-expect-error TODO: import .d.ts files under src/test folder + realTelnyx.messagingProfiles.create(options.data, function (err) { + const errorMessage = + // @ts-expect-error TODO: import .d.ts files under src/test foldernst errorMessage = + realTelnyx.messagingProfiles._generateConnectionErrorMessage(0); + expect(err.message).toBe(errorMessage); + expect(nock.isDone()); + done(); + }); + }); + + test('should retry the request if max retries are set', function (done) { + nock('https://' + options.host) + .post(options.path, options.data) + .replyWithError('bad stuff') + .post(options.path, options.data) + .replyWithError('worse stuff'); + + realTelnyx.setMaxNetworkRetries(1); + + // @ts-expect-error TODO: import .d.ts files under src/test folder + realTelnyx.messagingProfiles.create(options.data, function (err) { + const errorMessage = + // @ts-expect-error TODO: import .d.ts files under src/test foldernst errorMessage = + realTelnyx.messagingProfiles._generateConnectionErrorMessage(1); + expect(err.message).toBe(errorMessage); + expect(nock.isDone()); + done(); + }); + }); + + test('should stop retrying after a successful retry', function (done) { + nock('https://' + options.host) + .post(options.path, options.data) + .replyWithError('bad stuff') + .post(options.path, options.data) + .reply(200, { + data: { + id: '123', + record_type: 'messaging_profile', + name: 'Summer Campaign', + }, + }); + + realTelnyx.setMaxNetworkRetries(2); + + // @ts-expect-error TODO: import .d.ts files under src/test folder + realTelnyx.messagingProfiles.create( + options.data, + function (_err: unknown, response: ResponsePayload) { + expect(response.data.id).toBe('123'); + expect(nock.isDone()); + done(); + }, + ); + }); + + test('should not retry on a 422 error', function (done) { + nock('https://' + options.host) + .post(options.path, options.data) + .reply(422, { + errors: [ + { + title: 'Missing required parameter', + }, + ], + }); + + realTelnyx.setMaxNetworkRetries(1); + + // @ts-expect-error TODO: import .d.ts files under src/test folder + realTelnyx.messagingProfiles.create(options.data, function (err) { + expect(err.type).toBe('TelnyxInvalidParametersError'); + expect(nock.isDone()); + done(); + }); + }); + + test('should not retry on a 500 error when the method is POST', function (done) { + nock('https://' + options.host) + .post(options.path, options.data) + .reply(500, { + errors: [ + { + title: 'Unexpected error', + }, + ], + }); + + realTelnyx.setMaxNetworkRetries(1); + + // @ts-expect-error TODO: import .d.ts files under src/test folder + realTelnyx.messagingProfiles.create(options.data, function (err) { + expect(err.type).toBe('TelnyxAPIError'); + expect(nock.isDone()); + done(); + }); + }); + + test('should retry on a 503 error when the method is POST', function (done) { + nock('https://' + options.host) + .post(options.path, options.data) + .reply(503, { + errors: [ + { + message: 'Service unavailable', + }, + ], + }) + .post(options.path, options.data) + .reply(200, { + data: { + id: '123', + record_type: 'messaging_profile', + name: 'Summer Campaign', + }, + }); + + realTelnyx.setMaxNetworkRetries(1); + + // @ts-expect-error TODO: import .d.ts files under src/test folder + realTelnyx.messagingProfiles.create( + options.data, + function (_err: unknown, response: ResponsePayload) { + expect(response.data.id).toBe('123'); + expect(nock.isDone()); + done(); + }, + ); + }); + + test('should retry on a 500 error when the method is GET', function (done) { + nock('https://' + options.host) + .get(options.path + '/123') + .reply(500, { + errors: [ + { + title: 'Unexpected error', + }, + ], + }) + .get(options.path + '/123') + .reply(200, { + data: { + id: '123', + record_type: 'messaging_profile', + name: 'Summer Campaign', + }, + }); + + realTelnyx.setMaxNetworkRetries(1); + + // @ts-expect-error TODO: import .d.ts files under src/test folder + realTelnyx.messagingProfiles.retrieve( + '123', + function (_err: unknown, messagingProfile: ResponsePayload) { + expect(messagingProfile.data.id).toBe('123'); + expect(nock.isDone()); + done(); + }, + ); + }); + }); + + describe('_shouldRetry', function () { + test("should return false if we've reached maximum retries", function () { + telnyx.setMaxNetworkRetries(1); + // @ts-expect-error TODO: import .d.ts files under src/test folder + const res = telnyx.messagingProfiles._shouldRetry( + { + statusCode: 409, + }, + 1, + ); + + expect(res).toBe(false); + }); + + test('should return true if we have more retries available', function () { + telnyx.setMaxNetworkRetries(1); + // @ts-expect-error TODO: import .d.ts files under src/test folder + const res = telnyx.messagingProfiles._shouldRetry( + { + statusCode: 409, + }, + 0, + ); + + expect(res).toBe(true); + }); + + test('should return true if the error code is either 409 or 503', function () { + telnyx.setMaxNetworkRetries(1); + // @ts-expect-error TODO: import .d.ts files under src/test folder + let res = telnyx.messagingProfiles._shouldRetry( + { + statusCode: 409, + }, + 0, + ); + + expect(res).toBe(true); + + // @ts-expect-error TODO: import .d.ts files under src/test folder + res = telnyx.messagingProfiles._shouldRetry( + { + statusCode: 503, + }, + 0, + ); + + expect(res).toBe(true); + }); + + test('should return false if the status is 200', function () { + telnyx.setMaxNetworkRetries(2); + + // mocking that we're on our 2nd request + // @ts-expect-error TODO: import .d.ts files under src/test folder + const res = telnyx.messagingProfiles._shouldRetry( + { + statusCode: 200, + req: {_requestEvent: {method: 'POST'}}, + }, + 1, + ); + + expect(res).toBe(false); + }); + }); + + describe('_getSleepTimeInMS', function () { + test('should not exceed the maximum or minimum values', function () { + let sleepSeconds; + const max = telnyx.getMaxNetworkRetryDelay(); + const min = telnyx.getInitialNetworkRetryDelay(); + + for (let i = 0; i < 10; i++) { + // @ts-expect-error TODO: import .d.ts files under src/test folder + sleepSeconds = telnyx.messagingProfiles._getSleepTimeInMS(i) / 1000; + + expect(sleepSeconds).toBeLessThan(max); + expect(sleepSeconds).toBeGreaterThanOrEqual(min); + } + }); + }); + + describe('_responseHandler', function () { + test('should build an InvalidRequestError for status code 400', function (done) { + const options = { + host: telnyx.getConstant('DEFAULT_HOST'), + path: '/v2/messaging_profiles', + data: { + name: 'Winter Campaign', + }, + }; + nock('https://' + options.host) + .post(options.path, options.data) + .reply(400, { + errors: [ + { + title: 'Error', + }, + ], + }); + + // @ts-expect-error TODO: import .d.ts files under src/test folder + realTelnyx.messagingProfiles.create(options.data, function (err) { + expect(err.type).toBe('TelnyxInvalidRequestError'); + expect(nock.isDone()); + done(); + }); + }); + + test('should build an TelnyxAuthenticationError for status code 401', function (done) { + const options = { + host: telnyx.getConstant('DEFAULT_HOST'), + path: '/v2/messaging_profiles', + data: { + name: 'Winter Campaign', + }, + }; + nock('https://' + options.host) + .post(options.path, options.data) + .reply(401, { + errors: [ + { + title: 'Error', + }, + ], + }); + + // @ts-expect-error TODO: import .d.ts files under src/test folder + realTelnyx.messagingProfiles.create(options.data, function (err) { + expect(err.type).toBe('TelnyxAuthenticationError'); + expect(nock.isDone()); + done(); + }); + }); + test('should build an TelnyxPermissionError for status code 403', function (done) { + const options = { + host: telnyx.getConstant('DEFAULT_HOST'), + path: '/v2/messaging_profiles', + data: { + name: 'Winter Campaign', + }, + }; + nock('https://' + options.host) + .post(options.path, options.data) + .reply(403, { + errors: [ + { + title: 'Error', + }, + ], + }); + + // @ts-expect-error TODO: import .d.ts files under src/test folder + realTelnyx.messagingProfiles.create(options.data, function (err) { + expect(err.type).toBe('TelnyxPermissionError'); + expect(nock.isDone()); + done(); + }); + }); + test('should build an TelnyxResourceNotFoundError for status code 404', function (done) { + const options = { + host: telnyx.getConstant('DEFAULT_HOST'), + path: '/v2/messaging_profiles', + data: { + name: 'Winter Campaign', + }, + }; + nock('https://' + options.host) + .post(options.path, options.data) + .reply(404, { + errors: [ + { + title: 'Error', + }, + ], + }); + + // @ts-expect-error TODO: import .d.ts files under src/test folder + realTelnyx.messagingProfiles.create(options.data, function (err) { + expect(err.type).toBe('TelnyxResourceNotFoundError'); + expect(nock.isDone()); + done(); + }); + }); + test('should build an TelnyxMethodNotSupportedError for status code 405', function (done) { + const options = { + host: telnyx.getConstant('DEFAULT_HOST'), + path: '/v2/messaging_profiles', + data: { + name: 'Winter Campaign', + }, + }; + nock('https://' + options.host) + .post(options.path, options.data) + .reply(405, { + errors: [ + { + title: 'Error', + }, + ], + }); + + // @ts-expect-error TODO: import .d.ts files under src/test folder + realTelnyx.messagingProfiles.create(options.data, function (err) { + expect(err.type).toBe('TelnyxMethodNotSupportedError'); + expect(nock.isDone()); + done(); + }); + }); + test('should build an TelnyxTimeoutError for status code 408', function (done) { + const options = { + host: telnyx.getConstant('DEFAULT_HOST'), + path: '/v2/messaging_profiles', + data: { + name: 'Winter Campaign', + }, + }; + nock('https://' + options.host) + .post(options.path, options.data) + .reply(408, { + errors: [ + { + title: 'Error', + }, + ], + }); + + // @ts-expect-error TODO: import .d.ts files under src/test folder + realTelnyx.messagingProfiles.create(options.data, function (err) { + expect(err.type).toBe('TelnyxTimeoutError'); + expect(nock.isDone()); + done(); + }); + }); + test('should build an TelnyxUnsupportedMediaTypeError for status code 415', function (done) { + const options = { + host: telnyx.getConstant('DEFAULT_HOST'), + path: '/v2/messaging_profiles', + data: { + name: 'Winter Campaign', + }, + }; + nock('https://' + options.host) + .post(options.path, options.data) + .reply(415, { + errors: [ + { + title: 'Error', + }, + ], + }); + + // @ts-expect-error TODO: import .d.ts files under src/test folder + realTelnyx.messagingProfiles.create(options.data, function (err) { + expect(err.type).toBe('TelnyxUnsupportedMediaTypeError'); + expect(nock.isDone()); + done(); + }); + }); + test('should build an TelnyxInvalidParametersError for status code 422', function (done) { + const options = { + host: telnyx.getConstant('DEFAULT_HOST'), + path: '/v2/messaging_profiles', + data: { + name: 'Winter Campaign', + }, + }; + nock('https://' + options.host) + .post(options.path, options.data) + .reply(422, { + errors: [ + { + title: 'Error', + }, + ], + }); + + // @ts-expect-error TODO: import .d.ts files under src/test folder + realTelnyx.messagingProfiles.create(options.data, function (err) { + expect(err.type).toBe('TelnyxInvalidParametersError'); + expect(nock.isDone()); + done(); + }); + }); + test('should build an TelnyxRateLimitError for status code 429', function (done) { + const options = { + host: telnyx.getConstant('DEFAULT_HOST'), + path: '/v2/messaging_profiles', + data: { + name: 'Winter Campaign', + }, + }; + nock('https://' + options.host) + .post(options.path, options.data) + .reply(429, { + errors: [ + { + title: 'Error', + }, + ], + }); + + // @ts-expect-error TODO: import .d.ts files under src/test folder + realTelnyx.messagingProfiles.create(options.data, function (err) { + expect(err.type).toBe('TelnyxRateLimitError'); + expect(nock.isDone()); + done(); + }); + }); + test('should build an TelnyxAPIError for status code 500', function (done) { + const options = { + host: telnyx.getConstant('DEFAULT_HOST'), + path: '/v2/messaging_profiles', + data: { + name: 'Winter Campaign', + }, + }; + nock('https://' + options.host) + .post(options.path, options.data) + .reply(500, { + errors: [ + { + title: 'Error', + }, + ], + }); + + // @ts-expect-error TODO: import .d.ts files under src/test folder + realTelnyx.messagingProfiles.create(options.data, function (err) { + expect(err.type).toBe('TelnyxAPIError'); + expect(nock.isDone()); + done(); + }); + }); + test('should build an TelnyxServiceUnavailableError for status code 503', function (done) { + const options = { + host: telnyx.getConstant('DEFAULT_HOST'), + path: '/v2/messaging_profiles', + data: { + name: 'Winter Campaign', + }, + }; + nock('https://' + options.host) + .post(options.path, options.data) + .reply(503, { + errors: [ + { + title: 'Error', + }, + ], + }); + + // @ts-expect-error TODO: import .d.ts files under src/test folder + realTelnyx.messagingProfiles.create(options.data, function (err) { + expect(err.type).toBe('TelnyxServiceUnavailableError'); + expect(nock.isDone()); + done(); + }); + }); + }); + }); +}); diff --git a/src/test/Webhook.test.ts b/src/test/Webhook.test.ts new file mode 100644 index 0000000..04192b3 --- /dev/null +++ b/src/test/Webhook.test.ts @@ -0,0 +1,218 @@ +import {utils as testUtils} from './utils'; + +const telnyx = testUtils.getSpyableTelnyx(); + +import crypto from 'crypto'; +import nacl from 'tweetnacl'; + +const EVENT_PAYLOAD = { + data: { + record_type: 'event', + id: '0ccc7b54-4df3-4bca-a65a-3da1ecc777f0', + event_type: 'call_initiated', + created_at: '2018-02-02T22:25:27.521992Z', + payload: { + to: '+13129457420', + start_time: '2018-02-02T22:25:27.521992Z', + occurred_at: '2018-02-02T22:25:27.521992Z', + from: '+35319605860', + call_control_id: + 'AgDIxmoRX6QMuaIj_uXRXnPAXP0QlNfXczRrZvZakpWxBlpw48KyZQ==', + connection_id: '7267xxxxxxxxxxxxxx', + call_leg_id: '428c31b6-7af4-4bcb-b7f5-5013ef9657c1', + call_session_id: '428c31b6-abf3-3bc1-b7f4-5013ef9657c1', + client_state: 'aGF2ZSBhIG5pY2UgZGF5ID1d', + direction: 'incoming', + state: 'parked', + }, + }, +}; +const EVENT_PAYLOAD_STRING = JSON.stringify(EVENT_PAYLOAD, null, 2); + +const KEY_PAIR = nacl.sign.keyPair.fromSeed(crypto.randomBytes(32)); +const PUBLIC_KEY = new TextDecoder('utf8').decode(KEY_PAIR.publicKey); + +describe('Webhooks', function () { + describe('.constructEvent', function () { + test('should return an Event instance from a valid JSON payload and valid signature header', function () { + const timestamp = Math.floor(Date.now() / 1000).toString(); + const signature = generateSignature({ + payload: EVENT_PAYLOAD_STRING, + timestamp: timestamp, + }); + + const event = telnyx.webhooks.constructEvent( + EVENT_PAYLOAD_STRING, + signature, + timestamp, + PUBLIC_KEY, + ); + + expect(event.data.id).toBe(EVENT_PAYLOAD.data.id); + }); + + test('should raise a JSON error from invalid JSON payload', function () { + const timestamp = Math.floor(Date.now() / 1000).toString(); + const signature = generateSignature({ + payload: '} I am not valid JSON; 123][', + timestamp: timestamp, + }); + expect(function () { + telnyx.webhooks.constructEvent( + '} I am not valid JSON; 123][', + signature, + timestamp, + PUBLIC_KEY, + ); + }).toThrow(/Unexpected token/); + }); + + test('should raise a SignatureVerificationError from a valid JSON payload and an invalid signature header', function () { + const signature = 'bad_header'; + const timestamp = Math.floor(Date.now() / 1000).toString(); + + expect(function () { + telnyx.webhooks.constructEvent( + EVENT_PAYLOAD_STRING, + signature, + timestamp, + PUBLIC_KEY, + ); + }).toThrow(/Signature is invalid and does not match the payload/); + }); + }); + + describe('.verifySignature', function () { + test('should raise a SignatureVerificationError when there are no valid signatures for the payload', function () { + const signature = "I'm not even a real signature header"; + const timestamp = Math.floor(Date.now() / 1000).toString(); + + const expectedMessage = + /Signature is invalid and does not match the payload/; + + expect(function () { + telnyx.webhooks.signature.verifySignature( + EVENT_PAYLOAD_STRING, + signature, + timestamp, + PUBLIC_KEY, + ); + }).toThrow(expectedMessage); + + expect(function () { + telnyx.webhooks.signature.verifySignature( + EVENT_PAYLOAD_STRING, + '', + timestamp, + PUBLIC_KEY, + ); + }).toThrow(expectedMessage); + + expect(function () { + telnyx.webhooks.signature.verifySignature( + EVENT_PAYLOAD_STRING, + undefined, + timestamp, + PUBLIC_KEY, + ); + }).toThrow(expectedMessage); + + expect(function () { + telnyx.webhooks.signature.verifySignature( + EVENT_PAYLOAD_STRING, + Buffer.from('foo', 'ascii'), + timestamp, + PUBLIC_KEY, + ); + }).toThrow(expectedMessage); + }); + + test('should raise a SignatureVerificationError when the timestamp is not within the tolerance', function () { + const timestamp = (Date.now() / 1000 - 15).toString(); + const signature = generateSignature({ + timestamp: timestamp, + }); + + expect(function () { + telnyx.webhooks.signature.verifySignature( + EVENT_PAYLOAD_STRING, + signature, + timestamp, + PUBLIC_KEY, + 10, + ); + }).toThrow(/Timestamp outside the tolerance zone/); + }); + + test( + 'should return true when the header contains a valid signature and ' + + 'the timestamp is within the tolerance', + function () { + const timestamp = Math.floor(Date.now() / 1000).toString(); + const signature = generateSignature({ + timestamp: timestamp, + }); + + expect( + telnyx.webhooks.signature.verifySignature( + EVENT_PAYLOAD_STRING, + signature, + timestamp, + PUBLIC_KEY, + 10, + ), + ).toBe(true); + }, + ); + + test( + 'should return true when the header contains a valid signature ' + + 'and the timestamp is off but no tolerance is provided', + function () { + const timestamp = Math.floor( + new Date('2012.08.10').getTime() / 1000, + ).toString(); + const signature = generateSignature({ + timestamp: timestamp, + }); + + expect( + telnyx.webhooks.signature.verifySignature( + EVENT_PAYLOAD_STRING, + signature, + timestamp, + PUBLIC_KEY, + ), + ).toBe(true); + }, + ); + + test('should accept Buffer instances for the payload and header', function () { + const timestamp = Math.floor(Date.now() / 1000).toString(); + const signature = generateSignature({ + timestamp: timestamp, + }); + + expect( + telnyx.webhooks.signature.verifySignature( + Buffer.from(EVENT_PAYLOAD_STRING), + Buffer.from(signature), + Buffer.from(timestamp), + PUBLIC_KEY, + 10, + ), + ).toBe(true); + }); + }); +}); + +function generateSignature(opts: {payload?: string; timestamp?: string}) { + opts = opts || {}; + + opts.timestamp = opts.timestamp || Math.floor(Date.now() / 1000).toString(); + opts.payload = opts.payload || EVENT_PAYLOAD_STRING; + + const payload = Buffer.from(`${opts.timestamp}|${opts.payload}`, 'utf8'); + + return nacl.sign.detached(payload, KEY_PAIR.secretKey); +} diff --git a/src/test/autoPagination.test.ts b/src/test/autoPagination.test.ts new file mode 100644 index 0000000..b5bc4c5 --- /dev/null +++ b/src/test/autoPagination.test.ts @@ -0,0 +1,1008 @@ +import nock from 'nock'; +import {utils as testUtils} from './utils'; +import {forAwaitUntil} from './utils/forAwait.node10'; +import {awaitUntil} from './utils/await.node7'; + +import TelnyxNode from '../telnyx.node'; + +const telnyx = testUtils.getSpyableTelnyx(); + +type TelnyxRecord = { + id: string; +}; + +// eslint-disable-next-line @typescript-eslint/no-explicit-any +const realTelnyx: (typeof TelnyxNode)['prototype'] = new (TelnyxNode as any)( + testUtils.getUserTelnyxKey(), +); + +const LIMIT = 3; +const TOTAL_OBJECTS = 3; + +describe('auto pagination', function () { + let realMessagingProfileIds: string[]; + jest.setTimeout(20000); + + describe('callbacks', function () { + test('lets you call `next()` to iterate and `next(false)` to break', function () { + return expect( + new Promise(function (resolve, reject) { + realMessagingProfileIds = ['1', '2', '3']; + const messagingProfileIds: string[] = []; + function onMessagingProfile( + messagingProfile: TelnyxRecord, + next: (iterate?: boolean) => void, + ) { + messagingProfileIds.push(messagingProfile.id); + if (messagingProfileIds.length === LIMIT) { + next(false); + } else { + expect(messagingProfileIds.length).toBeLessThan(LIMIT); + next(); + } + } + function onDone(err: unknown) { + if (err) { + reject(err); + } else { + resolve(messagingProfileIds); + } + } + const options = { + host: telnyx.getConstant('DEFAULT_HOST'), + path: '/v2/messaging_profiles', + }; + nock('https://' + options.host + ':443') + .get(options.path) + .query({page: {size: 1}}) + .reply(200, { + data: [{record_type: 'messaging_profile', id: 1}], + meta: {total_pages: 3, page_number: 1, page_size: 1}, + }) + .get(options.path) + .query({page: {number: 2, size: 1}}) + .reply(200, { + data: [{record_type: 'messaging_profile', id: 2}], + meta: {total_pages: 3, page_number: 2, page_size: 1}, + }) + .get(options.path) + .query({page: {number: 3, size: 1}}) + .reply(200, { + data: [{record_type: 'messaging_profile', id: 3}], + meta: {total_pages: 3, page_number: 3, page_size: 1}, + }); + + // @ts-expect-error TODO: import .d.ts files under src/test folder + realTelnyx.messagingProfiles + .list({page: {size: 1}}) + .autoPagingEach(onMessagingProfile, onDone); + }), + ).toBe(realMessagingProfileIds.slice(0, LIMIT)); + }); + + test('lets you ignore the second arg and `return false` to break', function () { + return expect( + new Promise(function (resolve, reject) { + realMessagingProfileIds = ['1', '2', '3']; + const messagingProfileIds: string[] = []; + function onMessagingProfile(messagingProfile: TelnyxRecord) { + messagingProfileIds.push(messagingProfile.id); + if (messagingProfileIds.length === LIMIT) { + return false; + } else { + expect(messagingProfileIds.length).toBeLessThan(LIMIT); + } + } + function onDone(err: unknown) { + if (err) { + reject(err); + } else { + resolve(messagingProfileIds); + } + } + const options = { + host: telnyx.getConstant('DEFAULT_HOST'), + path: '/v2/messaging_profiles', + }; + nock('https://' + options.host + ':443') + .get(options.path) + .query({page: {size: 1}}) + .reply(200, { + data: [{record_type: 'messaging_profile', id: 1}], + meta: {total_pages: 3, page_number: 1, page_size: 1}, + }) + .get(options.path) + .query({page: {number: 2, size: 1}}) + .reply(200, { + data: [{record_type: 'messaging_profile', id: 2}], + meta: {total_pages: 3, page_number: 2, page_size: 1}, + }) + .get(options.path) + .query({page: {number: 3, size: 1}}) + .reply(200, { + data: [{record_type: 'messaging_profile', id: 3}], + meta: {total_pages: 3, page_number: 3, page_size: 1}, + }); + + // @ts-expect-error TODO: import .d.ts files under src/test folder + realTelnyx.messagingProfiles + .list({page: {size: 1}}) + .autoPagingEach(onMessagingProfile, onDone); + }), + ).toBe(realMessagingProfileIds.slice(0, LIMIT)); + }); + + test('lets you ignore the second arg and return a Promise which returns `false` to break', function () { + return expect( + new Promise(function (resolve, reject) { + realMessagingProfileIds = ['1', '2', '3']; + const messagingProfileIds: string[] = []; + function onMessagingProfile(messagingProfile: TelnyxRecord) { + messagingProfileIds.push(messagingProfile.id); + if (messagingProfileIds.length === LIMIT) { + return Promise.resolve(false); + } else { + expect(messagingProfileIds.length).toBeLessThan(LIMIT); + return Promise.resolve(); + } + } + function onDone(err: Error) { + if (err) { + reject(err); + } else { + resolve(messagingProfileIds); + } + } + const options = { + host: telnyx.getConstant('DEFAULT_HOST'), + path: '/v2/messaging_profiles', + }; + nock('https://' + options.host + ':443') + .get(options.path) + .query({page: {size: 1}}) + .reply(200, { + data: [{record_type: 'messaging_profile', id: 1}], + meta: {total_pages: 3, page_number: 1, page_size: 1}, + }) + .get(options.path) + .query({page: {number: 2, size: 1}}) + .reply(200, { + data: [{record_type: 'messaging_profile', id: 2}], + meta: {total_pages: 3, page_number: 2, page_size: 1}, + }) + .get(options.path) + .query({page: {number: 3, size: 1}}) + .reply(200, { + data: [{record_type: 'messaging_profile', id: 3}], + meta: {total_pages: 3, page_number: 3, page_size: 1}, + }); + + // @ts-expect-error TODO: import .d.ts files under src/test folder + realTelnyx.messagingProfiles + .list({page: {size: 1}}) + .autoPagingEach(onMessagingProfile, onDone); + }), + ).toBe(realMessagingProfileIds.slice(0, LIMIT)); + }); + + test('can use a promise instead of a callback for onDone', function () { + return expect( + new Promise(function (resolve, reject) { + realMessagingProfileIds = ['1', '2', '3']; + const messagingProfileIds: string[] = []; + function onMessagingProfile(messagingProfile: TelnyxRecord) { + messagingProfileIds.push(messagingProfile.id); + } + function onDone() { + resolve(messagingProfileIds); + } + const options = { + host: telnyx.getConstant('DEFAULT_HOST'), + path: '/v2/messaging_profiles', + }; + nock('https://' + options.host + ':443') + .get(options.path) + .query({page: {size: 1}}) + .reply(200, { + data: [{record_type: 'messaging_profile', id: 1}], + meta: {total_pages: 3, page_number: 1, page_size: 1}, + }) + .get(options.path) + .query({page: {number: 2, size: 1}}) + .reply(200, { + data: [{record_type: 'messaging_profile', id: 2}], + meta: {total_pages: 3, page_number: 2, page_size: 1}, + }) + .get(options.path) + .query({page: {number: 3, size: 1}}) + .reply(200, { + data: [{record_type: 'messaging_profile', id: 3}], + meta: {total_pages: 3, page_number: 3, page_size: 1}, + }); + + // @ts-expect-error TODO: import .d.ts files under src/test folder + realTelnyx.messagingProfiles + .list({page: {size: 1}}) + .autoPagingEach(onMessagingProfile) + .then(onDone) + .catch(reject); + }), + ).toBe(realMessagingProfileIds); + }); + + test('handles the end of a list properly when the last page is full', function () { + return expect( + new Promise(function (resolve, reject) { + realMessagingProfileIds = ['1', '2', '3', '4']; + const messagingProfileIds: string[] = []; + const options = { + host: telnyx.getConstant('DEFAULT_HOST'), + path: '/v2/messaging_profiles', + }; + nock('https://' + options.host + ':443') + .get(options.path) + .query({page: {size: 2}}) + .reply(200, { + data: [ + {record_type: 'messaging_profile', id: 1}, + {record_type: 'messaging_profile', id: 2}, + ], + meta: {total_pages: 2, page_number: 1, page_size: 2}, + }) + .get(options.path) + .query({page: {number: 2, size: 2}}) + .reply(200, { + data: [ + {record_type: 'messaging_profile', id: 3}, + {record_type: 'messaging_profile', id: 4}, + ], + meta: {total_pages: 2, page_number: 2, page_size: 2}, + }); + + // @ts-expect-error TODO: import .d.ts files under src/test folder + return realTelnyx.messagingProfiles + .list({page: {size: 2}}) + .autoPagingEach(function (messagingProfile: TelnyxRecord) { + messagingProfileIds.push(messagingProfile.id); + }) + .catch(reject) + .then(function () { + resolve(messagingProfileIds); + }); + }), + ).toBe(realMessagingProfileIds); + }); + + test('handles the end of a list properly when the last page is not full', function () { + return expect( + new Promise(function (resolve, reject) { + realMessagingProfileIds = ['1', '2', '3']; + const messagingProfileIds: string[] = []; + const options = { + host: telnyx.getConstant('DEFAULT_HOST'), + path: '/v2/messaging_profiles', + }; + nock('https://' + options.host + ':443') + .get(options.path) + .query({page: {size: 2}}) + .reply(200, { + data: [ + {record_type: 'messaging_profile', id: 1}, + {record_type: 'messaging_profile', id: 2}, + ], + meta: {total_pages: 2, page_number: 1, page_size: 2}, + }) + .get(options.path) + .query({page: {number: 2, size: 2}}) + .reply(200, { + data: [{record_type: 'messaging_profile', id: 3}], + meta: {total_pages: 2, page_number: 2, page_size: 2}, + }); + // @ts-expect-error TODO: import .d.ts files under src/test folder + return realTelnyx.messagingProfiles + .list({page: {size: 2}}) + .autoPagingEach(function (messagingProfile: TelnyxRecord) { + messagingProfileIds.push(messagingProfile.id); + }) + .catch(reject) + .then(function () { + resolve(messagingProfileIds); + }); + }), + ).toBe(realMessagingProfileIds); + }); + + test('handles a list which is shorter than the page size properly', function () { + return expect( + new Promise(function (resolve, reject) { + realMessagingProfileIds = ['1', '2']; + const messagingProfileIds: string[] = []; + const options = { + host: telnyx.getConstant('DEFAULT_HOST'), + path: '/v2/messaging_profiles', + }; + nock('https://' + options.host + ':443') + .get(options.path) + .query({page: {size: TOTAL_OBJECTS + 2}}) + .reply(200, { + data: [ + {record_type: 'messaging_profile', id: 1}, + {record_type: 'messaging_profile', id: 2}, + ], + meta: { + total_pages: 1, + page_number: 1, + page_size: TOTAL_OBJECTS + 2, + }, + }); + + // @ts-expect-error TODO: import .d.ts files under src/test folder + return realTelnyx.messagingProfiles + .list({page: {size: TOTAL_OBJECTS + 2}}) + .autoPagingEach(function (messagingProfile: TelnyxRecord) { + messagingProfileIds.push(messagingProfile.id); + }) + .catch(reject) + .then(function () { + resolve(messagingProfileIds); + }); + }), + ).toBe(realMessagingProfileIds); + }); + + test('handles errors after the first page correctly (callback)', function () { + return expect( + new Promise(function (resolve, reject) { + let i = 0; + function onmessagingProfile() { + i += 1; + if (i > 2) { + throw Error('Simulated error'); + } + } + + realMessagingProfileIds = ['1', '2', '3']; + const options = { + host: telnyx.getConstant('DEFAULT_HOST'), + path: '/v2/messaging_profiles', + }; + nock('https://' + options.host + ':443') + .get(options.path) + .query({page: {size: 2}}) + .reply(200, { + data: [ + {record_type: 'messaging_profile', id: 1}, + {record_type: 'messaging_profile', id: 2}, + ], + meta: {total_pages: 2, page_number: 1, page_size: 2}, + }) + .get(options.path) + .query({page: {number: 2, size: 2}}) + .reply(200, { + data: [{record_type: 'messaging_profile', id: 3}], + meta: {total_pages: 2, page_number: 2, page_size: 2}, + }); + + // @ts-expect-error TODO: import .d.ts files under src/test folder + return realTelnyx.messagingProfiles + .list({page: {size: 2}}) + .autoPagingEach(onmessagingProfile, function (err: Error) { + if (err) { + resolve(err.message); + } else { + reject(Error('Expected an error, did not get one.')); + } + }); + }), + ).toBe('Simulated error'); + }); + + test('handles errors after the first page correctly (promise)', function () { + return expect( + new Promise(function (resolve, reject) { + let i = 0; + function onmessagingProfile() { + i += 1; + if (i > 2) { + throw Error('Simulated error'); + } + } + realMessagingProfileIds = ['1', '2', '3']; + const options = { + host: telnyx.getConstant('DEFAULT_HOST'), + path: '/v2/messaging_profiles', + }; + nock('https://' + options.host + ':443') + .get(options.path) + .query({page: {size: 2}}) + .reply(200, { + data: [ + {record_type: 'messaging_profile', id: 1}, + {record_type: 'messaging_profile', id: 2}, + ], + meta: {total_pages: 2, page_number: 1, page_size: 2}, + }) + .get(options.path) + .query({page: {number: 2, size: 2}}) + .reply(200, { + data: [{record_type: 'messaging_profile', id: 3}], + meta: {total_pages: 2, page_number: 2, page_size: 2}, + }); + // @ts-expect-error TODO: import .d.ts files under src/test folder + return realTelnyx.messagingProfiles + .list({page: {size: 2}}) + .autoPagingEach(onmessagingProfile) + .then(function () { + reject(Error('Expected an error, did not get one.')); + }) + .catch(function (err: unknown) { + resolve((err as Error)?.message); + }); + }), + ).toBe('Simulated error'); + }); + }); + + describe('async iterators', function () { + test('works with `for await` when that feature exists (user break)', function () { + return expect( + new Promise(function (resolve, reject) { + realMessagingProfileIds = ['1', '2', '3']; + const options = { + host: telnyx.getConstant('DEFAULT_HOST'), + path: '/v2/messaging_profiles', + }; + nock('https://' + options.host + ':443') + .get(options.path) + .query({page: {size: 2}}) + .reply(200, { + data: [ + {record_type: 'messaging_profile', id: 1}, + {record_type: 'messaging_profile', id: 2}, + ], + meta: {total_pages: 2, page_number: 1, page_size: 2}, + }) + .get(options.path) + .query({page: {number: 2, size: 2}}) + .reply(200, { + data: [{record_type: 'messaging_profile', id: 3}], + meta: {total_pages: 2, page_number: 2, page_size: 2}, + }); + + forAwaitUntil( + // @ts-expect-error TODO: import .d.ts files under src/test folder + realTelnyx.messagingProfiles.list({page: {size: 2}}), + LIMIT, + ) + .then(function (messagingProfiles: TelnyxRecord[]) { + resolve( + messagingProfiles.map(function ( + messagingProfile: TelnyxRecord, + ) { + return messagingProfile.id; + }), + ); + }) + .catch(reject); + }), + ).toBe(realMessagingProfileIds.slice(0, LIMIT)); + }); + + test('works with `for await` when that feature exists (end of list)', function () { + return expect( + new Promise(function (resolve, reject) { + realMessagingProfileIds = ['1', '2', '3']; + const options = { + host: telnyx.getConstant('DEFAULT_HOST'), + path: '/v2/messaging_profiles', + }; + nock('https://' + options.host + ':443') + .get(options.path) + .query({page: {size: 2}}) + .reply(200, { + data: [ + {record_type: 'messaging_profile', id: 1}, + {record_type: 'messaging_profile', id: 2}, + ], + meta: {total_pages: 2, page_number: 1, page_size: 2}, + }) + .get(options.path) + .query({page: {number: 2, size: 2}}) + .reply(200, { + data: [{record_type: 'messaging_profile', id: 3}], + meta: {total_pages: 2, page_number: 2, page_size: 2}, + }); + + forAwaitUntil( + // @ts-expect-error TODO: import .d.ts files under src/test folder + realTelnyx.messagingProfiles.list({page: {size: 2}}), + TOTAL_OBJECTS + 1, + ) + .then(function (messagingProfiles: TelnyxRecord[]) { + resolve( + messagingProfiles.map(function ( + messagingProfile: TelnyxRecord, + ) { + return messagingProfile.id; + }), + ); + }) + .catch(reject); + }), + ).toBe(realMessagingProfileIds); + }); + + test('works with `await` and a while loop when await exists', function () { + return expect( + new Promise(function (resolve, reject) { + realMessagingProfileIds = ['1', '2', '3']; + const options = { + host: telnyx.getConstant('DEFAULT_HOST'), + path: '/v2/messaging_profiles', + }; + nock('https://' + options.host + ':443') + .get(options.path) + .query({page: {size: 2}}) + .reply(200, { + data: [ + {record_type: 'messaging_profile', id: 1}, + {record_type: 'messaging_profile', id: 2}, + ], + meta: {total_pages: 2, page_number: 1, page_size: 2}, + }) + .get(options.path) + .query({page: {number: 2, size: 2}}) + .reply(200, { + data: [{record_type: 'messaging_profile', id: 3}], + meta: {total_pages: 2, page_number: 2, page_size: 2}, + }); + + awaitUntil( + // @ts-expect-error TODO: import .d.ts files under src/test folder + realTelnyx.messagingProfiles.list({page: {size: 2}}), + LIMIT, + ) + .then(function (messagingProfiles: TelnyxRecord[]) { + resolve( + messagingProfiles.map(function ( + messagingProfile: TelnyxRecord, + ) { + return messagingProfile.id; + }), + ); + }) + .catch(reject); + }), + ).toBe(realMessagingProfileIds.slice(0, LIMIT)); + }); + + test('returns an empty object from .return() so that `break;` works in for-await', function () { + return expect( + new Promise(function (resolve, reject) { + realMessagingProfileIds = ['1', '2', '3']; + const options = { + host: telnyx.getConstant('DEFAULT_HOST'), + path: '/v2/messaging_profiles', + }; + nock('https://' + options.host + ':443') + .get(options.path) + .query({page: {size: 2}}) + .reply(200, { + data: [ + {record_type: 'messaging_profile', id: 1}, + {record_type: 'messaging_profile', id: 2}, + ], + meta: {total_pages: 2, page_number: 1, page_size: 2}, + }) + .get(options.path) + .query({page: {number: 2, size: 2}}) + .reply(200, { + data: [{record_type: 'messaging_profile', id: 3}], + meta: {total_pages: 2, page_number: 2, page_size: 2}, + }); + // @ts-expect-error TODO: import .d.ts files under src/test folder + const iter = realTelnyx.messagingProfiles.list({page: {size: 2}}); + + const messagingProfileIds: string[] = []; + function handleIter(result: {value: TelnyxRecord}) { + messagingProfileIds.push(result.value.id); + expect(iter.return()).toBe({}); + } + + iter + .next() + .then(handleIter) + .then(function () { + resolve(messagingProfileIds); + }) + .catch(reject); + }), + ).toBe(realMessagingProfileIds.slice(0, 1)); + }); + + test('works when you call it sequentially', function () { + return expect( + new Promise(function (resolve, reject) { + realMessagingProfileIds = ['1', '2', '3']; + const options = { + host: telnyx.getConstant('DEFAULT_HOST'), + path: '/v2/messaging_profiles', + }; + nock('https://' + options.host + ':443') + .get(options.path) + .query({page: {size: 2}}) + .reply(200, { + data: [ + {record_type: 'messaging_profile', id: 1}, + {record_type: 'messaging_profile', id: 2}, + ], + meta: {total_pages: 2, page_number: 1, page_size: 2}, + }) + .get(options.path) + .query({page: {number: 2, size: 2}}) + .reply(200, { + data: [{record_type: 'messaging_profile', id: 3}], + meta: {total_pages: 2, page_number: 2, page_size: 2}, + }); + + // @ts-expect-error TODO: import .d.ts files under src/test folder + const iter = realTelnyx.messagingProfiles.list({page: {size: 2}}); + + const messagingProfileIds: string[] = []; + function handleIter(result: {value: TelnyxRecord}) { + messagingProfileIds.push(result.value.id); + if (messagingProfileIds.length < 3) { + return iter.next().then(handleIter); + } + } + iter + .next() + .then(handleIter) + .then(function () { + resolve(messagingProfileIds); + }) + .catch(reject); + }), + ).toBe(realMessagingProfileIds.slice(0, LIMIT)); + }); + + test('gives you the same result each time when you call it multiple times in parallel', function () { + return expect( + new Promise(function (resolve, reject) { + realMessagingProfileIds = ['1', '2', '3', '4']; + const options = { + host: telnyx.getConstant('DEFAULT_HOST'), + path: '/v2/messaging_profiles', + }; + nock('https://' + options.host + ':443') + .get(options.path) + .query({page: {size: 3}}) + .reply(200, { + data: [ + {record_type: 'messaging_profile', id: 1}, + {record_type: 'messaging_profile', id: 2}, + {record_type: 'messaging_profile', id: 3}, + ], + meta: {total_pages: 3, page_number: 1, page_size: 3}, + }) + .get(options.path) + .query({page: {number: 2, size: 3}}) + .reply(200, { + data: [ + {record_type: 'messaging_profile', id: 4}, + {record_type: 'messaging_profile', id: 5}, + {record_type: 'messaging_profile', id: 6}, + ], + meta: {total_pages: 3, page_number: 2, page_size: 3}, + }) + .get(options.path) + .query({page: {number: 3, size: 3}}) + .reply(200, { + data: [ + {record_type: 'messaging_profile', id: 7}, + {record_type: 'messaging_profile', id: 8}, + {record_type: 'messaging_profile', id: 9}, + ], + meta: {total_pages: 3, page_number: 3, page_size: 3}, + }); + + // @ts-expect-error TODO: import .d.ts files under src/test folder + const iter = realTelnyx.messagingProfiles.list({page: {size: 3}}); + + const messagingProfileIds: string[] = []; + function handleIter(result: {value: TelnyxRecord}) { + messagingProfileIds.push(result.value.id); + } + + Promise.all([ + iter.next().then(handleIter), + iter + .next() + .then(handleIter) + .then(function () { + return Promise.all([ + iter.next().then(handleIter), + iter.next().then(handleIter), + ]); + }) + .then(function () { + return Promise.all([ + iter.next().then(handleIter), + iter.next().then(handleIter), + ]); + }) + .then(function () { + return Promise.all([ + iter.next().then(handleIter), + iter.next().then(handleIter), + ]); + }), + ]) + .then(function () { + resolve(messagingProfileIds); + }) + .catch(reject); + }), + ).toBe( + realMessagingProfileIds.reduce(function (acc: string[], x) { + acc.push(x); + acc.push(x); + return acc; + }, []), + ); + }); + }); + + describe('autoPagingToArray', function () { + test('can go to the end', function () { + return expect( + new Promise(function (resolve, reject) { + realMessagingProfileIds = ['1', '2', '3']; + const options = { + host: telnyx.getConstant('DEFAULT_HOST'), + path: '/v2/messaging_profiles', + }; + nock('https://' + options.host + ':443') + .get(options.path) + .query({page: {size: 2}}) + .reply(200, { + data: [ + {record_type: 'messaging_profile', id: 1}, + {record_type: 'messaging_profile', id: 2}, + ], + meta: {total_pages: 2, page_number: 1, page_size: 2}, + }) + .get(options.path) + .query({page: {number: 2, size: 2}}) + .reply(200, { + data: [{record_type: 'messaging_profile', id: 3}], + meta: {total_pages: 2, page_number: 2, page_size: 2}, + }); + + // @ts-expect-error TODO: import .d.ts files under src/test folder + realTelnyx.messagingProfiles + .list({page: {size: 2}}) + .autoPagingToArray({limit: LIMIT}) + .then(function (messagingProfiles: TelnyxRecord[]) { + return messagingProfiles.map(function ( + messagingProfile: TelnyxRecord, + ) { + return messagingProfile.id; + }); + }) + .then(resolve) + .catch(reject); + }), + ).toBe(realMessagingProfileIds); + }); + + test('returns a promise of an array', function () { + return expect( + new Promise(function (resolve, reject) { + realMessagingProfileIds = ['1', '2', '3']; + const options = { + host: telnyx.getConstant('DEFAULT_HOST'), + path: '/v2/messaging_profiles', + }; + nock('https://' + options.host + ':443') + .get(options.path) + .query({page: {size: 2}}) + .reply(200, { + data: [ + {record_type: 'messaging_profile', id: 1}, + {record_type: 'messaging_profile', id: 2}, + ], + meta: {total_pages: 2, page_number: 1, page_size: 2}, + }) + .get(options.path) + .query({page: {number: 2, size: 2}}) + .reply(200, { + data: [{record_type: 'messaging_profile', id: 3}], + meta: {total_pages: 2, page_number: 2, page_size: 2}, + }); + + // @ts-expect-error TODO: import .d.ts files under src/test folder + realTelnyx.messagingProfiles + .list({page: {size: 2}}) + .autoPagingToArray({limit: LIMIT}) + .then(function (messagingProfiles: TelnyxRecord[]) { + return messagingProfiles.map(function ( + messagingProfile: TelnyxRecord, + ) { + return messagingProfile.id; + }); + }) + .then(resolve) + .catch(reject); + }), + ).toBe(realMessagingProfileIds.slice(0, LIMIT)); + }); + + test('accepts an onDone callback, passing an array', function () { + return expect( + new Promise(function (resolve, reject) { + function onDone(err: unknown, messagingProfiles: TelnyxRecord[]) { + if (err) { + reject(err); + } else { + resolve( + messagingProfiles.map(function ( + messagingProfile: TelnyxRecord, + ) { + return messagingProfile.id; + }), + ); + } + } + realMessagingProfileIds = ['1', '2', '3']; + const options = { + host: telnyx.getConstant('DEFAULT_HOST'), + path: '/v2/messaging_profiles', + }; + nock('https://' + options.host + ':443') + .get(options.path) + .query({page: {size: 2}}) + .reply(200, { + data: [ + {record_type: 'messaging_profile', id: 1}, + {record_type: 'messaging_profile', id: 2}, + ], + meta: {total_pages: 2, page_number: 1, page_size: 2}, + }) + .get(options.path) + .query({page: {number: 2, size: 2}}) + .reply(200, { + data: [{record_type: 'messaging_profile', id: 3}], + meta: {total_pages: 2, page_number: 2, page_size: 2}, + }); + + // @ts-expect-error TODO: import .d.ts files under src/test folder + realTelnyx.messagingProfiles + .list({page: {size: 2}}) + .autoPagingToArray({limit: LIMIT}, onDone); + }), + ).toBe(realMessagingProfileIds.slice(0, LIMIT)); + }); + + test('enforces a `limit` arg', function () { + return expect( + new Promise(function (resolve, reject) { + realMessagingProfileIds = ['1', '2', '3']; + const options = { + host: telnyx.getConstant('DEFAULT_HOST'), + path: '/v2/messaging_profiles', + }; + nock('https://' + options.host + ':443') + .get(options.path) + .query({page: {size: 2}}) + .reply(200, { + data: [ + {record_type: 'messaging_profile', id: 1}, + {record_type: 'messaging_profile', id: 2}, + ], + meta: {total_pages: 2, page_number: 1, page_size: 2}, + }) + .get(options.path) + .query({page: {number: 2, size: 2}}) + .reply(200, { + data: [{record_type: 'messaging_profile', id: 3}], + meta: {total_pages: 2, page_number: 2, page_size: 2}, + }); + + try { + // @ts-expect-error TODO: import .d.ts files under src/test folder + realTelnyx.messagingProfiles + .list({page: {size: 3}}) + .autoPagingToArray(); + reject(Error('Should have thrown.')); + } catch (err: unknown) { + resolve((err as Error)?.message); + } + }), + ).toBe( + 'You must pass a `limit` option to autoPagingToArray, eg; `autoPagingToArray({limit: 1000});`.', + ); + }); + + test('caps the `limit` arg to a reasonable ceiling', function () { + return expect( + new Promise(function (resolve, reject) { + try { + // @ts-expect-error TODO: import .d.ts files under src/test folder + realTelnyx.messagingProfiles + .list({page: {size: 3}}) + .autoPagingToArray({limit: 1000000}); + reject(Error('Should have thrown.')); + } catch (err: unknown) { + resolve((err as Error)?.message); + } + }), + ).toBe( + 'You cannot specify a limit of more than 10,000 items to fetch in `autoPagingToArray`; use `autoPagingEach` to iterate through longer lists.', + ); + }); + }); + + describe('api compat edge cases', function () { + test('lets you listen to the first request as its own promise, and separately each item, but only sends one request for the first page.', function () { + return expect( + new Promise(function (resolve, reject) { + realMessagingProfileIds = ['1', '2', '3']; + const options = { + host: telnyx.getConstant('DEFAULT_HOST'), + path: '/v2/messaging_profiles', + }; + nock('https://' + options.host + ':443') + .get(options.path) + .query({page: {size: 2}}) + .reply(200, { + data: [ + {record_type: 'messaging_profile', id: 1}, + {record_type: 'messaging_profile', id: 2}, + ], + meta: {total_pages: 2, page_number: 1, page_size: 2}, + }) + .get(options.path) + .query({page: {number: 2, size: 2}}) + .reply(200, { + data: [{record_type: 'messaging_profile', id: 3}], + meta: {total_pages: 2, page_number: 2, page_size: 2}, + }); + // Count requests: we want one for the first page (not two), and then one for the second page. + let reqCount = 0; + function onRequest() { + reqCount += 1; + } + realTelnyx.on('request', onRequest); + + const messagingProfileIds: string[] = []; + // @ts-expect-error TODO: import .d.ts files under src/test folder + const p = realTelnyx.messagingProfiles.list({page: {size: 2}}); + Promise.all([ + p, + p.autoPagingEach(function (messagingProfile: TelnyxRecord) { + messagingProfileIds.push(messagingProfile.id); + }), + ]) + .then(function (results) { + realTelnyx.off('request', onRequest); + expect(reqCount).toBe(2); // not 3. + + resolve({ + firstReq: results[0].data.map(function ( + messagingProfile: TelnyxRecord, + ) { + return messagingProfile.id; + }), + paginated: messagingProfileIds, + }); + }) + .catch(reject); + }), + ).toBe({ + firstReq: realMessagingProfileIds.slice(0, 2), + paginated: realMessagingProfileIds, + }); + }); + }); +}); diff --git a/src/test/resources/Balance.test.ts b/src/test/resources/Balance.test.ts new file mode 100644 index 0000000..47740ff --- /dev/null +++ b/src/test/resources/Balance.test.ts @@ -0,0 +1,20 @@ +/* eslint-disable @typescript-eslint/ban-ts-comment */ + +import {utils as testUtils} from '../utils'; + +const telnyx = testUtils.getTelnyxMock(); + +describe('Balance Resource', function () { + describe('retrieve', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.balance.retrieve().then(function (response) { + expect(response.data).toHaveProperty('record_type', 'balance'); + expect(response.data).toHaveProperty('balance'); + expect(response.data).toHaveProperty('available_credit'); + expect(response.data).toHaveProperty('currency'); + expect(response.data).toHaveProperty('credit_limit'); + }); + }); + }); +}); diff --git a/src/test/telnyx.test.ts b/src/test/telnyx.test.ts new file mode 100644 index 0000000..243ec0b --- /dev/null +++ b/src/test/telnyx.test.ts @@ -0,0 +1,314 @@ +import nock from 'nock'; +import http, {Agent as HttpAgent} from 'http'; +import https, {Agent as HttpsAgent} from 'https'; + +import {utils as testUtils} from './utils'; +import TelnyxNode from '../telnyx.node'; + +// eslint-disable-next-line @typescript-eslint/no-explicit-any +const realTelnyx: (typeof TelnyxNode)['prototype'] = new (TelnyxNode as any)( + testUtils.getUserTelnyxKey(), +); + +type Record = { + id: string; + name: string; +}; +const MESSAGING_PROFILE_DETAILS: Record = { + id: '123', + name: 'Summer Campaign', +}; + +describe('Telnyx Module', function () { + jest.setTimeout(20000); + + describe('setApiKey', function () { + test('uses Bearer auth', function () { + expect(realTelnyx.getApiField('auth')).toBe( + 'Bearer ' + testUtils.getUserTelnyxKey(), + ); + }); + }); + + describe('setHttpAgent', function () { + let origHttpAgent: HttpAgent, origHttpsAgent: HttpsAgent; + beforeEach(function () { + origHttpAgent = realTelnyx.getApiField('http_agent'); + origHttpsAgent = realTelnyx.getApiField('https_agent'); + realTelnyx._setApiField('http_agent', null); + realTelnyx._setApiField('https_agent', null); + }); + afterEach(function () { + realTelnyx._setApiField('http_agent', origHttpAgent); + realTelnyx._setApiField('https_agent', origHttpsAgent); + }); + describe('when given an https.Agent', function () { + test('should save the agent as https_agent', function () { + const agent = new https.Agent(); + realTelnyx.setHttpAgent(agent); + expect(realTelnyx.getApiField('https_agent')).toBe(agent); + expect(realTelnyx.getApiField('http_agent')).toBeNull(); + }); + }); + describe('when given an http.Agent', function () { + test('should save the agent as http_agent', function () { + const agent = new http.Agent(); + realTelnyx.setHttpAgent(agent); + expect(realTelnyx.getApiField('http_agent')).toBe(agent); + expect(realTelnyx.getApiField('https_agent')).toBeNull(); + }); + }); + }); + + describe('GetClientUserAgent', function () { + test('Should return a user-agent serialized JSON object', function () { + return expect( + new Promise(function (resolve, _reject) { + realTelnyx.getClientUserAgent(function (c) { + resolve(JSON.parse(c)); + }); + }), + ).toHaveProperty('lang', 'node'); + }); + }); + + describe('GetClientUserAgentSeeded', function () { + test('Should return a user-agent serialized JSON object', function () { + const userAgent = {lang: 'node'}; + return expect( + new Promise(function (resolve, _reject) { + realTelnyx.getClientUserAgentSeeded(userAgent, function (c) { + resolve(JSON.parse(c)); + }); + }), + ).toHaveProperty('lang', 'node'); + }); + + test('Should URI-encode user-agent fields', function () { + const userAgent = {lang: 'ï'}; + return expect( + new Promise(function (resolve, _reject) { + realTelnyx.getClientUserAgentSeeded(userAgent, function (c) { + resolve(JSON.parse(c)); + }); + }), + ).toHaveProperty('lang', '%C3%AF'); + }); + }); + + describe('setTimeout', function () { + test('Should define a default equal to the node default', function () { + expect(realTelnyx.getApiField('timeout')).toBe( + http.createServer().timeout, + ); + }); + test('Should allow me to set a custom timeout', function () { + realTelnyx.setTimeout(900); + expect(realTelnyx.getApiField('timeout')).toBe(900); + }); + test('Should allow me to set null, to reset to the default', function () { + realTelnyx.setTimeout(null); + expect(realTelnyx.getApiField('timeout')).toBe( + http.createServer().timeout, + ); + }); + }); + + describe('_setAppInfo', function () { + describe('when given nothing or an empty object', function () { + test('should unset telnyx._appInfo', function () { + realTelnyx._setAppInfo(); + expect(realTelnyx._appInfo).toBeUndefined(); + }); + }); + + describe('when given an object with no `name`', function () { + test('should throw an error', function () { + expect(function () { + realTelnyx._setAppInfo({}); + }).toThrow(/AppInfo.name is required/); + + expect(function () { + realTelnyx._setAppInfo({ + version: '1.2.3', + }); + }).toThrow(/AppInfo.name is required/); + + expect(function () { + realTelnyx._setAppInfo({ + cats: '42', + }); + }).toThrow(/AppInfo.name is required/); + }); + }); + + describe('when given at least a `name`', function () { + test('should set name, partner ID, url, and version of telnyx._appInfo', function () { + realTelnyx._setAppInfo({ + name: 'MyAwesomeApp', + }); + expect(realTelnyx._appInfo).toMatchObject({ + name: 'MyAwesomeApp', + }); + + realTelnyx._setAppInfo({ + name: 'MyAwesomeApp', + version: '1.2.345', + }); + expect(realTelnyx._appInfo).toMatchObject({ + name: 'MyAwesomeApp', + version: '1.2.345', + }); + + realTelnyx._setAppInfo({ + name: 'MyAwesomeApp', + url: 'https://myawesomeapp.info', + }); + expect(realTelnyx._appInfo).toMatchObject({ + name: 'MyAwesomeApp', + url: 'https://myawesomeapp.info', + }); + + realTelnyx._setAppInfo({ + name: 'MyAwesomeApp', + partner_id: 'partner_1234', + }); + expect(realTelnyx._appInfo).toMatchObject({ + name: 'MyAwesomeApp', + partner_id: 'partner_1234', + }); + }); + + test('should ignore any invalid properties', function () { + realTelnyx._setAppInfo({ + name: 'MyAwesomeApp', + partner_id: 'partner_1234', + version: '1.2.345', + url: 'https://myawesomeapp.info', + countOfRadishes: 512, + }); + expect(realTelnyx._appInfo).toMatchObject({ + name: 'MyAwesomeApp', + partner_id: 'partner_1234', + version: '1.2.345', + url: 'https://myawesomeapp.info', + }); + }); + }); + + test('should be included in the ClientUserAgent and be added to the UserAgent String', function (done) { + const appInfo = { + name: testUtils.getRandomString(), + version: '1.2.345', + url: 'https://myawesomeapp.info', + }; + + realTelnyx._setAppInfo(appInfo); + + realTelnyx.getClientUserAgent(function (uaString) { + expect(JSON.parse(uaString).application).toMatchObject(appInfo); + + expect(realTelnyx.getAppInfoAsString()).toMatchObject( + appInfo.name + '/' + appInfo.version + ' (' + appInfo.url + ')', + ); + + done(); + }); + }); + }); + + describe('Callback support', function () { + describe('Any given endpoint', function () { + test('Will call a callback if successful', function () { + return expect( + new Promise(function (resolve, _reject) { + // @ts-expect-error TODO: import .d.ts files under src/test folder + realTelnyx.messagingProfiles.create( + MESSAGING_PROFILE_DETAILS, + function (_err: unknown, _mp: unknown) { + resolve('Called!'); + }, + ); + }), + ).toBe('Called!'); + }); + + test('Will expose HTTP response object', function () { + return expect( + new Promise(function (resolve, _reject) { + const options = { + host: realTelnyx.getConstant('DEFAULT_HOST'), + path: '/v2/messaging_profiles', + }; + nock('https://' + options.host + ':443') + .post(options.path) + .reply( + 200, + {data: {record_type: 'messaging_profile', id: 1}}, + {'request-id': 'foo'}, + ); + + // @ts-expect-error TODO: import .d.ts files under src/test folder + realTelnyx.messagingProfiles.create( + MESSAGING_PROFILE_DETAILS, + function ( + _err: unknown, + mp: {lastResponse: {headers: object; statusCode: number}}, + ) { + const headers = mp.lastResponse.headers; + expect(headers).toHaveProperty('request-id'); + + expect(mp.lastResponse.statusCode).toBe(200); + expect(nock.isDone()); + + resolve('Called!'); + }, + ); + }), + ).toBe('Called!'); + }); + + test('Given an error the callback will receive it', function () { + return expect( + new Promise(function (resolve, reject) { + // @ts-expect-error TODO: import .d.ts files under src/test folder + realTelnyx.messagingProfiles.create( + MESSAGING_PROFILE_DETAILS, + function (err: unknown, _messagingProfile: unknown) { + if (err) { + resolve('ErrorWasPassed'); + } else { + reject(new Error('NoErrorPassed')); + } + }, + ); + }), + ).toBe('ErrorWasPassed'); + }); + }); + }); + + describe('errors', function () { + test('Exports errors as types', function () { + expect( + new TelnyxNode.errors.TelnyxInvalidRequestError({ + message: 'error', + }).type, + ).toBe('TelnyxInvalidRequestError'); + }); + }); + + describe('setMaxNetworkRetries', function () { + describe('when given an empty or non-number variable', function () { + test('should error', function () { + expect(function () { + realTelnyx.setMaxNetworkRetries('foo' as unknown as number); + }).toThrow(/maxNetworkRetries must be a number/); + + expect(function () { + realTelnyx.setMaxNetworkRetries(undefined as unknown as number); + }).toThrow(/maxNetworkRetries must be a number/); + }); + }); + }); +}); diff --git a/src/test/utils.test.ts b/src/test/utils.test.ts new file mode 100644 index 0000000..ea7b61e --- /dev/null +++ b/src/test/utils.test.ts @@ -0,0 +1,267 @@ +'use strict'; + +import './utils'; + +import * as utils from '../utils'; + +describe('utils', function () { + describe('makeURLInterpolator', function () { + test('Interpolates values into a prepared template', function () { + const template = utils.makeURLInterpolator('/some/url/{foo}/{baz}?ok=1'); + + expect(template({foo: 1, baz: 2})).toBe('/some/url/1/2?ok=1'); + + expect(template({foo: '', baz: ''})).toBe('/some/url//?ok=1'); + + expect( + // Test encoding: + template({foo: 'FOO', baz: '__::baz::__'}), + ).toBe('/some/url/FOO/__%3A%3Abaz%3A%3A__?ok=1'); + }); + }); + + describe('stringifyRequestData', function () { + test('Handles basic types', function () { + expect( + utils.stringifyRequestData({ + a: 1, + b: 'foo', + }), + ).toBe('a=1&b=foo'); + }); + + test('Handles deeply nested object', function () { + expect( + utils.stringifyRequestData({ + a: { + b: { + c: { + d: 2, + }, + }, + }, + }), + ).toBe('a[b][c][d]=2'); + }); + + test('Handles arrays of objects', function () { + expect( + utils.stringifyRequestData({ + a: [{b: 'c'}, {b: 'd'}], + }), + ).toBe('a[][b]=c&a[][b]=d'); + }); + + test('Handles indexed arrays', function () { + expect( + utils.stringifyRequestData({ + a: { + 0: {b: 'c'}, + 1: {b: 'd'}, + }, + }), + ).toBe('a[0][b]=c&a[1][b]=d'); + }); + + test('Creates a string from an object, handling shallow nested objects', function () { + expect( + utils.stringifyRequestData({ + test: 1, + foo: 'baz', + somethingElse: '::""%&', + nested: { + 1: 2, + 'a n o t h e r': null, + }, + }), + ).toBe( + [ + 'test=1', + 'foo=baz', + 'somethingElse=%3A%3A%22%22%25%26', + 'nested[1]=2', + 'nested[a%20n%20o%20t%20h%20e%20r]=', + ].join('&'), + ); + }); + }); + + describe('protoExtend', function () { + test('Provides an extension mechanism', function () { + function A() {} + A.extend = utils.protoExtend; + const B = A.extend({ + constructor: function () { + this.called = true; + }, + }); + expect(new B()).toBeInstanceOf(A); + expect(new B()).toBeInstanceOf(B); + // @ts-expect-error - TS doesn't know about `called` + expect(new B().called).toBe(true); + // @ts-expect-error - TS doesn't know about `called` + expect(B.extend === utils.protoExtend).toBe(true); + }); + }); + + describe('getDataFromArgs', function () { + test('handles an empty list', function () { + expect(utils.getDataFromArgs([])).toBe({}); + }); + test('handles a list with no object', function () { + const args = [1, 3]; + expect(utils.getDataFromArgs(args)).toBe({}); + expect(args.length).toBe(2); + }); + test('ignores a hash with only options', function (done) { + const args = [{api_key: 'foo'}]; + + handleWarnings( + function () { + expect(utils.getDataFromArgs(args)).toBe({}); + expect(args.length).toBe(1); + + done(); + }, + function (message: string) { + throw new Error('Should not have warned, but did: ' + message); + }, + ); + }); + test('warns if the hash contains both data and options', function (done) { + const args = [{foo: 'bar', api_key: 'foo'}]; + + handleWarnings( + function () { + utils.getDataFromArgs(args); + }, + function (message: string) { + expect(message).toBe( + 'Telnyx: Options found in arguments (api_key).' + + ' Did you mean to pass an options object? See https://github.com/telnyx/telnyx-node/wiki/Passing-Options.', + ); + + done(); + }, + ); + }); + test('finds the data', function () { + const args = [{foo: 'bar'}, {api_key: 'foo'}]; + expect(utils.getDataFromArgs(args)).toBe({foo: 'bar'}); + expect(args.length).toBe(1); + }); + }); + + describe('getOptsFromArgs', function () { + test('handles an empty list', function () { + expect(utils.getOptionsFromArgs([])).toBe({ + auth: null, + headers: {}, + }); + }); + test('handles an list with no object', function () { + const args = [1, 3]; + expect(utils.getOptionsFromArgs(args)).toBe({ + auth: null, + headers: {}, + }); + expect(args.length).toBe(2); + }); + test('ignores a non-options object', function () { + const args = [{foo: 'bar'}]; + expect(utils.getOptionsFromArgs(args)).toBe({ + auth: null, + headers: {}, + }); + expect(args.length).toBe(1); + }); + test('parses an api key', function () { + const args = [ + 'KEY187557EC22404DB39975C43ACE661A58_9QdDI7XD5bvyahtaWx1YQo', + ]; + expect(utils.getOptionsFromArgs(args)).toBe({ + auth: 'KEY187557EC22404DB39975C43ACE661A58_9QdDI7XD5bvyahtaWx1YQo', + headers: {}, + }); + expect(args.length).toBe(0); + }); + test('warns if the hash contains something that does not belong', function (done) { + const args = [ + {foo: 'bar'}, + { + api_key: 'super-secret-key', + fishsticks: true, + custard: true, + }, + ]; + + handleWarnings( + function () { + utils.getOptionsFromArgs(args); + }, + function (message: string) { + expect(message).toBe( + 'Telnyx: Invalid options found (fishsticks, custard); ignoring.', + ); + + done(); + }, + ); + }); + }); + + describe('removeEmpty', function () { + test('removes empty properties and leaves non-empty ones', function () { + expect( + utils.removeEmpty({ + cat: 3, + dog: false, + rabbit: undefined, + pointer: null, + }), + ).toMatchObject({ + cat: 3, + dog: false, + }); + }); + + test('throws an error if not given two things to compare', function () { + expect(function () { + utils.removeEmpty('potato' as unknown as Record); + }).toThrow(); + }); + }); +}); + +function handleWarnings( + doWithShimmedConsoleWarn: () => void, + onWarn: (message: string) => void, +) { + if (typeof process.emitWarning !== 'function') { + /* eslint-disable no-console */ + + // Shim `console.warn` + const _warn = console.warn; + console.warn = onWarn; + + doWithShimmedConsoleWarn(); + + // Un-shim `console.warn`, + console.warn = _warn; + + /* eslint-enable no-console */ + } else { + function onProcessWarn(warning: {name: string; message: string}) { + /* eslint-disable-line no-inner-declarations */ + onWarn(warning.name + ': ' + warning.message); + } + + process.on('warning', onProcessWarn); + + doWithShimmedConsoleWarn(); + + process.nextTick(function () { + process.removeListener('warning', onProcessWarn); + }); + } +} diff --git a/testUtils/await.node7.js b/src/test/utils/await.node7.ts similarity index 58% rename from testUtils/await.node7.js rename to src/test/utils/await.node7.ts index aaa9e01..c54fc46 100644 --- a/testUtils/await.node7.js +++ b/src/test/utils/await.node7.ts @@ -1,7 +1,9 @@ -'use strict'; - -module.exports.awaitUntil = async function awaitUntil(iterator, limit) { - const items = []; +export async function awaitUntil( + iterator: AsyncIterator, + limit: number, +) { + const items: Array = []; + // eslint-disable-next-line no-constant-condition while (true) { const {value, done} = await iterator.next(); if (done) break; @@ -12,6 +14,6 @@ module.exports.awaitUntil = async function awaitUntil(iterator, limit) { if (items.length > limit) { throw Error('Kept iterating after break.'); } - }; + } return items; -} +}; diff --git a/testUtils/forAwait.node10.js b/src/test/utils/forAwait.node10.ts similarity index 51% rename from testUtils/forAwait.node10.js rename to src/test/utils/forAwait.node10.ts index 0cf0dd0..f2a58e1 100644 --- a/testUtils/forAwait.node10.js +++ b/src/test/utils/forAwait.node10.ts @@ -1,8 +1,9 @@ -'use strict'; - -module.exports.forAwaitUntil = async function forAwaitUntil(iterator, limit) { - const items = []; - for await (const item of iterator) { +export async function forAwaitUntil( + iterable: AsyncIterable, + limit: number, +) { + const items: Array = []; + for await (const item of iterable) { items.push(item); if (items.length === limit) { break; @@ -12,4 +13,4 @@ module.exports.forAwaitUntil = async function forAwaitUntil(iterator, limit) { } } return items; -} +}; diff --git a/src/test/utils/index.ts b/src/test/utils/index.ts new file mode 100644 index 0000000..db70d1f --- /dev/null +++ b/src/test/utils/index.ts @@ -0,0 +1,136 @@ +// NOTE: testUtils should be require'd before anything else in each spec file! + +import TelnyxNode from '../../telnyx.node'; +import { + RequestCallback, + RequestData, + RequestHeaders, + TelnyxResourceObject, +} from '../../Types'; + +type LastRequest = { + method: string; + url?: string; + data: RequestData; + headers: RequestHeaders; + auth: string | null; + host?: string; + usage?: Array; +}; + +export const utils = { + getUserTelnyxKey: function () { + const key = + process.env.TELNYX_TEST_API_KEY || + 'KEY187557EC22404DB39975C43ACE661A58_9QdDI7XD5bvyahtaWx1YQo'; + + return key; + }, + + getSpyableTelnyx: function () { + // Provide a testable telnyx instance + // That is, with mock-requests built in and hookable + + // needed for constructor + const telnyxInstance: (typeof TelnyxNode)['prototype'] = + // eslint-disable-next-line @typescript-eslint/no-explicit-any + new (TelnyxNode as any)('fakeAuthToken'); + + telnyxInstance.REQUESTS = []; + + for (const i in telnyxInstance) { + makeInstanceSpyable( + telnyxInstance, + telnyxInstance[ + i as keyof (typeof TelnyxNode)['prototype'] + ] as typeof TelnyxNode.TelnyxResource, + ); + } + + function makeInstanceSpyable( + telnyxInstance: (typeof TelnyxNode)['prototype'], + thisInstance: typeof TelnyxNode.TelnyxResource, + ) { + if (thisInstance instanceof TelnyxNode.TelnyxResource) { + patchRequest(telnyxInstance, thisInstance); + } + } + + function patchRequest( + telnyxInstance: (typeof TelnyxNode)['prototype'], + instance: TelnyxResourceObject, + ) { + instance._request = function ( + method: string, + host: string | null | undefined, + url: string | undefined, + data: RequestData, + auth: string | null | undefined, + options = { + headers: {}, + }, + cb: RequestCallback, + ) { + const req: LastRequest = (telnyxInstance.LAST_REQUEST = { + method: method, + auth: null, + url: url, + data: data, + headers: options.headers || {}, + }); + + if (auth) { + req.auth = auth; + } + if (host) { + req.host = host; + } + telnyxInstance.REQUESTS.push(data); + cb.call(this, null); + }; + } + + return telnyxInstance; + }, + + getTelnyxMock: function () { + // Provide a telnyx-mock like instance + // That is, with telnyx-mock requests built in + + // needed for constructor, using prototype as constructor type is not directly exported from TelnyxNode + const telnyxInstance: (typeof TelnyxNode)['prototype'] = + // constructor type is not directly exported from TelnyxNode + // eslint-disable-next-line @typescript-eslint/no-explicit-any + new (TelnyxNode as any)( + 'KEYSUPERSECRET', // testmode secret API KEY + ); + + telnyxInstance.setHost( + 'localhost', + process.env.TELNYX_MOCK_PORT || '12111', + 'http', + ); + + return telnyxInstance; + }, + + /** + * Get a random string for test Object creation + */ + getRandomString: function () { + return Math.random().toString(36).slice(2); + }, + + envSupportsForAwait: function () { + return typeof Symbol !== 'undefined' && Symbol.asyncIterator; + }, + + envSupportsAwait: function () { + try { + eval('(async function() {})'); // eslint-disable-line no-eval + return true; + } catch (_err) { + return false; + } + }, +}; diff --git a/src/utils.ts b/src/utils.ts index 5e0a91c..b9dc64d 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -5,10 +5,12 @@ import { RequestArgs, RequestData, RequestOptions, + ResponsePayload, + TelnyxObject, TelnyxResourceObject, UrlInterpolator, -} from './Types.js'; -import TelnyxResource from './TelnyxResource.js'; +} from './Types'; +import TelnyxResource from './TelnyxResource'; const OPTIONS_KEYS = ['api_key']; @@ -47,9 +49,9 @@ export function isOptionsHash(o: unknown): boolean | unknown { /** * Remove empty values from an object */ -export function removeEmpty( - obj: Record, -): Record { +export function removeEmpty( + obj: Record, +): Record { if (typeof obj !== 'object') { throw new Error('Argument must be an object'); } @@ -86,6 +88,38 @@ export function callbackifyPromiseWithTimeout( return promise; } +/** + * Add TelnyxResource to API response data + * + * @param [response] Resource response object + * @param [telnyx] Telnyx SDK + * @param [resourceName] Resource name in camelCase + * @param [methods] resource methods to include + */ +export function addResourceToResponseData( + response: ResponsePayload, + telnyx: TelnyxObject, + resourceName: string, + methods: { + [name: string]: (...args: unknown[]) => Promise; + }, +) { + if (response && response.data && typeof response.data === 'object') { + /* + * make nested methods. e.g.: call.bridge(); + * nested methods should be used from basic methods response. See specs for an example + */ + const resourceFulData = telnyx[resourceName as keyof TelnyxObject] as T & + TelnyxResourceObject; + + Object.assign(resourceFulData, response.data, methods); + + response.data = resourceFulData; + } + + return response; +} + /** * Create multiple nested methods, in camelCase and snakeCase, using spec and method names * diff --git a/test/.eslintrc.js b/test/.eslintrc.js deleted file mode 100644 index b2ab6d0..0000000 --- a/test/.eslintrc.js +++ /dev/null @@ -1,14 +0,0 @@ -module.exports = { - 'env': { - 'mocha': true - }, - 'plugins': [ - 'chai-friendly' - ], - 'rules': { - 'no-loop-func': 'off', - 'no-sync': 'off', - 'no-unused-expressions': 0, - 'chai-friendly/no-unused-expressions': 2 - } -}; diff --git a/test/Error.spec.js b/test/Error.spec.js deleted file mode 100644 index 3b8e383..0000000 --- a/test/Error.spec.js +++ /dev/null @@ -1,48 +0,0 @@ -'use strict'; - -require('../testUtils'); - -var Error = require('../lib/Error'); -var expect = require('chai').expect; - -describe('Error', function() { - it('Populates with type and message params', function() { - var e = new Error('FooError', 'Foo happened'); - expect(e).to.have.property('type', 'FooError'); - expect(e).to.have.property('message', 'Foo happened'); - expect(e).to.have.property('stack'); - }); - - describe('TelnyxError', function() { - it('Pulls in headers', function() { - var headers = {'Request-Id': '123'}; - var e = Error.TelnyxError.generate({errors: [{title: 'A terrible mistake has been made'}], headers: headers, statusCode: 400}); - expect(e).to.have.property('headers', headers); - }); - - it('Pulls in request IDs', function() { - var e = Error.TelnyxError.generate({errors: [{title: 'Oops'}], requestId: 'foo', statusCode: 400}); - expect(e).to.have.property('requestId', 'foo'); - }); - - it('Pulls in HTTP status code', function() { - var e = Error.TelnyxError.generate({errors: [{type: 'Oh noes'}], statusCode: 400}); - expect(e).to.have.property('statusCode', 400); - }); - - it('Builds errors based on status code', function() { - expect(Error.TelnyxError.generate({errors: [{title: 'Oops'}], statusCode: 400})).to.be.instanceOf( - Error.TelnyxInvalidRequestError - ); - expect(Error.TelnyxError.generate({errors: [{title: 'Oops'}], statusCode: 401})).to.be.instanceOf( - Error.TelnyxAuthenticationError - ); - expect(Error.TelnyxError.generate({errors: [{title: 'Oops'}], statusCode: 403})).to.be.instanceOf( - Error.TelnyxPermissionError - ); - // expect(Error.TelnyxError.generate({errors: [{title: 'Oops'}], statusCode: 404})).to.be.instanceOf( - // Error.ResourceNotFoundError - // ); - }); - }); -}); diff --git a/test/TelnyxResource.spec.js b/test/TelnyxResource.spec.js deleted file mode 100644 index e842832..0000000 --- a/test/TelnyxResource.spec.js +++ /dev/null @@ -1,605 +0,0 @@ -'use strict'; - -var utils = require('../testUtils'); -var nock = require('nock'); - -var telnyx = require('../testUtils').getSpyableTelnyx(); -var expect = require('chai').expect; - -describe('TelnyxResource', function() { - describe('createResourcePathWithSymbols', function() { - it('Generates a path', function() { - telnyx.messagingProfiles.create({}); - var path = telnyx.messagingProfiles.createResourcePathWithSymbols('{id}'); - expect(path).to.equal('/messaging_profiles/{id}'); - }); - }); - - describe('_defaultHeaders', function() { - it('sets the Authorization header with Bearer auth using the global API key', function() { - var headers = telnyx.messagingProfiles._defaultHeaders(null, ''); - expect(headers.Authorization).to.equal('Bearer fakeAuthToken'); - }); - it('sets the Authorization header with Bearer auth using the specified API key', function() { - var headers = telnyx.messagingProfiles._defaultHeaders('anotherFakeAuthToken', ''); - expect(headers.Authorization).to.equal('Bearer anotherFakeAuthToken'); - }); - - it('sets the content length for empty body', function() { - var headers = telnyx.messagingProfiles._defaultHeaders(null, ''); - expect(headers['Content-Length']).to.equal(0); - }); - - it('sets the content length for UTF-8 body', function() { - var headers = telnyx.messagingProfiles._defaultHeaders( - null, - '"{\"messaging_profile_id\":\"uuid\",\"text\":\"Hi There! This is Collin with Polling \",\"to\":\"+18332784547\"}"' - ); - expect(headers['Content-Length']).to.equal(101); - }); - - it('sets the content length for UTF-8 body with multi-bytes chars', function() { - var headers = telnyx.messagingProfiles._defaultHeaders( - null, - '"{\"messaging_profile_id\":\"uuid\",\"text\":\"Hi There! This is Collin with Polling – ‣\",\"to\":\"+18332784547\"}"' - ); - expect(headers['Content-Length']).to.equal(108); - }); - }); - - describe('Parameter encoding', function() { - // Use a real instance of telnyx as we're mocking the http.request responses. - var realTelnyx = require('../lib/telnyx')(utils.getUserTelnyxKey()); - - before(() => { - nock.disableNetConnect(); - }); - - after(function() { - nock.cleanAll(); - nock.enableNetConnect(); - }) - - describe('_request', function() { - it('encodes the query string in GET requests', function(done) { - var options = { - host: telnyx.getConstant('DEFAULT_HOST'), - path: '/v2/messaging_profiles', - data: { - page: {size: 10, number: 5} - }, - }; - - const scope = nock('https://' + options.host + ':443') - .get(options.path) - .query(options.data) - .reply(200, {data: [{record_type: 'messaging_profile'}]}); - - realTelnyx.messagingProfiles.list(options.data, function(err, response) { - done(); - scope.done(); - }); - }); - - it('encodes the body in PATCH requests', function(done) { - var options = { - host: telnyx.getConstant('DEFAULT_HOST'), - path: '/v2/messaging_profiles/123', - data: { - name: 'Winter Campaign', - }, - body: {name: 'Winter Campaign'}, - }; - - // PATCH https://api.telnyx.com:443/v2/messaging_profiles/123 - const scope = nock('https://' + options.host + ':443') - .patch(options.path, options.body) - .reply(200, {data: {record_type: 'messaging_profile'}}); - - realTelnyx.messagingProfiles.update('123', options.data, function(err, response) { - done(); - scope.done(); - }); - }); - - it('encodes the body in POST requests', function(done) { - var options = { - host: telnyx.getConstant('DEFAULT_HOST'), - path: '/v2/messaging_profiles', - data: { - name: 'Winter Campaign', - }, - body: {name: 'Winter Campaign'}, - }; - - const scope = nock('https://' + options.host + ':443') - .post(options.path, options.body) - .reply(200, '{ data: {}}'); - - realTelnyx.messagingProfiles.create(options.data, function(err, response) { - done(); - scope.done(); - }); - }); - }); - }); - - describe('Retry Network Requests', function() { - // Use a real instance of telnyx as we're mocking the http.request responses. - var realTelnyx = require('../lib/telnyx')(utils.getUserTelnyxKey()); - - // Override the sleep timer to speed up tests - realTelnyx.messagingProfiles._getSleepTimeInMS = function() { - return 0; - }; - - var options = { - host: telnyx.getConstant('DEFAULT_HOST'), - path: '/v2/messaging_profiles', - data: { - name: 'Summer Campaign', - }, - }; - - afterEach(function() { - realTelnyx.setMaxNetworkRetries(0); - telnyx.setMaxNetworkRetries(0); - }); - - before(() => { - nock.disableNetConnect(); - }); - - after(function() { - nock.cleanAll(); - nock.enableNetConnect(); - }) - - describe('_request', function() { - it('throws an error on connection failure', function(done) { - // Mock the connection error. - nock('https://' + options.host) - .post(options.path, options.data) - .replyWithError('bad stuff'); - - realTelnyx.messagingProfiles.create(options.data, function(err) { - var errorMessage = realTelnyx.messagingProfiles._generateConnectionErrorMessage(0); - expect(err.message).to.deep.equal(errorMessage); - expect(nock.isDone()); - done(); - }); - }); - - it('should retry the request if max retries are set', function(done) { - nock('https://' + options.host) - .post(options.path, options.data) - .replyWithError('bad stuff') - .post(options.path, options.data) - .replyWithError('worse stuff'); - - realTelnyx.setMaxNetworkRetries(1); - - realTelnyx.messagingProfiles.create(options.data, function(err) { - var errorMessage = realTelnyx.messagingProfiles._generateConnectionErrorMessage(1); - expect(err.message).to.equal(errorMessage); - expect(nock.isDone()); - done(); - }); - }); - - it('should stop retrying after a successful retry', function(done) { - nock('https://' + options.host) - .post(options.path, options.data) - .replyWithError('bad stuff') - .post(options.path, options.data) - .reply(200, {data: { - id: '123', - record_type: 'messaging_profile', - name: 'Summer Campaign', - }}); - - realTelnyx.setMaxNetworkRetries(2); - - realTelnyx.messagingProfiles.create(options.data, function(err, response) { - expect(response.data.id).to.equal('123'); - expect(nock.isDone()); - done(); - }); - }); - - it('should not retry on a 422 error', function(done) { - nock('https://' + options.host) - .post(options.path, options.data) - .reply(422, { - errors: [{ - title: 'Missing required parameter' - }] - }); - - realTelnyx.setMaxNetworkRetries(1); - - realTelnyx.messagingProfiles.create(options.data, function(err) { - expect(err.type).to.equal('TelnyxInvalidParametersError'); - expect(nock.isDone()); - done(); - }); - }); - - it('should not retry on a 500 error when the method is POST', function(done) { - nock('https://' + options.host) - .post(options.path, options.data) - .reply(500, { - errors: [{ - title: 'Unexpected error' - }] - }); - - realTelnyx.setMaxNetworkRetries(1); - - realTelnyx.messagingProfiles.create(options.data, function(err) { - expect(err.type).to.equal('TelnyxAPIError'); - expect(nock.isDone()); - done(); - }); - }); - - it('should retry on a 503 error when the method is POST', function(done) { - nock('https://' + options.host) - .post(options.path, options.data) - .reply(503, { - errors: [{ - message: 'Service unavailable' - }] - }) - .post(options.path, options.data) - .reply(200, {data: { - id: '123', - record_type: 'messaging_profile', - name: 'Summer Campaign', - }}); - - realTelnyx.setMaxNetworkRetries(1); - - realTelnyx.messagingProfiles.create(options.data, function(err, response) { - expect(response.data.id).to.equal('123'); - expect(nock.isDone()); - done(); - }); - }); - - it('should retry on a 500 error when the method is GET', function(done) { - nock('https://' + options.host) - .get(options.path + '/123') - .reply(500, { - errors: [{ - title: 'Unexpected error' - }] - }) - .get(options.path + '/123') - .reply(200, { - data: { - id: '123', - record_type: 'messaging_profile', - name: 'Summer Campaign', - } - }); - - realTelnyx.setMaxNetworkRetries(1); - - realTelnyx.messagingProfiles.retrieve('123', function(err, messagingProfile) { - expect(messagingProfile.data.id).to.equal('123'); - expect(nock.isDone()); - done(); - }); - }); - }); - - describe('_shouldRetry', function() { - it('should return false if we\'ve reached maximum retries', function() { - telnyx.setMaxNetworkRetries(1); - var res = telnyx.messagingProfiles._shouldRetry({ - statusCode: 409 - }, 1); - - expect(res).to.equal(false); - }); - - it('should return true if we have more retries available', function() { - telnyx.setMaxNetworkRetries(1); - var res = telnyx.messagingProfiles._shouldRetry({ - statusCode: 409 - }, 0); - - expect(res).to.equal(true); - }); - - it('should return true if the error code is either 409 or 503', function() { - telnyx.setMaxNetworkRetries(1); - var res = telnyx.messagingProfiles._shouldRetry({ - statusCode: 409 - }, 0); - - expect(res).to.equal(true); - - res = telnyx.messagingProfiles._shouldRetry({ - statusCode: 503 - }, 0); - - expect(res).to.equal(true); - }); - - it('should return false if the status is 200', function() { - telnyx.setMaxNetworkRetries(2); - - // mocking that we're on our 2nd request - var res = telnyx.messagingProfiles._shouldRetry({ - statusCode: 200, - req: {_requestEvent: {method: 'POST'}} - }, 1); - - expect(res).to.equal(false); - }); - }); - - describe('_getSleepTimeInMS', function() { - it('should not exceed the maximum or minimum values', function() { - var sleepSeconds; - var max = telnyx.getMaxNetworkRetryDelay(); - var min = telnyx.getInitialNetworkRetryDelay(); - - for (var i = 0; i < 10; i++) { - sleepSeconds = telnyx.messagingProfiles._getSleepTimeInMS(i) / 1000; - - expect(sleepSeconds).to.be.at.most(max); - expect(sleepSeconds).to.be.at.least(min); - } - }); - }); - - describe('_responseHandler', function() { - it('should build an InvalidRequestError for status code 400', function(done) { - var options = { - host: telnyx.getConstant('DEFAULT_HOST'), - path: '/v2/messaging_profiles', - data: { - name: 'Winter Campaign', - }, - }; - nock('https://' + options.host) - .post(options.path, options.data) - .reply(400, { - errors: [{ - title: 'Error' - }] - }); - - realTelnyx.messagingProfiles.create(options.data, function(err) { - expect(err.type).to.equal('TelnyxInvalidRequestError'); - expect(nock.isDone()); - done(); - }); - }); - - it('should build an TelnyxAuthenticationError for status code 401', function(done) { - var options = { - host: telnyx.getConstant('DEFAULT_HOST'), - path: '/v2/messaging_profiles', - data: { - name: 'Winter Campaign', - }, - }; - nock('https://' + options.host) - .post(options.path, options.data) - .reply(401, { - errors: [{ - title: 'Error' - }] - }); - - realTelnyx.messagingProfiles.create(options.data, function(err) { - expect(err.type).to.equal('TelnyxAuthenticationError'); - expect(nock.isDone()); - done(); - }); - }); - it('should build an TelnyxPermissionError for status code 403', function(done) { - var options = { - host: telnyx.getConstant('DEFAULT_HOST'), - path: '/v2/messaging_profiles', - data: { - name: 'Winter Campaign', - }, - }; - nock('https://' + options.host) - .post(options.path, options.data) - .reply(403, { - errors: [{ - title: 'Error' - }] - }); - - realTelnyx.messagingProfiles.create(options.data, function(err) { - expect(err.type).to.equal('TelnyxPermissionError'); - expect(nock.isDone()); - done(); - }); - }); - it('should build an TelnyxResourceNotFoundError for status code 404', function(done) { - var options = { - host: telnyx.getConstant('DEFAULT_HOST'), - path: '/v2/messaging_profiles', - data: { - name: 'Winter Campaign', - }, - }; - nock('https://' + options.host) - .post(options.path, options.data) - .reply(404, { - errors: [{ - title: 'Error' - }] - }); - - realTelnyx.messagingProfiles.create(options.data, function(err) { - expect(err.type).to.equal('TelnyxResourceNotFoundError'); - expect(nock.isDone()); - done(); - }); - }); - it('should build an TelnyxMethodNotSupportedError for status code 405', function(done) { - var options = { - host: telnyx.getConstant('DEFAULT_HOST'), - path: '/v2/messaging_profiles', - data: { - name: 'Winter Campaign', - }, - }; - nock('https://' + options.host) - .post(options.path, options.data) - .reply(405, { - errors: [{ - title: 'Error' - }] - }); - - realTelnyx.messagingProfiles.create(options.data, function(err) { - expect(err.type).to.equal('TelnyxMethodNotSupportedError'); - expect(nock.isDone()); - done(); - }); - }); - it('should build an TelnyxTimeoutError for status code 408', function(done) { - var options = { - host: telnyx.getConstant('DEFAULT_HOST'), - path: '/v2/messaging_profiles', - data: { - name: 'Winter Campaign', - }, - }; - nock('https://' + options.host) - .post(options.path, options.data) - .reply(408, { - errors: [{ - title: 'Error' - }] - }); - - realTelnyx.messagingProfiles.create(options.data, function(err) { - expect(err.type).to.equal('TelnyxTimeoutError'); - expect(nock.isDone()); - done(); - }); - }); - it('should build an TelnyxUnsupportedMediaTypeError for status code 415', function(done) { - var options = { - host: telnyx.getConstant('DEFAULT_HOST'), - path: '/v2/messaging_profiles', - data: { - name: 'Winter Campaign', - }, - }; - nock('https://' + options.host) - .post(options.path, options.data) - .reply(415, { - errors: [{ - title: 'Error' - }] - }); - - realTelnyx.messagingProfiles.create(options.data, function(err) { - expect(err.type).to.equal('TelnyxUnsupportedMediaTypeError'); - expect(nock.isDone()); - done(); - }); - }); - it('should build an TelnyxInvalidParametersError for status code 422', function(done) { - var options = { - host: telnyx.getConstant('DEFAULT_HOST'), - path: '/v2/messaging_profiles', - data: { - name: 'Winter Campaign', - }, - }; - nock('https://' + options.host) - .post(options.path, options.data) - .reply(422, { - errors: [{ - title: 'Error' - }] - }); - - realTelnyx.messagingProfiles.create(options.data, function(err) { - expect(err.type).to.equal('TelnyxInvalidParametersError'); - expect(nock.isDone()); - done(); - }); - }); - it('should build an TelnyxRateLimitError for status code 429', function(done) { - var options = { - host: telnyx.getConstant('DEFAULT_HOST'), - path: '/v2/messaging_profiles', - data: { - name: 'Winter Campaign', - }, - }; - nock('https://' + options.host) - .post(options.path, options.data) - .reply(429, { - errors: [{ - title: 'Error' - }] - }); - - realTelnyx.messagingProfiles.create(options.data, function(err) { - expect(err.type).to.equal('TelnyxRateLimitError'); - expect(nock.isDone()); - done(); - }); - }); - it('should build an TelnyxAPIError for status code 500', function(done) { - var options = { - host: telnyx.getConstant('DEFAULT_HOST'), - path: '/v2/messaging_profiles', - data: { - name: 'Winter Campaign', - }, - }; - nock('https://' + options.host) - .post(options.path, options.data) - .reply(500, { - errors: [{ - title: 'Error' - }] - }); - - realTelnyx.messagingProfiles.create(options.data, function(err) { - expect(err.type).to.equal('TelnyxAPIError'); - expect(nock.isDone()); - done(); - }); - }); - it('should build an TelnyxServiceUnavailableError for status code 503', function(done) { - var options = { - host: telnyx.getConstant('DEFAULT_HOST'), - path: '/v2/messaging_profiles', - data: { - name: 'Winter Campaign', - }, - }; - nock('https://' + options.host) - .post(options.path, options.data) - .reply(503, { - errors: [{ - title: 'Error' - }] - }); - - realTelnyx.messagingProfiles.create(options.data, function(err) { - expect(err.type).to.equal('TelnyxServiceUnavailableError'); - expect(nock.isDone()); - done(); - }); - }); - }); - }); -}); diff --git a/test/Webhook.spec.js b/test/Webhook.spec.js deleted file mode 100644 index e28b522..0000000 --- a/test/Webhook.spec.js +++ /dev/null @@ -1,149 +0,0 @@ -'use strict'; - -var telnyx = require('../testUtils').getSpyableTelnyx(); -var expect = require('chai').expect; -var Buffer = require('safe-buffer').Buffer; -var crypto = require('crypto'); -var nacl = require('tweetnacl'); - -var EVENT_PAYLOAD = { - data: { - record_type: 'event', - id: '0ccc7b54-4df3-4bca-a65a-3da1ecc777f0', - event_type: 'call_initiated', - created_at: '2018-02-02T22:25:27.521992Z', - payload: { - to: '+13129457420', - start_time: '2018-02-02T22:25:27.521992Z', - occurred_at: '2018-02-02T22:25:27.521992Z', - from: '+35319605860', - call_control_id: 'AgDIxmoRX6QMuaIj_uXRXnPAXP0QlNfXczRrZvZakpWxBlpw48KyZQ==', - connection_id: '7267xxxxxxxxxxxxxx', - call_leg_id: '428c31b6-7af4-4bcb-b7f5-5013ef9657c1', - call_session_id: '428c31b6-abf3-3bc1-b7f4-5013ef9657c1', - client_state: 'aGF2ZSBhIG5pY2UgZGF5ID1d', - direction: 'incoming', - state: 'parked' - } - } -}; -var EVENT_PAYLOAD_STRING = JSON.stringify(EVENT_PAYLOAD, null, 2); - -var KEY_PAIR = nacl.sign.keyPair.fromSeed(crypto.randomBytes(32)); -var PUBLIC_KEY = KEY_PAIR.publicKey; - -describe('Webhooks', function() { - describe('.constructEvent', function() { - it('should return an Event instance from a valid JSON payload and valid signature header', function() { - var timestamp = Math.floor(Date.now() / 1000).toString(); - var signature = generateSignature({ - payload: EVENT_PAYLOAD_STRING, - timestamp: timestamp, - }); - - var event = telnyx.webhooks.constructEvent(EVENT_PAYLOAD_STRING, signature, timestamp, PUBLIC_KEY); - - expect(event.data.id).to.equal(EVENT_PAYLOAD.data.id); - }); - - it('should raise a JSON error from invalid JSON payload', - function() { - var timestamp = Math.floor(Date.now() / 1000).toString(); - var signature = generateSignature({ - payload: '} I am not valid JSON; 123][', - timestamp: timestamp, - }); - expect(function() { - telnyx.webhooks.constructEvent('} I am not valid JSON; 123][', signature, timestamp, PUBLIC_KEY); - }).to.throw(/Unexpected token/); - }); - - it('should raise a SignatureVerificationError from a valid JSON payload and an invalid signature header', - function() { - var signature = 'bad_header'; - var timestamp = Math.floor(Date.now() / 1000).toString(); - - expect(function() { - telnyx.webhooks.constructEvent(EVENT_PAYLOAD_STRING, signature, timestamp, PUBLIC_KEY); - }).to.throw(/Signature is invalid and does not match the payload/); - }); - }); - - describe('.verifySignature', function() { - it('should raise a SignatureVerificationError when there are no valid signatures for the payload', function() { - var signature = "I'm not even a real signature header"; - var timestamp = Math.floor(Date.now() / 1000).toString(); - - var expectedMessage = /Signature is invalid and does not match the payload/; - - expect(function() { - telnyx.webhooks.signature.verifySignature(EVENT_PAYLOAD_STRING, signature, timestamp, PUBLIC_KEY); - }).to.throw(expectedMessage); - - expect(function() { - telnyx.webhooks.signature.verifySignature(EVENT_PAYLOAD_STRING, '', timestamp, PUBLIC_KEY); - }).to.throw(expectedMessage); - - expect(function() { - telnyx.webhooks.signature.verifySignature(EVENT_PAYLOAD_STRING, undefined, timestamp, PUBLIC_KEY); - }).to.throw(expectedMessage); - - expect(function() { - telnyx.webhooks.signature.verifySignature(EVENT_PAYLOAD_STRING, Buffer.from('foo', 'ascii'), timestamp, PUBLIC_KEY); - }).to.throw(expectedMessage); - }); - - it('should raise a SignatureVerificationError when the timestamp is not within the tolerance', function() { - var timestamp = ((Date.now() / 1000) - 15).toString(); - var signature = generateSignature({ - timestamp: timestamp, - }); - - expect(function() { - telnyx.webhooks.signature.verifySignature(EVENT_PAYLOAD_STRING, signature, timestamp, PUBLIC_KEY, 10); - }).to.throw(/Timestamp outside the tolerance zone/); - }); - - it('should return true when the header contains a valid signature and ' + - 'the timestamp is within the tolerance', - function() { - var timestamp = Math.floor(Date.now() / 1000).toString(); - var signature = generateSignature({ - timestamp: timestamp, - }); - - expect(telnyx.webhooks.signature.verifySignature(EVENT_PAYLOAD_STRING, signature, timestamp, PUBLIC_KEY, 10)).to.equal(true); - }); - - it('should return true when the header contains a valid signature ' + - 'and the timestamp is off but no tolerance is provided', - function() { - var timestamp = Math.floor(new Date('2012.08.10').getTime() / 1000).toString(); - var signature = generateSignature({ - timestamp: timestamp, - }); - - expect(telnyx.webhooks.signature.verifySignature(EVENT_PAYLOAD_STRING, signature, timestamp, PUBLIC_KEY)).to.equal(true); - }); - - it('should accept Buffer instances for the payload and header', function() { - var timestamp = Math.floor(Date.now() / 1000).toString(); - var signature = generateSignature({ - timestamp: timestamp, - }); - - expect(telnyx.webhooks.signature.verifySignature(Buffer.from(EVENT_PAYLOAD_STRING), Buffer.from(signature), Buffer.from(timestamp), PUBLIC_KEY, 10)).to.equal(true); - }); - }); -}); - -function generateSignature(opts) { - opts = opts || {}; - - opts.timestamp = opts.timestamp || Math.floor(Date.now() / 1000).toString(); - opts.payload = opts.payload || EVENT_PAYLOAD_STRING; - - var payload = Buffer.from(`${opts.timestamp}|${opts.payload}`, 'utf8'); - - return nacl.sign.detached(payload, KEY_PAIR.secretKey); -} diff --git a/test/autoPagination.spec.js b/test/autoPagination.spec.js deleted file mode 100644 index 6bf3282..0000000 --- a/test/autoPagination.spec.js +++ /dev/null @@ -1,661 +0,0 @@ -'use strict'; - -/* eslint-disable callback-return */ - -var testUtils = require('../testUtils'); -var telnyx = require('../testUtils').getSpyableTelnyx(); -var expect = require('chai').expect; -var nock = require('nock'); -var realTelnyx = require('../lib/telnyx')(testUtils.getUserTelnyxKey()); - -var LIMIT = 3; -var TOTAL_OBJECTS = 3; - -describe('auto pagination', function() { - this.timeout(20000); - - var realMessagingProfileIds; - - describe('callbacks', function() { - it('lets you call `next()` to iterate and `next(false)` to break', function() { - return expect(new Promise(function(resolve, reject) { - realMessagingProfileIds = [1,2,3]; - var messagingProfileIds = []; - function onMessagingProfile(messagingProfile, next) { - messagingProfileIds.push(messagingProfile.id); - if (messagingProfileIds.length === LIMIT) { - next(false); - } else { - expect(messagingProfileIds.length).to.be.lessThan(LIMIT); - next(); - } - } - function onDone(err) { - if (err) { - reject(err); - } else { - resolve(messagingProfileIds); - } - } - var options = { - host: telnyx.getConstant('DEFAULT_HOST'), - path: '/v2/messaging_profiles', - }; - nock('https://' + options.host + ':443') - .get(options.path) - .query({page: {size: 1}}) - .reply(200, {data: [{record_type: 'messaging_profile', id: 1}], meta: {total_pages: 3, page_number: 1, page_size: 1}}) - .get(options.path) - .query({page: {number: 2, size: 1}}) - .reply(200, {data: [{record_type: 'messaging_profile', id: 2}], meta: {total_pages: 3, page_number: 2, page_size: 1}}) - .get(options.path) - .query({page: {number: 3, size: 1}}) - .reply(200, {data: [{record_type: 'messaging_profile', id: 3}], meta: {total_pages: 3, page_number: 3, page_size: 1}}); - - realTelnyx.messagingProfiles.list({page: {size: 1}}) - .autoPagingEach(onMessagingProfile, onDone); - })).to.eventually.deep.equal(realMessagingProfileIds.slice(0, LIMIT)); - }); - - it('lets you ignore the second arg and `return false` to break', function() { - return expect(new Promise(function(resolve, reject) { - realMessagingProfileIds = [1,2,3]; - var messagingProfileIds = []; - function onMessagingProfile(messagingProfile) { - messagingProfileIds.push(messagingProfile.id); - if (messagingProfileIds.length === LIMIT) { - return false; - } else { - expect(messagingProfileIds.length).to.be.lessThan(LIMIT); - } - } - function onDone(err) { - if (err) { - reject(err); - } else { - resolve(messagingProfileIds); - } - } - var options = { - host: telnyx.getConstant('DEFAULT_HOST'), - path: '/v2/messaging_profiles', - }; - nock('https://' + options.host + ':443') - .get(options.path) - .query({page: {size: 1}}) - .reply(200, {data: [{record_type: 'messaging_profile', id: 1}], meta: {total_pages: 3, page_number: 1, page_size: 1}}) - .get(options.path) - .query({page: {number: 2, size: 1}}) - .reply(200, {data: [{record_type: 'messaging_profile', id: 2}], meta: {total_pages: 3, page_number: 2, page_size: 1}}) - .get(options.path) - .query({page: {number: 3, size: 1}}) - .reply(200, {data: [{record_type: 'messaging_profile', id: 3}], meta: {total_pages: 3, page_number: 3, page_size: 1}}); - - realTelnyx.messagingProfiles.list({page: {size: 1}}) - .autoPagingEach(onMessagingProfile, onDone); - })).to.eventually.deep.equal(realMessagingProfileIds.slice(0, LIMIT)); - }); - - it('lets you ignore the second arg and return a Promise which returns `false` to break', function() { - return expect(new Promise(function(resolve, reject) { - realMessagingProfileIds = [1,2,3]; - var messagingProfileIds = []; - function onMessagingProfile(messagingProfile) { - messagingProfileIds.push(messagingProfile.id); - if (messagingProfileIds.length === LIMIT) { - return Promise.resolve(false); - } else { - expect(messagingProfileIds.length).to.be.lessThan(LIMIT); - return Promise.resolve(); - } - } - function onDone(err) { - if (err) { - reject(err); - } else { - resolve(messagingProfileIds); - } - } - var options = { - host: telnyx.getConstant('DEFAULT_HOST'), - path: '/v2/messaging_profiles', - }; - nock('https://' + options.host + ':443') - .get(options.path) - .query({page: {size: 1}}) - .reply(200, {data: [{record_type: 'messaging_profile', id: 1}], meta: {total_pages: 3, page_number: 1, page_size: 1}}) - .get(options.path) - .query({page: {number: 2, size: 1}}) - .reply(200, {data: [{record_type: 'messaging_profile', id: 2}], meta: {total_pages: 3, page_number: 2, page_size: 1}}) - .get(options.path) - .query({page: {number: 3, size: 1}}) - .reply(200, {data: [{record_type: 'messaging_profile', id: 3}], meta: {total_pages: 3, page_number: 3, page_size: 1}}); - - realTelnyx.messagingProfiles.list({page: {size: 1}}) - .autoPagingEach(onMessagingProfile, onDone); - })).to.eventually.deep.equal(realMessagingProfileIds.slice(0, LIMIT)); - }); - - it('can use a promise instead of a callback for onDone', function() { - return expect(new Promise(function(resolve, reject) { - realMessagingProfileIds = [1,2,3]; - var messagingProfileIds = []; - function onMessagingProfile(messagingProfile) { - messagingProfileIds.push(messagingProfile.id); - } - function onDone() { - resolve(messagingProfileIds); - } - var options = { - host: telnyx.getConstant('DEFAULT_HOST'), - path: '/v2/messaging_profiles', - }; - nock('https://' + options.host + ':443') - .get(options.path) - .query({page: {size: 1}}) - .reply(200, {data: [{record_type: 'messaging_profile', id: 1}], meta: {total_pages: 3, page_number: 1, page_size: 1}}) - .get(options.path) - .query({page: {number: 2, size: 1}}) - .reply(200, {data: [{record_type: 'messaging_profile', id: 2}], meta: {total_pages: 3, page_number: 2, page_size: 1}}) - .get(options.path) - .query({page: {number: 3, size: 1}}) - .reply(200, {data: [{record_type: 'messaging_profile', id: 3}], meta: {total_pages: 3, page_number: 3, page_size: 1}}); - - realTelnyx.messagingProfiles.list({page: {size: 1}}) - .autoPagingEach(onMessagingProfile) - .then(onDone) - .catch(reject); - })).to.eventually.deep.equal(realMessagingProfileIds); - }); - - it('handles the end of a list properly when the last page is full', function() { - return expect(new Promise(function(resolve, reject) { - realMessagingProfileIds = [1,2,3,4]; - var messagingProfileIds = []; - var options = { - host: telnyx.getConstant('DEFAULT_HOST'), - path: '/v2/messaging_profiles', - }; - nock('https://' + options.host + ':443') - .get(options.path) - .query({page: {size: 2}}) - .reply(200, {data: [{record_type: 'messaging_profile', id: 1}, {record_type: 'messaging_profile', id: 2}], meta: {total_pages: 2, page_number: 1, page_size: 2}}) - .get(options.path) - .query({page: {number: 2, size: 2}}) - .reply(200, {data: [{record_type: 'messaging_profile', id: 3}, {record_type: 'messaging_profile', id: 4}], meta: {total_pages: 2, page_number: 2, page_size: 2}}) - - return realTelnyx.messagingProfiles.list({page: {size: 2}}) - .autoPagingEach(function(messagingProfile) { messagingProfileIds.push(messagingProfile.id); }) - .catch(reject) - .then(function() { - resolve(messagingProfileIds); - }); - })).to.eventually.deep.equal(realMessagingProfileIds); - }); - - it('handles the end of a list properly when the last page is not full', function() { - return expect(new Promise(function(resolve, reject) { - realMessagingProfileIds = [1,2,3]; - var messagingProfileIds = []; - var options = { - host: telnyx.getConstant('DEFAULT_HOST'), - path: '/v2/messaging_profiles', - }; - nock('https://' + options.host + ':443') - .get(options.path) - .query({page: {size: 2}}) - .reply(200, {data: [{record_type: 'messaging_profile', id: 1}, {record_type: 'messaging_profile', id: 2}], meta: {total_pages: 2, page_number: 1, page_size: 2}}) - .get(options.path) - .query({page: {number: 2, size: 2}}) - .reply(200, {data: [{record_type: 'messaging_profile', id: 3}], meta: {total_pages: 2, page_number: 2, page_size: 2}}) - return realTelnyx.messagingProfiles.list({page: {size: 2}}) - .autoPagingEach(function(messagingProfile) { messagingProfileIds.push(messagingProfile.id); }) - .catch(reject) - .then(function() { - resolve(messagingProfileIds); - }); - })).to.eventually.deep.equal(realMessagingProfileIds); - }); - - it('handles a list which is shorter than the page size properly', function() { - return expect(new Promise(function(resolve, reject) { - realMessagingProfileIds = [1,2]; - var messagingProfileIds = []; - var options = { - host: telnyx.getConstant('DEFAULT_HOST'), - path: '/v2/messaging_profiles', - }; - nock('https://' + options.host + ':443') - .get(options.path) - .query({page: {size: TOTAL_OBJECTS + 2}}) - .reply(200, {data: [{record_type: 'messaging_profile', id: 1}, {record_type: 'messaging_profile', id: 2}], meta: {total_pages: 1, page_number: 1, page_size: TOTAL_OBJECTS + 2}}) - - return realTelnyx.messagingProfiles.list({page: {size: TOTAL_OBJECTS + 2}}) - .autoPagingEach(function(messagingProfile) { messagingProfileIds.push(messagingProfile.id); }) - .catch(reject) - .then(function() { - resolve(messagingProfileIds); - }); - })).to.eventually.deep.equal(realMessagingProfileIds); - }); - - it('handles errors after the first page correctly (callback)', function() { - return expect(new Promise(function(resolve, reject) { - var i = 0; - function onmessagingProfile() { - i += 1; - if (i > 2) { - throw Error('Simulated error'); - } - } - - realMessagingProfileIds = [1,2,3]; - var options = { - host: telnyx.getConstant('DEFAULT_HOST'), - path: '/v2/messaging_profiles', - }; - nock('https://' + options.host + ':443') - .get(options.path) - .query({page: {size: 2}}) - .reply(200, {data: [{record_type: 'messaging_profile', id: 1}, {record_type: 'messaging_profile', id: 2}], meta: {total_pages: 2, page_number: 1, page_size: 2}}) - .get(options.path) - .query({page: {number: 2, size: 2}}) - .reply(200, {data: [{record_type: 'messaging_profile', id: 3}], meta: {total_pages: 2, page_number: 2, page_size: 2}}) - - return realTelnyx.messagingProfiles.list({page: {size: 2}}) - .autoPagingEach(onmessagingProfile, function(err) { - if (err) { - resolve(err.message); - } else { - reject(Error('Expected an error, did not get one.')); - } - }); - })).to.eventually.deep.equal('Simulated error'); - }); - - it('handles errors after the first page correctly (promise)', function() { - return expect(new Promise(function(resolve, reject) { - var i = 0; - function onmessagingProfile() { - i += 1; - if (i > 2) { - throw Error('Simulated error'); - } - } - realMessagingProfileIds = [1,2,3]; - var options = { - host: telnyx.getConstant('DEFAULT_HOST'), - path: '/v2/messaging_profiles', - }; - nock('https://' + options.host + ':443') - .get(options.path) - .query({page: {size: 2}}) - .reply(200, {data: [{record_type: 'messaging_profile', id: 1}, {record_type: 'messaging_profile', id: 2}], meta: {total_pages: 2, page_number: 1, page_size: 2}}) - .get(options.path) - .query({page: {number: 2, size: 2}}) - .reply(200, {data: [{record_type: 'messaging_profile', id: 3}], meta: {total_pages: 2, page_number: 2, page_size: 2}}) - return realTelnyx.messagingProfiles.list({page: {size: 2}}) - .autoPagingEach(onmessagingProfile) - .then(function() { - reject(Error('Expected an error, did not get one.')); - }) - .catch(function(err) { - resolve(err.message); - }); - })).to.eventually.deep.equal('Simulated error'); - }); - }); - - describe('async iterators', function() { - - if (testUtils.envSupportsForAwait()) { - // `for await` throws a syntax error everywhere but node 10, - // so we must conditionally require it. - var forAwaitUntil = require('../testUtils/forAwait.node10').forAwaitUntil; - - it('works with `for await` when that feature exists (user break)', function() { - return expect(new Promise(function(resolve, reject) { - realMessagingProfileIds = [1,2,3]; - var options = { - host: telnyx.getConstant('DEFAULT_HOST'), - path: '/v2/messaging_profiles', - }; - nock('https://' + options.host + ':443') - .get(options.path) - .query({page: {size: 2}}) - .reply(200, {data: [{record_type: 'messaging_profile', id: 1}, {record_type: 'messaging_profile', id: 2}], meta: {total_pages: 2, page_number: 1, page_size: 2}}) - .get(options.path) - .query({page: {number: 2, size: 2}}) - .reply(200, {data: [{record_type: 'messaging_profile', id: 3}], meta: {total_pages: 2, page_number: 2, page_size: 2}}) - - forAwaitUntil(realTelnyx.messagingProfiles.list({page: {size: 2}}), LIMIT) - .then(function(messagingProfiles) { - resolve(messagingProfiles.map(function(messagingProfile) { return messagingProfile.id; })); - }) - .catch(reject) - })).to.eventually.deep.equal(realMessagingProfileIds.slice(0, LIMIT)); - }); - - it('works with `for await` when that feature exists (end of list)', function() { - return expect(new Promise(function(resolve, reject) { - realMessagingProfileIds = [1,2,3]; - var options = { - host: telnyx.getConstant('DEFAULT_HOST'), - path: '/v2/messaging_profiles', - }; - nock('https://' + options.host + ':443') - .get(options.path) - .query({page: {size: 2}}) - .reply(200, {data: [{record_type: 'messaging_profile', id: 1}, {record_type: 'messaging_profile', id: 2}], meta: {total_pages: 2, page_number: 1, page_size: 2}}) - .get(options.path) - .query({page: {number: 2, size: 2}}) - .reply(200, {data: [{record_type: 'messaging_profile', id: 3}], meta: {total_pages: 2, page_number: 2, page_size: 2}}) - - forAwaitUntil(realTelnyx.messagingProfiles.list({page: {size: 2}}), TOTAL_OBJECTS + 1) - .then(function(messagingProfiles) { - resolve(messagingProfiles.map(function(messagingProfile) { return messagingProfile.id; })); - }) - .catch(reject); - })).to.eventually.deep.equal(realMessagingProfileIds); - }); - } - - if (testUtils.envSupportsAwait()) { - // Similarly, `await` throws a syntax error below Node 7.6. - var awaitUntil = require('../testUtils/await.node7').awaitUntil; - - it('works with `await` and a while loop when await exists', function() { - return expect(new Promise(function(resolve, reject) { - realMessagingProfileIds = [1,2,3]; - var options = { - host: telnyx.getConstant('DEFAULT_HOST'), - path: '/v2/messaging_profiles', - }; - nock('https://' + options.host + ':443') - .get(options.path) - .query({page: {size: 2}}) - .reply(200, {data: [{record_type: 'messaging_profile', id: 1}, {record_type: 'messaging_profile', id: 2}], meta: {total_pages: 2, page_number: 1, page_size: 2}}) - .get(options.path) - .query({page: {number: 2, size: 2}}) - .reply(200, {data: [{record_type: 'messaging_profile', id: 3}], meta: {total_pages: 2, page_number: 2, page_size: 2}}) - - awaitUntil(realTelnyx.messagingProfiles.list({page: {size: 2}}), LIMIT) - .then(function(messagingProfiles) { - resolve(messagingProfiles.map(function(messagingProfile) { return messagingProfile.id; })); - }) - .catch(reject); - })).to.eventually.deep.equal(realMessagingProfileIds.slice(0, LIMIT)); - }); - } - - it('returns an empty object from .return() so that `break;` works in for-await', function() { - return expect(new Promise(function(resolve, reject) { - realMessagingProfileIds = [1,2,3]; - var options = { - host: telnyx.getConstant('DEFAULT_HOST'), - path: '/v2/messaging_profiles', - }; - nock('https://' + options.host + ':443') - .get(options.path) - .query({page: {size: 2}}) - .reply(200, {data: [{record_type: 'messaging_profile', id: 1}, {record_type: 'messaging_profile', id: 2}], meta: {total_pages: 2, page_number: 1, page_size: 2}}) - .get(options.path) - .query({page: {number: 2, size: 2}}) - .reply(200, {data: [{record_type: 'messaging_profile', id: 3}], meta: {total_pages: 2, page_number: 2, page_size: 2}}) - var iter = realTelnyx.messagingProfiles.list({page: {size: 2}}); - - var messagingProfileIds = []; - function handleIter(result) { - messagingProfileIds.push(result.value.id); - expect(iter.return()).to.deep.equal({}); - } - - iter.next().then(handleIter).then(function() { - resolve(messagingProfileIds); - }).catch(reject); - })).to.eventually.deep.equal(realMessagingProfileIds.slice(0, 1)); - }); - - it('works when you call it sequentially', function() { - return expect(new Promise(function(resolve, reject) { - realMessagingProfileIds = [1,2,3]; - var options = { - host: telnyx.getConstant('DEFAULT_HOST'), - path: '/v2/messaging_profiles', - }; - nock('https://' + options.host + ':443') - .get(options.path) - .query({page: {size: 2}}) - .reply(200, {data: [{record_type: 'messaging_profile', id: 1}, {record_type: 'messaging_profile', id: 2}], meta: {total_pages: 2, page_number: 1, page_size: 2}}) - .get(options.path) - .query({page: {number: 2, size: 2}}) - .reply(200, {data: [{record_type: 'messaging_profile', id: 3}], meta: {total_pages: 2, page_number: 2, page_size: 2}}) - - var iter = realTelnyx.messagingProfiles.list({page: {size: 2}}); - - var messagingProfileIds = []; - function handleIter(result) { - messagingProfileIds.push(result.value.id); - if (messagingProfileIds.length < 3) { - return iter.next().then(handleIter); - } - } - iter.next().then(handleIter).then(function() { - resolve(messagingProfileIds); - }).catch(reject); - })).to.eventually.deep.equal(realMessagingProfileIds.slice(0, LIMIT)); - }); - - it('gives you the same result each time when you call it multiple times in parallel', function() { - return expect(new Promise(function(resolve, reject) { - realMessagingProfileIds = [1,2,3,4]; - var options = { - host: telnyx.getConstant('DEFAULT_HOST'), - path: '/v2/messaging_profiles', - }; - nock('https://' + options.host + ':443') - .get(options.path) - .query({page: {size: 3}}) - .reply(200, {data: [{record_type: 'messaging_profile', id: 1}, {record_type: 'messaging_profile', id: 2}, {record_type: 'messaging_profile', id: 3}], meta: {total_pages: 3, page_number: 1, page_size: 3}}) - .get(options.path) - .query({page: {number: 2, size: 3}}) - .reply(200, {data: [{record_type: 'messaging_profile', id: 4}, {record_type: 'messaging_profile', id: 5}, {record_type: 'messaging_profile', id: 6}], meta: {total_pages: 3, page_number: 2, page_size: 3}}) - .get(options.path) - .query({page: {number: 3, size: 3}}) - .reply(200, {data: [{record_type: 'messaging_profile', id: 7}, {record_type: 'messaging_profile', id: 8}, {record_type: 'messaging_profile', id: 9}], meta: {total_pages: 3, page_number: 3, page_size: 3}}) - - var iter = realTelnyx.messagingProfiles.list({page: {size: 3}}); - - var messagingProfileIds = [] - function handleIter(result) { - messagingProfileIds.push(result.value.id); - } - - Promise.all([ - iter.next().then(handleIter), - iter.next().then(handleIter).then(function() { - return Promise.all([ - iter.next().then(handleIter), - iter.next().then(handleIter), - ]) - }).then(function() { - return Promise.all([ - iter.next().then(handleIter), - iter.next().then(handleIter), - ]) - }).then(function() { - return Promise.all([ - iter.next().then(handleIter), - iter.next().then(handleIter), - ]) - }) - ]).then(function() { - resolve(messagingProfileIds); - }).catch(reject); - })).to.eventually.deep.equal(realMessagingProfileIds.reduce(function(acc, x) { - acc.push(x); - acc.push(x); - return acc; - }, [])); - }); - }); - - describe('autoPagingToArray', function() { - it('can go to the end', function() { - return expect(new Promise(function(resolve, reject) { - realMessagingProfileIds = [1,2,3]; - var options = { - host: telnyx.getConstant('DEFAULT_HOST'), - path: '/v2/messaging_profiles', - }; - nock('https://' + options.host + ':443') - .get(options.path) - .query({page: {size: 2}}) - .reply(200, {data: [{record_type: 'messaging_profile', id: 1}, {record_type: 'messaging_profile', id: 2}], meta: {total_pages: 2, page_number: 1, page_size: 2}}) - .get(options.path) - .query({page: {number: 2, size: 2}}) - .reply(200, {data: [{record_type: 'messaging_profile', id: 3}], meta: {total_pages: 2, page_number: 2, page_size: 2}}) - - realTelnyx.messagingProfiles.list({page: {size: 2}}) - .autoPagingToArray({limit: LIMIT}) - .then(function(messagingProfiles) { - return messagingProfiles.map(function(messagingProfile) { return messagingProfile.id; }); - }) - .then(resolve) - .catch(reject); - })).to.eventually.deep.equal(realMessagingProfileIds); - }); - - it('returns a promise of an array', function() { - return expect(new Promise(function(resolve, reject) { - realMessagingProfileIds = [1,2,3]; - var options = { - host: telnyx.getConstant('DEFAULT_HOST'), - path: '/v2/messaging_profiles', - }; - nock('https://' + options.host + ':443') - .get(options.path) - .query({page: {size: 2}}) - .reply(200, {data: [{record_type: 'messaging_profile', id: 1}, {record_type: 'messaging_profile', id: 2}], meta: {total_pages: 2, page_number: 1, page_size: 2}}) - .get(options.path) - .query({page: {number: 2, size: 2}}) - .reply(200, {data: [{record_type: 'messaging_profile', id: 3}], meta: {total_pages: 2, page_number: 2, page_size: 2}}) - - realTelnyx.messagingProfiles.list({page: {size: 2}}) - .autoPagingToArray({limit: LIMIT}) - .then(function(messagingProfiles) { - return messagingProfiles.map(function(messagingProfile) { return messagingProfile.id; }); - }) - .then(resolve) - .catch(reject); - })).to.eventually.deep.equal(realMessagingProfileIds.slice(0, LIMIT)); - }); - - it('accepts an onDone callback, passing an array', function() { - return expect(new Promise(function(resolve, reject) { - function onDone(err, messagingProfiles) { - if (err) { - reject(err); - } else { - resolve(messagingProfiles.map(function(messagingProfile) { return messagingProfile.id; })); - } - } - realMessagingProfileIds = [1,2,3]; - var options = { - host: telnyx.getConstant('DEFAULT_HOST'), - path: '/v2/messaging_profiles', - }; - nock('https://' + options.host + ':443') - .get(options.path) - .query({page: {size: 2}}) - .reply(200, {data: [{record_type: 'messaging_profile', id: 1}, {record_type: 'messaging_profile', id: 2}], meta: {total_pages: 2, page_number: 1, page_size: 2}}) - .get(options.path) - .query({page: {number: 2, size: 2}}) - .reply(200, {data: [{record_type: 'messaging_profile', id: 3}], meta: {total_pages: 2, page_number: 2, page_size: 2}}) - - realTelnyx.messagingProfiles.list({page: {size: 2}}) - .autoPagingToArray({limit: LIMIT}, onDone); - })).to.eventually.deep.equal(realMessagingProfileIds.slice(0, LIMIT)); - }); - - it('enforces a `limit` arg', function() { - return expect(new Promise(function(resolve, reject) { - realMessagingProfileIds = [1,2,3]; - var options = { - host: telnyx.getConstant('DEFAULT_HOST'), - path: '/v2/messaging_profiles', - }; - nock('https://' + options.host + ':443') - .get(options.path) - .query({page: {size: 2}}) - .reply(200, {data: [{record_type: 'messaging_profile', id: 1}, {record_type: 'messaging_profile', id: 2}], meta: {total_pages: 2, page_number: 1, page_size: 2}}) - .get(options.path) - .query({page: {number: 2, size: 2}}) - .reply(200, {data: [{record_type: 'messaging_profile', id: 3}], meta: {total_pages: 2, page_number: 2, page_size: 2}}) - - try { - realTelnyx.messagingProfiles.list({page: {size: 3}}) - .autoPagingToArray(); - reject(Error('Should have thrown.')); - } catch (err) { - resolve(err.message); - } - })).to.eventually.equal('You must pass a `limit` option to autoPagingToArray, eg; `autoPagingToArray({limit: 1000});`.'); - }); - - it('caps the `limit` arg to a reasonable ceiling', function() { - return expect(new Promise(function(resolve, reject) { - try { - realTelnyx.messagingProfiles.list({page: {size: 3}}) - .autoPagingToArray({limit: 1000000}); - reject(Error('Should have thrown.')); - } catch (err) { - resolve(err.message); - } - })).to.eventually.equal('You cannot specify a limit of more than 10,000 items to fetch in `autoPagingToArray`; use `autoPagingEach` to iterate through longer lists.'); - }); - }); - - describe('api compat edge cases', function() { - it('lets you listen to the first request as its own promise, and separately each item, but only sends one request for the first page.', function() { - return expect(new Promise(function(resolve, reject) { - realMessagingProfileIds = [1,2,3]; - var options = { - host: telnyx.getConstant('DEFAULT_HOST'), - path: '/v2/messaging_profiles', - }; - nock('https://' + options.host + ':443') - .get(options.path) - .query({page: {size: 2}}) - .reply(200, {data: [{record_type: 'messaging_profile', id: 1}, {record_type: 'messaging_profile', id: 2}], meta: {total_pages: 2, page_number: 1, page_size: 2}}) - .get(options.path) - .query({page: {number: 2, size: 2}}) - .reply(200, {data: [{record_type: 'messaging_profile', id: 3}], meta: {total_pages: 2, page_number: 2, page_size: 2}}) - // Count requests: we want one for the first page (not two), and then one for the second page. - var reqCount = 0; - function onRequest() { - reqCount += 1; - } - realTelnyx.on('request', onRequest); - - var messagingProfileIds = []; - var p = realTelnyx.messagingProfiles.list({page: {size: 2}}) - Promise.all([ - p, - p.autoPagingEach(function(messagingProfile) { messagingProfileIds.push(messagingProfile.id); }), - ]).then(function(results) { - realTelnyx.off('request', onRequest); - expect(reqCount).to.equal(2); // not 3. - - resolve({ - firstReq: results[0].data.map(function(messagingProfile) { return messagingProfile.id; }), - paginated: messagingProfileIds, - }); - }).catch(reject); - })).to.eventually.deep.equal({ - firstReq: realMessagingProfileIds.slice(0, 2), - paginated: realMessagingProfileIds, - }); - }); - }); -}); diff --git a/test/mocha.opts b/test/mocha.opts deleted file mode 100644 index 6ea60f6..0000000 --- a/test/mocha.opts +++ /dev/null @@ -1,2 +0,0 @@ ---bail ---recursive diff --git a/test/resources/AccessIpAddress.spec.js b/test/resources/AccessIpAddress.spec.js deleted file mode 100644 index 0c0b619..0000000 --- a/test/resources/AccessIpAddress.spec.js +++ /dev/null @@ -1,99 +0,0 @@ -'use strict'; - -var utils = require('../../testUtils'); -var telnyx = utils.getTelnyxMock(); -var expect = require('chai').expect; - -var TEST_AUTH_KEY = utils.getUserTelnyxKey(); - -describe('Access IP Addresses Resource', function () { - describe('retrieve', function () { - function responseFn(response) { - expect(response).to.have.property('created_at'); - expect(response).to.have.property('description'); - expect(response).to.have.property('id'); - expect(response).to.have.property('ip_address'); - expect(response).to.have.property('source'); - expect(response).to.have.property('status'); - expect(response).to.have.property('updated_at'); - expect(response).to.have.property('user_id'); - } - - it('Sends the correct request', function () { - return telnyx.accessIpAddress.retrieve('123').then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.accessIpAddress - .retrieve('123', TEST_AUTH_KEY) - .then(responseFn); - }); - }); - - describe('list', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - } - - it('Sends the correct request', function () { - return telnyx.accessIpAddress.list().then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.accessIpAddress.list(TEST_AUTH_KEY).then(responseFn); - }); - }); - - describe('create', function () { - function responseFn(response) { - expect(response).to.have.property('created_at'); - expect(response).to.have.property('description'); - expect(response).to.have.property('id'); - expect(response).to.have.property('ip_address'); - expect(response).to.have.property('source'); - expect(response).to.have.property('status'); - expect(response).to.have.property('updated_at'); - expect(response).to.have.property('user_id'); - } - - it('Sends the correct request', function () { - return telnyx.accessIpAddress - .create({ - ip_address: 'ip_address', - }) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.accessIpAddress - .create( - { - description: 'test description', - ip_address: '127.0.0.0', - }, - TEST_AUTH_KEY - ) - .then(responseFn); - }); - }); - describe('del', function () { - function responseFn(response) { - expect(response).to.have.property('created_at'); - expect(response).to.have.property('description'); - expect(response).to.have.property('id'); - expect(response).to.have.property('ip_address'); - expect(response).to.have.property('source'); - expect(response).to.have.property('status'); - expect(response).to.have.property('updated_at'); - expect(response).to.have.property('user_id'); - } - - it('Sends the correct request', function () { - return telnyx.accessIpAddress.del('1').then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.accessIpAddress.del('1', TEST_AUTH_KEY).then(responseFn); - }); - }); -}); diff --git a/test/resources/AccessIpRanges.spec.js b/test/resources/AccessIpRanges.spec.js deleted file mode 100644 index e81b970..0000000 --- a/test/resources/AccessIpRanges.spec.js +++ /dev/null @@ -1,118 +0,0 @@ -'use strict'; - -var utils = require('../../testUtils'); -var telnyx = utils.getTelnyxMock(); -var expect = require('chai').expect; - -var TEST_AUTH_KEY = utils.getUserTelnyxKey(); - -describe('Access IP Ranges Resource', function () { - describe('list', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - for (let index = 0; index < response.data.length; index++) { - const element = response.data[index]; - expect(element).to.have.property('cidr_block'); - expect(element).to.have.property('created_at'); - expect(element).to.have.property('description'); - expect(element).to.have.property('id'); - expect(element).to.have.property('status'); - expect(element).to.have.property('updated_at'); - expect(element).to.have.property('user_id'); - } - } - - it('Sends the correct request', function () { - return telnyx.accessIpRanges - .list({ - filter: { - cidr_block: 'string', - status: 'pending', - created_at: { - gt: '2019-08-24T14:15:22Z', - lt: '2019-08-24T14:15:22Z', - }, - }, - page: { - number: '1', - size: '20', - }, - }) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.accessIpRanges - .list( - { - filter: { - cidr_block: 'string', - status: 'pending', - created_at: { - gt: '2019-08-24T14:15:22Z', - lt: '2019-08-24T14:15:22Z', - }, - }, - page: { - number: '1', - size: '20', - }, - }, - TEST_AUTH_KEY - ) - .then(responseFn); - }); - }); - - describe('create', function () { - function responseFn(response) { - expect(response).to.have.property('cidr_block'); - expect(response).to.have.property('created_at'); - expect(response).to.have.property('description'); - expect(response).to.have.property('id'); - expect(response).to.have.property('status'); - expect(response).to.have.property('updated_at'); - expect(response).to.have.property('user_id'); - } - - it('Sends the correct request', function () { - return telnyx.accessIpRanges - .create({ - cidr_block: 'string', - }) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.accessIpRanges - .create( - { - cidr_block: 'string', - description: 'string', - }, - TEST_AUTH_KEY - ) - .then(responseFn); - }); - }); - - describe('del', function () { - function responseFn(response) { - expect(response).to.have.property('created_at'); - expect(response).to.have.property('cidr_block'); - expect(response).to.have.property('description'); - expect(response).to.have.property('id'); - expect(response).to.have.property('status'); - expect(response).to.have.property('updated_at'); - expect(response).to.have.property('user_id'); - } - - it('Sends the correct request', function () { - return telnyx.accessIpRanges.del('1').then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.accessIpRanges.del('1', TEST_AUTH_KEY).then(responseFn); - }); - }); -}); diff --git a/test/resources/ActionsSimCards.spec.js b/test/resources/ActionsSimCards.spec.js deleted file mode 100644 index 663738f..0000000 --- a/test/resources/ActionsSimCards.spec.js +++ /dev/null @@ -1,75 +0,0 @@ -'use strict'; - -var utils = require('../../testUtils'); -var telnyx = utils.getTelnyxMock(); -var expect = require('chai').expect; - -var TEST_AUTH_KEY = utils.getUserTelnyxKey(); - -describe.skip('SimCards Actions Resource', function () { - const registerData = { - registration_codes: ['2578318790'], - sim_card_group_id: '6a09cdc3-8948-47f0-aa62-74ac943d6c58', - }; - - const bulkData = { - mobile_operator_networks_preferences: [ - { - mobile_operator_network_id: '6a09cdc3-8948-47f0-aa62-74ac943d6c58', - priority: 0, - }, - ], - sim_card_ids: [ - '6a09cdc3-8948-47f0-aa62-74ac943d6c58', - '6b14e151-8493-4fa1-8664-1cc4e6d14158', - ], - }; - - function responseFnRegister(response) { - expect(response.data[0]).to.include({ - record_type: 'sim_card', - }); - expect(response.data[0]).to.have.property('id'); - expect(response.data[0]).to.have.property('status'); - expect(response.data[0]).to.have.property('iccid'); - expect(response.data[0]).to.have.property('sim_card_group_id'); - } - - function responseFnBulk(response) { - expect(response.data[0]).to.include({ - record_type: 'sim_card_network_preferences', - }); - expect(response.data[0]).to.have.property( - 'mobile_operator_networks_preferences' - ); - expect(response.data[0]).to.have.property('sim_card_id'); - } - - describe('register', function () { - it('Sends the correct request', function () { - return telnyx.actions.simCards - .register(registerData) - .then(responseFnRegister); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.actions.simCards - .register(registerData, TEST_AUTH_KEY) - .then(responseFnRegister); - }); - }); - - describe('bulkNetworkPreferences', function () { - it('Sends the correct request', function () { - return telnyx.actions.simCards - .bulkNetworkPreferences(bulkData) - .then(responseFnBulk); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.actions.simCards - .bulkNetworkPreferences(bulkData, TEST_AUTH_KEY) - .then(responseFnBulk); - }); - }); -}); diff --git a/test/resources/ActivateDeactivateBulkCredentials.spec.js b/test/resources/ActivateDeactivateBulkCredentials.spec.js deleted file mode 100644 index d8e795a..0000000 --- a/test/resources/ActivateDeactivateBulkCredentials.spec.js +++ /dev/null @@ -1,41 +0,0 @@ -'use strict'; - -var utils = require('../../testUtils'); -var telnyx = utils.getTelnyxMock(); -var expect = require('chai').expect; - -var TEST_AUTH_KEY = utils.getUserTelnyxKey(); - -describe('Actions', function () { - describe('create', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - } - - it('Sends the correct request', function () { - telnyx.activateDeactivateBulkCredentials - - .create('activate', { - filter: { - tag: 'string', - }, - }) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - telnyx.activateDeactivateBulkCredentials - - .create( - 'activate', - { - filter: { - tag: 'string', - }, - }, - TEST_AUTH_KEY - ) - .then(responseFn); - }); - }); -}); diff --git a/test/resources/Addresses.spec.js b/test/resources/Addresses.spec.js deleted file mode 100644 index 60d9b3d..0000000 --- a/test/resources/Addresses.spec.js +++ /dev/null @@ -1,162 +0,0 @@ -'use strict'; - -var utils = require('../../testUtils'); -var telnyx = utils.getTelnyxMock(); -var expect = require('chai').expect; - -var TEST_AUTH_KEY = utils.getUserTelnyxKey(); - -var addressData = { - address_book: true, - administrative_area: 'IL', - borough: 'Guadalajara', - neighborhood: 'Ciudad de los deportes', - business_name: 'Kon', - country_code: 'us', - extended_address: 'Suite 123', - first_name: 'Alfred', - last_name: 'Foster', - locality: 'Chicago', - postal_code: '2904', - street_address: '311 W Superior Street', -}; - -describe('Address', function () { - describe('list', function () { - function responseFn(response) { - expect(response).to.be.an('array'); - for (let index = 0; index < response.length; index++) { - const row = response[index]; - expect(row).to.have.property('first_name'); - expect(row).to.have.property('last_name'); - expect(row).to.have.property('phone_number'); - expect(row).to.have.property('business_name'); - expect(row).to.have.property('street_address'); - expect(row).to.have.property('extended_address'); - expect(row).to.have.property('locality'); - expect(row).to.have.property('administrative_area'); - expect(row).to.have.property('postal_code'); - expect(row).to.have.property('country_code'); - expect(row).to.have.property('address_book'); - } - } - - it('Sends the correct request', function () { - return telnyx.addresses.list().then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.addresses - .list( - { - page: 1, - }, - TEST_AUTH_KEY - ) - .then(responseFn); - }); - }); - - describe('create', function () { - function responseFn(response) { - expect(response).to.have.property('id'); - expect(response).to.have.property('first_name'); - expect(response).to.have.property('last_name'); - expect(response).to.have.property('business_name'); - expect(response).to.have.property('street_address'); - expect(response).to.have.property('extended_address'); - expect(response).to.have.property('locality'); - expect(response).to.have.property('administrative_area'); - expect(response).to.have.property('postal_code'); - expect(response).to.have.property('country_code'); - expect(response).to.have.property('address_book'); - } - - it('Sends the correct request', function () { - return telnyx.addresses.create(addressData).then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.addresses - .create(addressData, TEST_AUTH_KEY) - .then(responseFn); - }); - }); - - describe('retrieve', function () { - function responseFn(response) { - expect(response).to.have.property('id'); - expect(response).to.have.property('first_name'); - expect(response).to.have.property('last_name'); - expect(response).to.have.property('business_name'); - expect(response).to.have.property('street_address'); - expect(response).to.have.property('extended_address'); - expect(response).to.have.property('locality'); - expect(response).to.have.property('administrative_area'); - expect(response).to.have.property('postal_code'); - expect(response).to.have.property('country_code'); - expect(response).to.have.property('address_book'); - } - - it('Sends the correct request', function () { - return telnyx.addresses.retrieve('1').then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.addresses.retrieve('1', TEST_AUTH_KEY).then(responseFn); - }); - }); - - describe('del', function () { - function responseFn(response) { - expect(response).to.have.property('id'); - expect(response).to.have.property('first_name'); - expect(response).to.have.property('last_name'); - expect(response).to.have.property('business_name'); - expect(response).to.have.property('street_address'); - expect(response).to.have.property('extended_address'); - expect(response).to.have.property('locality'); - expect(response).to.have.property('administrative_area'); - expect(response).to.have.property('postal_code'); - expect(response).to.have.property('country_code'); - expect(response).to.have.property('address_book'); - } - - it('Sends the correct request', function () { - return telnyx.addresses.del('1').then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.addresses.del('1', TEST_AUTH_KEY).then(responseFn); - }); - }); - - describe('Nested', function () { - function responseFn(response) { - if (response.data) { - expect(response.data).to.have.property('id'); - expect(response.data).to.have.property('street_address'); - expect(response.data).to.have.property('postal_code'); - expect(response.data).to.have.property('first_name'); - expect(response.data).to.have.property('last_name'); - expect(response.data).to.have.property('locality'); - expect(response.data).to.include({record_type: 'address'}); - } - } - - describe('del', function () { - it('Sends the correct request', function () { - return telnyx.addresses.create(addressData).then(function (response) { - const mp = response.data; - return mp.del().then(responseFn); - }); - }); - it('Sends the correct request [with specified auth]', function () { - return telnyx.addresses.retrieve('123').then(function (response) { - const mp = response.data; - return mp.del(TEST_AUTH_KEY).then(responseFn); - }); - }); - }); - }); -}); diff --git a/test/resources/AuthenticationProviders.spec.js b/test/resources/AuthenticationProviders.spec.js deleted file mode 100644 index ddd48fd..0000000 --- a/test/resources/AuthenticationProviders.spec.js +++ /dev/null @@ -1,92 +0,0 @@ -'use strict'; - -var utils = require('../../testUtils'); -var telnyx = utils.getTelnyxMock(); -var expect = require('chai').expect; - -var TEST_AUTH_KEY = utils.getUserTelnyxKey(); - -describe('AuthenticationProviders Resource', function () { - function responseFn(response) { - expect(response.data).to.have.property('id'); - expect(response.data).to.have.property('active'); - expect(response.data).to.have.property('name'); - expect(response.data).to.have.property('short_name'); - expect(response.data).to.have.property('settings'); - expect(response.data).to.include({record_type: 'authentication_provider'}); - } - - describe('list', function () { - function listResponseFn(response) { - return responseFn({data: response.data[0]}); - } - - it('Sends the correct request', function () { - return telnyx.authenticationProviders.list().then(listResponseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.authenticationProviders - .list(TEST_AUTH_KEY) - .then(listResponseFn); - }); - }); - - describe('create', function () { - it('Sends the correct request', function () { - return telnyx.authenticationProviders - .create({ - name: 'Okta', - short_name: 'myorg', - settings: { - assertion_consumer_service_url: - 'https://api.telnyx.com/sso/saml/auth/myorg', - idp_cert_fingerprint: - '13:38:C7:BB:C9:FF:4A:70:38:3A:E3:D9:5C:CD:DB:2E:50:1E:80:A7', - idp_cert_fingerprint_algorithm: 'sha256', - idp_entity_id: 'https://myorg.myidp.com/saml/metadata', - idp_sso_target_url: - 'https://myorg.myidp.com/trust/saml2/http-post/sso', - name_identifier_format: 'urn:oasis:names:tc:SAML:1.1:nameid-format', - service_provider_entity_id: - 'https://api.telnyx.com/sso/saml/metadata/myorg', - }, - }) - .then(responseFn); - }); - }); - - describe('retrieve', function () { - it('Sends the correct request', function () { - return telnyx.authenticationProviders.retrieve('123').then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.authenticationProviders - .retrieve('123', TEST_AUTH_KEY) - .then(responseFn); - }); - }); - - describe('update', function () { - it('Sends the correct request', function () { - return telnyx.authenticationProviders - .update('123', { - short_name: 'shorty', - }) - .then(responseFn); - }); - }); - - describe('del', function () { - it('Sends the correct request', function () { - return telnyx.authenticationProviders.del('123').then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.authenticationProviders - .del('123', TEST_AUTH_KEY) - .then(responseFn); - }); - }); -}); diff --git a/test/resources/AvailablePhoneNumbers.spec.js b/test/resources/AvailablePhoneNumbers.spec.js deleted file mode 100644 index 4f792a8..0000000 --- a/test/resources/AvailablePhoneNumbers.spec.js +++ /dev/null @@ -1,19 +0,0 @@ -'use strict'; - -var telnyx = require('../../testUtils').getTelnyxMock(); -var expect = require('chai').expect; - -describe('AvailablePhoneNumbers Resource', function () { - describe('list', function () { - it('Sends the correct request', function () { - return telnyx.availablePhoneNumbers.list().then(function (response) { - expect(response.data[0]).to.have.property('phone_number'); - expect(response.data[0]).to.have.property('cost_information'); - expect(response.data[0]).to.have.property('region_information'); - expect(response.data[0]).to.include({ - record_type: 'available_phone_number', - }); - }); - }); - }); -}); diff --git a/test/resources/Balance.spec.js b/test/resources/Balance.spec.js deleted file mode 100644 index 9692589..0000000 --- a/test/resources/Balance.spec.js +++ /dev/null @@ -1,18 +0,0 @@ -'use strict'; - -var telnyx = require('../../testUtils').getTelnyxMock(); -var expect = require('chai').expect; - -describe('Balance Resource', function () { - describe('retrieve', function () { - it('Sends the correct request', function () { - return telnyx.balance.retrieve().then(function (response) { - expect(response.data).to.include({record_type: 'balance'}); - expect(response.data).to.have.property('balance'); - expect(response.data).to.have.property('available_credit'); - expect(response.data).to.have.property('currency'); - expect(response.data).to.have.property('credit_limit'); - }); - }); - }); -}); diff --git a/test/resources/BillingGroups.spec.js b/test/resources/BillingGroups.spec.js deleted file mode 100644 index 8e78eb0..0000000 --- a/test/resources/BillingGroups.spec.js +++ /dev/null @@ -1,134 +0,0 @@ -'use strict'; - -var utils = require('../../testUtils'); -var telnyx = utils.getTelnyxMock(); -var expect = require('chai').expect; - -var TEST_AUTH_KEY = utils.getUserTelnyxKey(); -var TEST_UUID = '123e4567-e89b-12d3-a456-426614174000'; - -describe('Billing Groups', function () { - describe('list', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - expect(response.data[0]).to.have.property('created_at'); - expect(response.data[0]).to.have.property('deleted_at'); - expect(response.data[0]).to.have.property('id'); - expect(response.data[0]).to.have.property('name'); - expect(response.data[0]).to.have.property('organization_id'); - expect(response.data[0]).to.have.property('record_type'); - expect(response.data[0]).to.have.property('updated_at'); - expect(response).to.have.property('meta'); - expect(response.meta).to.have.property('page_number'); - expect(response.meta).to.have.property('page_size'); - expect(response.meta).to.have.property('total_pages'); - expect(response.meta).to.have.property('total_results'); - } - - it('Sends the correct request', function () { - return telnyx.billingGroups - .list({ - page: { - number: 1, - size: 20, - }, - }) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.billingGroups - .list( - { - page: { - number: 1, - size: 20, - }, - }, - TEST_AUTH_KEY - ) - .then(responseFn); - }); - }); - - describe('create', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - } - - it('Sends the correct request', function () { - return telnyx.billingGroups - .create({ - name: 'name', - }) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.billingGroups - .create( - { - name: 'name', - }, - TEST_AUTH_KEY - ) - .then(responseFn); - }); - }); - - describe('retrieve', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - } - - it('Sends the correct request', function () { - return telnyx.billingGroups.retrieve(TEST_UUID).then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.billingGroups - .retrieve(TEST_UUID, TEST_AUTH_KEY) - .then(responseFn); - }); - }); - describe('del', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - } - - it('Sends the correct request', function () { - return telnyx.billingGroups.del(TEST_UUID).then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.billingGroups - .del(TEST_UUID, TEST_AUTH_KEY) - .then(responseFn); - }); - }); - describe('update', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - } - - it('Sends the correct request', function () { - return telnyx.billingGroups - .update(TEST_UUID, { - name: 'string', - }) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.billingGroups - .update( - TEST_UUID, - { - name: 'string', - }, - TEST_AUTH_KEY - ) - .then(responseFn); - }); - }); -}); diff --git a/test/resources/BulkCreation.spec.js b/test/resources/BulkCreation.spec.js deleted file mode 100644 index 1b3b4c2..0000000 --- a/test/resources/BulkCreation.spec.js +++ /dev/null @@ -1,158 +0,0 @@ -'use strict'; - -var utils = require('../../testUtils'); -var telnyx = utils.getTelnyxMock(); -var expect = require('chai').expect; -var TEST_AUTH_KEY = utils.getUserTelnyxKey(); - -describe('Bulk Creation', function () { - describe('list', function () { - function responseFn(response) { - expect(response).to.have.property('meta'); - expect(response.meta).to.have.property('page'); - expect(response.meta).to.have.property('recordsPerPage'); - expect(response.meta).to.have.property('totalPages'); - expect(response.meta).to.have.property('totalRecords'); - expect(response).to.have.property('records'); - expect(response.records[0]).to.have.property('status'); - expect(response.records[0]).to.have.property('taskId'); - } - - it('Sends the correct request', function () { - return telnyx.bulkCreation - .list({ - recordsPerPage: 20, - page: 1, - }) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.bulkCreation - .list( - { - recordsPerPage: 20, - page: 1, - }, - TEST_AUTH_KEY - ) - .then(responseFn); - }); - }); - - describe('create', function () { - function responseFn(response) { - // eslint-disable-next-line no-warning-comments - // todo point 29 - // expect(response).to.have.property('brandCount'); - // expect(response).to.have.property('taskId'); - } - - it('Sends the correct request', function () { - return telnyx.bulkCreation - .create({ - brands: [ - { - city: 'New York', - companyName: 'ABC Inc.', - country: 'US', - description: - 'This campaign belongs to Brand X and will be used for marketing.', - displayName: 'ABC Mobile', - email: 'string', - entityType: 'SMALL_BUSINESS', - firstName: 'John', - lastName: 'Smith', - phone: '+12024567890', - phoneNumbers: ['+12193849584', '+13129872456'], - postalCode: '10001', - referenceId: '4q90017a-2f50-4c90-c9e6-5f67304cbde9', - sampleMessages: ['Sample message 1', 'Sample message 2'], - state: 'NY', - street: '123', - subUsecases: ['MARKETING', '2FA'], - vertical: 'TECHNOLOGY', - website: 'http://www.abcmobile.com', - }, - ], - }) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.bulkCreation - .create( - { - brands: [ - { - city: 'New York', - companyName: 'ABC Inc.', - country: 'US', - description: - 'This campaign belongs to Brand X and will be used for marketing.', - displayName: 'ABC Mobile', - email: 'string', - entityType: 'SMALL_BUSINESS', - firstName: 'John', - lastName: 'Smith', - phone: '+12024567890', - phoneNumbers: ['+12193849584', '+13129872456'], - postalCode: '10001', - referenceId: '4q90017a-2f50-4c90-c9e6-5f67304cbde9', - sampleMessages: ['Sample message 1', 'Sample message 2'], - state: 'NY', - street: '123', - subUsecases: ['MARKETING', '2FA'], - vertical: 'TECHNOLOGY', - website: 'http://www.abcmobile.com', - }, - ], - }, - TEST_AUTH_KEY - ) - .then(responseFn); - }); - }); - - describe('retrieveTaskStatus', function () { - function responseFn(response) { - expect(response).to.have.property('status'); - expect(response).to.have.property('taskId'); - } - - it('Sends the correct request', function () { - return telnyx.bulkCreation.retrieveTaskStatus('1').then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.bulkCreation.retrieveTaskStatus('1').then(responseFn); - }); - }); - describe('retrieveDetailedTaskStatus', function () { - function responseFn(response) { - expect(response).to.have.property('meta'); - expect(response.meta).to.have.property('page'); - expect(response.meta).to.have.property('recordsPerPage'); - expect(response.meta).to.have.property('totalPages'); - expect(response.meta).to.have.property('totalRecords'); - expect(response).to.have.property('records'); - expect(response.records[0]).to.have.property('brand'); - expect(response.records[0]).to.have.property('campaign'); - expect(response.records[0]).to.have.property('phoneNumbers'); - expect(response.records[0]).to.have.property('referenceId'); - expect(response.records[0]).to.have.property('taskId'); - } - - it('Sends the correct request', function () { - return telnyx.bulkCreation - .retrieveDetailedTaskStatus('1') - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.bulkCreation - .retrieveDetailedTaskStatus('1', TEST_AUTH_KEY) - .then(responseFn); - }); - }); -}); diff --git a/test/resources/BulkTelephonyCredentials.spec.js b/test/resources/BulkTelephonyCredentials.spec.js deleted file mode 100644 index 503f89a..0000000 --- a/test/resources/BulkTelephonyCredentials.spec.js +++ /dev/null @@ -1,97 +0,0 @@ -'use strict'; - -var utils = require('../../testUtils'); -var telnyx = utils.getTelnyxMock(); -var expect = require('chai').expect; - -var TEST_AUTH_KEY = utils.getUserTelnyxKey(); - -describe('Bulk Credentials Resource', function () { - describe('create', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - expect(response.data).to.have.property('credentials'); - } - - it('Sends the correct request', function () { - return telnyx.bulkTelephonyCredentials - .create({ - connection_id: '804252963366242252', - name: 'Default Name', - tag: 'My Credentials', - }) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.bulkTelephonyCredentials - .create( - { - connection_id: '804252963366242252', - name: 'Default Name', - tag: 'My Credentials', - }, - TEST_AUTH_KEY - ) - .then(responseFn); - }); - }); - describe('delete', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - } - - it('Sends the correct request', function () { - return telnyx.bulkTelephonyCredentials - .deleteCredentials({ - filter: { - tag: 'data', - }, - }) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.bulkTelephonyCredentials - .deleteCredentials( - { - filter: { - tag: 'data', - }, - }, - TEST_AUTH_KEY - ) - .then(responseFn); - }); - }); - describe('update', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - } - - it('Sends the correct request', function () { - return telnyx.bulkTelephonyCredentials - .updateCredentials({ - filter: { - tag: 'data', - }, - }) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.bulkTelephonyCredentials - .updateCredentials( - { - connection_id: '804252963366242252', - tag: 'My Credentials', - filter: { - tag: 'data', - }, - }, - TEST_AUTH_KEY - ) - .then(responseFn); - }); - }); -}); diff --git a/test/resources/CallControlApplications.spec.js b/test/resources/CallControlApplications.spec.js deleted file mode 100644 index 3c1fc7f..0000000 --- a/test/resources/CallControlApplications.spec.js +++ /dev/null @@ -1,119 +0,0 @@ -'use strict'; - - -var utils = require('../../testUtils'); -var telnyx = utils.getTelnyxMock(); -var expect = require('chai').expect; - -var TEST_AUTH_KEY = utils.getUserTelnyxKey(); - -describe('Call Control List list', function() { - describe('retrieve', function() { - function responseFn(response) { - expect(response.data).to.have.property('id'); - } - - it('Sends the correct request', function() { - return telnyx.callControlApplications.retrieve('123').then((response) => { - responseFn(response) - }); - }) - - it('Sends the correct request [with specified auth]', function() { - return telnyx.callControlApplications.retrieve('123', TEST_AUTH_KEY) - .then(responseFn); - }); - }); - - describe('create', function() { - function responseFn(response) { - expect(response.data).to.have.property('id'); - expect(response.data).to.include({record_type: 'call_control_application'}); - } - - it('Sends the correct request', function() { - return telnyx.callControlApplications.create({'application_name': 'test', 'webhook_event_url': 'https://fakeurl.org/123123'}) - .then(responseFn); - }) - - it('Sends the correct request [with specified auth]', function() { - return telnyx.callControlApplications.create({'application_name': 'test', 'webhook_event_url': 'https://fakeurl.org/123123'}, TEST_AUTH_KEY) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth in options]', function() { - return telnyx.callControlApplications.create({'application_name': 'test', 'webhook_event_url': 'https://fakeurl.org/123123'}, {api_key: TEST_AUTH_KEY}) - .then(responseFn); - }); - }); - - describe('list', function() { - function responseFn(response) { - expect(response.data[0]).to.have.property('id'); - expect(response.data[0]).to.include({record_type: 'call_control_application'}); - } - - it('Sends the correct request', function() { - return telnyx.callControlApplications.list() - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function() { - return telnyx.callControlApplications.list(TEST_AUTH_KEY) - .then(responseFn); - }); - }); - - describe('del', function() { - - function responseFn(response) { - if (response.data) { - expect(response.data).to.have.property('id'); - expect(response.data).to.include({record_type: 'call_control_application'}); - } - } - - it('Sends the correct request', function() { - return telnyx.callControlApplications.create({'application_name': 'test', 'webhook_event_url': 'https://fakeurl.org/123123'}) - .then(function(response) { - const callControlApplications = response.data; - return callControlApplications.del() - .then(responseFn); - }) - }); - it('Sends the correct request [with specified auth]', function() { - return telnyx.callControlApplications.retrieve('123') - .then(function(response) { - const callControlApplications = response.data; - return callControlApplications.del(TEST_AUTH_KEY) - .then(responseFn); - }) - }); - }); - - describe('update', function() { - function responseFn(response) { - if (response.data) { - expect(response.data).to.have.property('id'); - expect(response.data).to.have.property('application_name'); - } - } - - it('Sends the correct request', function() { - return telnyx.callControlApplications.create({'application_name': 'test', 'webhook_event_url': 'https://fakeurl.org/123123'}) - .then(function(response) { - const ip = response.data; - return ip.update({'application_name': 'test updated', 'webhook_event_url': 'https://fakeurl.org/123123'}) - .then(responseFn); - }) - }); - it('Sends the correct request [with specified auth]', function() { - return telnyx.callControlApplications.retrieve('123') - .then(function(response) { - const ip = response.data; - return ip.update({'application_name': 'test updated', 'webhook_event_url': 'https://fakeurl.org/123123'}, TEST_AUTH_KEY) - .then(responseFn); - }) - }); - }); -}); diff --git a/test/resources/Calls.spec.js b/test/resources/Calls.spec.js deleted file mode 100644 index b997477..0000000 --- a/test/resources/Calls.spec.js +++ /dev/null @@ -1,260 +0,0 @@ -'use strict'; - -var telnyx = require('../../testUtils').getTelnyxMock(); -var utils = require('../../lib/utils'); -var expect = require('chai').expect; - -var TEST_AUTH_KEY = - 'KEY187557EC22404DB39975C43ACE661A58_9QdDI7XD5bvyahtaWx1YQo'; - -var COMMANDS = [ - 'answer', - 'reject', - 'hangup', - 'bridge', - 'speak', - 'fork_start', - 'fork_stop', - 'gather_using_audio', - 'gather_using_speak', - 'gather_stop', - 'playback_start', - 'playback_stop', - 'record_start', - 'record_stop', - 'record_pause', - 'record_resume', - 'refer', - 'send_dtmf', - 'transfer', - 'transcription_start', - 'transcription_stop', - 'enqueue', - 'leave_queue', -]; - -describe('Calls Resource', function () { - describe('Call Information', function () { - describe('retrieve', function () { - function responseFn(response) { - expect(response.data).to.include({ - call_control_id: '891510ac-f3e4-11e8-af5b-de00688a4901', - record_type: 'call', - }); - } - - it('Sends the correct request', function () { - return telnyx.calls - .retrieve('891510ac-f3e4-11e8-af5b-de00688a4901') - .then(function (response) { - expect(response.data).to.include(responseFn); - }); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.calls - .retrieve('891510ac-f3e4-11e8-af5b-de00688a4901', TEST_AUTH_KEY) - .then(function (response) { - expect(response.data).to.include(responseFn); - }); - }); - }); - }); - - describe('Call Events', function () { - describe('list', function () { - function responseFn(response) { - expect(response.data[0]).to.have.property('call_session_id'); - expect(response.data[0]).to.have.property('call_leg_id'); - expect(response.data[0]).to.have.property('name'); - expect(response.data[0]).to.have.property('type'); - expect(response.data[0]).to.include({record_type: 'call_event'}); - } - - it('Sends the correct request', function () { - return telnyx.callEvents.list().then(responseFn); - }); - it('Sends the correct request [with specified auth]', function () { - return telnyx.callEvents.list(TEST_AUTH_KEY).then(responseFn); - }); - }); - }); - - describe('Call Commands', function () { - const callCreateData = { - connection_id: 'uuid', - to: '+18005550199', - from: '+18005550100', - command_id: '891510ac-f3e4-11e8-af5b-de00688a4901', - }; - const callCommandsData = { - bridge: { - call_control_id: '', - }, - reject: { - cause: 'USER_BUSY', - }, - speak: { - payload: 'Hello', - voice: 'female', - language: 'en-US', - }, - gather_using_audio: { - audio_url: 'http://example.com/message.wav', - }, - gather_using_speak: { - payload: 'Hello', - voice: 'male', - language: 'en-US', - }, - playback_start: { - audio_url: 'http://example.com/message.wav', - }, - record_start: { - format: 'mp3', - channels: 'single', - }, - dtmf: { - digits: '1www2WABCDw9', - }, - send_dtmf: { - digits: '1www2WABCDw9', - }, - transfer: { - to: '+13129457420', - }, - refer: { - sip_address: 'sip:username@sip.non-telnyx-address.com', - }, - enqueue: { - queue_name: 'tier_1_support', - }, - }; - - function responseFn(response) { - expect(response.data).to.include({result: 'ok'}); - } - - describe('create', function () { - function responseFn(response) { - expect(response.data).to.have.property('call_session_id'); - expect(response.data).to.have.property('call_leg_id'); - expect(response.data).to.have.property('call_control_id'); - expect(response.data).to.include({ - record_type: 'call', - is_alive: false, - }); - } - - it('Sends the correct request', function () { - return telnyx.calls.create(callCreateData).then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.calls - .create(callCreateData, TEST_AUTH_KEY) - .then(responseFn); - }); - }); - - COMMANDS.forEach(function (command) { - describe(command, function () { - const camelCaseCommand = utils.snakeToCamelCase(command); - let telnyxInstance; - - this.beforeEach(() => { - // make specs independent - telnyxInstance = require('../../testUtils').getTelnyxMock(); - }); - - it('Sends the correct request', function () { - return telnyxInstance.calls - .create(callCreateData) - .then(function (response) { - const call = response.data; - call[utils.snakeToCamelCase(command)]( - callCommandsData[command] || {} - ).then(responseFn); - - return call[command](callCommandsData[command] || {}).then( - responseFn - ); - }); - }); - it('Sends the correct request [with specified auth]', function () { - return telnyxInstance.calls - .create(callCreateData) - .then(function (response) { - const call = response.data; - call[utils.snakeToCamelCase(command)]( - callCommandsData[command] || {}, - TEST_AUTH_KEY - ).then(responseFn); - - return call[command]( - callCommandsData[command] || {}, - TEST_AUTH_KEY - ).then(responseFn); - }); - }); - - it('Sends the correct method request [with empty resource instance]', function () { - const call = new telnyxInstance.Call({ - call_control_id: '3fa85f55-5717-4562-b3fc-2c963f63vga6', - }); - - call[utils.snakeToCamelCase(command)]( - callCommandsData[command] || {} - ).then(responseFn); - - call[utils.snakeToCamelCase(command)]( - callCommandsData[command] || {}, - TEST_AUTH_KEY - ).then(responseFn); - }); - - it('Sends the correct method request [with empty resource instance and specified auth]', function () { - const call = new telnyxInstance.Call({ - call_control_id: '3fa85f55-5717-4562-b3fc-2c963f63vga6', - }); - - call[command](callCommandsData[command] || {}, TEST_AUTH_KEY).then( - responseFn - ); - - return call[command](callCommandsData[command] || {}).then( - responseFn - ); - }); - - if (camelCaseCommand !== command) { - describe(camelCaseCommand, function () { - it('Sends the correct request', function () { - return telnyxInstance.calls - .create(callCreateData) - .then(function (response) { - const call = response.data; - - return call[camelCaseCommand]( - callCommandsData[command] || {} - ).then(responseFn); - }); - }); - it('Sends the correct request [with specified auth]', function () { - return telnyxInstance.calls - .create(callCreateData) - .then(function (response) { - const call = response.data; - - return call[camelCaseCommand]( - callCommandsData[command] || {}, - TEST_AUTH_KEY - ).then(responseFn); - }); - }); - }); - } - }); - }); - }); -}); diff --git a/test/resources/Campaign.spec.js b/test/resources/Campaign.spec.js deleted file mode 100644 index 3057d2b..0000000 --- a/test/resources/Campaign.spec.js +++ /dev/null @@ -1,246 +0,0 @@ -'use strict'; - -var utils = require('../../testUtils'); -var telnyx = utils.getTelnyxMock(); -var expect = require('chai').expect; - -var TEST_AUTH_KEY = utils.getUserTelnyxKey(); - -describe('Campaign', function () { - describe('list', function () { - function responseFn(response) { - expect(response).to.have.property('page'); - expect(response).to.have.property('records'); - expect(response).to.have.property('totalRecords'); - } - - it('Sends the correct request', function () { - return telnyx.campaign.list({brandId: 'string'}).then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.campaign - .list({brandId: 'string'}, TEST_AUTH_KEY) - .then(responseFn); - }); - }); - describe('acceptShareCampaign', function () { - function responseFn(response) { - expect(response).to.have.property('detail'); - for (const detail of response.detail) { - expect(detail).to.have.property('loc'); - expect(detail).to.have.property('msg'); - expect(detail).to.have.property('type'); - } - } - - it('Sends the correct request', function () { - return telnyx.campaign - .acceptShareCampaign({campaignId: '1'}) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.campaign - .acceptShareCampaign({brandId: 'string'}, TEST_AUTH_KEY) - .then(responseFn); - }); - }); - describe('getCampaignCost', function () { - function responseFn(response) { - expect(response).to.have.property('campaignUsecase'); - expect(response).to.have.property('description'); - expect(response).to.have.property('monthlyCost'); - expect(response).to.have.property('upFrontCost'); - } - - it('Sends the correct request', function () { - return telnyx.campaign.getCampaignCost({usecase: '1'}).then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.campaign - .getCampaignCost({usecase: 'string'}, TEST_AUTH_KEY) - .then(responseFn); - }); - }); - describe('Get My Campaign', function () { - function responseFn(response) { - expect(response).to.have.property('affiliateMarketing'); - expect(response).to.have.property('ageGated'); - expect(response).to.have.property('autoRenewal'); - expect(response).to.have.property('billedDate'); - expect(response).to.have.property('brandId'); - expect(response).to.have.property('campaignId'); - expect(response).to.have.property('createDate'); - expect(response).to.have.property('description'); - expect(response).to.have.property('directLending'); - expect(response).to.have.property('embeddedLink'); - expect(response).to.have.property('embeddedPhone'); - expect(response).to.have.property('helpMessage'); - expect(response).to.have.property('messageFlow'); - expect(response).to.have.property('numberPool'); - expect(response).to.have.property('resellerId'); - expect(response).to.have.property('sample1'); - expect(response).to.have.property('sample2'); - expect(response).to.have.property('sample3'); - expect(response).to.have.property('sample4'); - expect(response).to.have.property('sample5'); - expect(response).to.have.property('status'); - expect(response).to.have.property('subUsecases'); - expect(response).to.have.property('subscriberHelp'); - expect(response).to.have.property('subscriberOptin'); - expect(response).to.have.property('subscriberOptout'); - expect(response).to.have.property('usecase'); - expect(response).to.have.property('vertical'); - } - it('Sends the correct request', function () { - return telnyx.campaign - .retrieveCampaignId({ - campaignId: 'campaignId', - }) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.campaign - .retrieveCampaignId( - { - campaignId: 'campaignId', - }, - TEST_AUTH_KEY - ) - .then(responseFn); - }); - }); - describe('Get Campaign MNO Metadata', function () { - function responseFn(response) { - expect(response.lastResponse.statusCode).to.equal(200); - } - it('Sends the correct request', function () { - return telnyx.campaign - .retrieveMnoMetadata({ - campaignId: 'campaignId', - }) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.campaign - .retrieveMnoMetadata( - { - campaignId: 'campaignId', - }, - TEST_AUTH_KEY - ) - .then(responseFn); - }); - }); - describe('Get Campaign Operation Status', function () { - function responseFn(response) { - expect(response.lastResponse.statusCode).to.equal(200); - } - it('Sends the correct request', function () { - return telnyx.campaign - .retrieveOperationStatus({ - campaignId: 'campaignId', - }) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.campaign - .retrieveOperationStatus( - { - campaignId: 'campaignId', - }, - TEST_AUTH_KEY - ) - .then(responseFn); - }); - }); - describe('retrieveOsrCampaignAttributes', function () { - function responseFn(response) { - expect(response.lastResponse.statusCode).to.equal(200); - } - it('Sends the correct request', function () { - return telnyx.campaign - .retrieveOsrCampaignAttributes({ - campaignId: 'campaignId', - }) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.campaign - .retrieveOsrCampaignAttributes( - { - campaignId: 'campaignId', - }, - TEST_AUTH_KEY - ) - .then(responseFn); - }); - }); - describe('deactivateCampaignId', function () { - function responseFn(response) { - expect(response).to.have.property('message'); - expect(response).to.have.property('record_type'); - expect(response).to.have.property('time'); - } - it('Sends the correct request', function () { - return telnyx.campaign - .deactivateCampaignId({ - campaignId: 'campaignId', - }) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.campaign - .deactivateCampaignId( - { - campaignId: 'campaignId', - }, - TEST_AUTH_KEY - ) - .then(responseFn); - }); - }); - describe('retrieveSharingStatus', function () { - function responseFn(response) { - expect(response).to.have.property('sharedByMe'); - const sharedByMe = response.sharedByMe; - expect(sharedByMe).to.have.property('downstreamCnpId'); - expect(sharedByMe).to.have.property('sharedDate'); - expect(sharedByMe).to.have.property('sharingStatus'); - expect(sharedByMe).to.have.property('statusDate'); - expect(sharedByMe).to.have.property('upstreamCnpId'); - expect(response).to.have.property('sharedWithMe'); - const sharedWithMe = response.sharedWithMe; - expect(sharedWithMe).to.have.property('downstreamCnpId'); - expect(sharedWithMe).to.have.property('sharedDate'); - expect(sharedWithMe).to.have.property('sharingStatus'); - expect(sharedWithMe).to.have.property('statusDate'); - expect(sharedWithMe).to.have.property('upstreamCnpId'); - } - it('Sends the correct request', function () { - return telnyx.campaign - .retrieveSharingStatus({ - campaignId: 'campaignId', - }) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.campaign - .retrieveSharingStatus( - { - campaignId: 'campaignId', - }, - TEST_AUTH_KEY - ) - .then(responseFn); - }); - }); -}); diff --git a/test/resources/CampaignBuilder.spec.js b/test/resources/CampaignBuilder.spec.js deleted file mode 100644 index f8e6ff5..0000000 --- a/test/resources/CampaignBuilder.spec.js +++ /dev/null @@ -1,139 +0,0 @@ -'use strict'; - -var utils = require('../../testUtils'); -var telnyx = utils.getTelnyxMock(); -var expect = require('chai').expect; - -var TEST_AUTH_KEY = utils.getUserTelnyxKey(); - -describe('Campaign Builder', function () { - describe('create', function () { - function responseFn(response) { - if (Object.keys(response).length > 0) { - expect(response).to.have.property('affiliateMarketing'); - expect(response).to.have.property('ageGated'); - expect(response).to.have.property('autoRenewal'); - expect(response).to.have.property('billedDate'); - expect(response).to.have.property('brandId'); - expect(response).to.have.property('campaignId'); - expect(response).to.have.property('createDate'); - expect(response).to.have.property('description'); - expect(response).to.have.property('directLending'); - expect(response).to.have.property('embeddedLink'); - expect(response).to.have.property('embeddedPhone'); - expect(response).to.have.property('helpMessage'); - expect(response).to.have.property('messageFlow'); - expect(response).to.have.property('numberPool'); - expect(response).to.have.property('resellerId'); - expect(response).to.have.property('sample1'); - expect(response).to.have.property('sample2'); - expect(response).to.have.property('sample3'); - expect(response).to.have.property('sample4'); - expect(response).to.have.property('sample5'); - expect(response).to.have.property('status'); - expect(response).to.have.property('subUsecases'); - expect(response).to.have.property('subscriberHelp'); - expect(response).to.have.property('subscriberOptin'); - expect(response).to.have.property('subscriberOptout'); - expect(response).to.have.property('usecase'); - expect(response).to.have.property('vertical'); - } else { - expect(response.lastResponse.statusCode).to.equal(200); - } - } - it('Sends the correct request', function () { - return telnyx.campaignBuilder - .create({ - affiliateMarketing: true, - ageGated: true, - autoRenewal: true, - brandId: 'string', - description: 'string', - directLending: true, - embeddedLink: true, - embeddedPhone: true, - helpKeywords: 'string', - helpMessage: 'string', - messageFlow: 'string', - mnoIds: [0], - numberPool: true, - optinKeywords: 'string', - optinMessage: 'string', - optoutKeywords: 'string', - optoutMessage: 'string', - referenceId: 'string', - resellerId: 'string', - sample1: 'string', - sample2: 'string', - sample3: 'string', - sample4: 'string', - sample5: 'string', - subUsecases: ['string'], - subscriberHelp: true, - subscriberOptin: true, - subscriberOptout: true, - tag: ['string'], - termsAndConditions: true, - usecase: 'MIXED', - }) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.campaignBuilder - .create( - { - affiliateMarketing: true, - ageGated: true, - autoRenewal: true, - brandId: 'string', - description: 'string', - directLending: true, - embeddedLink: true, - embeddedPhone: true, - helpKeywords: 'string', - helpMessage: 'string', - messageFlow: 'string', - mnoIds: [0], - numberPool: true, - optinKeywords: 'string', - optinMessage: 'string', - optoutKeywords: 'string', - optoutMessage: 'string', - referenceId: 'string', - resellerId: 'string', - sample1: 'string', - sample2: 'string', - sample3: 'string', - sample4: 'string', - sample5: 'string', - subUsecases: ['string'], - subscriberHelp: true, - subscriberOptin: true, - subscriberOptout: true, - tag: ['string'], - termsAndConditions: true, - usecase: 'MIXED', - }, - TEST_AUTH_KEY - ) - .then(responseFn); - }); - }); - describe('retrieveQualifyByUsecase', function () { - function responseFn(response) { - expect(response.lastResponse.statusCode).to.equal(200); - } - it('Sends the correct request', function () { - return telnyx.campaignBuilder - .retrieveQualifyByUsecase('brandId', 'usecase') - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.campaignBuilder - .retrieveQualifyByUsecase('brandId', 'usecase', TEST_AUTH_KEY) - .then(responseFn); - }); - }); -}); diff --git a/test/resources/ClientStateUpdate.spec.js b/test/resources/ClientStateUpdate.spec.js deleted file mode 100644 index 5a89031..0000000 --- a/test/resources/ClientStateUpdate.spec.js +++ /dev/null @@ -1,37 +0,0 @@ -'use strict'; - -var utils = require('../../testUtils'); -var telnyx = utils.getTelnyxMock(); -var expect = require('chai').expect; - -var TEST_AUTH_KEY = utils.getUserTelnyxKey(); - -describe('Client State Update', function () { - describe('update', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - expect(response.data).to.have.property('result'); - } - - it('Sends the correct request', function () { - return telnyx.clientStateUpdate - .update({ - call_control_id: '35146afd-df93-4963-b1e9-1a085e2ae874', - client_state: 'aGF2ZSBhIG5pY2UgZGF5ID1d', - }) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.clientStateUpdate - .update( - { - call_control_id: '35146afd-df93-4963-b1e9-1a085e2ae874', - client_state: 'aGF2ZSBhIG5pY2UgZGF5ID1d', - }, - TEST_AUTH_KEY - ) - .then(responseFn); - }); - }); -}); diff --git a/test/resources/Conferences.spec.js b/test/resources/Conferences.spec.js deleted file mode 100644 index b952210..0000000 --- a/test/resources/Conferences.spec.js +++ /dev/null @@ -1,200 +0,0 @@ -'use strict'; - -var utils = require('../../testUtils'); -var telnyx = utils.getTelnyxMock(); -var expect = require('chai').expect; - -var TEST_AUTH_KEY = utils.getUserTelnyxKey(); - -var CONFERENCES = [ - 'join', - 'mute', - 'unmute', - 'hold', - 'unhold', - 'speak', - 'play', - 'stop', - 'record_start', - 'record_stop', - 'update', - 'leave', - 'dial_participant', -]; - -var CONFERENCE_ID = '41b9acd4-f4da-4ff5-a85c-e07e90b53f46'; - -describe('Calls Resource', function () { - describe('Call Conferences', function () { - const conferenceCreateData = { - name: 'Business', - call_control_id: '891510ac-f3e4-11e8-af5b-de00688a4901', - }; - const callConferencesData = { - join: { - call_control_id: '891510ac-f3e4-11e8-af5b-de00688a4901', - }, - unhold: { - call_control_ids: ['891510ac-f3e4-11e8-af5b-de00688a4901'], - }, - speak: { - language: 'en-US', - payload: 'Say this to participants', - voice: 'female', - }, - play: { - media_name: 'my_media_uploaded_to_media_storage_api', - }, - record_start: { - channels: 'single', - format: 'wav', - }, - update: { - call_control_id: '891510ac-f3e4-11e8-af5b-de00688a4901', - supervisor_role: 'whisper', - }, - leave: { - call_control_id: '891510ac-f3e4-11e8-af5b-de00688a4901', - }, - dial_participant: { - call_control_id: '891510ac-f3e4-11e8-af5b-de00688a4901', - from: '+15555555555', - to: '+16666666666', - }, - }; - - function responseFn(response) { - expect(response.data).to.include({result: 'ok'}); - } - - describe('list', function () { - function responseFn(response) { - expect(response.data[0]).to.have.property('id'); - expect(response.data[0]).to.have.property('name'); - expect(response.data[0]).to.include({record_type: 'conference'}); - } - - it('Sends the correct request', function () { - return telnyx.conferences.list().then(responseFn); - }); - it('Sends the correct request [with specified auth]', function () { - return telnyx.conferences.list(TEST_AUTH_KEY).then(responseFn); - }); - }); - - describe('retrieve', function () { - function responseFn(response) { - expect(response.data).to.have.property('id'); - expect(response.data).to.have.property('name'); - expect(response.data).to.include({record_type: 'conference'}); - } - - it('Sends the correct request', function () { - return telnyx.conferences.retrieve(CONFERENCE_ID).then(responseFn); - }); - it('Sends the correct request [with specified auth]', function () { - return telnyx.conferences - .retrieve(CONFERENCE_ID, TEST_AUTH_KEY) - .then(responseFn); - }); - }); - - describe('create', function () { - function responseFn(response) { - expect(response.data).to.have.property('id'); - expect(response.data).to.have.property('name'); - expect(response.data).to.include({ - record_type: 'conference', - }); - } - - it('Sends the correct request', function () { - return telnyx.conferences.create(conferenceCreateData).then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.conferences - .create(conferenceCreateData, TEST_AUTH_KEY) - .then(responseFn); - }); - }); - - describe('participants', function () { - function responseFn(response) { - expect(response.data[0]).to.include({ - record_type: 'participant', - }); - expect(response.data[0]).to.have.property('conference'); - expect(response.data[0]).to.have.property('call_control_id'); - expect(response.data[0]).to.have.property('end_conference_on_exit'); - expect(response.data[0]).to.have.property('muted'); - expect(response.data[0]).to.have.property('on_hold'); - } - - it('Sends the correct request', function () { - return telnyx.conferences - .participants(CONFERENCE_ID, {filter: {muted: true}}) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.conferences - .participants(CONFERENCE_ID, TEST_AUTH_KEY) - .then(responseFn); - }); - }); - - CONFERENCES.forEach(function (action) { - describe(action, function () { - let telnyxInstance; - - this.beforeEach(() => { - // make specs independent - telnyxInstance = require('../../testUtils').getTelnyxMock(); - }); - - it('Sends the correct request', function () { - return telnyxInstance.conferences - .create(conferenceCreateData) - .then(function (response) { - const conference = response.data; - return conference[action](callConferencesData[action] || {}).then( - responseFn - ); - }); - }); - it('Sends the correct request [with specified auth]', function () { - return telnyxInstance.conferences - .create(conferenceCreateData) - .then(function (response) { - const conference = response.data; - return conference[action]( - callConferencesData[action] || {}, - TEST_AUTH_KEY - ).then(responseFn); - }); - }); - - it('Sends the correct request [with empty resource instance]', function () { - const conference = new telnyxInstance.Conference({ - id: '891510ac-f3e4-11e8-af5b-de00688a4901', - }); - - return conference[action](callConferencesData[action] || {}).then( - responseFn - ); - }); - it('Sends the correct request [with empty resource instance and specified auth]', function () { - const conference = new telnyxInstance.Conference({ - id: '891510ac-f3e4-11e8-af5b-de00688a4901', - }); - - return conference[action]( - callConferencesData[action] || {}, - TEST_AUTH_KEY - ).then(responseFn); - }); - }); - }); - }); -}); diff --git a/test/resources/Connections.spec.js b/test/resources/Connections.spec.js deleted file mode 100644 index 401158c..0000000 --- a/test/resources/Connections.spec.js +++ /dev/null @@ -1,42 +0,0 @@ -'use strict'; - -var utils = require('../../testUtils'); -var telnyx = utils.getTelnyxMock(); -var expect = require('chai').expect; - -var TEST_AUTH_KEY = utils.getUserTelnyxKey(); - -describe('Connections Resource', function() { - function responseFn(response) { - expect(response.data).to.have.property('id'); - expect(response.data).to.have.property('connection_name'); - expect(response.data).to.include({record_type: 'ip_connection'}); - } - - describe('retrieve', function() { - it('Sends the correct request', function() { - return telnyx.connections.retrieve('123').then(responseFn); - }) - - it('Sends the correct request [with specified auth]', function() { - return telnyx.connections.retrieve('123', TEST_AUTH_KEY) - .then(responseFn); - }); - }); - - describe('list', function() { - function listResponseFn(response) { - return responseFn({data: response.data[0]}); - } - - it('Sends the correct request', function() { - return telnyx.connections.list() - .then(listResponseFn); - }); - - it('Sends the correct request [with specified auth]', function() { - return telnyx.connections.list(TEST_AUTH_KEY) - .then(listResponseFn); - }); - }); -}); diff --git a/test/resources/CredentialConnections.spec.js b/test/resources/CredentialConnections.spec.js deleted file mode 100644 index 367904f..0000000 --- a/test/resources/CredentialConnections.spec.js +++ /dev/null @@ -1,127 +0,0 @@ -'use strict'; - -var utils = require('../../testUtils'); -var telnyx = utils.getTelnyxMock(); -var expect = require('chai').expect; - -var TEST_AUTH_KEY = utils.getUserTelnyxKey(); - -describe('Access IP Addresses Resource', function () { - describe('retrieve', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - } - - it('Sends the correct request', function () { - return telnyx.credentialConnections.retrieve('123').then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.credentialConnections - .retrieve('123', TEST_AUTH_KEY) - .then(responseFn); - }); - }); - - describe('list', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - } - - it('Sends the correct request', function () { - return telnyx.credentialConnections - .list({ - page: { - number: 1, - size: 20, - }, - filter: { - outbound: { - outbound_voice_profile_id: '1293384261075731499', - }, - }, - sort: 'connection_name', - }) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.credentialConnections - .list( - { - page: { - number: 1, - size: 20, - }, - filter: { - outbound: { - outbound_voice_profile_id: '1293384261075731499', - }, - }, - sort: 'connection_name', - }, - TEST_AUTH_KEY - ) - .then(responseFn); - }); - }); - - describe('create', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - } - - it('Sends the correct request', function () { - return telnyx.credentialConnections - .create({ - connection_name: 'my name', - password: 'my123secure456password789', - user_name: 'myusername123', - }) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.credentialConnections - .create( - { - connection_name: 'my name', - password: 'my123secure456password789', - user_name: 'myusername123', - }, - TEST_AUTH_KEY - ) - .then(responseFn); - }); - }); - describe('del', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - } - - it('Sends the correct request', function () { - return telnyx.credentialConnections.del('1').then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.credentialConnections - .del('1', TEST_AUTH_KEY) - .then(responseFn); - }); - }); - describe('update', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - } - - it('Sends the correct request', function () { - return telnyx.credentialConnections.del('1').then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.credentialConnections - .del('1', TEST_AUTH_KEY) - .then(responseFn); - }); - }); -}); diff --git a/test/resources/DetailRecords.spec.js b/test/resources/DetailRecords.spec.js deleted file mode 100644 index d4c5d20..0000000 --- a/test/resources/DetailRecords.spec.js +++ /dev/null @@ -1,23 +0,0 @@ -'use strict'; - -var telnyx = require('../../testUtils').getTelnyxMock(); -var expect = require('chai').expect; - -describe('DetailRecords Resource', function () { - function responseFn(response) { - expect(response.data).to.have.property('data'); - for (let index = 0; index < response.data.length; index++) { - const row = response.data[index]; - expect(row).to.have.property('record_type'); - expect(row).to.have.property('uuid'); - } - } - - describe.skip('query', function () { - it('Sends the correct request', function () { - return telnyx.detailRecords - .query({filter: {record_type: 'messaging'}}) - .then(responseFn); - }); - }); -}); diff --git a/test/resources/DocumentLinks.spec.js b/test/resources/DocumentLinks.spec.js deleted file mode 100644 index 2ac94c3..0000000 --- a/test/resources/DocumentLinks.spec.js +++ /dev/null @@ -1,15 +0,0 @@ -'use strict'; - -var telnyx = require('../../testUtils').getTelnyxMock(); -var expect = require('chai').expect; - -describe('Documents Links', function () { - describe('list', function () { - it('Sends the correct request', function () { - return telnyx.documentLinks.list().then(function (response) { - expect(response).to.have.property('data'); - expect(response).to.have.property('meta'); - }); - }); - }); -}); diff --git a/test/resources/Documents.spec.js b/test/resources/Documents.spec.js deleted file mode 100644 index dad1bef..0000000 --- a/test/resources/Documents.spec.js +++ /dev/null @@ -1,160 +0,0 @@ -'use strict'; - -var utils = require('../../testUtils'); -var telnyx = utils.getTelnyxMock(); -var expect = require('chai').expect; - -var TEST_AUTH_KEY = utils.getUserTelnyxKey(); -var TEST_UUID = '123e4567-e89b-12d3-a456-426614174000'; - -describe('Documents', function () { - describe('list', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - expect(response).to.have.property('meta'); - } - - it('Sends the correct request', function () { - return telnyx.documents - .list({ - filter: { - filename: { - contains: 'invoice', - }, - customer_reference: { - eq: 'MY REF 001', - in: ['MY REF 001'], - }, - created_at: { - gt: '2021-04-09T22:25:27.521Z', - lt: '2021-04-09T22:25:27.521Z', - }, - }, - sort: ['filename'], - page: { - number: '1', - size: '20', - }, - }) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.documents - .list( - { - filter: { - filename: { - contains: 'invoice', - }, - customer_reference: { - eq: 'MY REF 001', - in: ['MY REF 001'], - }, - created_at: { - gt: '2021-04-09T22:25:27.521Z', - lt: '2021-04-09T22:25:27.521Z', - }, - }, - sort: ['filename'], - page: { - number: '1', - size: '20', - }, - }, - TEST_AUTH_KEY - ) - .then(responseFn); - }); - }); - - describe('Document Id', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - } - it('Sends the correct request', function () { - return telnyx.documents.retrieveDocumentId(TEST_UUID).then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.documents - .retrieveDocumentId(TEST_UUID, TEST_AUTH_KEY) - .then(responseFn); - }); - }); - describe('Download Document', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - } - it('Sends the correct request', function () { - return telnyx.documents - .retrieveDownloadDocument(TEST_UUID) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.documents - .retrieveDownloadDocument(TEST_UUID, TEST_AUTH_KEY) - .then(responseFn); - }); - }); - describe('update', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - } - - it('Sends the correct request', function () { - const requestBody = { - customer_reference: 'your_customer_reference', - filename: 'your_filename', - }; - return telnyx.documents.update(TEST_UUID, requestBody).then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - const requestBody = { - customer_reference: 'your_customer_reference', - filename: 'your_filename', - }; - return telnyx.documents - .update(TEST_UUID, requestBody, TEST_AUTH_KEY) - .then(responseFn); - }); - }); - - describe('upload', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - } - it('Sends the correct request', function () { - return telnyx.documents - .upload({ - url: 'https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf', - }) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.documents - .upload( - { - url: 'https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf', - }, - TEST_AUTH_KEY - ) - .then(responseFn); - }); - }); - describe('del', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - } - it('Sends the correct request', function () { - return telnyx.documents.del(TEST_UUID).then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.documents.del(TEST_UUID, TEST_AUTH_KEY).then(responseFn); - }); - }); -}); diff --git a/test/resources/DynamicEmergency.spec.js b/test/resources/DynamicEmergency.spec.js deleted file mode 100644 index d587183..0000000 --- a/test/resources/DynamicEmergency.spec.js +++ /dev/null @@ -1,119 +0,0 @@ -'use strict'; - -var utils = require('../../testUtils'); -var telnyx = utils.getTelnyxMock(); -var expect = require('chai').expect; - -var TEST_AUTH_KEY = utils.getUserTelnyxKey(); -var TEST_UUID = '123e4567-e89b-12d3-a456-426614174000'; - -describe('DynamicEmergency', function() { - describe('Addresses', function() { - function responseFn(response) { - expect(response.data).to.have.property('id'); - expect(response.data).to.have.property('country_code'); - expect(response.data).to.have.property('locality'); - expect(response.data).to.include({record_type: 'dynamic_emergency_address'}); - } - - describe('list', function() { - function listResponseFn(response) { - return responseFn({data: response.data[0]}); - } - - it('Sends the correct request', function() { - return telnyx.dynamicEmergency.addresses.list() - .then(listResponseFn); - }); - - it('Sends the correct request [with specified auth]', function() { - return telnyx.dynamicEmergency.addresses.list(TEST_AUTH_KEY) - .then(listResponseFn); - }); - }); - - describe('retrieve', function() { - it('Sends the correct request', function() { - return telnyx.dynamicEmergency.addresses.retrieve(TEST_UUID).then(responseFn); - }) - - it('Sends the correct request [with specified auth]', function() { - return telnyx.dynamicEmergency.addresses.retrieve(TEST_UUID, TEST_AUTH_KEY) - .then(responseFn); - }); - }); - - describe.skip('create', function() { - it('Sends the correct request', function() { - return telnyx.dynamicEmergency.addresses.create({ - administrative_area: 'IL', - house_number: '311', - locality: 'Chicago', - postal_code: '60654', - street_name: 'Superior', - country_code: 'US' - }).then(responseFn); - }); - }); - - describe('del', function() { - it('Sends the correct request', function() { - return telnyx.dynamicEmergency.addresses.del(TEST_UUID).then(responseFn); - }); - }); - }); - - describe('Endpoints', function() { - function responseFn(response) { - expect(response.data).to.have.property('id'); - expect(response.data).to.have.property('callback_number'); - expect(response.data).to.have.property('caller_name'); - expect(response.data).to.have.property('dynamic_emergency_address_id'); - expect(response.data).to.include({record_type: 'dynamic_emergency_endpoint'}); - } - - describe('list', function() { - function listResponseFn(response) { - return responseFn({data: response.data[0]}); - } - - it('Sends the correct request', function() { - return telnyx.dynamicEmergency.endpoints.list() - .then(listResponseFn); - }); - - it('Sends the correct request [with specified auth]', function() { - return telnyx.dynamicEmergency.endpoints.list(TEST_AUTH_KEY) - .then(listResponseFn); - }); - }); - - describe('retrieve', function() { - it('Sends the correct request', function() { - return telnyx.dynamicEmergency.endpoints.retrieve(TEST_UUID).then(responseFn); - }) - - it('Sends the correct request [with specified auth]', function() { - return telnyx.dynamicEmergency.endpoints.retrieve(TEST_UUID, TEST_AUTH_KEY) - .then(responseFn); - }); - }); - - describe.skip('create', function() { - it('Sends the correct request', function() { - return telnyx.dynamicEmergency.endpoints.create({ - callback_number: '+13125550000', - caller_name: 'Jane Doe Desk Phone', - dynamic_emergency_address_id: '0ccc7b54-4df3-4bca-a65a-3da1ecc777f0', - country_code: 'US', - }).then(responseFn); - }); - }); - - describe('del', function() { - it('Sends the correct request', function() { - return telnyx.dynamicEmergency.endpoints.del(TEST_UUID).then(responseFn); - }); - }); - }); -}); diff --git a/test/resources/Events.spec.js b/test/resources/Events.spec.js deleted file mode 100644 index f6c84a7..0000000 --- a/test/resources/Events.spec.js +++ /dev/null @@ -1,30 +0,0 @@ -'use strict'; - -var telnyx = require('../../testUtils').getSpyableTelnyx(); -var expect = require('chai').expect; - -describe('Events Resource', function() { - describe('retrieve', function() { - it('Sends the correct request', function() { - telnyx.events.retrieve('eventIdBaz'); - expect(telnyx.LAST_REQUEST).to.deep.equal({ - method: 'GET', - url: '/v2/events/eventIdBaz', - headers: {}, - data: {}, - }); - }); - }); - - describe('list', function() { - it('Sends the correct request', function() { - telnyx.events.list({page: {size: 25}}); - expect(telnyx.LAST_REQUEST).to.deep.equal({ - method: 'GET', - url: '/v2/events', - headers: {}, - data: {page: {size: 25}}, - }); - }); - }); -}); diff --git a/test/resources/FaxApplications.spec.js b/test/resources/FaxApplications.spec.js deleted file mode 100644 index 67a07a2..0000000 --- a/test/resources/FaxApplications.spec.js +++ /dev/null @@ -1,112 +0,0 @@ -'use strict'; - - -var utils = require('../../testUtils'); -var telnyx = utils.getTelnyxMock(); -var expect = require('chai').expect; - -var TEST_AUTH_KEY = utils.getUserTelnyxKey(); -var TEST_UUID = '123e4567-e89b-12d3-a456-426614174000'; - -describe('Fax Applications list', function() { - function responseFn(response) { - expect(response.data).to.have.property('id'); - expect(response.data).to.include({record_type: 'fax_application'}); - } - - const createFaxData = { - 'application_name': 'test', - 'webhook_event_url': 'https://fakeurl.com/123123' - }; - - describe('retrieve', function() { - it('Sends the correct request', function() { - return telnyx.faxApplications.retrieve(TEST_UUID).then((response) => { - responseFn(response) - }); - }) - - it('Sends the correct request [with specified auth]', function() { - return telnyx.faxApplications.retrieve(TEST_UUID, TEST_AUTH_KEY) - .then(responseFn); - }); - }); - - describe('create', function() { - it('Sends the correct request', function() { - return telnyx.faxApplications.create(createFaxData) - .then(responseFn); - }) - - it('Sends the correct request [with specified auth]', function() { - return telnyx.faxApplications.create(createFaxData, TEST_AUTH_KEY) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth in options]', function() { - return telnyx.faxApplications.create(createFaxData, {api_key: TEST_AUTH_KEY}) - .then(responseFn); - }); - }); - - describe('list', function() { - function listResponseFn(response) { - return responseFn({data: response.data[0]}); - } - - it('Sends the correct request', function() { - return telnyx.faxApplications.list() - .then(listResponseFn); - }); - - it('Sends the correct request [with specified auth]', function() { - return telnyx.faxApplications.list(TEST_AUTH_KEY) - .then(listResponseFn); - }); - }); - - describe('del', function() { - function responseFn(response) { - if (response.data) { - expect(response.data).to.have.property('id'); - expect(response.data).to.include({record_type: 'fax_application'}); - } - } - - it('Sends the correct request', function() { - return telnyx.faxApplications.create(createFaxData) - .then(function(response) { - const faxApplications = response.data; - return faxApplications.del() - .then(responseFn); - }) - }); - it('Sends the correct request [with specified auth]', function() { - return telnyx.faxApplications.retrieve('123') - .then(function(response) { - const faxApplications = response.data; - return faxApplications.del(TEST_AUTH_KEY) - .then(responseFn); - }) - }); - }); - - describe('update', function() { - it('Sends the correct request', function() { - return telnyx.faxApplications.create(createFaxData) - .then(function(response) { - const ip = response.data; - return ip.update(createFaxData) - .then(responseFn); - }) - }); - it('Sends the correct request [with specified auth]', function() { - return telnyx.faxApplications.retrieve(TEST_UUID) - .then(function(response) { - const ip = response.data; - return ip.update(createFaxData, TEST_AUTH_KEY) - .then(responseFn); - }) - }); - }); -}); diff --git a/test/resources/Faxes.spec.js b/test/resources/Faxes.spec.js deleted file mode 100644 index 5855599..0000000 --- a/test/resources/Faxes.spec.js +++ /dev/null @@ -1,107 +0,0 @@ -'use strict'; - -var utils = require('../../testUtils'); -var telnyx = utils.getTelnyxMock(); -var expect = require('chai').expect; - -var TEST_AUTH_KEY = utils.getUserTelnyxKey(); -var TEST_UUID = '123e4567-e89b-12d3-a456-426614174000'; - -var faxCreateData = { - connection_id: 'c-1', - media_url: 'http://www.example.com/fax.pdf', - quality: 'high', - to: '+456', - from: '+123', -} - -describe('Faxes Resource', function () { - function responseFn(response) { - expect(response.data).to.have.property('connection_id'); - expect(response.data).to.have.property('media_url'); - expect(response.data).to.have.property('to'); - } - - describe('retrieve', function () { - it('Sends the correct request', function () { - return telnyx.faxes.retrieve(TEST_UUID).then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.faxes.retrieve(TEST_UUID, TEST_AUTH_KEY).then(responseFn); - }); - }); - - describe('create', function () { - it('Sends the correct request', function () { - return telnyx.faxes.create(faxCreateData).then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.faxes - .create(faxCreateData, TEST_AUTH_KEY) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth in options]', function () { - return telnyx.faxes - .create(faxCreateData, {api_key: TEST_AUTH_KEY}) - .then(responseFn); - }); - }); - - describe('send', function () { - it('Sends the correct request', function () { - return telnyx.faxes.send(faxCreateData).then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.faxes - .send(faxCreateData, TEST_AUTH_KEY) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth in options]', function () { - return telnyx.faxes - .send(faxCreateData, {api_key: TEST_AUTH_KEY}) - .then(responseFn); - }); - }); - - describe('list', function () { - function listResponseFn(response) { - return responseFn({data: response.data[0]}); - } - - it('Sends the correct request', function () { - return telnyx.faxes.list().then(listResponseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.faxes.list(TEST_AUTH_KEY).then(listResponseFn); - }); - }); - - describe.skip('Nested', function () { - function responseFn(response) { - expect(response.statusCode).to.equal(204); - } - - describe('del', function () { - it('Sends the correct request', function () { - return telnyx.faxes - .create(faxCreateData) - .then(function (response) { - const fax = response.data; - return fax.del().then(responseFn); - }); - }); - it('Sends the correct request [with specified auth]', function () { - return telnyx.faxes.retrieve(TEST_UUID).then(function (response) { - const fax = response.data; - return fax.del(TEST_AUTH_KEY).then(responseFn); - }); - }); - }); - }); -}); diff --git a/test/resources/FqdnConnections.spec.js b/test/resources/FqdnConnections.spec.js deleted file mode 100644 index fb08858..0000000 --- a/test/resources/FqdnConnections.spec.js +++ /dev/null @@ -1,108 +0,0 @@ -'use strict'; - -var utils = require('../../testUtils'); -var telnyx = utils.getTelnyxMock(); -var expect = require('chai').expect; - -var TEST_AUTH_KEY = utils.getUserTelnyxKey(); - -describe('FqdnConnections Resource', function() { - function responseFn(response) { - expect(response.data).to.have.property('id'); - expect(response.data).to.have.property('connection_name'); - expect(response.data).to.have.property('record_type'); - expect(response.data).to.include({record_type: 'fqdn_connection'}); - } - - describe('retrieve', function() { - it('Sends the correct request', function() { - return telnyx.fqdnConnections.retrieve('123').then(responseFn); - }) - - it('Sends the correct request [with specified auth]', function() { - return telnyx.fqdnConnections.retrieve('123', TEST_AUTH_KEY) - .then(responseFn); - }); - }); - - describe('create', function() { - it('Sends the correct request', function() { - return telnyx.fqdnConnections.create({connection_name: 'Central BSD-1'}) - .then(responseFn); - }) - - it('Sends the correct request [with specified auth]', function() { - return telnyx.fqdnConnections.create({connection_name: 'Central BSD-1'}, TEST_AUTH_KEY) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth in options]', function() { - return telnyx.fqdnConnections.create({connection_name: 'Central BSD-1'}, {api_key: TEST_AUTH_KEY}) - .then(responseFn); - }); - }); - - describe('list', function() { - function listResponseFn(response) { - return responseFn({data: response.data[0]}); - } - - it('Sends the correct request', function() { - return telnyx.fqdnConnections.list() - .then(listResponseFn); - }); - - it('Sends the correct request [with specified auth]', function() { - return telnyx.fqdnConnections.list(TEST_AUTH_KEY) - .then(listResponseFn); - }); - }); - - describe('Nested', function() { - function responseFn(response) { - if (response.data) { - expect(response.data).to.have.property('id'); - expect(response.data).to.have.property('connection_name'); - expect(response.data).to.include({record_type: 'fqdn_connection'}); - } - } - - describe('del', function() { - it('Sends the correct request', function() { - return telnyx.fqdnConnections.create({connection_name: 'Central BSD-1'}) - .then(function(response) { - const mp = response.data; - return mp.del() - .then(responseFn); - }) - }); - it('Sends the correct request [with specified auth]', function() { - return telnyx.fqdnConnections.retrieve('123') - .then(function(response) { - const mp = response.data; - return mp.del(TEST_AUTH_KEY) - .then(responseFn); - }) - }); - }); - - describe('update', function() { - it('Sends the correct request', function() { - return telnyx.fqdnConnections.create({connection_name: 'Central BSD-1'}) - .then(function(response) { - const mp = response.data; - return mp.update({connection_name: 'Western BSD-2'}) - .then(responseFn); - }) - }); - it('Sends the correct request [with specified auth]', function() { - return telnyx.fqdnConnections.retrieve('123') - .then(function(response) { - const mp = response.data; - return mp.update({connection_name: 'Western BSD-2'}, TEST_AUTH_KEY) - .then(responseFn); - }) - }); - }); - }) -}); diff --git a/test/resources/Fqdns.spec.js b/test/resources/Fqdns.spec.js deleted file mode 100644 index 7a1290f..0000000 --- a/test/resources/Fqdns.spec.js +++ /dev/null @@ -1,110 +0,0 @@ -'use strict'; - -var utils = require('../../testUtils'); -var telnyx = utils.getTelnyxMock(); -var expect = require('chai').expect; - -var TEST_AUTH_KEY = utils.getUserTelnyxKey(); - -describe('Fqdns Resource', function() { - function responseFn(response) { - expect(response.data).to.have.property('id'); - expect(response.data).to.have.property('connection_id'); - expect(response.data).to.have.property('fqdn'); - expect(response.data).to.have.property('record_type'); - expect(response.data).to.include({record_type: 'fqdn'}); - } - - describe('retrieve', function() { - it('Sends the correct request', function() { - return telnyx.fqdns.retrieve('123').then(responseFn); - }) - - it('Sends the correct request [with specified auth]', function() { - return telnyx.fqdns.retrieve('123', TEST_AUTH_KEY) - .then(responseFn); - }); - }); - - describe('create', function() { - it('Sends the correct request', function() { - return telnyx.fqdns.create({connection_id: 'Central BSD-1', fqdn: 'example.com', dns_record_type: 'a'}) - .then(responseFn); - }) - - it('Sends the correct request [with specified auth]', function() { - return telnyx.fqdns.create({connection_id: 'Central BSD-1', fqdn: 'example.com', dns_record_type: 'a'}, TEST_AUTH_KEY) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth in options]', function() { - return telnyx.fqdns.create({connection_id: 'Central BSD-1', fqdn: 'example.com', dns_record_type: 'a'}, {api_key: TEST_AUTH_KEY}) - .then(responseFn); - }); - }); - - describe('list', function() { - function listResponseFn(response) { - return responseFn({data: response.data[0]}); - } - - it('Sends the correct request', function() { - return telnyx.fqdns.list() - .then(listResponseFn); - }); - - it('Sends the correct request [with specified auth]', function() { - return telnyx.fqdns.list(TEST_AUTH_KEY) - .then(listResponseFn); - }); - }); - - describe('Nested', function() { - function responseFn(response) { - if (response.data) { - expect(response.data).to.have.property('id'); - expect(response.data).to.have.property('connection_id'); - expect(response.data).to.have.property('fqdn'); - expect(response.data).to.include({record_type: 'fqdn'}); - } - } - - describe('del', function() { - it('Sends the correct request', function() { - return telnyx.fqdns.create({connection_id: 'Central BSD-1', fqdn: 'example.com', dns_record_type: 'a'}) - .then(function(response) { - const fqdn = response.data; - return fqdn.del() - .then(responseFn); - }) - }); - it('Sends the correct request [with specified auth]', function() { - return telnyx.fqdns.retrieve('123') - .then(function(response) { - const fqdn = response.data; - return fqdn.del(TEST_AUTH_KEY) - .then(responseFn); - }) - }); - }); - - describe('update', function() { - it('Sends the correct request', function() { - return telnyx.fqdns.create({connection_id: 'Central BSD-1', fqdn: 'example.com', dns_record_type: 'a'}) - .then(function(response) { - const fqdn = response.data; - return fqdn.update({connection_id: 'Western BSD-2'}) - .then(responseFn); - }) - }); - it('Sends the correct request [with specified auth]', function() { - return telnyx.fqdns.retrieve('123') - .then(function(response) { - const fqdn = response.data; - return fqdn.update({connection_id: 'Western BSD-2'}, TEST_AUTH_KEY) - .then(responseFn); - }) - }); - }); - }) -}); diff --git a/test/resources/InventoryCoverage.spec.js b/test/resources/InventoryCoverage.spec.js deleted file mode 100644 index 335d0f5..0000000 --- a/test/resources/InventoryCoverage.spec.js +++ /dev/null @@ -1,33 +0,0 @@ -'use strict'; - -var utils = require('../../testUtils'); -var telnyx = utils.getTelnyxMock(); -var expect = require('chai').expect; - -var TEST_AUTH_KEY = utils.getUserTelnyxKey(); - -describe('InventoryCoverage Resource', function() { - describe.skip('request', function() { - function responseFn(response) { - expect(response.data[0]).to.have.property('number_type'); - expect(response.data[0]).to.have.property('group'); - expect(response.data[0]).to.have.property('group_type'); - expect(response.data[0]).to.have.property('coverage_type'); - expect(response.data[0]).to.have.property('phone_number_type'); - expect(response.data[0]).to.have.property('number_range'); - expect(response.data[0]).to.include({record_type: 'inventory_coverage_group'}); - } - - it('Sends the correct request', function() { - return telnyx.inventoryCoverage.request( - {filter: {npa: '318', nxx: '202', country_code: 'US', groupBy: 'nxx'}}) - .then(responseFn); - }) - - it('Sends the correct request [with specified auth]', function() { - return telnyx.inventoryCoverage.request( - {filter: {npa: '318', nxx: '202', country_code: 'US', groupBy: 'nxx'}}, TEST_AUTH_KEY) - .then(responseFn); - }); - }); -}); diff --git a/test/resources/IpConnections.spec.js b/test/resources/IpConnections.spec.js deleted file mode 100644 index 5f57aaa..0000000 --- a/test/resources/IpConnections.spec.js +++ /dev/null @@ -1,108 +0,0 @@ -'use strict'; - -var utils = require('../../testUtils'); -var telnyx = utils.getTelnyxMock(); -var expect = require('chai').expect; - -var TEST_AUTH_KEY = utils.getUserTelnyxKey(); -var TEST_UUID = '123e4567-e89b-12d3-a456-426614174000'; - -describe('IpConnections Resource', function() { - function responseFn(response) { - expect(response.data).to.have.property('id'); - expect(response.data).to.have.property('connection_name'); - expect(response.data).to.include({record_type: 'ip_connection'}); - } - - describe('retrieve', function() { - it('Sends the correct request', function() { - return telnyx.ipConnections.retrieve(TEST_UUID).then(responseFn); - }) - - it('Sends the correct request [with specified auth]', function() { - return telnyx.ipConnections.retrieve(TEST_UUID, TEST_AUTH_KEY) - .then(responseFn); - }); - }); - - describe('create', function() { - it('Sends the correct request', function() { - return telnyx.ipConnections.create({connection_name: 'Central BSD-1'}) - .then(responseFn); - }) - - it('Sends the correct request [with specified auth]', function() { - return telnyx.ipConnections.create({connection_name: 'Central BSD-1'}, TEST_AUTH_KEY) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth in options]', function() { - return telnyx.ipConnections.create({connection_name: 'Central BSD-1'}, {api_key: TEST_AUTH_KEY}) - .then(responseFn); - }); - }); - - describe('list', function() { - function listResponseFn(response) { - return responseFn({data: response.data[0]}); - } - - it('Sends the correct request', function() { - return telnyx.ipConnections.list() - .then(listResponseFn); - }); - - it('Sends the correct request [with specified auth]', function() { - return telnyx.ipConnections.list(TEST_AUTH_KEY) - .then(listResponseFn); - }); - }); - - describe('Nested', function() { - function responseFn(response) { - if (response.data) { - expect(response.data).to.have.property('id'); - expect(response.data).to.have.property('connection_name'); - expect(response.data).to.include({record_type: 'ip_connection'}); - } - } - - describe('del', function() { - it('Sends the correct request', function() { - return telnyx.ipConnections.create({connection_name: 'Central BSD-1'}) - .then(function(response) { - const ipConnection = response.data; - return ipConnection.del() - .then(responseFn); - }) - }); - it('Sends the correct request [with specified auth]', function() { - return telnyx.ipConnections.retrieve(TEST_UUID) - .then(function(response) { - const ipConnection = response.data; - return ipConnection.del(TEST_AUTH_KEY) - .then(responseFn); - }) - }); - }); - - describe('update', function() { - it('Sends the correct request', function() { - return telnyx.ipConnections.create({connection_name: 'Central BSD-1'}) - .then(function(response) { - const ipConnection = response.data; - return ipConnection.update({connection_name: 'Western BSD-2'}) - .then(responseFn); - }) - }); - it('Sends the correct request [with specified auth]', function() { - return telnyx.ipConnections.retrieve(TEST_UUID) - .then(function(response) { - const ipConnection = response.data; - return ipConnection.update({connection_name: 'Western BSD-2'}, TEST_AUTH_KEY) - .then(responseFn); - }) - }); - }); - }) -}); diff --git a/test/resources/Ips.spec.js b/test/resources/Ips.spec.js deleted file mode 100644 index 33926c9..0000000 --- a/test/resources/Ips.spec.js +++ /dev/null @@ -1,120 +0,0 @@ -'use strict'; - -var utils = require('../../testUtils'); -var telnyx = utils.getTelnyxMock(); -var expect = require('chai').expect; - -var TEST_AUTH_KEY = utils.getUserTelnyxKey(); -var TEST_UUID = '123e4567-e89b-12d3-a456-426614174000'; - -describe('Ips Resource', function () { - function responseFn(response) { - expect(response.data).to.have.property('id'); - expect(response.data).to.have.property('connection_id'); - expect(response.data).to.have.property('ip_address'); - expect(response.data).to.have.property('record_type'); - expect(response.data).to.include({record_type: 'ip'}); - } - - describe('retrieve', function () { - it('Sends the correct request', function () { - return telnyx.ips.retrieve(TEST_UUID).then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.ips.retrieve(TEST_UUID, TEST_AUTH_KEY).then(responseFn); - }); - }); - - describe('create', function () { - it('Sends the correct request', function () { - return telnyx.ips - .create({connection_id: 'Central BSD-1', ip_address: '192.168.0.0'}) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.ips - .create( - {connection_id: 'Central BSD-1', ip_address: '192.168.0.0'}, - TEST_AUTH_KEY - ) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth in options]', function () { - return telnyx.ips - .create( - {connection_id: 'Central BSD-1', ip_address: '192.168.0.0'}, - {api_key: TEST_AUTH_KEY} - ) - .then(responseFn); - }); - }); - - describe('list', function () { - function listResponseFn(response) { - return responseFn({data: response.data[0]}); - } - - it('Sends the correct request', function () { - return telnyx.ips.list().then(listResponseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.ips.list(TEST_AUTH_KEY).then(listResponseFn); - }); - }); - - describe('Nested', function () { - function responseFn(response) { - if (response.data) { - expect(response.data).to.have.property('id'); - expect(response.data).to.have.property('ip_address'); - expect(response.data).to.have.property('connection_id'); - expect(response.data).to.include({record_type: 'ip'}); - } - } - - describe.skip('del', function () { - it('Sends the correct request', function () { - return telnyx.ips - .create({connection_id: 'Central BSD-1', ip_address: '192.168.0.0'}) - .then(function (response) { - const ip = response.data; - return ip.del().then(responseFn); - }); - }); - it('Sends the correct request [with specified auth]', function () { - return telnyx.ips.retrieve('123').then(function (response) { - const ip = response.data; - return ip.del(TEST_AUTH_KEY).then(responseFn); - }); - }); - }); - - describe('update', function () { - it('Sends the correct request', function () { - return telnyx.ips - .create({connection_id: 'Central BSD-1', ip_address: '192.168.0.0'}) - .then(function (response) { - const ip = response.data; - return ip - .update({ - connection_id: 'Western BSD-2', - ip_address: '192.168.0.0', - }) - .then(responseFn); - }); - }); - it.skip('Sends the correct request [with specified auth]', function () { - return telnyx.ips.retrieve('123').then(function (response) { - const ip = response.data; - return ip - .update({connection_id: 'Western BSD-2'}, TEST_AUTH_KEY) - .then(responseFn); - }); - }); - }); - }); -}); diff --git a/test/resources/ManagedAccounts.spec.js b/test/resources/ManagedAccounts.spec.js deleted file mode 100644 index 81b064e..0000000 --- a/test/resources/ManagedAccounts.spec.js +++ /dev/null @@ -1,205 +0,0 @@ -'use strict'; - -var utils = require('../../testUtils'); -var telnyx = utils.getTelnyxMock(); -var expect = require('chai').expect; - -var TEST_AUTH_KEY = utils.getUserTelnyxKey(); - -describe('Managed Accounts', function () { - describe('list', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - for (let index = 0; index < response.length; index++) { - const row = response[index]; - expect(row).to.have.property('api_key'); - expect(row).to.have.property('api_token'); - expect(row).to.have.property('api_user'); - expect(row).to.have.property('created_at'); - expect(row).to.have.property('email'); - expect(row).to.have.property('id'); - expect(row).to.have.property('manager_account_id'); - expect(row).to.have.property('record_type'); - expect(row).to.have.property('updated_at'); - } - } - - it('Sends the correct request', function () { - return telnyx.managedAccounts - .list({ - page: { - number: '1', - size: '20', - }, - filter: { - email: { - contains: 'null', - eq: 'null', - }, - }, - sort: 'email', - include_cancelled_accounts: 'true', - }) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.managedAccounts - .list( - { - page: { - number: '1', - size: '20', - }, - filter: { - email: { - contains: 'null', - eq: 'null', - }, - }, - sort: 'email', - include_cancelled_accounts: 'true', - }, - TEST_AUTH_KEY - ) - .then(responseFn); - }); - }); - - describe('create', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - expect(response.data).to.have.property('api_key'); - expect(response.data).to.have.property('api_token'); - expect(response.data).to.have.property('api_user'); - expect(response.data).to.have.property('created_at'); - expect(response.data).to.have.property('email'); - expect(response.data).to.have.property('id'); - expect(response.data).to.have.property('manager_account_id'); - expect(response.data).to.have.property('record_type'); - expect(response.data).to.have.property('updated_at'); - } - it('Sends the correct request', function () { - return telnyx.managedAccounts - .create({business_name: "Larry's Cat Food Inc"}) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.managedAccounts - .create({business_name: "Larry's Cat Food Inc"}, TEST_AUTH_KEY) - .then(responseFn); - }); - }); - describe('retrieveManagedAccount', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - expect(response.data).to.have.property('api_key'); - expect(response.data).to.have.property('api_token'); - expect(response.data).to.have.property('api_user'); - expect(response.data).to.have.property('created_at'); - expect(response.data).to.have.property('email'); - expect(response.data).to.have.property('id'); - expect(response.data).to.have.property('manager_account_id'); - expect(response.data).to.have.property('record_type'); - expect(response.data).to.have.property('updated_at'); - } - it('Sends the correct request', function () { - return telnyx.managedAccounts - .retrieveManagedAccount('f65ceda4-6522-4ad6-aede-98de83385123') - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.managedAccounts - .retrieveManagedAccount( - 'f65ceda4-6522-4ad6-aede-98de83385123', - TEST_AUTH_KEY - ) - .then(responseFn); - }); - }); - describe('updateManagedAccount', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - expect(response.data).to.have.property('api_key'); - expect(response.data).to.have.property('api_token'); - expect(response.data).to.have.property('api_user'); - expect(response.data).to.have.property('created_at'); - expect(response.data).to.have.property('email'); - expect(response.data).to.have.property('id'); - expect(response.data).to.have.property('manager_account_id'); - expect(response.data).to.have.property('record_type'); - expect(response.data).to.have.property('updated_at'); - } - it('Sends the correct request', function () { - return telnyx.managedAccounts - .updateManagedAccount('f65ceda4-6522-4ad6-aede-98de83385123', { - business_name: "Larry's Dog Food Inc", - }) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.managedAccounts - .updateManagedAccount( - 'f65ceda4-6522-4ad6-aede-98de83385123', - { - business_name: "Larry's Dog Food Inc", - }, - TEST_AUTH_KEY - ) - .then(responseFn); - }); - }); - describe('disableAccount', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - expect(response.data).to.have.property('api_key'); - expect(response.data).to.have.property('api_token'); - expect(response.data).to.have.property('api_user'); - expect(response.data).to.have.property('created_at'); - expect(response.data).to.have.property('email'); - expect(response.data).to.have.property('id'); - expect(response.data).to.have.property('manager_account_id'); - expect(response.data).to.have.property('record_type'); - expect(response.data).to.have.property('updated_at'); - } - it('Sends the correct request', function () { - return telnyx.managedAccounts - .disableAccount('f65ceda4-6522-4ad6-aede-98de83385123') - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.managedAccounts - .disableAccount('f65ceda4-6522-4ad6-aede-98de83385123', TEST_AUTH_KEY) - .then(responseFn); - }); - }); - describe('enableAccount', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - expect(response.data).to.have.property('api_key'); - expect(response.data).to.have.property('api_token'); - expect(response.data).to.have.property('api_user'); - expect(response.data).to.have.property('created_at'); - expect(response.data).to.have.property('email'); - expect(response.data).to.have.property('id'); - expect(response.data).to.have.property('manager_account_id'); - expect(response.data).to.have.property('record_type'); - expect(response.data).to.have.property('updated_at'); - } - it('Sends the correct request', function () { - return telnyx.managedAccounts - .enableAccount('f65ceda4-6522-4ad6-aede-98de83385123') - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.managedAccounts - .enableAccount('f65ceda4-6522-4ad6-aede-98de83385123', TEST_AUTH_KEY) - .then(responseFn); - }); - }); -}); diff --git a/test/resources/Messages.spec.js b/test/resources/Messages.spec.js deleted file mode 100644 index 1ca85af..0000000 --- a/test/resources/Messages.spec.js +++ /dev/null @@ -1,66 +0,0 @@ -'use strict'; - -var utils = require('../../testUtils'); -var telnyx = utils.getTelnyxMock(); -var expect = require('chai').expect; - -var TEST_AUTH_KEY = utils.getUserTelnyxKey(); -var TEST_UUID = '123e4567-e89b-12d3-a456-426614174000'; - -describe('Messages Resource', function() { - describe('retrieve', function() { - it('Sends the correct request', function() { - return telnyx.messages.retrieve(TEST_UUID) - .then(function(response) { - expect(response.data).to.include.keys(['id', 'record_type', 'direction', 'messaging_profile_id', 'from', 'text', 'to', 'type']); - }) - }); - - it('Sends the correct request [with specified auth]', function() { - return telnyx.messages.retrieve(TEST_UUID, TEST_AUTH_KEY) - .then(function(response) { - expect(response.data).to.include.keys(['id', 'record_type', 'direction', 'messaging_profile_id', 'from', 'text', 'to', 'type']); - }) - }); - }); - describe('create', function() { - it('Sends the correct request', function() { - return telnyx.messages.create({ - text: 'Hello, World!', - from: '+18665552368', - to: '+18665552367', - }) - .then(function(response) { - expect(response.data).to.include.keys(['from', 'text']); - expect(response.data.from).to.include.keys(['carrier', 'line_type', 'phone_number']); - expect(response.data.to[0]).to.include.keys(['carrier', 'line_type', 'phone_number', 'status']); - }) - }); - - it('Sends the correct request [with specified auth]', function() { - return telnyx.messages.create({ - text: 'Hello, World!', - from: '+18665552368', - to: '+18665552367', - }, TEST_AUTH_KEY) - .then(function(response) { - expect(response.data).to.include.keys(['from', 'text']); - expect(response.data.from).to.include.keys(['carrier', 'line_type', 'phone_number']); - expect(response.data.to[0]).to.include.keys(['carrier', 'line_type', 'phone_number', 'status']); - }) - }); - - it('Sends the correct request [with specified auth in options]', function() { - return telnyx.messages.create({ - text: 'Hello, World!', - from: '+18665552368', - to: '+18665552367', - }, {api_key: TEST_AUTH_KEY}) - .then(function(response) { - expect(response.data).to.include.keys(['from', 'text']); - expect(response.data.from).to.include.keys(['carrier', 'line_type', 'phone_number']); - expect(response.data.to[0]).to.include.keys(['carrier', 'line_type', 'phone_number', 'status']); - }) - }); - }); -}); diff --git a/test/resources/MessagesSenderIds.spec.js b/test/resources/MessagesSenderIds.spec.js deleted file mode 100644 index ca087d2..0000000 --- a/test/resources/MessagesSenderIds.spec.js +++ /dev/null @@ -1,41 +0,0 @@ -'use strict'; - -var utils = require('../../testUtils'); -var telnyx = utils.getTelnyxMock(); -var expect = require('chai').expect; - -var TEST_AUTH_KEY = utils.getUserTelnyxKey(); - -describe.skip('Messages Alphanumeric Sender Ids Resource', function() { - const createData = { - text: 'Hello, World!', - from: '+18665552368', - to: [{address: '+18665552367'}], - messaging_profile_id: '073dd98e-0c85-496b-970f-dd3b7ae21c2se' - } - - function responseFn(response) { - expect(response.data).to.include({ - text: 'Hello, World!', - from: '+18665552368', - }); - expect(response.data.to[0]).to.include({address: '+18665552367'}); - } - - describe('create', function() { - it('Sends the correct request', function() { - return telnyx.messages.alphanumericSenderId.create(createData) - .then(responseFn) - }); - - it('Sends the correct request [with specified auth]', function() { - return telnyx.messages.alphanumericSenderId.create(createData, TEST_AUTH_KEY) - .then(responseFn) - }); - - it('Sends the correct request [with specified auth in options]', function() { - return telnyx.messages.alphanumericSenderId.create(createData, {api_key: TEST_AUTH_KEY}) - .then(responseFn) - }); - }); -}); diff --git a/test/resources/MessagingHostedNumberOrders.spec.js b/test/resources/MessagingHostedNumberOrders.spec.js deleted file mode 100644 index 4ecaddb..0000000 --- a/test/resources/MessagingHostedNumberOrders.spec.js +++ /dev/null @@ -1,91 +0,0 @@ -'use strict'; - -var utils = require('../../testUtils'); -var telnyx = utils.getTelnyxMock(); -var expect = require('chai').expect; -var TEST_AUTH_KEY = utils.getUserTelnyxKey(); -var TEST_UUID = '123e4567-e89b-12d3-a456-426614174000'; - -describe('Messaging Hosted Order Numbers', function () { - function responseFn(response) { - expect(response.data).to.include({ - record_type: 'messaging_hosted_number_order', - }); - expect(response.data).to.have.property('status'); - expect(response.data).to.have.property('id'); - } - - describe('retrieve', function () { - it('Sends the correct request', function () { - return telnyx.messagingHostedNumberOrders - .retrieve(TEST_UUID) - .then((response) => { - responseFn(response); - }); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.messagingHostedNumberOrders - .retrieve(TEST_UUID, TEST_AUTH_KEY) - .then(responseFn); - }); - }); - - describe('create', function () { - function responseFnNoBody(response) { - expect(response.data).to.have.property('id'); - expect(response.data).to.have.property('requirements_met'); - expect(response.data).to.include({ - record_type: 'messaging_hosted_number_order', - }); - } - - it('Sends the correct request', function () { - return telnyx.messagingHostedNumberOrders - .create({messaging_profile_id: '442191469269222625'}) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.messagingHostedNumberOrders - .create({messaging_profile_id: '442191469269222625'}, TEST_AUTH_KEY) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth and no body]', function () { - telnyx.messagingHostedNumberOrders - .create({}, TEST_AUTH_KEY) - .then(responseFnNoBody); - }); - }); - - describe('list', function () { - function responseFn(response) { - expect(response.data[0]).to.have.property('id'); - expect(response.data[0]).to.include({ - record_type: 'messaging_hosted_number_order', - }); - } - it('Sends the correct request', function () { - return telnyx.messagingHostedNumberOrders.list().then(responseFn); - }); - it('Sends the correct request [with specified auth]', function () { - return telnyx.messagingHostedNumberOrders - .list(TEST_AUTH_KEY) - .then(responseFn); - }); - }); - describe('del', function () { - function responseFn(response) { - if (response.data) { - expect(response.data).to.have.property('id'); - expect(response.data).to.include({ - record_type: 'messaging_hosted_numbers', - }); - } - } - it('Sends the correct request [with specified auth]', function () { - return telnyx.messagingHostedNumberOrders.del('123').then(responseFn); - }); - }); -}); diff --git a/test/resources/MessagingHostedNumbers.spec.js b/test/resources/MessagingHostedNumbers.spec.js deleted file mode 100644 index a05da34..0000000 --- a/test/resources/MessagingHostedNumbers.spec.js +++ /dev/null @@ -1,19 +0,0 @@ -'use strict'; - -var utils = require('../../testUtils'); -var telnyx = utils.getTelnyxMock(); -var expect = require('chai').expect; - -describe('retrieve', function () { - function responseFn(response) { - if (response.data) { - expect(response.data).to.have.property('id'); - expect(response.data).to.include({ - record_type: 'messaging_hosted_numbers', - }); - } - } - it('Sends the correct request [with specified auth]', function () { - return telnyx.messagingHostedNumbers.retrieve('123').then(responseFn); - }); -}); diff --git a/test/resources/MessagingPhoneNumbers.spec.js b/test/resources/MessagingPhoneNumbers.spec.js deleted file mode 100644 index 1e1c14e..0000000 --- a/test/resources/MessagingPhoneNumbers.spec.js +++ /dev/null @@ -1,61 +0,0 @@ -'use strict'; - -var utils = require('../../testUtils'); -var telnyx = utils.getTelnyxMock(); -var expect = require('chai').expect; - -var TEST_AUTH_KEY = utils.getUserTelnyxKey(); - -describe.skip('MessagingPhoneNumbers Resource', function() { - describe('retrieve', function() { - function responseFn(response) { - expect(response.data).to.include({id: '123', record_type: 'messaging_phone_number'}); - } - - it('Sends the correct request', function() { - return telnyx.messagingPhoneNumbers.retrieve('123') - .then(function(response) { - expect(response.data).to.include(responseFn); - }); - }); - - it('Sends the correct request [with specified auth]', function() { - return telnyx.messagingPhoneNumbers.retrieve('123', TEST_AUTH_KEY) - .then(function(response) { - expect(response.data).to.include(responseFn); - }); - }); - }); - - describe('list', function() { - function responseFn(response) { - expect(response.data[0]).to.have.property('id'); - expect(response.data[0]).to.have.property('phone_number'); - expect(response.data[0]).to.include({record_type: 'messaging_phone_number'}); - } - - it('Sends the correct request', function() { - return telnyx.messagingPhoneNumbers.list() - .then(responseFn); - }); - it('Sends the correct request [with specified auth]', function() { - return telnyx.messagingPhoneNumbers.list(TEST_AUTH_KEY) - .then(responseFn); - }); - }); - - describe('update', function() { - it('Sends the correct request', function() { - return telnyx.messagingPhoneNumbers.update('123', { - messaging_product: 'P2P' - }) - .then(function(response) { - expect(response.data).to.include({ - id: '123', - messaging_product: 'P2P', - record_type: 'messaging_phone_number', - }); - }); - }); - }); -}); diff --git a/test/resources/MessagingProfileMetrics.spec.js b/test/resources/MessagingProfileMetrics.spec.js deleted file mode 100644 index 3e90cde..0000000 --- a/test/resources/MessagingProfileMetrics.spec.js +++ /dev/null @@ -1,28 +0,0 @@ -'use strict'; - -var utils = require('../../testUtils'); -var telnyx = utils.getTelnyxMock(); -var expect = require('chai').expect; - -var TEST_AUTH_KEY = utils.getUserTelnyxKey(); - -describe('MessagingProfileMetrics Resource', function() { - describe('list', function() { - function responseFn(response) { - expect(response.data[0]).to.have.property('inbound'); - expect(response.data[0]).to.have.property('outbound'); - expect(response.data[0]).to.have.property('phone_numbers'); - expect(response.data[0]).to.have.property('messaging_profile_id'); - expect(response.data[0]).to.include({record_type: 'messaging_profile_metrics'}); - } - - it('Sends the correct request', function() { - return telnyx.messagingProfileMetrics.list() - .then(responseFn); - }); - it('Sends the correct request [with specified auth]', function() { - return telnyx.messagingProfileMetrics.list(TEST_AUTH_KEY) - .then(responseFn); - }); - }); -}); diff --git a/test/resources/MessagingProfiles.spec.js b/test/resources/MessagingProfiles.spec.js deleted file mode 100644 index c6be16c..0000000 --- a/test/resources/MessagingProfiles.spec.js +++ /dev/null @@ -1,222 +0,0 @@ -'use strict'; - -var telnyx = require('../../testUtils').getTelnyxMock(); -var utils = require('../../lib/utils'); -var expect = require('chai').expect; - -var TEST_AUTH_KEY = - 'KEY187557EC22404DB39975C43ACE661A58_9QdDI7XD5bvyahtaWx1YQo'; -var TEST_UUID = '123e4567-e89b-12d3-a456-426614174000'; - -var METHODS = ['phone_numbers', 'short_codes', 'del']; - -describe('MessagingProfiles Resource', function () { - function responseFn(response) { - expect(response.data).to.have.property('name'); - expect(response.data).to.include({record_type: 'messaging_profile'}); - } - - describe('retrieve', function () { - it('Sends the correct request', function () { - return telnyx.messagingProfiles.retrieve(TEST_UUID).then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.messagingProfiles - .retrieve(TEST_UUID, TEST_AUTH_KEY) - .then(responseFn); - }); - }); - - describe('create', function () { - it('Sends the correct request', function () { - return telnyx.messagingProfiles - .create({name: 'Summer Campaign'}) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.messagingProfiles - .create({name: 'Summer Campaign'}, TEST_AUTH_KEY) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth in options]', function () { - return telnyx.messagingProfiles - .create({name: 'Summer Campaign'}, {api_key: TEST_AUTH_KEY}) - .then(responseFn); - }); - }); - - describe('update', function () { - it('Sends the correct request', function () { - return telnyx.messagingProfiles - .update(TEST_UUID, {name: 'Foo "baz"'}) - .then(responseFn); - }); - }); - - describe('list', function () { - function responseFn(response) { - expect(response.data[0]).to.have.property('id'); - expect(response.data[0]).to.have.property('name'); - expect(response.data[0]).to.include({record_type: 'messaging_profile'}); - } - - it('Sends the correct request', function () { - return telnyx.messagingProfiles.list().then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.messagingProfiles.list(TEST_AUTH_KEY).then(responseFn); - }); - }); - - describe('PhoneNumbers methods', function () { - function responseFn(response) { - expect(response.data[0]).to.have.property('id'); - expect(response.data[0]).to.have.property('phone_number'); - expect(response.data[0]).to.have.property('messaging_profile_id'); - expect(response.data[0]).to.include({record_type: 'messaging_settings'}); - } - - describe('listPhoneNumbers', function () { - it('Sends the correct request', function () { - return telnyx.messagingProfiles - .listPhoneNumbers(TEST_UUID) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.messagingProfiles - .listPhoneNumbers(TEST_UUID, TEST_AUTH_KEY) - .then(responseFn); - }); - }); - }); - - describe('ShortCodes methods', function () { - function responseFn(response) { - expect(response.data[0]).to.have.property('id'); - expect(response.data[0]).to.have.property('short_code'); - expect(response.data[0]).to.have.property('messaging_profile_id'); - expect(response.data[0]).to.include({record_type: 'short_code'}); - } - - describe('listShortCodes', function () { - it('Sends the correct request', function () { - return telnyx.messagingProfiles - .listShortCodes(TEST_UUID) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.messagingProfiles - .listShortCodes(TEST_UUID, TEST_AUTH_KEY) - .then(responseFn); - }); - }); - }); - - describe('Nested', function () { - function responseFn(response) { - if (response.data.length) { - expect(response.data[0]).to.have.property('id'); - expect(response.data[0]).to.have.property('record_type'); - expect(response.data[0]).to.have.property('messaging_profile_id'); - } else { - expect(response.data).to.have.property('id'); - } - } - - METHODS.forEach(function (action) { - describe(action, function () { - const camelCaseAction = utils.snakeToCamelCase(action); - - it('Sends the correct request', function () { - return telnyx.messagingProfiles - .create({name: 'Summer Campaign'}) - .then(function (response) { - const mp = response.data; - return mp[action]().then(responseFn); - }); - }); - it('Sends the correct request [with specified auth]', function () { - return telnyx.messagingProfiles - .create({name: 'Summer Campaign'}) - .then(function (response) { - const mp = response.data; - return mp[action](TEST_AUTH_KEY).then(responseFn); - }); - }); - - describe(camelCaseAction, function () { - it('Sends the correct request', function () { - return telnyx.messagingProfiles - .create({name: 'Summer Campaign'}) - .then(function (response) { - const mp = response.data; - return mp[camelCaseAction]().then(responseFn); - }); - }); - it('Sends the correct request [with specified auth]', function () { - return telnyx.messagingProfiles - .create({name: 'Summer Campaign'}) - .then(function (response) { - const mp = response.data; - return mp[camelCaseAction](TEST_AUTH_KEY).then(responseFn); - }); - }); - }); - }); - }); - - describe('Metrics methods', function () { - function metricsNestedResponseFn(response) { - expect(response.data).to.have.property('detailed'); - expect(response.data).to.have.property('overview'); - expect(response.data.overview).to.have.property('inbound'); - expect(response.data.overview).to.have.property('outbound'); - expect(response.data.overview).to.have.property('phone_numbers'); - expect(response.data.overview).to.have.property('messaging_profile_id'); - expect(response.data.overview).to.include({ - record_type: 'messaging_profile_metrics', - }); - expect(response.data.detailed[0]).to.have.property('metrics'); - } - - describe('retrieveMetrics', function () { - it('Sends the correct request', function () { - return telnyx.messagingProfiles - .retrieveMetrics(TEST_UUID) - .then(metricsNestedResponseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.messagingProfiles - .retrieveMetrics(TEST_UUID, TEST_AUTH_KEY) - .then(metricsNestedResponseFn); - }); - }); - - describe('nested metrics', function () { - it('Sends the correct request', function () { - return telnyx.messagingProfiles - .create({name: 'Summer Campaign'}) - .then(function (response) { - const mp = response.data; - return mp.metrics().then(metricsNestedResponseFn); - }); - }); - it('Sends the correct request [with specified auth]', function () { - return telnyx.messagingProfiles - .retrieve(TEST_UUID) - .then(function (response) { - const mp = response.data; - return mp.metrics(TEST_AUTH_KEY).then(metricsNestedResponseFn); - }); - }); - }); - }); - }); -}); diff --git a/test/resources/MessagingSenderIds.spec.js b/test/resources/MessagingSenderIds.spec.js deleted file mode 100644 index fdf98a5..0000000 --- a/test/resources/MessagingSenderIds.spec.js +++ /dev/null @@ -1,98 +0,0 @@ -'use strict'; - -var utils = require('../../testUtils'); -var telnyx = utils.getTelnyxMock(); -var expect = require('chai').expect; - -var TEST_AUTH_KEY = utils.getUserTelnyxKey(); - -describe.skip('Messaging AlphanumericSenderIds Resource', function() { - describe('retrieve', function() { - function responseFn(response) { - expect(response.data).to.include({ - id: '123', - messaging_profile_id: '123', - record_type: 'alphanumeric_sender_id' - }); - } - - it('Sends the correct request', function() { - return telnyx.messagingSenderIds.retrieve('123') - .then(function(response) { - expect(response.data).to.include(responseFn); - }); - }); - - it('Sends the correct request [with specified auth]', function() { - return telnyx.messagingSenderIds.retrieve('123', TEST_AUTH_KEY) - .then(function(response) { - expect(response.data).to.include(responseFn); - }); - }); - }); - - describe('create', function() { - function responseFn(response) { - expect(response.data).to.include({alphanumeric_sender_id: 'Summer Campaign', record_type: 'alphanumeric_sender_id'}); - } - - function responseFnNoBody(response) { - expect(response.data).to.have.property('id'); - expect(response.data).to.have.property('alphanumeric_sender_id'); - expect(response.data).to.have.property('record_type'); - } - - it('Sends the correct request', function() { - return telnyx.messagingSenderIds.create({alphanumeric_sender_id: 'Summer Campaign'}) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function() { - return telnyx.messagingSenderIds.create({alphanumeric_sender_id: 'Summer Campaign'}, TEST_AUTH_KEY) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth and no body]', function() { - return telnyx.messagingSenderIds.create(TEST_AUTH_KEY) - .then(responseFnNoBody); - }); - - it('Sends the correct request [with specified auth in options]', function() { - return telnyx.messagingSenderIds.create({alphanumeric_sender_id: 'Summer Campaign'}, {api_key: TEST_AUTH_KEY}) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth in options and no body]', function() { - return telnyx.messagingSenderIds.create({api_key: TEST_AUTH_KEY}) - .then(responseFnNoBody); - }); - }); - - describe('del', function() { - it('Sends the correct request', function() { - return telnyx.messagingSenderIds.del('123') - .then(function(response) { - expect(response.data).to.include({id: '123', record_type: 'alphanumeric_sender_id'}); - }); - }); - }); - - describe('list', function() { - function responseFn(response) { - expect(response.data[0]).to.have.property('id'); - expect(response.data[0]).to.have.property('alphanumeric_sender_id'); - expect(response.data[0]).to.include({record_type: 'alphanumeric_sender_id'}); - - } - - it('Sends the correct request', function() { - return telnyx.messagingSenderIds.list() - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function() { - return telnyx.messagingSenderIds.list(TEST_AUTH_KEY) - .then(responseFn); - }); - }); -}); diff --git a/test/resources/MessagingShortCodes.spec.js b/test/resources/MessagingShortCodes.spec.js deleted file mode 100644 index 196e1a2..0000000 --- a/test/resources/MessagingShortCodes.spec.js +++ /dev/null @@ -1,54 +0,0 @@ -'use strict'; - -var utils = require('../../testUtils'); -var telnyx = utils.getTelnyxMock(); -var expect = require('chai').expect; - -var TEST_AUTH_KEY = utils.getUserTelnyxKey(); -var TEST_UUID = '123e4567-e89b-12d3-a456-426614174000'; - -describe('MessagingShortCodes Resource', function() { - function responseFn(response) { - expect(response.data).to.include({ - record_type: 'short_code' - }); - expect(response.data).to.have.property('messaging_profile_id'); - } - - describe('retrieve', function() { - it('Sends the correct request', function() { - return telnyx.messagingShortCodes.retrieve(TEST_UUID) - .then(responseFn) - }); - - it('Sends the correct request [with specified auth]', function() { - return telnyx.messagingShortCodes.retrieve(TEST_UUID, TEST_AUTH_KEY) - .then(responseFn) - }); - }); - - describe('update', function() { - it('Sends the correct request', function() { - return telnyx.messagingShortCodes.update(TEST_UUID, {messaging_profile_id: '12345'}) - .then(responseFn); - }); - }); - - describe('list', function() { - function responseFn(response) { - expect(response.data[0]).to.have.property('id'); - expect(response.data[0]).to.have.property('short_code'); - expect(response.data[0]).to.include({record_type: 'short_code'}); - } - - it('Sends the correct request', function() { - return telnyx.messagingShortCodes.list() - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function() { - return telnyx.messagingShortCodes.list(TEST_AUTH_KEY) - .then(responseFn) - }); - }); -}); diff --git a/test/resources/MobileOperatorNetworks.spec.js b/test/resources/MobileOperatorNetworks.spec.js deleted file mode 100644 index 9c8022d..0000000 --- a/test/resources/MobileOperatorNetworks.spec.js +++ /dev/null @@ -1,24 +0,0 @@ -'use strict'; - -var telnyx = require('../../testUtils').getTelnyxMock(); -var expect = require('chai').expect; - -describe('MobileOperatorNetworks Resource', function () { - describe('list', function () { - it('Sends the correct request', function () { - return telnyx.mobileOperatorNetworks.list().then(function (response) { - expect(response.data[0]).to.include({ - record_type: 'mobile_operator_network', - }); - expect(response.data[0]).to.include.keys([ - 'id', - 'tadig', - 'name', - 'mnc', - 'mcc', - 'country_code', - ]); - }); - }); - }); -}); diff --git a/test/resources/Notifications.spec.js b/test/resources/Notifications.spec.js deleted file mode 100644 index e69de29..0000000 diff --git a/test/resources/NumberBackgroundJobs.spec.js b/test/resources/NumberBackgroundJobs.spec.js deleted file mode 100644 index 418718e..0000000 --- a/test/resources/NumberBackgroundJobs.spec.js +++ /dev/null @@ -1,63 +0,0 @@ -'use strict'; - -var utils = require('../../testUtils'); -var telnyx = utils.getTelnyxMock(); -var expect = require('chai').expect; - -var TEST_AUTH_KEY = utils.getUserTelnyxKey(); - -describe('NumberBackgroundJobs resource', function() { - function responseFn(response) { - expect(response.data).to.have.property('id'); - expect(response.data).to.have.property('failed_operations'); - expect(response.data).to.have.property('successful_operations'); - expect(response.data).to.have.property('pending_operations'); - expect(response.data).to.include({record_type: 'phone_numbers_job'}); - } - - describe('retrieve', function() { - it('Sends the correct request', function() { - return telnyx.numberBackgroundJobs.retrieve('123').then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function() { - return telnyx.numberBackgroundJobs.retrieve('123', TEST_AUTH_KEY) - .then(responseFn); - }); - }); - - describe('list', function() { - function responseFn(response) { - expect(response.data[0]).to.have.property('id'); - expect(response.data[0]).to.have.property('failed_operations'); - expect(response.data[0]).to.have.property('successful_operations'); - expect(response.data[0]).to.have.property('pending_operations'); - expect(response.data[0]).to.include({record_type: 'phone_numbers_job'}); - } - - it('Sends the correct request', function() { - return telnyx.numberBackgroundJobs.list().then(responseFn); - }); - }); - - describe('updateEmergencySettings', function() { - it('Sends the correct request', function() { - return telnyx.numberBackgroundJobs.updateEmergencySettings({emergency_address_id: '123', emergency_enabled: true, phone_numbers: ['+15555555555']}) - .then(responseFn); - }); - }); - - describe('updateNumbers', function() { - it('sends the correct request', function() { - return telnyx.numberBackgroundJobs.updateNumbers({phone_numbers: ['+15555555555'], billing_group_id: '123'}) - .then(responseFn); - }); - }); - - describe('deleteNumbers', function() { - it('sends the correct request', function() { - return telnyx.numberBackgroundJobs.deleteNumbers({phone_numbers: ['+15555555555'], billing_group_id: '123'}) - .then(responseFn); - }); - }); -}); diff --git a/test/resources/NumberLookup.spec.js b/test/resources/NumberLookup.spec.js deleted file mode 100644 index 6548601..0000000 --- a/test/resources/NumberLookup.spec.js +++ /dev/null @@ -1,19 +0,0 @@ -'use strict'; - -var telnyx = require('../../testUtils').getTelnyxMock(); -var expect = require('chai').expect; - -describe('NumberLookup Resource', function () { - describe('retrieve', function () { - it('Sends the correct request', function () { - return telnyx.numberLookup.retrieve('+18665552368').then(function (response) { - expect(response.data).to.include({record_type: 'number_lookup'}); - expect(response.data).to.have.property('country_code'); - expect(response.data).to.have.property('fraud'); - expect(response.data).to.have.property('phone_number'); - expect(response.data).to.have.property('national_format'); - expect(response.data).to.have.property('portability'); - }); - }); - }); -}); diff --git a/test/resources/NumberOrderDocuments.spec.js b/test/resources/NumberOrderDocuments.spec.js deleted file mode 100644 index 8861e12..0000000 --- a/test/resources/NumberOrderDocuments.spec.js +++ /dev/null @@ -1,97 +0,0 @@ -'use strict'; - -var utils = require('../../testUtils'); -var telnyx = utils.getTelnyxMock(); -var expect = require('chai').expect; - -var TEST_AUTH_KEY = utils.getUserTelnyxKey(); - -describe('NumberOrderDocuments Resource', function() { - describe('retrieve', function() { - function responseFn(response) { - expect(response.data).to.include({ - record_type: 'number_order_document' - }); - expect(response.data).to.have.property('file_id'); - expect(response.data).to.have.property('requirements_id'); - expect(response.data).to.have.property('requirement_type'); - } - - it('Sends the correct request', function() { - return telnyx.numberOrderDocuments.retrieve('387d1e31-a218-4375-8151-103f2d5e2d2c') - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function() { - return telnyx.numberOrderDocuments.retrieve( - '387d1e31-a218-4375-8151-103f2d5e2d2c', TEST_AUTH_KEY - ) - .then(responseFn); - }); - }); - - describe('list', function() { - function responseFn(response) { - expect(response.data[0]).to.have.property('id'); - expect(response.data[0]).to.have.property('file_id'); - expect(response.data[0]).to.have.property('requirements_id'); - expect(response.data[0]).to.have.property('requirement_type'); - expect(response.data[0]).to.include({record_type: 'number_order_document'}); - } - - it('Sends the correct request', function() { - return telnyx.numberOrderDocuments.list() - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function() { - return telnyx.numberOrderDocuments.list(TEST_AUTH_KEY) - .then(responseFn); - }); - }); - - describe('update', function() { - it('Sends the correct request', function() { - return telnyx.numberOrderDocuments.update( - '387d1e31-a218-4375-8151-103f2d5e2d2c', - {file_id: '1e3c5822-0362-4702-8e46-5a129f0d3976'} - ) - .then(function(response) { - expect(response.data).to.include({ - record_type: 'number_order_document', - }); - expect(response.data).to.have.property('file_id'); - expect(response.data).to.have.property('requirements_id'); - expect(response.data).to.have.property('requirement_type'); - }); - }); - }); - - describe('upload', function() { - function responseFn(response) { - expect(response.data).to.include({ - record_type: 'number_order_document', - }); - expect(response.data).to.have.property('file_id'); - expect(response.data).to.have.property('requirements_id'); - expect(response.data).to.have.property('requirement_type'); - } - - it('Sends the correct request', function() { - return telnyx.numberOrderDocuments.upload({ - requirements_id: '36aaf27d-986b-493c-bd1b-de16af2e4292' - }) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function() { - return telnyx.numberOrderDocuments.upload( - { - requirements_id: '36aaf27d-986b-493c-bd1b-de16af2e4292' - }, - TEST_AUTH_KEY - ) - .then(responseFn); - }); - }); -}); diff --git a/test/resources/NumberOrders.spec.js b/test/resources/NumberOrders.spec.js deleted file mode 100644 index 0f6d752..0000000 --- a/test/resources/NumberOrders.spec.js +++ /dev/null @@ -1,106 +0,0 @@ -'use strict'; - -var utils = require('../../testUtils'); -var telnyx = utils.getTelnyxMock(); -var expect = require('chai').expect; - -var TEST_AUTH_KEY = utils.getUserTelnyxKey(); - -describe('NumberOrders Resource', function () { - describe('retrieve', function () { - function responseFn(response) { - expect(response.data).to.include({ - id: '12ade33a-21c0-473b-b055-b3c836e1c292', - record_type: 'number_order', - }); - } - - it('Sends the correct request', function () { - return telnyx.numberOrders - .retrieve('12ade33a-21c0-473b-b055-b3c836e1c292') - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.numberOrders - .retrieve('12ade33a-21c0-473b-b055-b3c836e1c292', TEST_AUTH_KEY) - .then(responseFn); - }); - }); - - describe('list', function () { - function responseFn(response) { - expect(response.data[0]).to.have.property('id'); - expect(response.data[0]).to.have.property('status'); - expect(response.data[0]).to.have.property('customer_reference'); - expect(response.data[0]).to.have.property('requirements_met'); - expect(response.data[0]).to.have.property('phone_numbers_count'); - expect(response.data[0]).to.include({record_type: 'number_order'}); - } - - it('Sends the correct request', function () { - return telnyx.numberOrders.list().then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.numberOrders.list(TEST_AUTH_KEY).then(responseFn); - }); - }); - - describe('update', function () { - it('Sends the correct request', function () { - return telnyx.numberOrders - .update('12ade33a-21c0-473b-b055-b3c836e1c292', { - customer_reference: 'MY REF 002', - }) - .then(function (response) { - expect(response.data).to.include({ - id: '12ade33a-21c0-473b-b055-b3c836e1c292', - record_type: 'number_order', - customer_reference: 'MY REF 001', - }); - }); - }); - }); - - describe('create', function () { - function responseFn(response) { - expect(response.data).to.include({ - record_type: 'number_order', - }); - expect(response.data).to.have.property('requirements_met'); - expect(response.data).to.have.property('phone_numbers_count'); - } - - function responseFnNoBody(response) { - expect(response.data).to.have.property('id'); - expect(response.data).to.have.property('requirements_met'); - expect(response.data).to.have.property('phone_numbers_count'); - expect(response.data).to.include({record_type: 'number_order'}); - } - - it('Sends the correct request', function () { - const requestBody = { - customer_reference: 'MY REF 001', - file_id: '1e3c5822-0362-4702-8e46-5a129f0d3976', - requirements_id: '36aaf27d-986b-493c-bd1b-de16af2e4292', - }; - return telnyx.numberOrders.create(requestBody).then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - const requestBody = { - customer_reference: 'MY REF 001', - file_id: '1e3c5822-0362-4702-8e46-5a129f0d3976', - requirements_id: '36aaf27d-986b-493c-bd1b-de16af2e4292', - }; - return telnyx.numberOrders - .create(requestBody, TEST_AUTH_KEY) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth and no body]', function () { - telnyx.numberOrders.create(TEST_AUTH_KEY).then(responseFnNoBody); - }); - }); -}); diff --git a/test/resources/NumberPortouts.spec.js b/test/resources/NumberPortouts.spec.js deleted file mode 100644 index 7623425..0000000 --- a/test/resources/NumberPortouts.spec.js +++ /dev/null @@ -1,187 +0,0 @@ -'use strict'; - -var utils = require('../../testUtils'); -var telnyx = utils.getTelnyxMock(); -var expect = require('chai').expect; - -var TEST_AUTH_KEY = utils.getUserTelnyxKey(); -var TEST_UUID = '123e4567-e89b-12d3-a456-426614174000'; - -describe('numberPortouts', function () { - describe('list', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - expect(response).to.have.property('meta'); - } - - it('Sends the correct request', function () { - return telnyx.numberPortouts - .list({ - filter: { - carrier_name: 'string', - spid: 'string', - status: 'string', - }, - page: { - number: 1, - size: 250, - }, - }) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.numberPortouts - .list( - { - filter: { - carrier_name: 'string', - spid: 'string', - status: 'string', - }, - page: { - number: 1, - size: 250, - }, - }, - TEST_AUTH_KEY - ) - .then(responseFn); - }); - }); - - describe('Document Id', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - } - it('Sends the correct request', function () { - return telnyx.numberPortouts.retrieve(TEST_UUID).then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.numberPortouts - .retrieve(TEST_UUID, TEST_AUTH_KEY) - .then(responseFn); - }); - }); - describe('Download Document', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - expect(response.data[0]).to.have.property('body'); - expect(response.data[0]).to.have.property('created_at'); - expect(response.data[0]).to.have.property('id'); - expect(response.data[0]).to.have.property('user_id'); - } - it('Sends the correct request', function () { - return telnyx.numberPortouts.retrieveComments(TEST_UUID).then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.numberPortouts - .retrieveComments(TEST_UUID, TEST_AUTH_KEY) - .then(responseFn); - }); - }); - describe('create', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - expect(response.data[0]).to.have.property('body'); - expect(response.data[0]).to.have.property('created_at'); - expect(response.data[0]).to.have.property('id'); - expect(response.data[0]).to.have.property('user_id'); - } - - it('Sends the correct request', function () { - return telnyx.numberPortouts - .create(TEST_UUID, {body: 'string'}) // Ensure TEST_UUID is a string - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.numberPortouts - .create(TEST_UUID, {body: 'string'}, TEST_AUTH_KEY) // Ensure TEST_UUID is a string - .then(responseFn); - }); - }); - - describe('listSupportingDocuments', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - expect(response.data[0]).to.have.property('created_at'); - expect(response.data[0]).to.have.property('document_id'); - expect(response.data[0]).to.have.property('id'); - expect(response.data[0]).to.have.property('portout_id'); - expect(response.data[0]).to.have.property('record_type'); - expect(response.data[0]).to.have.property('type'); - expect(response.data[0]).to.have.property('updated_at'); - } - it('Sends the correct request', function () { - return telnyx.numberPortouts - .listSupportingDocuments(TEST_UUID) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.numberPortouts - .listSupportingDocuments(TEST_UUID, TEST_AUTH_KEY) - .then(responseFn); - }); - }); - describe('createListOfSupportingDocuments', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - } - it('Sends the correct request', function () { - const requestBody = { - documents: [ - { - document_id: '0ccc7b54-4df3-4bca-a65a-3da1ecc777f0', - type: 'loa', - }, - ], - }; - return telnyx.numberPortouts - .createListOfSupportingDocuments(requestBody, TEST_UUID) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - const requestBody = { - documents: [ - { - document_id: '0ccc7b54-4df3-4bca-a65a-3da1ecc777f0', - type: 'loa', - }, - ], - }; - return telnyx.numberPortouts - .createListOfSupportingDocuments(requestBody, TEST_UUID, TEST_AUTH_KEY) - .then(responseFn); - }); - }); - describe('updateStatus', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - } - it('Sends the correct request', function () { - return telnyx.numberPortouts - .updateStatus({ - TEST_UUID, - status: 'status', - }) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.numberPortouts - .updateStatus( - { - TEST_UUID, - status: 'status', - }, - TEST_AUTH_KEY - ) - .then(responseFn); - }); - }); -}); diff --git a/test/resources/NumberReservations.spec.js b/test/resources/NumberReservations.spec.js deleted file mode 100644 index a753fdd..0000000 --- a/test/resources/NumberReservations.spec.js +++ /dev/null @@ -1,98 +0,0 @@ -'use strict'; - -var utils = require('../../testUtils'); -var telnyx = utils.getTelnyxMock(); -var expect = require('chai').expect; - -var TEST_AUTH_KEY = utils.getUserTelnyxKey(); -var TEST_UUID = '123e4567-e89b-12d3-a456-426614174000'; - -describe('NumberReservations Resource', function() { - function responseFn(response) { - expect(response.data).to.have.property('id'); - expect(response.data).to.have.property('status'); - expect(response.data).to.have.property('phone_numbers'); - expect(response.data).to.include({record_type: 'number_reservation'}); - } - - const numberReservationCreateData = { - phone_numbers: [{phone_number: '+19705555098'}] - } - - describe('retrieve', function() { - it('Sends the correct request', function() { - return telnyx.numberReservations.retrieve(TEST_UUID) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function() { - return telnyx.numberReservations.retrieve(TEST_UUID, TEST_AUTH_KEY) - .then(responseFn); - }); - }); - - describe('list', function() { - function listResponseFn(response) { - return responseFn({data: response.data[0]}); - } - - it('Sends the correct request', function() { - return telnyx.numberReservations.list() - .then(listResponseFn); - }); - - it('Sends the correct request [with specified auth]', function() { - return telnyx.numberReservations.list(TEST_AUTH_KEY) - .then(listResponseFn); - }); - }); - - describe('create', function() { - function responseFn(response) { - expect(response.data).to.have.property('id'); - expect(response.data).to.have.property('status'); - expect(response.data).to.have.property('phone_numbers'); - - expect(response.data.record_type).to.be.eq('number_reservation'); - expect(response.data.phone_numbers[0]).to.include({ - phone_number: '+19705555098' - }); - } - - it('Sends the correct request', function() { - return telnyx.numberReservations.create(numberReservationCreateData) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function() { - return telnyx.numberReservations.create(numberReservationCreateData, TEST_AUTH_KEY) - .then(responseFn); - }); - }); - - describe.skip('extend', function() { - function responseFn(response) { - expect(response.data).to.have.property('id'); - expect(response.data).to.have.property('status'); - expect(response.data).to.have.property('phone_numbers'); - expect(response.data).to.include({record_type: 'number_reservation'}); - } - - it('Sends the correct request', function() { - return telnyx.numberReservations.create(numberReservationCreateData) - .then(function(response) { - const numberReservation = response.data; - return numberReservation.extend({}) - .then(responseFn); - }) - }); - it('Sends the correct request [with specified auth]', function() { - return telnyx.numberReservations.create(numberReservationCreateData) - .then(function(response) { - const numberReservation = response.data; - return numberReservation.extend({}, TEST_AUTH_KEY) - .then(responseFn); - }) - }); - }); -}); diff --git a/test/resources/OtaUpdates.spec.js b/test/resources/OtaUpdates.spec.js deleted file mode 100644 index 75e6008..0000000 --- a/test/resources/OtaUpdates.spec.js +++ /dev/null @@ -1,50 +0,0 @@ -'use strict'; - -var utils = require('../../testUtils'); -var telnyx = utils.getTelnyxMock(); -var expect = require('chai').expect; - -var TEST_AUTH_KEY = utils.getUserTelnyxKey(); -var TEST_UUID = '123e4567-e89b-12d3-a456-426614174000'; - -describe('OtaUpdates Resource', function() { - function responseFn(response) { - expect(response.data).to.include.keys(['id', 'sim_card_id', 'status', 'settings']); - expect(response.data).to.include({ - record_type: 'ota_update', - type: 'sim_card_network_preferences' - }); - } - - describe('retrieve', function() { - it('Sends the correct request', function() { - return telnyx.otaUpdates.retrieve(TEST_UUID) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function() { - return telnyx.otaUpdates.retrieve(TEST_UUID, TEST_AUTH_KEY) - .then(responseFn); - }); - }); - - describe('list', function() { - function responseFn(response) { - expect(response.data[0]).to.include.keys(['id', 'sim_card_id', 'status']); - expect(response.data[0]).to.include({ - record_type: 'ota_update', - type: 'sim_card_network_preferences' - }); - } - - it('Sends the correct request', function() { - return telnyx.otaUpdates.list() - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function() { - return telnyx.otaUpdates.list(TEST_AUTH_KEY) - .then(responseFn); - }); - }); -}); diff --git a/test/resources/Outbound.spec.js b/test/resources/Outbound.spec.js deleted file mode 100644 index 12a3f91..0000000 --- a/test/resources/Outbound.spec.js +++ /dev/null @@ -1,133 +0,0 @@ -'use strict'; - - -var utils = require('../../testUtils'); -var telnyx = utils.getTelnyxMock(); -var expect = require('chai').expect; - -var TEST_AUTH_KEY = utils.getUserTelnyxKey(); -var TEST_UUID = '123e4567-e89b-12d3-a456-426614174000'; - -describe('Outbound list', function() { - function responseFn(response) { - expect(response.data).to.have.property('id'); - expect(response.data).to.have.property('billing_group_id'); - expect(response.data).to.include({record_type: 'outbound_voice_profile'}); - } - - describe('retrieve', function() { - it('Sends the correct request', function() { - return telnyx.outboundVoiceProfiles.retrieve(TEST_UUID).then((response) => { - responseFn(response) - }); - }) - - it('Sends the correct request [with specified auth]', function() { - return telnyx.outboundVoiceProfiles.retrieve(TEST_UUID, TEST_AUTH_KEY) - .then(responseFn); - }); - }); - - describe('create', function() { - it('Sends the correct request', function() { - return telnyx.outboundVoiceProfiles.create({ - billing_group_id: '6a09cdc3-8948-47f0-aa62-74ac943d6c58', - concurrent_call_limit: 10, - name: 'name' - }) - .then(responseFn); - }) - - it('Sends the correct request [with specified auth]', function() { - return telnyx.outboundVoiceProfiles.create({ - billing_group_id: '6a09cdc3-8948-47f0-aa62-74ac943d6c58', - concurrent_call_limit: 10, - name: 'name' - }, TEST_AUTH_KEY) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth in options]', function() { - return telnyx.outboundVoiceProfiles.create({ - billing_group_id: '6a09cdc3-8948-47f0-aa62-74ac943d6c58', - concurrent_call_limit: 10, - name: 'name' - }, {api_key: TEST_AUTH_KEY}) - .then(responseFn); - }); - }); - - describe('list', function() { - function listResponseFn(response) { - return responseFn({data: response.data[0]}); - } - - it('Sends the correct request', function() { - return telnyx.outboundVoiceProfiles.list() - .then(listResponseFn); - }); - - it('Sends the correct request [with specified auth]', function() { - return telnyx.outboundVoiceProfiles.list(TEST_AUTH_KEY) - .then(listResponseFn); - }); - }); - - describe('del', function() { - function responseFn(response) { - if (response.data) { - expect(response.data).to.have.property('id'); - expect(response.data).to.include({record_type: 'outbound_voice_profile'}); - } - } - - it('Sends the correct request', function() { - return telnyx.outboundVoiceProfiles.create({billing_group_id: '6a09cdc3-8948-47f0-aa62-74ac943d6c58', name: 'name'}) - .then(function(response) { - const outboundVoiceProfiles = response.data; - return outboundVoiceProfiles.del() - .then(responseFn); - }) - }); - - it('Sends the correct request [with specified auth]', function() { - return telnyx.outboundVoiceProfiles.retrieve(TEST_UUID) - .then(function(response) { - const outboundVoiceProfiles = response.data; - return outboundVoiceProfiles.del(TEST_AUTH_KEY) - .then(responseFn); - }) - }); - }); - - describe('update', function() { - function responseFn(response) { - if (response.data) { - expect(response.data).to.have.property('id'); - expect(response.data).to.include({concurrent_call_limit: 12}); - } - } - - it('Sends the correct request', function() { - return telnyx.outboundVoiceProfiles.create({ - billing_group_id: '6a09cdc3-8948-47f0-aa62-74ac943d6c58', - concurrent_call_limit: 10, - name: 'name' - }) - .then(function(response) { - const ip = response.data; - return ip.update({billing_group_id: '6a09cdc3-8948-47f0-aa62-74ac943d6c59', concurrent_call_limit: 12}) - .then(responseFn); - }) - }); - - it('Sends the correct request [with specified auth]', function() { - return telnyx.outboundVoiceProfiles.retrieve(TEST_UUID) - .then(function(response) { - const ip = response.data; - return ip.update({concurrent_call_limit: 12}, TEST_AUTH_KEY) - .then(responseFn); - }) - }); - }); -}); diff --git a/test/resources/PhoneNumberAssignmentByProfile.spec.js b/test/resources/PhoneNumberAssignmentByProfile.spec.js deleted file mode 100644 index 42fe903..0000000 --- a/test/resources/PhoneNumberAssignmentByProfile.spec.js +++ /dev/null @@ -1,79 +0,0 @@ -'use strict'; - -var utils = require('../../testUtils'); -var telnyx = utils.getTelnyxMock(); -var expect = require('chai').expect; -var TEST_AUTH_KEY = utils.getUserTelnyxKey(); -describe('Get Assignment Task Status', function () { - describe('retrieveTaskStatus', function () { - function responseFn(response) { - expect(response).to.have.property('status'); - expect(response).to.have.property('taskId'); - } - - it('Sends the correct request', function () { - return telnyx.phoneNumberAssignmentByProfile - .retrieveTaskStatus({ - taskId: 'string', - }) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.phoneNumberAssignmentByProfile - .retrieveTaskStatus( - { - taskId: 'string', - }, - TEST_AUTH_KEY - ) - .then(responseFn); - }); - }); - describe('retrievePhoneNumberStatus', function () { - function responseFn(response) { - expect(response).to.have.property('records'); - expect(response.records).to.be.an('array'); - expect(response.records[0]).to.have.property('phoneNumber'); - expect(response.records[0]).to.have.property('status'); - expect(response.records[0]).to.have.property('taskId'); - } - - it('should assign phone number by profile', function () { - return telnyx.phoneNumberAssignmentByProfile - .retrievePhoneNumberStatus({taskId: 'taskId'}) - .then(responseFn); - }); - - it('should assign phone number by profile [with specified auth]', function () { - return telnyx.phoneNumberAssignmentByProfile - .retrievePhoneNumberStatus({taskId: 'taskId'}, TEST_AUTH_KEY) - .then(responseFn); - }); - }); - describe('create', function () { - function responseFn(response) { - expect(response).to.have.property('messagingProfileId'); - expect(response).to.have.property('taskId'); - } - - it('Sends the correct request', function () { - return telnyx.phoneNumberAssignmentByProfile - .create({ - messagingProfileId: '4001767e-ce0f-4cae-9d5f-0d5e636e7809', - }) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.phoneNumberAssignmentByProfile - .create( - { - messagingProfileId: '4001767e-ce0f-4cae-9d5f-0d5e636e7809', - }, - TEST_AUTH_KEY - ) - .then(responseFn); - }); - }); -}); diff --git a/test/resources/PhoneNumberInboundChannels.spec.js b/test/resources/PhoneNumberInboundChannels.spec.js deleted file mode 100644 index 184e314..0000000 --- a/test/resources/PhoneNumberInboundChannels.spec.js +++ /dev/null @@ -1,47 +0,0 @@ -'use strict'; - -var utils = require('../../testUtils'); -var telnyx = utils.getTelnyxMock(); -var expect = require('chai').expect; - -var TEST_AUTH_KEY = utils.getUserTelnyxKey(); - -describe('Phone Numbers Inbound Channels', function () { - describe('retrieve', function () { - function responseFn(response) { - expect(response.data).to.include({ - record_type: 'inbound_channels', - }); - } - - it('Sends the correct request', function () { - return telnyx.phoneNumbersInboundChannels.retrieve().then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.phoneNumbersInboundChannels - .retrieve(TEST_AUTH_KEY) - .then(responseFn); - }); - }); - - describe('update', function () { - function responseFn(response) { - if (response.data) { - expect(response.data).to.include({channels: 7}); - expect(response.data).to.include({record_type: 'inbound_channels'}); - } - } - - it('Sends the correct request', function () { - return telnyx.phoneNumbersInboundChannels - .update({channels: 8}) - .then(responseFn); - }); - it('Sends the correct request [with specified auth]', function () { - return telnyx.phoneNumbersInboundChannels - .update({channels: 8}, TEST_AUTH_KEY) - .then(responseFn); - }); - }); -}); diff --git a/test/resources/PhoneNumbers.spec.js b/test/resources/PhoneNumbers.spec.js deleted file mode 100644 index d46ccd5..0000000 --- a/test/resources/PhoneNumbers.spec.js +++ /dev/null @@ -1,137 +0,0 @@ -'use strict'; - -var utils = require('../../testUtils'); -var telnyx = utils.getTelnyxMock(); -var expect = require('chai').expect; - -var TEST_AUTH_KEY = utils.getUserTelnyxKey(); -var TEST_UUID = '123e4567-e89b-12d3-a456-426614174000'; - -describe('PhoneNumbers Resource', function() { - function responseFn(response) { - expect(response.data).to.have.property('id'); - expect(response.data).to.have.property('phone_number'); - expect(response.data).to.include({record_type: 'phone_number'}); - } - - describe('update', function() { - it('Sends the correct request', function() { - return telnyx.phoneNumbers.update(TEST_UUID, {status: 'active'}) - .then(responseFn) - }); - }); - - describe('del', function() { - it('Sends the correct request', function() { - return telnyx.phoneNumbers.del(TEST_UUID) - .then(responseFn); - }); - }); - - describe('list', function() { - function listResponseFn(response) { - return responseFn({data: response.data[0]}); - } - - it('Sends the correct request', function() { - return telnyx.phoneNumbers.list() - .then(listResponseFn); - }); - - it('Sends the correct request [with specified auth]', function() { - return telnyx.phoneNumbers.list(TEST_AUTH_KEY) - .then(listResponseFn); - }); - }); - - describe('retrieve', function() { - it('Sends the correct request', function() { - return telnyx.phoneNumbers.retrieve(TEST_UUID) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function() { - return telnyx.phoneNumbers.retrieve(TEST_UUID, TEST_AUTH_KEY) - .then(responseFn); - }); - }); - - describe('setEmergencySettings', function() { - function responseFn(response) { - expect(response.data).to.have.property('id'); - expect(response.data).to.include({record_type: 'voice_settings'}); - expect(response.data).to.have.property('emergency'); - expect(response.data.emergency).to.include({emergency_enabled: true, emergency_address_id: '1315261609962112019'}); - } - - it('Sends the correct request', function() { - return telnyx.phoneNumbers.setEmergencySettings(TEST_UUID, {emergency_enabled: true, emergency_address_id: '1315261609962112019'}) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function() { - return telnyx.phoneNumbers.setEmergencySettings(TEST_UUID, {emergency_enabled: true, emergency_address_id: '1315261609962112019'}, TEST_AUTH_KEY) - .then(responseFn); - }); - }); - - describe('Voice methods', function() { - function responseFn(response) { - expect(response.data).to.have.property('id'); - expect(response.data).to.have.property('translated_number'); - expect(response.data).to.have.property('connection_id'); - expect(response.data).to.include({record_type: 'voice_settings'}); - } - - describe('retrieveVoiceSettings', function() { - it('Sends the correct request', function() { - return telnyx.phoneNumbers.retrieveVoiceSettings(TEST_UUID) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function() { - return telnyx.phoneNumbers.retrieveVoiceSettings(TEST_UUID, TEST_AUTH_KEY) - .then(responseFn); - }); - }); - - describe('updateVoiceSettings', function() { - it('Sends the correct request', function() { - return telnyx.phoneNumbers.updateVoiceSettings(TEST_UUID, { - tech_prefix_enabled: true, - }) - .then(responseFn); - }); - }); - }); - - describe('Messaging methods', function() { - function responseFn(response) { - expect(response.data).to.have.property('id'); - expect(response.data).to.have.property('phone_number'); - expect(response.data).to.have.property('messaging_profile_id'); - expect(response.data).to.include({record_type: 'messaging_settings'}); - } - - describe('retrieveMessagingSettings', function() { - it('Sends the correct request', function() { - return telnyx.phoneNumbers.retrieveMessagingSettings(TEST_UUID) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function() { - return telnyx.phoneNumbers.retrieveMessagingSettings(TEST_UUID, TEST_AUTH_KEY) - .then(responseFn); - }); - }); - - describe('updateMessagingSettings', function() { - it('Sends the correct request', function() { - return telnyx.phoneNumbers.updateMessagingSettings(TEST_UUID, { - messaging_product: 'P2P', - }) - .then(responseFn); - }); - }); - }); -}); diff --git a/test/resources/PhoneNumbersMessaging.spec.js b/test/resources/PhoneNumbersMessaging.spec.js deleted file mode 100644 index 672966d..0000000 --- a/test/resources/PhoneNumbersMessaging.spec.js +++ /dev/null @@ -1,30 +0,0 @@ -'use strict'; - -var utils = require('../../testUtils'); -var telnyx = utils.getTelnyxMock(); -var expect = require('chai').expect; - -var TEST_AUTH_KEY = utils.getUserTelnyxKey(); - -describe('Phone Numbers Messaging Resource', function() { - function responseFn(response) { - expect(response.data[0]).to.include({ - record_type: 'messaging_settings', - }); - expect(response.data[0]).to.have.property('id'); - expect(response.data[0]).to.have.property('phone_number'); - expect(response.data[0]).to.have.property('messaging_profile_id'); - } - - describe('list', function() { - it('Sends the correct request', function() { - return telnyx.phoneNumbers.messaging.list() - .then(responseFn) - }); - - it('Sends the correct request [with specified auth]', function() { - return telnyx.phoneNumbers.messaging.list(TEST_AUTH_KEY) - .then(responseFn) - }); - }); -}); diff --git a/test/resources/PhoneNumbersRegulatoryRequirements.spec.js b/test/resources/PhoneNumbersRegulatoryRequirements.spec.js deleted file mode 100644 index 769f17b..0000000 --- a/test/resources/PhoneNumbersRegulatoryRequirements.spec.js +++ /dev/null @@ -1,33 +0,0 @@ -'use strict'; - -var utils = require('../../testUtils'); -var telnyx = utils.getTelnyxMock(); -var expect = require('chai').expect; - -var TEST_AUTH_KEY = utils.getUserTelnyxKey(); - -// Skip tests as path out of sync with mock for now -describe.skip('PhoneNumberRegulatoryRequirements Resource', function() { - describe('list', function() { - function responseFn(response) { - expect(response.data[0]).to.have.property('phone_number'); - expect(response.data[0]).to.have.property('regulatory_group_id'); - expect(response.data[0]).to.have.property('regulatory_requirements'); - expect(response.data[0]).to.include({record_type: 'phone_number_regulatory_requirement'}); - expect(response.data[0].regulatory_requirements[0]).to.have.property('requirement_type'); - expect(response.data[0].regulatory_requirements[0]).to.have.property('label'); - expect(response.data[0].regulatory_requirements[0]).to.have.property('field_type'); - expect(response.data[0].regulatory_requirements[0]).to.include({record_type: 'regulatory_requirement'}); - } - - it('Sends the correct request', function() { - return telnyx.phoneNumberRegulatoryRequirements.list() - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function() { - return telnyx.phoneNumberRegulatoryRequirements.list(TEST_AUTH_KEY) - .then(responseFn); - }); - }); -}); diff --git a/test/resources/PhoneNumbersVoice.spec.js b/test/resources/PhoneNumbersVoice.spec.js deleted file mode 100644 index 0a89d89..0000000 --- a/test/resources/PhoneNumbersVoice.spec.js +++ /dev/null @@ -1,30 +0,0 @@ -'use strict'; - -var utils = require('../../testUtils'); -var telnyx = utils.getTelnyxMock(); -var expect = require('chai').expect; - -var TEST_AUTH_KEY = utils.getUserTelnyxKey(); - -describe('Phone Numbers Voice Resource', function() { - function responseFn(response) { - expect(response.data[0]).to.include({ - record_type: 'voice_settings', - }); - expect(response.data[0]).to.have.property('id'); - expect(response.data[0]).to.have.property('translated_number'); - expect(response.data[0]).to.have.property('connection_id'); - } - - describe('list', function() { - it('Sends the correct request', function() { - return telnyx.phoneNumbers.voice.list() - .then(responseFn) - }); - - it('Sends the correct request [with specified auth]', function() { - return telnyx.phoneNumbers.voice.list(TEST_AUTH_KEY) - .then(responseFn) - }); - }); -}); diff --git a/test/resources/PortabilityChecks.spec.js b/test/resources/PortabilityChecks.spec.js deleted file mode 100644 index 9e9b364..0000000 --- a/test/resources/PortabilityChecks.spec.js +++ /dev/null @@ -1,32 +0,0 @@ -'use strict'; - -var utils = require('../../testUtils'); -var telnyx = utils.getTelnyxMock(); -var expect = require('chai').expect; - -var TEST_AUTH_KEY = utils.getUserTelnyxKey(); - -describe('PortabilityChecks Resource', function() { - function responseFn(response) { - expect(response.data[0]).to.have.property('phone_number'); - expect(response.data[0]).to.have.property('fast_portable'); - expect(response.data[0]).to.have.property('portable'); - expect(response.data[0]).to.include({record_type: 'portability_check_result'}); - } - - const portabilityChecksParams = { - phone_numbers: ['+15555555555', '+16666666667'] - }; - - describe('run', function() { - it('Sends the correct request', function() { - return telnyx.portabilityChecks.run(portabilityChecksParams) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function() { - return telnyx.portabilityChecks.run(portabilityChecksParams, TEST_AUTH_KEY) - .then(responseFn); - }); - }); -}); diff --git a/test/resources/PortingOrders.spec.js b/test/resources/PortingOrders.spec.js deleted file mode 100644 index 9e1aad4..0000000 --- a/test/resources/PortingOrders.spec.js +++ /dev/null @@ -1,176 +0,0 @@ -'use strict'; - -var utils = require('../../testUtils'); -var telnyx = utils.getTelnyxMock(); -var expect = require('chai').expect; - -var TEST_AUTH_KEY = utils.getUserTelnyxKey(); -var TEST_UUID = '123e4567-e89b-12d3-a456-426614174000'; - -describe('PortingOrders Resource', function() { - function responseFn(response) { - expect(response.data).to.have.property('activation_settings'); - expect(response.data).to.have.property('end_user'); - expect(response.data).to.have.property('phone_number_configuration'); - expect(response.data).to.include({record_type: 'porting_order'}); - } - - function listResponseFn(response) { - return responseFn({data: response.data[0]}); - } - - const newPortingOrderParams = { - phone_numbers: ['+15555555555', '+16666666667'] - }; - - describe('list', function() { - it('Sends the correct request', function() { - return telnyx.portingOrders.list() - .then(listResponseFn); - }); - - it('Sends the correct request [with specified auth]', function() { - return telnyx.portingOrders.list() - .then(listResponseFn); - }); - }); - - describe('create', function() { - it('Sends the correct request', function() { - return telnyx.portingOrders.create(newPortingOrderParams).then(listResponseFn); - }) - - it('Sends the correct request [with specified auth]', function() { - return telnyx.portingOrders.create(newPortingOrderParams, TEST_AUTH_KEY) - .then(listResponseFn); - }); - }); - - describe('retrieve', function() { - it('Sends the correct request', function() { - return telnyx.portingOrders.retrieve(TEST_UUID).then(responseFn); - }) - - it('Sends the correct request [with specified auth]', function() { - return telnyx.portingOrders.retrieve(TEST_UUID, TEST_AUTH_KEY) - .then(responseFn); - }); - }); - - describe('listExceptionTypes', function() { - function responseFn(response) { - expect(response.data[0]).to.have.property('code'); - expect(response.data[0]).to.have.property('description'); - } - - it('Sends the correct request', function() { - return telnyx.portingOrders.listExceptionTypes().then(responseFn); - }) - - it('Sends the correct request [with specified auth]', function() { - return telnyx.portingOrders.listExceptionTypes(TEST_AUTH_KEY) - .then(responseFn); - }); - }); - - describe('listActivationJobs', function() { - function responseFn(response) { - expect(response.data[0]).to.have.property('id'); - expect(response.data[0]).to.have.property('status'); - expect(response.data[0]).to.have.include({record_type: 'porting_activation_job'}); - } - - it('Sends the correct request', function() { - return telnyx.portingOrders.listActivationJobs(TEST_UUID).then(responseFn); - }) - - it('Sends the correct request [with specified auth]', function() { - return telnyx.portingOrders.listActivationJobs(TEST_UUID, TEST_AUTH_KEY) - .then(responseFn); - }); - }); - - describe.skip('cancelOrder', function() { - it('Sends the correct request', function() { - return telnyx.portingOrders.cancelOrder(TEST_UUID).then(responseFn); - }) - }); - - describe('listAllowedFocWindows', function() { - function responseFn(response) { - expect(response.data[0]).to.have.property('started_at'); - expect(response.data[0]).to.have.property('ended_at'); - expect(response.data[0]).to.have.include({record_type: 'porting_order'}); - } - - it('Sends the correct request', function() { - return telnyx.portingOrders.listAllowedFocWindows(TEST_UUID).then(responseFn); - }); - }); - - describe('retrieveLoaTemplate', function() { - function responseFn(response) { - expect(response.data).to.not.be.null - } - - it('Sends the correct request', function() { - return telnyx.portingOrders.retrieveLoaTemplate(TEST_UUID).then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function() { - return telnyx.portingOrders.retrieveLoaTemplate(TEST_UUID, TEST_AUTH_KEY) - .then(responseFn); - }); - }); - - describe.skip('confirmOrder', function() { - it('Sends the correct request', function() { - return telnyx.portingOrders.confirmOrder(TEST_UUID).then(responseFn); - }) - - it('Sends the correct request [with specified auth]', function() { - return telnyx.portingOrders.confirmOrder(TEST_UUID, TEST_AUTH_KEY) - .then(responseFn); - }); - }); - - describe('update', function() { - const INVOICE_ID = '35146afd-df93-4963-b1e9-1a085e2ae875'; - - it('Sends the correct request', function() { - return telnyx.portingOrders.create(newPortingOrderParams) - .then(function(response) { - const po = response.data; - return po.update({documents: {invoice: INVOICE_ID}}) - .then(responseFn); - }) - }); - it('Sends the correct request [with specified auth]', function() { - return telnyx.portingOrders.retrieve(TEST_UUID) - .then(function(response) { - const po = response.data; - return po.update({documents: {invoice: INVOICE_ID}}, TEST_AUTH_KEY) - .then(responseFn); - }) - }); - }); - - describe.skip('del', function() { - it('Sends the correct request', function() { - return telnyx.portingOrders.create(newPortingOrderParams) - .then(function(response) { - const po = response.data; - return po.del() - .then(responseFn); - }) - }); - it('Sends the correct request [with specified auth]', function() { - return telnyx.portingOrders.retrieve('id') - .then(function(response) { - const po = response.data; - return po.del(TEST_AUTH_KEY) - .then(responseFn); - }) - }); - }); -}); diff --git a/test/resources/PortingPhoneNumbers.spec.js b/test/resources/PortingPhoneNumbers.spec.js deleted file mode 100644 index ccaa3c8..0000000 --- a/test/resources/PortingPhoneNumbers.spec.js +++ /dev/null @@ -1,32 +0,0 @@ -'use strict'; - -var utils = require('../../testUtils'); -var telnyx = utils.getTelnyxMock(); -var expect = require('chai').expect; - -var TEST_AUTH_KEY = utils.getUserTelnyxKey(); - -describe('PortingPhoneNumbers Resource', function() { - function responseFn(response) { - expect(response.data).to.have.property('activation_status'); - expect(response.data).to.have.property('portability_status'); - expect(response.data).to.have.property('porting_order_id'); - expect(response.data).to.include({record_type: 'porting_phone_number'}); - } - - function listResponseFn(response) { - return responseFn({data: response.data[0]}); - } - - describe('list', function() { - it('Sends the correct request', function() { - return telnyx.portingPhoneNumbers.list() - .then(listResponseFn); - }); - - it('Sends the correct request [with specified auth]', function() { - return telnyx.portingPhoneNumbers.list(TEST_AUTH_KEY) - .then(listResponseFn); - }); - }); -}); diff --git a/test/resources/PortoutRequests.spec.js b/test/resources/PortoutRequests.spec.js deleted file mode 100644 index 8a24447..0000000 --- a/test/resources/PortoutRequests.spec.js +++ /dev/null @@ -1,161 +0,0 @@ -'use strict'; - -var utils = require('../../testUtils'); -var telnyx = utils.getTelnyxMock(); -var expect = require('chai').expect; - -var TEST_AUTH_KEY = utils.getUserTelnyxKey(); -var TEST_UUID = '123e4567-e89b-12d3-a456-426614174000'; - -describe('portout', function () { - describe('updateStatus', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - } - - it('Sends the correct request', function () { - return telnyx.portoutRequests - .updateStatus(TEST_UUID, 'string', {body: 'string'}) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.portoutRequests - .updateStatus(TEST_UUID, 'string', {body: 'string'}, TEST_AUTH_KEY) - .then(responseFn); - }); - }); - - describe('listComments', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - for (let index = 0; index < response.data.length; index++) { - const element = response.data[index]; - expect(element).to.have.property('body'); - expect(element).to.have.property('created_at'); - expect(element).to.have.property('id'); - expect(element).to.have.property('user_id'); - } - } - - it('Sends the correct request', function () { - return telnyx.portoutRequests.listComments(TEST_UUID).then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.portoutRequests - .listComments(TEST_UUID, TEST_AUTH_KEY) - .then(responseFn); - }); - }); - - describe('createComment', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - for (let index = 0; index < response.data.length; index++) { - const element = response.data[index]; - expect(element).to.have.property('body'); - expect(element).to.have.property('created_at'); - expect(element).to.have.property('id'); - expect(element).to.have.property('user_id'); - } - } - - it('Sends the correct request', function () { - return telnyx.portoutRequests.createComment(TEST_UUID).then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.portoutRequests - .createComment(TEST_UUID, TEST_AUTH_KEY) - .then(responseFn); - }); - }); - describe('retrieveRequest', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - } - - it('Sends the correct request', function () { - return telnyx.portoutRequests.retrieveRequest(TEST_UUID).then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.portoutRequests - .retrieveRequest(TEST_UUID, TEST_AUTH_KEY) - .then(responseFn); - }); - }); - describe('retrieveComment', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - for (let index = 0; index < response.data.length; index++) { - const element = response.data[index]; - expect(element).to.have.property('body'); - expect(element).to.have.property('created_at'); - expect(element).to.have.property('id'); - expect(element).to.have.property('user_id'); - } - } - - it('Sends the correct request', function () { - return telnyx.portoutRequests.retrieveComment(TEST_UUID).then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.portoutRequests - .retrieveComment(TEST_UUID, TEST_AUTH_KEY) - .then(responseFn); - }); - }); - describe('listDocuments', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - for (let index = 0; index < response.data.length; index++) { - const element = response.data[index]; - expect(element).to.have.property('created_at'); - expect(element).to.have.property('document_id'); - expect(element).to.have.property('id'); - expect(element).to.have.property('portout_id'); - expect(element).to.have.property('record_type'); - expect(element).to.have.property('type'); - expect(element).to.have.property('updated_at'); - } - } - - it('Sends the correct request', function () { - return telnyx.portoutRequests.listDocuments(TEST_UUID).then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.portoutRequests - .listDocuments(TEST_UUID, TEST_AUTH_KEY) - .then(responseFn); - }); - }); - describe('createDocuments', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - for (let index = 0; index < response.data.length; index++) { - const element = response.data[index]; - expect(element).to.have.property('created_at'); - expect(element).to.have.property('document_id'); - expect(element).to.have.property('id'); - expect(element).to.have.property('portout_id'); - expect(element).to.have.property('record_type'); - expect(element).to.have.property('type'); - expect(element).to.have.property('updated_at'); - } - } - - it('Sends the correct request', function () { - return telnyx.portoutRequests.createDocuments(TEST_UUID).then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.portoutRequests - .createDocuments(TEST_UUID, TEST_AUTH_KEY) - .then(responseFn); - }); - }); -}); diff --git a/test/resources/ProgrammableFaxCommands.spec.js b/test/resources/ProgrammableFaxCommands.spec.js deleted file mode 100644 index 555c230..0000000 --- a/test/resources/ProgrammableFaxCommands.spec.js +++ /dev/null @@ -1,175 +0,0 @@ -'use strict'; - -var utils = require('../../testUtils'); -var telnyx = utils.getTelnyxMock(); -var expect = require('chai').expect; - -var TEST_AUTH_KEY = utils.getUserTelnyxKey(); -var TEST_UUID = '123e4567-e89b-12d3-a456-426614174000'; - -describe('fax', function () { - describe('list', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - } - - it('Sends the correct request', function () { - return telnyx.programmableFaxCommands - .list({ - filter: { - date_created_at: { - eq: '2021-04-25', - gte: '2021-04-25', - lte: '2021-04-25', - }, - date_updated_at: { - eq: '2021-04-25', - gte: '2021-04-25', - lte: '2021-04-25', - }, - unique_name: 'my_video_room', - }, - include_sessions: 'true', - page: { - size: '20', - number: '1', - }, - }) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.programmableFaxCommands - .list( - { - filter: { - date_created_at: { - eq: '2021-04-25', - gte: '2021-04-25', - lte: '2021-04-25', - }, - date_updated_at: { - eq: '2021-04-25', - gte: '2021-04-25', - lte: '2021-04-25', - }, - unique_name: 'my_video_room', - }, - include_sessions: 'true', - page: { - size: '20', - number: '1', - }, - }, - TEST_AUTH_KEY - ) - .then(responseFn); - }); - }); - describe('create', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - } - - it('Sends the correct request', function () { - return telnyx.programmableFaxCommands - .send({ - connection_id: '234423', - from: '+13125790015', - media_name: 'my_media_uploaded_to_media_storage_api', - media_url: - 'https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf', - monochrome: false, - quality: 'high', - store_media: false, - t38_enabled: true, - to: '+13127367276', - webhook_url: 'https://www.example.com/server-b/', - }) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.programmableFaxCommands - .send( - { - connection_id: '234423', - from: '+13125790015', - media_name: 'my_media_uploaded_to_media_storage_api', - media_url: - 'https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf', - monochrome: false, - quality: 'high', - store_media: false, - t38_enabled: true, - to: '+13127367276', - webhook_url: 'https://www.example.com/server-b/', - }, - TEST_AUTH_KEY - ) - .then(responseFn); - }); - }); - describe('del', function () { - function responseFn(response) { - expect(response.lastResponse.statusCode).to.equal(204); - } - - it('Sends the correct request', function () { - return telnyx.programmableFaxCommands.del(TEST_UUID).then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.programmableFaxCommands - .del(TEST_UUID, TEST_AUTH_KEY) - .then(responseFn); - }); - }); - describe('retrieve', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - } - - it('Sends the correct request', function () { - return telnyx.programmableFaxCommands - .retrieve(TEST_UUID) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.programmableFaxCommands - .retrieve(TEST_UUID, TEST_AUTH_KEY) - .then(responseFn); - }); - }); - describe('cancel', function () { - function responseFn(response) { - expect(response.lastResponse.statusCode).to.equal(202); - } - - it('Sends the correct request', function () { - return telnyx.programmableFaxCommands.cancel(TEST_UUID).then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.programmableFaxCommands - .cancel(TEST_UUID, TEST_AUTH_KEY) - .then(responseFn); - }); - }); - describe('refresh', function () { - function responseFn(response) { - expect(response.lastResponse.statusCode).to.equal(200); - } - - it('Sends the correct request', function () { - return telnyx.programmableFaxCommands.refresh(TEST_UUID).then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.programmableFaxCommands - .refresh(TEST_UUID, TEST_AUTH_KEY) - .then(responseFn); - }); - }); -}); diff --git a/test/resources/PublicKey.spec.js b/test/resources/PublicKey.spec.js deleted file mode 100644 index 6fb2ad6..0000000 --- a/test/resources/PublicKey.spec.js +++ /dev/null @@ -1,17 +0,0 @@ -'use strict'; - -var telnyx = require('../../testUtils').getTelnyxMock(); -var expect = require('chai').expect; - -describe.skip('PublicKey Resource', function() { - describe('retrieve', function() { - it('Sends the correct request', function() { - return telnyx.publicKey.retrieve() - .then(function(response) { - expect(response.data).to.include({record_type: 'public_key'}); - expect(response.data).to.have.property('public'); - expect(response.data).to.have.property('organization_id'); - }); - }); - }); -}); diff --git a/test/resources/Queues.spec.js b/test/resources/Queues.spec.js deleted file mode 100644 index 1378918..0000000 --- a/test/resources/Queues.spec.js +++ /dev/null @@ -1,55 +0,0 @@ -'use strict'; - -var utils = require('../../testUtils'); -var telnyx = utils.getTelnyxMock(); -var expect = require('chai').expect; - -var TEST_AUTH_KEY = utils.getUserTelnyxKey(); - -describe('Queues Resource', function() { - describe('retrieve', function() { - function responseFn(response) { - expect(response.data).to.include({name: 'support'}); - } - - it('Sends the correct request', function() { - return telnyx.queues.retrieve('support').then(responseFn); - }) - - it('Sends the correct request [with specified auth]', function() { - return telnyx.queues.retrieve('support', TEST_AUTH_KEY) - .then(responseFn); - }); - }); - - describe('list_calls', function() { - function responseFn(response) { - expect(response.data[0]).to.have.property('call_control_id'); - expect(response.data[0]).to.have.property('queue_position'); - expect(response.data[0]).to.include({record_type: 'queue_call'}); - } - - it('Sends the correct request', function() { - return telnyx.queues.list_calls('support') - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function() { - return telnyx.queues.retrieve_call('support', '891510ac-f3e4-11e8-af5b-de00688a4901') - .then(responseFn); - }); - }); - - describe('retrieve_call', function() { - function responseFn(response) { - expect(response.data).to.have.property('call_control_id'); - expect(response.data).to.have.property('queue_position'); - expect(response.data).to.include({record_type: 'queue_call'}); - } - - it('Sends the correct request', function() { - return telnyx.queues.retrieve_call('queue_id', 'call_control_id') - .then(responseFn); - }); - }); -}); diff --git a/test/resources/RegisterCall.spec.js b/test/resources/RegisterCall.spec.js deleted file mode 100644 index 707a146..0000000 --- a/test/resources/RegisterCall.spec.js +++ /dev/null @@ -1,38 +0,0 @@ -'use strict'; - -var utils = require('../../testUtils'); -var telnyx = utils.getTelnyxMock(); -var expect = require('chai').expect; - -var TEST_AUTH_KEY = utils.getUserTelnyxKey(); - -describe('Register Call', function () { - describe('create', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - } - - it('Sends the correct request', function () { - return telnyx.registerCall - .create({ - from: '+15001340938', - reason: 'Confirm the Doctor appointment.', - to: '+18005550100', - }) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.registerCall - .create( - { - from: '+15001340938', - reason: 'Confirm the Doctor appointment.', - to: '+18005550100', - }, - TEST_AUTH_KEY - ) - .then(responseFn); - }); - }); -}); diff --git a/test/resources/RegulatoryRequirements.spec.js b/test/resources/RegulatoryRequirements.spec.js deleted file mode 100644 index 560128f..0000000 --- a/test/resources/RegulatoryRequirements.spec.js +++ /dev/null @@ -1,53 +0,0 @@ -'use strict'; - -var utils = require('../../testUtils'); -var telnyx = utils.getTelnyxMock(); -var expect = require('chai').expect; - -var TEST_AUTH_KEY = utils.getUserTelnyxKey(); - -describe.skip('RegulatoryRequirements Resource', function() { - describe('retrieve', function() { - function responseFn(response) { - expect(response.data).to.have.property('requirement_type'); - expect(response.data).to.have.property('label'); - expect(response.data).to.have.property('description'); - expect(response.data).to.have.property('field_type'); - expect(response.data).to.include({ - record_type: 'regulatory_requirement' - }); - } - - it('Sends the correct request', function() { - return telnyx.regulatoryRequirements.retrieve('123') - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function() { - return telnyx.regulatoryRequirements.retrieve('123', TEST_AUTH_KEY) - .then(responseFn); - }); - }); - - describe('list', function() { - function responseFn(response) { - expect(response.data[0]).to.have.property('requirement_type'); - expect(response.data[0]).to.have.property('label'); - expect(response.data[0]).to.have.property('description'); - expect(response.data[0]).to.have.property('field_type'); - expect(response.data[0]).to.include({ - record_type: 'regulatory_requirement' - }); - } - - it('Sends the correct request', function() { - return telnyx.regulatoryRequirements.list() - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function() { - return telnyx.regulatoryRequirements.list(TEST_AUTH_KEY) - .then(responseFn); - }); - }); -}); diff --git a/test/resources/ReportsMdrs.spec.js b/test/resources/ReportsMdrs.spec.js deleted file mode 100644 index 3f3e792..0000000 --- a/test/resources/ReportsMdrs.spec.js +++ /dev/null @@ -1,50 +0,0 @@ -'use strict'; - -var utils = require('../../testUtils'); -var telnyx = utils.getTelnyxMock(); -var expect = require('chai').expect; - -var TEST_AUTH_KEY = utils.getUserTelnyxKey(); - -describe('reportsMdrs', function () { - describe('list', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - } - - it('Sends the correct request', function () { - return telnyx.reportsMdrs - .list({ - start_date: 'string', - end_date: 'string', - id: 'e093fbe0-5bde-11eb-ae93-0242ac130002', - direction: 'INBOUND', - profile: 'My profile', - cld: '+15551237654', - cli: '+15551237654', - status: 'DELIVERED', - message_type: 'SMS', - }) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.reportsMdrs - .list( - { - start_date: 'string', - end_date: 'string', - id: 'e093fbe0-5bde-11eb-ae93-0242ac130002', - direction: 'INBOUND', - profile: 'My profile', - cld: '+15551237654', - cli: '+15551237654', - status: 'DELIVERED', - message_type: 'SMS', - }, - TEST_AUTH_KEY - ) - .then(responseFn); - }); - }); -}); diff --git a/test/resources/RoomCompositions.spec.js b/test/resources/RoomCompositions.spec.js deleted file mode 100644 index b64e507..0000000 --- a/test/resources/RoomCompositions.spec.js +++ /dev/null @@ -1,169 +0,0 @@ -'use strict'; - -var utils = require('../../testUtils'); -var telnyx = utils.getTelnyxMock(); -var expect = require('chai').expect; - -var TEST_AUTH_KEY = utils.getUserTelnyxKey(); -var TEST_UUID = '123e4567-e89b-12d3-a456-426614174000'; - -describe('Access IP Ranges Resource', function () { - describe('list', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - } - - it('Sends the correct request', function () { - return telnyx.roomCompositions - .list({ - filter: { - date_created_at: { - eq: '2021-04-25', - gte: '2021-04-25', - lte: '2021-04-25', - }, - session_id: '92e7d459-bcc5-4386-9f5f-6dd14a82588d', - status: 'completed', - }, - page: { - size: '20', - number: '1', - }, - }) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.roomCompositions - .list( - { - filter: { - date_created_at: { - eq: '2021-04-25', - gte: '2021-04-25', - lte: '2021-04-25', - }, - session_id: '92e7d459-bcc5-4386-9f5f-6dd14a82588d', - status: 'completed', - }, - page: { - size: '20', - number: '1', - }, - }, - TEST_AUTH_KEY - ) - .then(responseFn); - }); - }); - - describe('create', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - } - - it('Sends the correct request', function () { - return telnyx.roomCompositions - .create({ - format: 'mp4', - resolution: '800x600', - session_id: '0ccc7b54-4df3-4bca-a65a-3da1ecc777b0', - video_layout: { - property1: { - height: 360, - max_columns: 3, - max_rows: 3, - video_sources: ['7b61621f-62e0-4aad-ab11-9fd19e272e73'], - width: 480, - x_pos: 100, - y_pos: 100, - z_pos: 1, - }, - property2: { - height: 360, - max_columns: 3, - max_rows: 3, - video_sources: ['7b61621f-62e0-4aad-ab11-9fd19e272e73'], - width: 480, - x_pos: 100, - y_pos: 100, - z_pos: 1, - }, - }, - webhook_event_failover_url: 'https://failover.example.com', - webhook_event_url: 'https://example.com', - webhook_timeout_secs: 25, - }) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.roomCompositions - .create( - { - format: 'mp4', - resolution: '800x600', - session_id: '0ccc7b54-4df3-4bca-a65a-3da1ecc777b0', - video_layout: { - property1: { - height: 360, - max_columns: 3, - max_rows: 3, - video_sources: ['7b61621f-62e0-4aad-ab11-9fd19e272e73'], - width: 480, - x_pos: 100, - y_pos: 100, - z_pos: 1, - }, - property2: { - height: 360, - max_columns: 3, - max_rows: 3, - video_sources: ['7b61621f-62e0-4aad-ab11-9fd19e272e73'], - width: 480, - x_pos: 100, - y_pos: 100, - z_pos: 1, - }, - }, - webhook_event_failover_url: 'https://failover.example.com', - webhook_event_url: 'https://example.com', - webhook_timeout_secs: 25, - }, - TEST_AUTH_KEY - ) - .then(responseFn); - }); - }); - - describe('del', function () { - function responseFn(response) { - expect(response.lastResponse.statusCode).to.equal(204); - } - - it('Sends the correct request', function () { - return telnyx.roomCompositions.del(TEST_UUID).then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.roomCompositions - .del(TEST_UUID, TEST_AUTH_KEY) - .then(responseFn); - }); - }); - describe('retrieve', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - } - - it('Sends the correct request', function () { - return telnyx.roomCompositions.retrieve(TEST_UUID).then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.roomCompositions - .retrieve(TEST_UUID, TEST_AUTH_KEY) - .then(responseFn); - }); - }); -}); diff --git a/test/resources/RoomParticipants.spec.js b/test/resources/RoomParticipants.spec.js deleted file mode 100644 index 2a7da2d..0000000 --- a/test/resources/RoomParticipants.spec.js +++ /dev/null @@ -1,94 +0,0 @@ -'use strict'; - -var utils = require('../../testUtils'); -var telnyx = utils.getTelnyxMock(); -var expect = require('chai').expect; - -var TEST_AUTH_KEY = utils.getUserTelnyxKey(); -var TEST_UUID = '123e4567-e89b-12d3-a456-426614174000'; - -describe('roomParticipants', function () { - describe('list', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - } - - it('Sends the correct request', function () { - return telnyx.roomParticipants - .list({ - filter: { - date_joined_at: { - eq: '2021-04-25', - gte: '2021-04-25', - lte: '2021-04-25', - }, - date_updated_at: { - eq: '2021-04-25', - gte: '2021-04-25', - lte: '2021-04-25', - }, - date_left_at: { - eq: '2021-04-25', - gte: '2021-04-25', - lte: '2021-04-25', - }, - context: 'Alice', - session_id: '0ccc7b54-4df3-4bca-a65a-3da1ecc777f0', - }, - page: { - size: '20', - number: '1', - }, - }) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.roomParticipants - .list( - { - filter: { - date_joined_at: { - eq: '2021-04-25', - gte: '2021-04-25', - lte: '2021-04-25', - }, - date_updated_at: { - eq: '2021-04-25', - gte: '2021-04-25', - lte: '2021-04-25', - }, - date_left_at: { - eq: '2021-04-25', - gte: '2021-04-25', - lte: '2021-04-25', - }, - context: 'Alice', - session_id: '0ccc7b54-4df3-4bca-a65a-3da1ecc777f0', - }, - page: { - size: '20', - number: '1', - }, - }, - TEST_AUTH_KEY - ) - .then(responseFn); - }); - }); - describe('retrieve', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - } - - it('Sends the correct request', function () { - return telnyx.roomParticipants.retrieve(TEST_UUID).then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.roomParticipants - .retrieve(TEST_UUID, TEST_AUTH_KEY) - .then(responseFn); - }); - }); -}); diff --git a/test/resources/RoomSessions.spec.js b/test/resources/RoomSessions.spec.js deleted file mode 100644 index fa41dbe..0000000 --- a/test/resources/RoomSessions.spec.js +++ /dev/null @@ -1,210 +0,0 @@ -'use strict'; - -var utils = require('../../testUtils'); -var telnyx = utils.getTelnyxMock(); -var expect = require('chai').expect; - -var TEST_AUTH_KEY = utils.getUserTelnyxKey(); -var TEST_UUID = '123e4567-e89b-12d3-a456-426614174000'; - -describe('Access IP Ranges Resource', function () { - describe('list', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - } - - it('Sends the correct request', function () { - return telnyx.roomSessions - .list({ - filter: { - date_created_at: { - eq: '2021-04-25', - gte: '2021-04-25', - lte: '2021-04-25', - }, - date_updated_at: { - eq: '2021-04-25', - gte: '2021-04-25', - lte: '2021-04-25', - }, - date_ended_at: { - eq: '2021-04-25', - gte: '2021-04-25', - lte: '2021-04-25', - }, - room_id: '0ccc7b54-4df3-4bca-a65a-3da1ecc777f0', - active: 'true', - }, - include_participants: 'true', - page: { - size: '20', - number: '1', - }, - }) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.roomSessions - .list( - { - filter: { - date_created_at: { - eq: '2021-04-25', - gte: '2021-04-25', - lte: '2021-04-25', - }, - date_updated_at: { - eq: '2021-04-25', - gte: '2021-04-25', - lte: '2021-04-25', - }, - date_ended_at: { - eq: '2021-04-25', - gte: '2021-04-25', - lte: '2021-04-25', - }, - room_id: '0ccc7b54-4df3-4bca-a65a-3da1ecc777f0', - active: 'true', - }, - include_participants: 'true', - page: { - size: '20', - number: '1', - }, - }, - TEST_AUTH_KEY - ) - .then(responseFn); - }); - }); - - describe('retrieveRoomSessionId', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - } - - it('Sends the correct request', function () { - return telnyx.roomSessions - .retrieveRoomSessionId(TEST_UUID) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.roomSessions - .retrieveRoomSessionId(TEST_UUID, TEST_AUTH_KEY) - .then(responseFn); - }); - }); - - describe('muteSession', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - expect(response.data).to.have.property('result'); - } - - it('Sends the correct request', function () { - const requestBody = { - exclude: ['7b61621f-62e0-4aad-ab11-9fd19e272e73'], - participants: 'all', - }; - return telnyx.roomSessions - .muteSession(TEST_UUID, requestBody) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - const requestBody = { - exclude: ['7b61621f-62e0-4aad-ab11-9fd19e272e73'], - participants: 'all', - }; - return telnyx.roomSessions - .muteSession(TEST_UUID, requestBody, TEST_AUTH_KEY) - .then(responseFn); - }); - }); - describe('unmuteSession', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - expect(response.data).to.have.property('result'); - } - - it('Sends the correct request', function () { - const requestBody = { - exclude: ['7b61621f-62e0-4aad-ab11-9fd19e272e73'], - participants: 'all', - }; - return telnyx.roomSessions - .unmuteSession(TEST_UUID, requestBody) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - const requestBody = { - exclude: ['7b61621f-62e0-4aad-ab11-9fd19e272e73'], - participants: 'all', - }; - return telnyx.roomSessions - .unmuteSession(TEST_UUID, requestBody, TEST_AUTH_KEY) - .then(responseFn); - }); - }); - describe('kickParticipant', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - expect(response.data).to.have.property('result'); - } - - it('Sends the correct request', function () { - const requestBody = { - exclude: ['7b61621f-62e0-4aad-ab11-9fd19e272e73'], - participants: 'all', - }; - return telnyx.roomSessions - .kickParticipant(TEST_UUID, requestBody) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - const requestBody = { - exclude: ['7b61621f-62e0-4aad-ab11-9fd19e272e73'], - participants: 'all', - }; - return telnyx.roomSessions - .kickParticipant(TEST_UUID, requestBody, TEST_AUTH_KEY) - .then(responseFn); - }); - }); - describe('retrieveParticipants', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - } - - it('Sends the correct request', function () { - return telnyx.roomSessions - .retrieveParticipants(TEST_UUID) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.roomSessions - .retrieveParticipants(TEST_UUID, TEST_AUTH_KEY) - .then(responseFn); - }); - }); - describe('endSession', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - } - - it('Sends the correct request', function () { - return telnyx.roomSessions.endSession(TEST_UUID).then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.roomSessions - .endSession(TEST_UUID, TEST_AUTH_KEY) - .then(responseFn); - }); - }); -}); diff --git a/test/resources/Rooms.spec.js b/test/resources/Rooms.spec.js deleted file mode 100644 index 66cc809..0000000 --- a/test/resources/Rooms.spec.js +++ /dev/null @@ -1,155 +0,0 @@ -'use strict'; - -var utils = require('../../testUtils'); -var telnyx = utils.getTelnyxMock(); -var expect = require('chai').expect; - -var TEST_AUTH_KEY = utils.getUserTelnyxKey(); -var TEST_UUID = '123e4567-e89b-12d3-a456-426614174000'; - -describe('numberPortoutsSupportingDocuments', function () { - describe('list', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - } - - it('Sends the correct request', function () { - return telnyx.rooms - .list({ - filter: { - date_created_at: { - eq: '2021-04-25', - gte: '2021-04-25', - lte: '2021-04-25', - }, - date_updated_at: { - eq: '2021-04-25', - gte: '2021-04-25', - lte: '2021-04-25', - }, - unique_name: 'my_video_room', - }, - include_sessions: 'true', - page: { - size: '20', - number: '1', - }, - }) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.rooms - .list( - { - filter: { - date_created_at: { - eq: '2021-04-25', - gte: '2021-04-25', - lte: '2021-04-25', - }, - date_updated_at: { - eq: '2021-04-25', - gte: '2021-04-25', - lte: '2021-04-25', - }, - unique_name: 'my_video_room', - }, - include_sessions: 'true', - page: { - size: '20', - number: '1', - }, - }, - TEST_AUTH_KEY - ) - .then(responseFn); - }); - }); - describe('create', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - } - - it('Sends the correct request', function () { - return telnyx.rooms - .create({ - enable_recording: true, - max_participants: 10, - unique_name: 'My room', - webhook_event_failover_url: 'https://failover.example.com', - webhook_event_url: 'https://example.com', - webhook_timeout_secs: 25, - }) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.rooms - .create( - { - enable_recording: true, - max_participants: 10, - unique_name: 'My room', - webhook_event_failover_url: 'https://failover.example.com', - webhook_event_url: 'https://example.com', - webhook_timeout_secs: 25, - }, - TEST_AUTH_KEY - ) - .then(responseFn); - }); - }); - describe('del', function () { - function responseFn(response) { - expect(response.lastResponse.statusCode).to.equal(204); - } - - it('Sends the correct request', function () { - return telnyx.rooms.del(TEST_UUID).then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.rooms.del(TEST_UUID, TEST_AUTH_KEY).then(responseFn); - }); - }); - describe('retrieve', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - } - - it('Sends the correct request', function () { - return telnyx.rooms.retrieve(TEST_UUID).then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.rooms.retrieve(TEST_UUID, TEST_AUTH_KEY).then(responseFn); - }); - }); - describe('update', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - } - - it('Sends the correct request', function () { - return telnyx.rooms.update(TEST_UUID).then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.rooms.update(TEST_UUID, TEST_AUTH_KEY).then(responseFn); - }); - }); - describe('update', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - } - - it('Sends the correct request', function () { - return telnyx.rooms.update(TEST_UUID).then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.rooms.update(TEST_UUID, TEST_AUTH_KEY).then(responseFn); - }); - }); -}); diff --git a/test/resources/RoomsClientToken.spec.js b/test/resources/RoomsClientToken.spec.js deleted file mode 100644 index 49cbb90..0000000 --- a/test/resources/RoomsClientToken.spec.js +++ /dev/null @@ -1,55 +0,0 @@ -'use strict'; - -var utils = require('../../testUtils'); -var telnyx = utils.getTelnyxMock(); -var expect = require('chai').expect; - -var TEST_AUTH_KEY = utils.getUserTelnyxKey(); -var TEST_UUID = '123e4567-e89b-12d3-a456-426614174000'; - -describe('numberPortoutsSupportingDocuments', function () { - describe('retrieveGenerateJoinClientToken', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - } - - it('Sends the correct request', function () { - const requestBody = {refresh_token_ttl_secs: 3600, token_ttl_secs: 600}; - return telnyx.roomClientToken - .retrieveGenerateJoinClientToken(TEST_UUID, requestBody) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - const requestBody = {refresh_token_ttl_secs: 3600, token_ttl_secs: 600}; - return telnyx.roomClientToken - .retrieveGenerateJoinClientToken(TEST_UUID, requestBody, TEST_AUTH_KEY) - .then(responseFn); - }); - }); - describe('retrieveRefreshClientToken', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - } - - it('Sends the correct request', function () { - return telnyx.roomClientToken - .retrieveRefreshClientToken(TEST_UUID, { - refresh_token: 'eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9', - }) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.roomClientToken - .retrieveRefreshClientToken( - TEST_UUID, - { - refresh_token: 'eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9', - }, - TEST_AUTH_KEY - ) - .then(responseFn); - }); - }); -}); diff --git a/test/resources/ShortCodes.spec.js b/test/resources/ShortCodes.spec.js deleted file mode 100644 index 7db9aba..0000000 --- a/test/resources/ShortCodes.spec.js +++ /dev/null @@ -1,81 +0,0 @@ -'use strict'; - -var utils = require('../../testUtils'); -var telnyx = utils.getTelnyxMock(); -var expect = require('chai').expect; - -var TEST_AUTH_KEY = utils.getUserTelnyxKey(); -var TEST_UUID = '123e4567-e89b-12d3-a456-426614174000'; - -describe('ShortCodes Resource', function() { - describe('retrieve', function() { - function responseFn(response) { - expect(response.data).to.have.property('id'); - expect(response.data).to.have.property('short_code'); - expect(response.data).to.have.property('country_code'); - expect(response.data).to.have.property('messaging_profile_id'); - expect(response.data).to.include({record_type: 'short_code'}); - } - - it('Sends the correct request', function() { - return telnyx.shortCodes.retrieve(TEST_UUID).then(responseFn); - }) - - it('Sends the correct request [with specified auth]', function() { - return telnyx.shortCodes.retrieve(TEST_UUID, TEST_AUTH_KEY) - .then(responseFn); - }); - }); - - describe('list', function() { - function responseFn(response) { - expect(response.data[0]).to.have.property('id'); - expect(response.data[0]).to.have.property('short_code'); - expect(response.data[0]).to.have.property('country_code'); - expect(response.data[0]).to.have.property('messaging_profile_id'); - expect(response.data[0]).to.include({record_type: 'short_code'}); - - } - - it('Sends the correct request', function() { - return telnyx.shortCodes.list() - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function() { - return telnyx.shortCodes.list(TEST_AUTH_KEY) - .then(responseFn); - }); - }); - - describe('Nested', function() { - function responseFn(response) { - if (response.data) { - expect(response.data).to.have.property('id'); - expect(response.data).to.have.property('short_code'); - expect(response.data).to.have.property('country_code'); - expect(response.data).to.have.property('messaging_profile_id'); - expect(response.data).to.include({record_type: 'short_code'}); - } - } - - describe('update', function() { - it('Sends the correct request', function() { - return telnyx.shortCodes.retrieve(TEST_UUID) - .then(function(response) { - const mp = response.data; - return mp.update({messaging_profile_id: 'uuid'}) - .then(responseFn); - }) - }); - it('Sends the correct request [with specified auth]', function() { - return telnyx.shortCodes.retrieve(TEST_UUID) - .then(function(response) { - const mp = response.data; - return mp.update({messaging_profile_id: 'uuid'}, TEST_AUTH_KEY) - .then(responseFn); - }) - }); - }); - }) -}); diff --git a/test/resources/SimCardActions.spec.js b/test/resources/SimCardActions.spec.js deleted file mode 100644 index 9d066d8..0000000 --- a/test/resources/SimCardActions.spec.js +++ /dev/null @@ -1,68 +0,0 @@ -'use strict'; - -var utils = require('../../testUtils'); -var telnyx = utils.getTelnyxMock(); -var expect = require('chai').expect; - -var TEST_AUTH_KEY = utils.getUserTelnyxKey(); -var TEST_UUID = '123e4567-e89b-12d3-a456-426614174000'; - -describe('numberPortoutsSupportingDocuments', function () { - describe('list', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - } - - it('Sends the correct request', function () { - return telnyx.simCardActions - .list({ - page: { - number: '1', - size: '20', - }, - filter: { - sim_card_id: '47a1c2b0-cc7b-4ab1-bb98-b33fb0fc61b9', - status: 'in-progress', - bulk_sim_card_action_id: '47a1c2b0-cc7b-4ab1-bb98-b33fb0fc61b9', - action_type: 'disable', - }, - }) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.simCardActions - .list( - { - page: { - number: '1', - size: '20', - }, - filter: { - sim_card_id: '47a1c2b0-cc7b-4ab1-bb98-b33fb0fc61b9', - status: 'in-progress', - bulk_sim_card_action_id: '47a1c2b0-cc7b-4ab1-bb98-b33fb0fc61b9', - action_type: 'disable', - }, - }, - TEST_AUTH_KEY - ) - .then(responseFn); - }); - }); - describe('retrieve', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - } - - it('Sends the correct request', function () { - return telnyx.simCardActions.retrieve(TEST_UUID).then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.simCardActions - .retrieve(TEST_UUID, TEST_AUTH_KEY) - .then(responseFn); - }); - }); -}); diff --git a/test/resources/SimCardGroups.spec.js b/test/resources/SimCardGroups.spec.js deleted file mode 100644 index c1984c9..0000000 --- a/test/resources/SimCardGroups.spec.js +++ /dev/null @@ -1,115 +0,0 @@ -'use strict'; - -var utils = require('../../testUtils'); -var telnyx = utils.getTelnyxMock(); -var expect = require('chai').expect; - -var TEST_AUTH_KEY = utils.getUserTelnyxKey(); - -describe.skip('SimCardGroups Resource', function() { - describe('retrieve', function() { - function responseFn(response) { - expect(response.data).to.include.keys(['id', 'name', 'data_limit', 'consumed_data']); - expect(response.data).to.include({record_type: 'sim_card_group'}); - expect(response.data.consumed_data).to.include.keys(['amount', 'unit']); - } - - it('Sends the correct request', function() { - return telnyx.simCardGroups.retrieve('123').then(responseFn); - }) - - it('Sends the correct request [with specified auth]', function() { - return telnyx.simCardGroups.retrieve('123', TEST_AUTH_KEY) - .then(responseFn); - }); - }); - - describe('create', function() { - function responseFn(response) { - expect(response.data).to.include.keys(['id', 'name', 'data_limit', 'consumed_data']); - expect(response.data).to.include({record_type: 'sim_card_group'}); - expect(response.data.consumed_data).to.include.keys(['amount', 'unit']); - } - - it('Sends the correct request', function() { - return telnyx.simCardGroups.create({name: 'My Custom Group'}) - .then(responseFn); - }) - - it('Sends the correct request [with specified auth]', function() { - return telnyx.simCardGroups.create({name: 'My Custom Group'}, TEST_AUTH_KEY) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth in options]', function() { - return telnyx.simCardGroups.create({name: 'My Custom Group'}, {api_key: TEST_AUTH_KEY}) - .then(responseFn); - }); - }); - - describe('list', function() { - function responseFn(response) { - expect(response.data[0]).to.include.keys(['id', 'name', 'data_limit', 'consumed_data']); - expect(response.data[0]).to.include({record_type: 'sim_card_group'}); - expect(response.data[0].consumed_data).to.include.keys(['amount', 'unit']); - } - - it('Sends the correct request', function() { - return telnyx.simCardGroups.list() - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function() { - return telnyx.simCardGroups.list(TEST_AUTH_KEY) - .then(responseFn); - }); - }); - - describe('Nested', function() { - function responseFn(response) { - if (response.data) { - expect(response.data).to.include.keys(['id', 'name', 'data_limit', 'consumed_data']); - expect(response.data).to.include({record_type: 'sim_card_group'}); - expect(response.data.consumed_data).to.include.keys(['amount', 'unit']); - } - } - - describe('del', function() { - it('Sends the correct request', function() { - return telnyx.simCardGroups.create({name: 'My Custom Group'}) - .then(function(response) { - const simCardGroup = response.data; - return simCardGroup.del() - .then(responseFn); - }) - }); - it('Sends the correct request [with specified auth]', function() { - return telnyx.simCardGroups.retrieve('123') - .then(function(response) { - const simCardGroup = response.data; - return simCardGroup.del(TEST_AUTH_KEY) - .then(responseFn); - }) - }); - }); - - describe('update', function() { - it('Sends the correct request', function() { - return telnyx.simCardGroups.create({name: 'My Custom Group'}) - .then(function(response) { - const simCardGroup = response.data; - return simCardGroup.update({name: 'My Custom Updated Group'}) - .then(responseFn); - }) - }); - it('Sends the correct request [with specified auth]', function() { - return telnyx.simCardGroups.retrieve('123') - .then(function(response) { - const simCardGroup = response.data; - return simCardGroup.update({name: 'My Custom Updated Group'}, TEST_AUTH_KEY) - .then(responseFn); - }) - }); - }); - }) -}); diff --git a/test/resources/SimCardOrders.spec.js b/test/resources/SimCardOrders.spec.js deleted file mode 100644 index 1bc5237..0000000 --- a/test/resources/SimCardOrders.spec.js +++ /dev/null @@ -1,92 +0,0 @@ -'use strict'; - -var utils = require('../../testUtils'); -var telnyx = utils.getTelnyxMock(); -var expect = require('chai').expect; - -var TEST_AUTH_KEY = utils.getUserTelnyxKey(); -var TEST_UUID = '123e4567-e89b-12d3-a456-426614174000'; - -describe('numberPortoutsSupportingDocuments', function () { - describe('list', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - } - - it('Sends the correct request', function () { - return telnyx.simCardOrders - .list({ - filter: { - created_at: '2018-02-02T22:25:27.521Z', - updated_at: '2018-02-02T22:25:27.521Z', - quantity: '21', - cost: { - amount: '2.53', - currency: 'USD', - }, - address: { - id: '1293384261075731499', - street_address: '311 W Superior St', - extended_address: 'Suite 504', - locality: 'Chicago', - administrative_area: 'IL', - country_code: 'US', - postal_code: '60654', - }, - }, - page: { - number: '1', - size: '20', - }, - }) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.simCardOrders - .list( - { - filter: { - created_at: '2018-02-02T22:25:27.521Z', - updated_at: '2018-02-02T22:25:27.521Z', - quantity: '21', - cost: { - amount: '2.53', - currency: 'USD', - }, - address: { - id: '1293384261075731499', - street_address: '311 W Superior St', - extended_address: 'Suite 504', - locality: 'Chicago', - administrative_area: 'IL', - country_code: 'US', - postal_code: '60654', - }, - }, - page: { - number: '1', - size: '20', - }, - }, - TEST_AUTH_KEY - ) - .then(responseFn); - }); - }); - describe('retrieve', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - } - - it('Sends the correct request', function () { - return telnyx.simCardOrders.retrieve(TEST_UUID).then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.simCardOrders - .retrieve(TEST_UUID, TEST_AUTH_KEY) - .then(responseFn); - }); - }); -}); diff --git a/test/resources/SimCards.spec.js b/test/resources/SimCards.spec.js deleted file mode 100644 index 8517c96..0000000 --- a/test/resources/SimCards.spec.js +++ /dev/null @@ -1,243 +0,0 @@ -'use strict'; - -var testUtils = require('../../testUtils'); -var telnyx = testUtils.getTelnyxMock(); -var utils = require('../../lib/utils'); -var expect = require('chai').expect; - -var TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); -var TEST_UUID = '123e4567-e89b-12d3-a456-426614174000'; - -describe('SimCards Resource', function () { - const simCardUpdateData = { - tags: ['personal'], - }; - - - describe('retrieve', function () { - function responseFn(response) { - expect(response.data).to.have.property('id'); - expect(response.data).to.include({ - record_type: 'sim_card', - }); - } - - it('Sends the correct request', function () { - return telnyx.simCards.retrieve(TEST_UUID).then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.simCards.retrieve(TEST_UUID, TEST_AUTH_KEY).then(responseFn); - }); - }); - - describe('list', function () { - function responseFn(response) { - expect(response.data[0]).to.have.property('id'); - expect(response.data[0]).to.have.property('status'); - expect(response.data[0]).to.have.property('iccid'); - expect(response.data[0]).to.include({record_type: 'sim_card'}); - } - - it('Sends the correct request', function () { - return telnyx.simCards.list().then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.simCards.list(TEST_AUTH_KEY).then(responseFn); - }); - }); - - describe('update', function () { - function responseFn(response) { - expect(response.data).to.have.property('id'); - expect(response.data).to.have.property('status'); - expect(response.data).to.have.property('iccid'); - expect(response.data.record_type).to.be.eq('sim_card'); - } - - it('Sends the correct request', function () { - return telnyx.simCards.update(TEST_UUID, simCardUpdateData).then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.simCards - .update(TEST_UUID, simCardUpdateData, TEST_AUTH_KEY) - .then(responseFn); - }); - }); - - describe('save', function () { - function responseFn(response) { - expect(response.data.record_type).to.be.eq('sim_card'); - expect(response.data).to.have.property('id'); - expect(response.data).to.have.property('status'); - expect(response.data).to.have.property('iccid'); - expect(response.data).to.have.property('sim_card_group_id'); - expect(response.data.record_type).to.be.eq('sim_card'); - } - - it('Sends the correct request', function () { - return telnyx.simCards.retrieve(TEST_UUID).then(function (response) { - const simCard = response.data; - return simCard.save(simCardUpdateData).then(responseFn); - }); - }); - }); - - describe('delete', function () { - function responseFn(response) { - expect(response.data.record_type).to.be.eq('sim_card'); - expect(response.data).to.have.property('id'); - expect(response.data).to.have.property('status'); - expect(response.data).to.have.property('iccid'); - expect(response.data).to.have.property('sim_card_group_id'); - expect(response.data.record_type).to.be.eq('sim_card'); - } - - it('Sends the correct request', function () { - return telnyx.simCards.retrieve(TEST_UUID).then(function (response) { - const simCard = response.data; - return simCard.del().then(responseFn); - }); - }); - }); - - describe.skip('Nested', function() { - ['activate', 'deactivate', 'enable', 'disable', 'set_standby'].forEach(function (command) { - function responseFn(response) { - expect(response.data.record_type).to.be.eq('sim_card'); - } - - describe(command, function () { - const camelCaseCommand = utils.snakeToCamelCase(command); - it('Sends the correct request', function () { - return telnyx.simCards.retrieve(TEST_UUID).then(function (response) { - const simCard = response.data; - return simCard[camelCaseCommand]().then(responseFn); - }); - }); - it('Sends the correct request [with specified auth]', function () { - return telnyx.simCards.retrieve(TEST_UUID).then(function (response) { - const simCard = response.data; - return simCard[camelCaseCommand](TEST_AUTH_KEY).then(responseFn); - }); - }); - }); - }); - }); - - describe('retrieveNetworkPreferences', function () { - function responseFn(response) { - expect(response.data.record_type).to.be.eq( - 'sim_card_network_preferences' - ); - expect(response.data).to.include.keys([ - 'sim_card_id', - 'mobile_operator_networks_preferences', - ]); - } - - it('Sends the correct request', function () { - return telnyx.simCards.retrieve(TEST_UUID).then(function (response) { - const simCard = response.data; - return simCard.retrieveNetworkPreferences().then(responseFn); - }); - }); - - it('Sends the correct request passing params', function () { - return telnyx.simCards.retrieve(TEST_UUID).then(function (response) { - const simCard = response.data; - return simCard - .retrieveNetworkPreferences({include_ota_updates: true}) - .then(responseFn); - }); - }); - }); - - describe('setNetworkPreferences', function () { - function responseFn(response) { - expect(response.data.record_type).to.be.eq( - 'sim_card_network_preferences' - ); - expect(response.data).to.include.keys([ - 'sim_card_id', - 'mobile_operator_networks_preferences', - ]); - } - - it('Sends the correct request', function () { - return telnyx.simCards.retrieve(TEST_UUID).then(function (response) { - const simCard = response.data; - return simCard - .setNetworkPreferences({ - mobile_operator_networks_preferences: [ - { - mobile_operator_network_id: TEST_UUID, - priority: 0, - }, - ], - }) - .then(responseFn); - }); - }); - }); - - describe('deleteNetworkPreferences', function () { - function responseFn(response) { - expect(response.data.record_type).to.be.eq( - 'sim_card_network_preferences' - ); - expect(response.data).to.include.keys([ - 'sim_card_id', - 'mobile_operator_networks_preferences', - ]); - } - - it('Sends the correct request', function () { - return telnyx.simCards.retrieve(TEST_UUID).then(function (response) { - const simCard = response.data; - return simCard.deleteNetworkPreferences().then(responseFn); - }); - }); - }); - - describe.skip('PublicIP', function() { - function responseFn(response) { - expect(response.data.record_type).to.be.eq( - 'sim_card_public_ip' - ); - expect(response.data).to.include.keys([ - 'sim_card_id', - 'status', - ]); - } - - describe('retrieve', function () { - it('Sends the correct request', function () { - return telnyx.simCards.retrieve(TEST_UUID).then(function (response) { - const simCard = response.data; - return simCard.retrievePublicIP().then(responseFn); - }); - }); - }); - - describe('set', function () { - it('Sends the correct request', function () { - return telnyx.simCards.retrieve(TEST_UUID).then(function (response) { - const simCard = response.data; - return simCard.setPublicIP().then(responseFn); - }); - }); - }); - - describe('delete', function () { - it('Sends the correct request', function () { - return telnyx.simCards.retrieve(TEST_UUID).then(function (response) { - const simCard = response.data; - return simCard.deletePublicIP().then(responseFn); - }); - }); - }); - }); -}); diff --git a/test/resources/TeXMLApplication.spec.js b/test/resources/TeXMLApplication.spec.js deleted file mode 100644 index a116737..0000000 --- a/test/resources/TeXMLApplication.spec.js +++ /dev/null @@ -1,217 +0,0 @@ -'use strict'; - -var utils = require('../../testUtils'); -var telnyx = utils.getTelnyxMock(); -var expect = require('chai').expect; - -var TEST_AUTH_KEY = utils.getUserTelnyxKey(); -var TEST_UUID = '123e4567-e89b-12d3-a456-426614174000'; - -describe('TeXML', function () { - describe('list', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - expect(response.data[0]).to.have.property('active'); - expect(response.data[0]).to.have.property('anchorsite_override'); - expect(response.data[0]).to.have.property('created_at'); - expect(response.data[0]).to.have.property('ip_address'); - expect(response.data[0]).to.have.property('dtmf_type'); - expect(response.data[0]).to.have.property('first_command_timeout'); - expect(response.data[0]).to.have.property('first_command_timeout_secs'); - expect(response.data[0]).to.have.property('voice_url'); - } - - it('Sends the correct request', function () { - return telnyx.teXmlApplication - .list({ - page: { - number: 1, - size: 200, - }, - filter: { - friendly_name: { - contains: 'string', - }, - outbound_voice_profile_id: 'string', - }, - }) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.teXmlApplication - .list( - { - page: { - number: 1, - size: 200, - }, - filter: { - friendly_name: { - contains: 'string', - }, - outbound_voice_profile_id: 'string', - }, - sort: 'string', - }, - TEST_AUTH_KEY - ) - .then(responseFn); - }); - }); - - describe('create', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - } - - it('Sends the correct request', function () { - return telnyx.teXmlApplication - .create({ - active: false, - anchorsite_override: 'Amsterdam, Netherlands', - dtmf_type: 'Inband', - first_command_timeout: true, - first_command_timeout_secs: 10, - friendly_name: 'call-router', - inbound: { - channel_limit: 10, - sip_subdomain: 'example', - sip_subdomain_receive_settings: 'only_my_connections', - }, - outbound: { - channel_limit: 10, - outbound_voice_profile_id: '1293384261075731499', - }, - status_callback: 'https://example.com', - status_callback_method: 'get', - voice_fallback_url: 'https://fallback.example.com', - voice_method: 'get', - voice_url: 'https://example.com', - }) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.teXmlApplication - .create( - { - active: false, - anchorsite_override: 'Amsterdam, Netherlands', - dtmf_type: 'Inband', - first_command_timeout: true, - first_command_timeout_secs: 10, - friendly_name: 'call-router', - inbound: { - channel_limit: 10, - sip_subdomain: 'example', - sip_subdomain_receive_settings: 'only_my_connections', - }, - outbound: { - channel_limit: 10, - outbound_voice_profile_id: '1293384261075731499', - }, - status_callback: 'https://example.com', - status_callback_method: 'get', - voice_fallback_url: 'https://fallback.example.com', - voice_method: 'get', - voice_url: 'https://example.com', - }, - TEST_AUTH_KEY - ) - .then(responseFn); - }); - }); - - describe('del', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - } - - it('Sends the correct request', function () { - return telnyx.teXmlApplication.del(TEST_UUID).then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.teXmlApplication - .del(TEST_UUID, TEST_AUTH_KEY) - .then(responseFn); - }); - }); - describe('retrieve', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - } - - it('Sends the correct request', function () { - return telnyx.teXmlApplication.retrieve(TEST_UUID).then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.teXmlApplication - .retrieve(TEST_UUID, TEST_AUTH_KEY) - .then(responseFn); - }); - }); - describe('update', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - } - - it('Sends the correct request', function () { - const requestBody = { - active: false, - anchorsite_override: 'Amsterdam, Netherlands', - dtmf_type: 'Inband', - first_command_timeout: true, - first_command_timeout_secs: 10, - friendly_name: 'call-router', - inbound: { - channel_limit: 10, - sip_subdomain: 'example', - sip_subdomain_receive_settings: 'only_my_connections', - }, - outbound: { - channel_limit: 10, - outbound_voice_profile_id: '1293384261075731499', - }, - status_callback: 'https://example.com', - status_callback_method: 'get', - voice_fallback_url: 'https://fallback.example.com', - voice_method: 'get', - voice_url: 'https://example.com', - }; - return telnyx.teXmlApplication - .update(TEST_UUID, requestBody) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - const requestBody = { - active: false, - anchorsite_override: 'Amsterdam, Netherlands', - dtmf_type: 'Inband', - first_command_timeout: true, - first_command_timeout_secs: 10, - friendly_name: 'call-router', - inbound: { - channel_limit: 10, - sip_subdomain: 'example', - sip_subdomain_receive_settings: 'only_my_connections', - }, - outbound: { - channel_limit: 10, - outbound_voice_profile_id: '1293384261075731499', - }, - status_callback: 'https://example.com', - status_callback_method: 'get', - voice_fallback_url: 'https://fallback.example.com', - voice_method: 'get', - voice_url: 'https://example.com', - }; - return telnyx.teXmlApplication - .update(TEST_UUID, requestBody, TEST_AUTH_KEY) - .then(responseFn); - }); - }); -}); diff --git a/test/resources/TelephonyCredentials.spec.js b/test/resources/TelephonyCredentials.spec.js deleted file mode 100644 index c4bf50e..0000000 --- a/test/resources/TelephonyCredentials.spec.js +++ /dev/null @@ -1,141 +0,0 @@ -'use strict'; - -var utils = require('../../testUtils'); -var telnyx = utils.getTelnyxMock(); -var expect = require('chai').expect; - -var TEST_AUTH_KEY = utils.getUserTelnyxKey(); - -var credentialCreateData = { - connection_id: '1474011037387720344', -}; - -var retrieveCredentialId = '456c215ade3-0d39-418e-94be-c5f780760199'; - -describe('TelephonyCredentials Resource', function () { - function responseFn(response) { - expect(response.data).to.have.property('created_at'); - expect(response.data).to.have.property('expired'); - expect(response.data).to.have.property('expires_at'); - expect(response.data).to.have.property('id'); - expect(response.data).to.have.property('name'); - expect(response.data).to.have.property('record_type'); - expect(response.data).to.have.property('resource_id'); - expect(response.data).to.have.property('sip_password'); - expect(response.data).to.have.property('sip_username'); - } - - describe('create', function() { - it('Sends the correct request', function () { - return telnyx.telephonyCredentials.create(credentialCreateData).then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.telephonyCredentials.create(credentialCreateData, TEST_AUTH_KEY).then(responseFn); - }); - - it('Sends the correct request [with specified auth in options]', function () { - return telnyx.telephonyCredentials - .create(credentialCreateData, {api_key: TEST_AUTH_KEY}) - .then(responseFn); - }); - }); - - describe('retrieve / generateAccessTokenFromCredential', function () { - function responseFn(response) { - expect(response.data).to.not.be.null - } - - describe('retrieve', function () { - it('Sends the correct request', function () { - return telnyx.telephonyCredentials.retrieve('9fb9e45f-958a-4d9f-81ff-735ffbcaa133').then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.telephonyCredentials.retrieve('9fb9e45f-958a-4d9f-81ff-735ffbcaa133', TEST_AUTH_KEY).then(responseFn); - }); - }); - - describe('generateAccessTokenFromCredential', function () { - it('Sends the correct request', function () { - return telnyx.telephonyCredentials.generateAccessTokenFromCredential('9fb9e45f-958a-4d9f-81ff-735ffbcaa133').then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.telephonyCredentials.generateAccessTokenFromCredential('9fb9e45f-958a-4d9f-81ff-735ffbcaa133', TEST_AUTH_KEY).then(responseFn); - }); - }); - }); - - describe('retrieveCredential', function () { - it('Sends the correct request', function () { - return telnyx.telephonyCredentials.retrieveCredential(retrieveCredentialId).then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.telephonyCredentials.retrieveCredential(retrieveCredentialId, TEST_AUTH_KEY).then(responseFn); - }); - - it('Sends the correct request [with specified auth in options]', function () { - return telnyx.telephonyCredentials - .retrieveCredential(retrieveCredentialId, {api_key: TEST_AUTH_KEY}) - .then(responseFn); - }); - }); - - describe('update', function () { - var updateCredentialData = {name: 'knox'}; - - function responseFn(response) { - expect(response.data).to.have.property('name'); - } - - it('Sends the correct request', function () { - return telnyx.telephonyCredentials.update(retrieveCredentialId, updateCredentialData).then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.telephonyCredentials.update(retrieveCredentialId, updateCredentialData, TEST_AUTH_KEY).then(responseFn); - }); - - it('Sends the correct request [with specified auth in options]', function () { - return telnyx.telephonyCredentials - .update(retrieveCredentialId, updateCredentialData, {api_key: TEST_AUTH_KEY}) - .then(responseFn); - }); - }); - - describe('list', function () { - function responseFn(response) { - expect(response.data[0]).to.have.property('id'); - expect(response.data[0]).to.have.property('sip_password'); - expect(response.data[0]).to.have.property('sip_username'); - } - - it('Sends the correct request', function () { - return telnyx.telephonyCredentials.list().then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.telephonyCredentials.list(TEST_AUTH_KEY).then(responseFn); - }); - }); - - describe('del', function () { - it('Sends the correct request', function () { - return telnyx.telephonyCredentials - .create(credentialCreateData) - .then(function (response) { - const tc = response.data; - return tc.del().then(responseFn); - }); - }); - it('Sends the correct request [with specified auth]', function () { - return telnyx.telephonyCredentials.retrieveCredential('123').then(function (response) { - const tc = response.data; - return tc.del(TEST_AUTH_KEY).then(responseFn); - }); - }); - }); - -}); diff --git a/test/resources/UpdateClientState.spec.js b/test/resources/UpdateClientState.spec.js deleted file mode 100644 index 33ed106..0000000 --- a/test/resources/UpdateClientState.spec.js +++ /dev/null @@ -1,31 +0,0 @@ -'use strict'; - -var utils = require('../../testUtils'); -var telnyx = utils.getTelnyxMock(); -var expect = require('chai').expect; - -var TEST_AUTH_KEY = utils.getUserTelnyxKey(); - -describe('Update Client State', function () { - describe('update', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - } - - it('Sends the correct request', function () { - return telnyx.updateClientState - .update('call_control_id', {client_state: 'aGF2ZSBhIG5pY2UgZGF5ID1d'}) - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.updateClientState - .update( - 'call_control_id', - {client_state: 'aGF2ZSBhIG5pY2UgZGF5ID1d'}, - TEST_AUTH_KEY - ) - .then(responseFn); - }); - }); -}); diff --git a/test/resources/VerifiedCallsDisplayProfiles.spec.js b/test/resources/VerifiedCallsDisplayProfiles.spec.js deleted file mode 100644 index 29d52cd..0000000 --- a/test/resources/VerifiedCallsDisplayProfiles.spec.js +++ /dev/null @@ -1,27 +0,0 @@ -'use strict'; - -var utils = require('../../testUtils'); -var telnyx = utils.getTelnyxMock(); -var expect = require('chai').expect; - -var TEST_AUTH_KEY = utils.getUserTelnyxKey(); - -describe('Verified Calls Display Profiles', function () { - describe('create', function () { - function responseFn(response) { - expect(response.lastResponse.statusCode).to.equal(201); - } - - it('Sends the correct request', function () { - return telnyx.verifiedCallsDisplayProfiles - .create('string') - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.verifiedCallsDisplayProfiles - .create('string', TEST_AUTH_KEY) - .then(responseFn); - }); - }); -}); diff --git a/test/resources/Webhooks.spec.js b/test/resources/Webhooks.spec.js deleted file mode 100644 index 93e1719..0000000 --- a/test/resources/Webhooks.spec.js +++ /dev/null @@ -1,40 +0,0 @@ -'use strict'; - -var utils = require('../../testUtils'); -var telnyx = utils.getTelnyxMock(); -var expect = require('chai').expect; - -var TEST_AUTH_KEY = utils.getUserTelnyxKey(); -var TEST_UUID = '123e4567-e89b-12d3-a456-426614174000'; - -describe('Webhook Deliveries', function () { - describe('retrieve', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - } - - it('Sends the correct request', function () { - return telnyx.webhooksApi.retrieve(TEST_UUID).then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.webhooksApi - .retrieve(TEST_UUID, TEST_AUTH_KEY) - .then(responseFn); - }); - }); - - describe('list', function () { - function responseFn(response) { - expect(response).to.have.property('data'); - } - - it('Sends the correct request', function () { - return telnyx.webhooksApi.list().then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function () { - return telnyx.webhooksApi.list(TEST_AUTH_KEY).then(responseFn); - }); - }); -}); diff --git a/test/resources/WirelessDetailRecordReports.spec.js b/test/resources/WirelessDetailRecordReports.spec.js deleted file mode 100644 index 3e53b74..0000000 --- a/test/resources/WirelessDetailRecordReports.spec.js +++ /dev/null @@ -1,78 +0,0 @@ -'use strict'; - -var utils = require('../../testUtils'); -var telnyx = utils.getTelnyxMock(); -var expect = require('chai').expect; - -var TEST_AUTH_KEY = utils.getUserTelnyxKey(); - -describe('WirelessDetailRecordReports Resource', function() { - function responseFn(response) { - expect(response.data).to.have.property('status'); - expect(response.data).to.have.property('start_time'); - expect(response.data).to.have.property('end_time'); - expect(response.data).to.have.property('report_url'); - expect(response.data).to.include({record_type: 'detail_records_report'}); - } - - describe('retrieve', function() { - it('Sends the correct request', function() { - return telnyx.wirelessDetailRecordReports.retrieve('12ade33a-21c0-473b-b055-b3c836e1c292') - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function() { - return telnyx.wirelessDetailRecordReports.retrieve('12ade33a-21c0-473b-b055-b3c836e1c292', TEST_AUTH_KEY) - .then(responseFn); - }); - }); - - describe('list', function() { - function responseFn(response) { - expect(response.data[0]).to.have.property('id'); - expect(response.data[0]).to.have.property('status'); - expect(response.data[0]).to.have.property('start_time'); - expect(response.data[0]).to.have.property('end_time'); - expect(response.data[0]).to.have.property('report_url'); - expect(response.data[0]).to.include({record_type: 'detail_records_report'}); - } - - it('Sends the correct request', function() { - return telnyx.wirelessDetailRecordReports.list() - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function() { - return telnyx.wirelessDetailRecordReports.list(TEST_AUTH_KEY) - .then(responseFn); - }); - }); - - describe('create', function() { - it('Sends the correct request', function() { - return telnyx.wirelessDetailRecordReports.create({ - start_time: '2018-02-01T22:25:27.521Z', - end_time: '2018-02-02T22:25:27.521Z' - }).then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function() { - return telnyx.wirelessDetailRecordReports.create({ - start_time: '2018-02-01T22:25:27.521Z', - end_time: '2018-02-02T22:25:27.521Z' - }, TEST_AUTH_KEY).then(responseFn); - }); - }); - - describe('del', function() { - it('Sends the correct request', function() { - return telnyx.wirelessDetailRecordReports.del('12ade33a-21c0-473b-b055-b3c836e1c292') - .then(responseFn); - }); - - it('Sends the correct request [with specified auth]', function() { - return telnyx.wirelessDetailRecordReports.del('12ade33a-21c0-473b-b055-b3c836e1c292', TEST_AUTH_KEY) - .then(responseFn); - }); - }); -}); diff --git a/test/telnyx.spec.js b/test/telnyx.spec.js deleted file mode 100644 index 13b8c57..0000000 --- a/test/telnyx.spec.js +++ /dev/null @@ -1,269 +0,0 @@ -'use strict'; - -var testUtils = require('../testUtils'); -var realTelnyx = require('../lib/telnyx')(testUtils.getUserTelnyxKey()); - -var nock = require('nock'); -var http = require('http'); -var https = require('https'); - -var expect = require('chai').expect; - -var MESSAGING_PROFILE_DETAILS = { - name: 'Summer Campaign', -}; - -describe('Telnyx Module', function() { - this.timeout(20000); - - describe('setApiKey', function() { - it('uses Bearer auth', function() { - expect(realTelnyx.getApiField('auth')).to.equal('Bearer ' + testUtils.getUserTelnyxKey()); - }); - }); - - describe('setHttpAgent', function() { - var origHttpAgent, origHttpsAgent; - beforeEach(function() { - origHttpAgent = realTelnyx.getApiField('http_agent'); - origHttpsAgent = realTelnyx.getApiField('https_agent'); - realTelnyx._setApiField('http_agent', null); - realTelnyx._setApiField('https_agent', null); - }); - afterEach(function() { - realTelnyx._setApiField('http_agent', origHttpAgent); - realTelnyx._setApiField('https_agent', origHttpsAgent); - }); - describe('when given an https.Agent', function() { - it('should save the agent as https_agent', function() { - var agent = new https.Agent(); - realTelnyx.setHttpAgent(agent); - expect(realTelnyx.getApiField('https_agent')).to.equal(agent); - expect(realTelnyx.getApiField('http_agent')).to.be.null; - }); - }); - describe('when given an http.Agent', function() { - it('should save the agent as http_agent', function() { - var agent = new http.Agent(); - realTelnyx.setHttpAgent(agent); - expect(realTelnyx.getApiField('http_agent')).to.equal(agent); - expect(realTelnyx.getApiField('https_agent')).to.be.null; - }); - }); - }); - - describe('GetClientUserAgent', function() { - it('Should return a user-agent serialized JSON object', function() { - return expect(new Promise(function(resolve, reject) { - realTelnyx.getClientUserAgent(function(c) { - resolve(JSON.parse(c)); - }); - })).to.eventually.have.property('lang', 'node'); - }); - }); - - describe('GetClientUserAgentSeeded', function() { - it('Should return a user-agent serialized JSON object', function() { - var userAgent = {lang: 'node'}; - return expect(new Promise(function(resolve, reject) { - realTelnyx.getClientUserAgentSeeded(userAgent, function(c) { - resolve(JSON.parse(c)); - }); - })).to.eventually.have.property('lang', 'node'); - }); - - it('Should URI-encode user-agent fields', function() { - var userAgent = {lang: 'ï'}; - return expect(new Promise(function(resolve, reject) { - realTelnyx.getClientUserAgentSeeded(userAgent, function(c) { - resolve(JSON.parse(c)); - }); - })).to.eventually.have.property('lang', '%C3%AF'); - }) - }); - - describe('setTimeout', function() { - it('Should define a default equal to the node default', function() { - expect(realTelnyx.getApiField('timeout')).to.equal(http.createServer().timeout); - }); - it('Should allow me to set a custom timeout', function() { - realTelnyx.setTimeout(900); - expect(realTelnyx.getApiField('timeout')).to.equal(900); - }); - it('Should allow me to set null, to reset to the default', function() { - realTelnyx.setTimeout(null); - expect(realTelnyx.getApiField('timeout')).to.equal(http.createServer().timeout); - }); - }); - - describe('setAppInfo', function() { - describe('when given nothing or an empty object', function() { - it('should unset telnyx._appInfo', function() { - realTelnyx.setAppInfo(); - expect(realTelnyx._appInfo).to.be.undefined; - }); - }); - - describe('when given an object with no `name`', function() { - it('should throw an error', function() { - expect(function() { - realTelnyx.setAppInfo({}); - }).to.throw(/AppInfo.name is required/); - - expect(function() { - realTelnyx.setAppInfo({ - version: '1.2.3', - }); - }).to.throw(/AppInfo.name is required/); - - expect(function() { - realTelnyx.setAppInfo({ - cats: '42', - }); - }).to.throw(/AppInfo.name is required/); - }); - }); - - describe('when given at least a `name`', function() { - it('should set name, partner ID, url, and version of telnyx._appInfo', function() { - realTelnyx.setAppInfo({ - name: 'MyAwesomeApp', - }); - expect(realTelnyx._appInfo).to.eql({ - name: 'MyAwesomeApp', - }); - - realTelnyx.setAppInfo({ - name: 'MyAwesomeApp', - version: '1.2.345', - }); - expect(realTelnyx._appInfo).to.eql({ - name: 'MyAwesomeApp', - version: '1.2.345', - }); - - realTelnyx.setAppInfo({ - name: 'MyAwesomeApp', - url: 'https://myawesomeapp.info', - }); - expect(realTelnyx._appInfo).to.eql({ - name: 'MyAwesomeApp', - url: 'https://myawesomeapp.info', - }); - - realTelnyx.setAppInfo({ - name: 'MyAwesomeApp', - partner_id: 'partner_1234', - }); - expect(realTelnyx._appInfo).to.eql({ - name: 'MyAwesomeApp', - partner_id: 'partner_1234', - }); - - }); - - it('should ignore any invalid properties', function() { - realTelnyx.setAppInfo({ - name: 'MyAwesomeApp', - partner_id: 'partner_1234', - version: '1.2.345', - url: 'https://myawesomeapp.info', - countOfRadishes: 512, - }); - expect(realTelnyx._appInfo).to.eql({ - name: 'MyAwesomeApp', - partner_id: 'partner_1234', - version: '1.2.345', - url: 'https://myawesomeapp.info', - }); - }); - }); - - it('should be included in the ClientUserAgent and be added to the UserAgent String', function(done) { - var appInfo = { - name: testUtils.getRandomString(), - version: '1.2.345', - url: 'https://myawesomeapp.info', - }; - - realTelnyx.setAppInfo(appInfo); - - realTelnyx.getClientUserAgent(function(uaString) { - expect(JSON.parse(uaString).application).to.eql(appInfo); - - expect(realTelnyx.getAppInfoAsString()).to.eql(appInfo.name + '/' + appInfo.version + ' (' + appInfo.url + ')'); - - done(); - }); - }); - }); - - describe('Callback support', function() { - describe('Any given endpoint', function() { - it('Will call a callback if successful', function() { - return expect(new Promise(function(resolve, reject) { - realTelnyx.messagingProfiles.create(MESSAGING_PROFILE_DETAILS, function(err, mp) { - resolve('Called!'); - }); - })).to.eventually.equal('Called!'); - }); - - it('Will expose HTTP response object', function() { - return expect(new Promise(function(resolve, reject) { - var options = { - host: realTelnyx.getConstant('DEFAULT_HOST'), - path: '/v2/messaging_profiles', - }; - nock('https://' + options.host + ':443') - .post(options.path) - .reply(200, {data: {record_type: 'messaging_profile', id: 1}}, {'request-id': 'foo'}) - - realTelnyx.messagingProfiles.create(MESSAGING_PROFILE_DETAILS, function(err, mp) { - var headers = mp.lastResponse.headers; - expect(headers).to.contain.keys('request-id'); - - expect(mp.lastResponse.statusCode).to.equal(200); - expect(nock.isDone()); - - resolve('Called!'); - }); - })).to.eventually.equal('Called!'); - }); - - it('Given an error the callback will receive it', function() { - return expect(new Promise(function(resolve, reject) { - realTelnyx.messagingProfiles.create(MESSAGING_PROFILE_DETAILS, function(err, messagingProfile) { - if (err) { - resolve('ErrorWasPassed'); - } else { - reject(new Error('NoErrorPassed')); - } - }); - })).to.eventually.become('ErrorWasPassed'); - }); - }); - }); - - describe('errors', function() { - it('Exports errors as types', function() { - var Telnyx = require('../lib/telnyx'); - expect(new Telnyx.errors.TelnyxInvalidRequestError({ - message: 'error' - }).type).to.equal('TelnyxInvalidRequestError'); - }); - }); - - describe('setMaxNetworkRetries', function() { - describe('when given an empty or non-number variable', function() { - it('should error', function() { - expect(function() { - realTelnyx.setMaxNetworkRetries('foo'); - }).to.throw(/maxNetworkRetries must be a number/); - - expect(function() { - realTelnyx.setMaxNetworkRetries(); - }).to.throw(/maxNetworkRetries must be a number/); - }); - }); - }); -}); diff --git a/test/utils.spec.js b/test/utils.spec.js deleted file mode 100644 index 32c95e7..0000000 --- a/test/utils.spec.js +++ /dev/null @@ -1,253 +0,0 @@ -'use strict'; - -require('../testUtils'); - -var utils = require('../lib/utils'); -var expect = require('chai').expect; - -describe('utils', function() { - describe('makeURLInterpolator', function() { - it('Interpolates values into a prepared template', function() { - var template = utils.makeURLInterpolator('/some/url/{foo}/{baz}?ok=1'); - - expect( - template({foo: 1, baz: 2}) - ).to.equal('/some/url/1/2?ok=1'); - - expect( - template({foo: '', baz: ''}) - ).to.equal('/some/url//?ok=1'); - - expect( - // Test encoding: - template({foo: 'FOO', baz: '__::baz::__'}) - ).to.equal('/some/url/FOO/__%3A%3Abaz%3A%3A__?ok=1'); - }); - }); - - describe('stringifyRequestData', function() { - it('Handles basic types', function() { - expect(utils.stringifyRequestData({ - a: 1, - b: 'foo', - })).to.equal('a=1&b=foo'); - }); - - it('Handles deeply nested object', function() { - expect(utils.stringifyRequestData({ - a: { - b: { - c: { - d: 2, - }, - }, - }, - })).to.equal('a[b][c][d]=2'); - }); - - it('Handles arrays of objects', function() { - expect(utils.stringifyRequestData({ - a: [ - {b: 'c'}, - {b: 'd'}, - ], - })).to.equal('a[][b]=c&a[][b]=d'); - }) - - it('Handles indexed arrays', function() { - expect(utils.stringifyRequestData({ - a: { - 0: {b: 'c'}, - 1: {b: 'd'}, - }, - })).to.equal('a[0][b]=c&a[1][b]=d'); - }) - - it('Creates a string from an object, handling shallow nested objects', function() { - expect(utils.stringifyRequestData({ - test: 1, - foo: 'baz', - somethingElse: '::""%&', - nested: { - 1: 2, - 'a n o t h e r': null, - }, - })).to.equal([ - 'test=1', - 'foo=baz', - 'somethingElse=%3A%3A%22%22%25%26', - 'nested[1]=2', - 'nested[a%20n%20o%20t%20h%20e%20r]=', - ].join('&')); - }); - }); - - describe('protoExtend', function() { - it('Provides an extension mechanism', function() { - function A() {} - A.extend = utils.protoExtend; - var B = A.extend({ - constructor: function() { - this.called = true; - }, - }); - expect(new B()).to.be.an.instanceof(A); - expect(new B()).to.be.an.instanceof(B); - expect(new B().called).to.equal(true); - expect(B.extend === utils.protoExtend).to.equal(true); - }); - }); - - describe('getDataFromArgs', function() { - it('handles an empty list', function() { - expect(utils.getDataFromArgs([])).to.deep.equal({}); - }); - it('handles a list with no object', function() { - var args = [1, 3]; - expect(utils.getDataFromArgs(args)).to.deep.equal({}); - expect(args.length).to.equal(2); - }); - it('ignores a hash with only options', function(done) { - var args = [{api_key: 'foo'}]; - - handleWarnings(function() { - expect(utils.getDataFromArgs(args)).to.deep.equal({}); - expect(args.length).to.equal(1); - - done(); - }, function(message) { - throw new Error('Should not have warned, but did: ' + message); - }); - }); - it('warns if the hash contains both data and options', function(done) { - var args = [{foo: 'bar', api_key: 'foo'}]; - - handleWarnings(function() { - utils.getDataFromArgs(args); - }, function(message) { - expect(message).to.equal( - 'Telnyx: Options found in arguments (api_key).' + - ' Did you mean to pass an options object? See https://github.com/telnyx/telnyx-node/wiki/Passing-Options.' - ); - - done(); - }); - }); - it('finds the data', function() { - var args = [{foo: 'bar'}, {api_key: 'foo'}]; - expect(utils.getDataFromArgs(args)).to.deep.equal({foo: 'bar'}); - expect(args.length).to.equal(1); - }); - }); - - describe('getOptsFromArgs', function() { - it('handles an empty list', function() { - expect(utils.getOptionsFromArgs([])).to.deep.equal({ - auth: null, - headers: {}, - }); - }); - it('handles an list with no object', function() { - var args = [1, 3]; - expect(utils.getOptionsFromArgs(args)).to.deep.equal({ - auth: null, - headers: {}, - }); - expect(args.length).to.equal(2); - }); - it('ignores a non-options object', function() { - var args = [{foo: 'bar'}]; - expect(utils.getOptionsFromArgs(args)).to.deep.equal({ - auth: null, - headers: {}, - }); - expect(args.length).to.equal(1); - }); - it('parses an api key', function() { - var args = ['KEY187557EC22404DB39975C43ACE661A58_9QdDI7XD5bvyahtaWx1YQo']; - expect(utils.getOptionsFromArgs(args)).to.deep.equal({ - auth: 'KEY187557EC22404DB39975C43ACE661A58_9QdDI7XD5bvyahtaWx1YQo', - headers: {}, - }); - expect(args.length).to.equal(0); - }); - it('warns if the hash contains something that does not belong', function(done) { - var args = [{foo: 'bar'}, { - api_key: 'super-secret-key', - fishsticks: true, - custard: true, - },]; - - handleWarnings(function() { - utils.getOptionsFromArgs(args); - }, function(message) { - expect(message).to.equal( - 'Telnyx: Invalid options found (fishsticks, custard); ignoring.' - ); - - done(); - }); - }); - }); - - describe('secureCompare', function() { - it('returns true given two equal things', function() { - expect(utils.secureCompare('potato', 'potato')).to.equal(true); - }); - - it('returns false given two unequal things', function() { - expect(utils.secureCompare('potato', 'tomato')).to.equal(false); - }); - - it('throws an error if not given two things to compare', function() { - expect(function() { utils.secureCompare('potato'); }).to.throw(); - }); - }); - - describe('removeEmpty', function() { - it('removes empty properties and leaves non-empty ones', function() { - expect(utils.removeEmpty({ - cat: 3, - dog: false, - rabbit: undefined, - pointer: null, - })).to.eql({ - cat: 3, - dog: false, - }); - }); - - it('throws an error if not given two things to compare', function() { - expect(function() { utils.removeEmpty('potato'); }).to.throw(); - }); - }); -}); - -function handleWarnings(doWithShimmedConsoleWarn, onWarn) { - if (typeof process.emitWarning !== 'function') { - /* eslint-disable no-console */ - - // Shim `console.warn` - var _warn = console.warn; - console.warn = onWarn; - - doWithShimmedConsoleWarn(); - - // Un-shim `console.warn`, - console.warn = _warn; - - /* eslint-enable no-console */ - } else { - function onProcessWarn(warning) { /* eslint-disable-line no-inner-declarations */ - onWarn(warning.name + ': ' + warning.message); - } - - process.on('warning', onProcessWarn); - - doWithShimmedConsoleWarn(); - - process.nextTick(function() { - process.removeListener('warning', onProcessWarn); - }) - } -} diff --git a/testUtils/.eslintrc.js b/testUtils/.eslintrc.js deleted file mode 100644 index b2ab6d0..0000000 --- a/testUtils/.eslintrc.js +++ /dev/null @@ -1,14 +0,0 @@ -module.exports = { - 'env': { - 'mocha': true - }, - 'plugins': [ - 'chai-friendly' - ], - 'rules': { - 'no-loop-func': 'off', - 'no-sync': 'off', - 'no-unused-expressions': 0, - 'chai-friendly/no-unused-expressions': 2 - } -}; diff --git a/testUtils/index.js b/testUtils/index.js deleted file mode 100644 index 91ed35f..0000000 --- a/testUtils/index.js +++ /dev/null @@ -1,145 +0,0 @@ -'use strict'; - -// NOTE: testUtils should be require'd before anything else in each spec file! - -require('mocha'); -// Ensure we are using the 'as promised' libs before any tests are run: -require('chai').use(require('chai-as-promised')); - -var utils = module.exports = { - - getUserTelnyxKey: function() { - var key = process.env.TELNYX_TEST_API_KEY || 'KEY187557EC22404DB39975C43ACE661A58_9QdDI7XD5bvyahtaWx1YQo'; - - return key; - }, - - getSpyableTelnyx: function() { - // Provide a testable telnyx instance - // That is, with mock-requests built in and hookable - - var telnyx = require('../lib/telnyx'); - var telnyxInstance = telnyx('fakeAuthToken'); - - telnyxInstance.REQUESTS = []; - - for (var i in telnyxInstance) { - makeInstanceSpyable(telnyxInstance, telnyxInstance[i]); - } - - function makeInstanceSpyable(telnyxInstance, thisInstance) { - if (thisInstance instanceof telnyx.TelnyxResource) { - patchRequest(telnyxInstance, thisInstance); - } - } - - function patchRequest(telnyxInstance, instance) { - instance._request = function(method, host, url, data, auth, options, cb) { - var req = telnyxInstance.LAST_REQUEST = { - method: method, - url: url, - data: data, - headers: options.headers || {}, - }; - if (auth) { - req.auth = auth; - } - if (host) { - req.host = host; - } - telnyxInstance.REQUESTS.push(req); - cb.call(this, null, {}); - }; - } - - return telnyxInstance; - }, - - getTelnyxMock: function() { - // Provide a telnyx-mock like instance - // That is, with telnyx-mock requests built in - - var telnyx = require('../lib/telnyx'); - var telnyxInstance = telnyx('KEYSUPERSECRET'); // testmode secret API KEY - - telnyxInstance.setHost('localhost', process.env.TELNYX_MOCK_PORT || '12111', 'http'); - - return telnyxInstance; - }, - - /** - * A utility where cleanup functions can be registered to be called post-spec. - * CleanupUtility will automatically register on the mocha afterEach hook, - * ensuring its called after each descendent-describe block. - */ - CleanupUtility: (function() { - CleanupUtility.DEFAULT_TIMEOUT = 20000; - - function CleanupUtility(timeout) { - var self = this; - this._cleanupFns = []; - this._telnyx = require('../lib/telnyx')( - utils.getUserTelnyxKey(), - 'latest' - ); - afterEach(function(done) { - this.timeout(timeout || CleanupUtility.DEFAULT_TIMEOUT); - return self.doCleanup(done); - }); - } - - CleanupUtility.prototype = { - - doCleanup: function(done) { - var cleanups = this._cleanupFns; - var total = cleanups.length; - var completed = 0; - for (var fn; (fn = cleanups.shift());) { - var promise = fn.call(this); - if (!promise || !promise.then) { - throw new Error('CleanupUtility expects cleanup functions to return promises!'); - } - promise.then(function() { - // cleanup successful - completed += 1; - if (completed === total) { - done(); - } - }, function(err) { - // not successful - throw err; - }); - } - if (total === 0) { - done(); - } - }, - add: function(fn) { - this._cleanupFns.push(fn); - }, - }; - - return CleanupUtility; - }()), - - /** - * Get a random string for test Object creation - */ - getRandomString: function() { - return Math.random().toString(36).slice(2); - }, - - envSupportsForAwait: function() { - return typeof Symbol !== 'undefined' && Symbol.asyncIterator; - }, - - envSupportsAwait: function() { - try { - eval('(async function() {})'); // eslint-disable-line no-eval - return true; - } catch (err) { - return false; - } - }, - -}; diff --git a/tsconfig.json b/tsconfig.json index 194a57a..f9177d5 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,7 +3,8 @@ "rootDir": "./src", "outDir": "./dist", "lib": ["ES2023"], - "module": "node16", + "module": "ES2022", + "moduleResolution": "Bundler", "target": "ES2022", "checkJs": false, "alwaysStrict": true, @@ -11,9 +12,13 @@ "noImplicitThis": true, "strict": true, "strictFunctionTypes": true, - "types": [ "node" ], - "esModuleInterop": false, - "resolveJsonModule": true, + "types": [ "node", "jest" ], + "esModuleInterop": true, "noUncheckedIndexedAccess": true }, + "exclude": [ + "./dist", + "./src/test", + "./node_modules" + ], } diff --git a/types/MessagingProfilesResource.d.ts b/types/MessagingProfilesResource.d.ts new file mode 100644 index 0000000..663dd95 --- /dev/null +++ b/types/MessagingProfilesResource.d.ts @@ -0,0 +1,51 @@ +import {paths} from './TelnyxAPI.js'; + +declare module 'telnyx' { + namespace Telnyx { + type MessagingProfilesRetrieveParams = + paths['/messaging_profiles/{id}']['get']['parameters']['query']; + + type MessagingProfilesDeleteParams = + paths['/messaging_profiles/{id}']['delete']['parameters']['path']; + + type MessagingProfilesRetrieveResponse = + paths['/messaging_profiles/{id}']['get']['responses']['200']['content']['application/json']['data']; + + type MessagingProfilesDeleteResponse = + paths['/messaging_profiles/{id}']['delete']['responses']['200']['content']['application/json']['data']; + + type MessagingProfilesListParams = + paths['/messaging_profiles']['get']['parameters']['query']; + + type MessagingProfilesListResponse = + paths['/messaging_profiles']['get']['responses']['200']['content']['application/json']['data']; + + type MessagingProfilesCreateParams = + paths['/messaging_profiles']['post']['requestBody']['content']['application/json']; + + type MessagingProfilesCreateResponse = + paths['/messaging_profiles']['post']['responses']['200']['content']['application/json']['data']; + + class MessagingProfilesResource { + create( + params?: MessagingProfilesCreateParams, + options?: RequestOptions, + ): Promise>; + + del( + params?: MessagingProfilesDeleteParams, + options?: RequestOptions, + ): Promise>; + + retrieve( + params?: MessagingProfilesRetrieveParams, + options?: RequestOptions, + ): Promise>; + + list( + params?: MessagingProfilesListParams, + options?: RequestOptions, + ): Promise>; + } + } +} diff --git a/types/index.d.ts b/types/index.d.ts index 3ca473e..1944f20 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -7,6 +7,7 @@ // Imports: The beginning of the section generated from our OpenAPI spec /// +/// // Imports: The end of the section generated from our OpenAPI spec declare module 'telnyx' { @@ -24,6 +25,7 @@ declare module 'telnyx' { // Fields: The beginning of the section generated from our OpenAPI spec balance: Telnyx.BalanceResource; + messagingProfiles: Telnyx.MessagingProfilesResource; // Fields: The end of the section generated from our OpenAPI spec webhooks: Telnyx.Webhooks; /** diff --git a/types/lib.d.ts b/types/lib.d.ts index 0260d22..53a305d 100644 --- a/types/lib.d.ts +++ b/types/lib.d.ts @@ -33,7 +33,7 @@ declare module 'telnyx' { headers?: Record; } - export type Response = T & { + export type Response = {data: T} & { lastResponse: { headers: Record; requestId: string; From 331ab2bacad6692e5ecce60d627e581583617bb6 Mon Sep 17 00:00:00 2001 From: Lucas Rosa Date: Tue, 24 Sep 2024 19:34:55 -0300 Subject: [PATCH 04/59] fix Webhooks and utils tests --- README.md | 4 +- src/Webhooks.ts | 75 ++---- src/resources/MessagingProfileMetrics.ts | 6 + src/telnyx.ts | 2 + .../{Webhook.test.ts => Webhooks.test.ts} | 49 +--- .../resources/MessagingProfileMetrics.test.ts | 29 +++ src/test/resources/MessagingProfiles.test.ts | 245 ++++++++++++++++++ src/test/utils.test.ts | 104 ++------ src/utils.ts | 11 + types/MessagingProfileMetricsResource.d.ts | 18 ++ types/MessagingProfilesResource.d.ts | 53 +++- types/index.d.ts | 1 + 12 files changed, 426 insertions(+), 171 deletions(-) create mode 100644 src/resources/MessagingProfileMetrics.ts rename src/test/{Webhook.test.ts => Webhooks.test.ts} (84%) create mode 100644 src/test/resources/MessagingProfileMetrics.test.ts create mode 100644 src/test/resources/MessagingProfiles.test.ts create mode 100644 types/MessagingProfileMetricsResource.d.ts diff --git a/README.md b/README.md index 68040e1..f477ba7 100644 --- a/README.md +++ b/README.md @@ -358,13 +358,13 @@ $ TELNYX_MOCK_PORT=12000 npm test Run a single test suite: ```bash -$ npm test -- test/Error.spec.js +$ npm test -- test/Error.test.ts ``` Run a single test (case sensitive): ```bash -$ npm test -- test/Error.spec.js -t 'Populates with type' +$ npm test -- test/Error.test.ts -t 'Populates with type' ``` If you wish, you may run tests using your Telnyx _Test_ API key by setting the diff --git a/src/Webhooks.ts b/src/Webhooks.ts index b627733..5514288 100644 --- a/src/Webhooks.ts +++ b/src/Webhooks.ts @@ -1,17 +1,18 @@ import nacl from 'tweetnacl'; import * as TelnyxError from './Error'; -type WebhookPayload = string | Uint8Array; -type WebhookHeader = string | Uint8Array; +type WebhookPayload = string; +type WebhookHeader = Uint8Array; const Webhooks = { DEFAULT_TOLERANCE: 300, // 5 minutes + decoder: new TextDecoder('utf8'), constructEvent: function ( payload: WebhookPayload, - signatureHeader: WebhookHeader, - timestampHeader: WebhookHeader, - publicKey: string, + signatureHeader: WebhookHeader | undefined, + timestampHeader: string | undefined = '', + publicKey: Uint8Array, tolerance?: number, ) { this.signature.verifySignature( @@ -22,10 +23,7 @@ const Webhooks = { tolerance || Webhooks.DEFAULT_TOLERANCE, ); - const jsonPayload = - payload instanceof Uint8Array - ? JSON.parse(new TextDecoder('utf8').decode(payload)) - : JSON.parse(payload); + const jsonPayload = JSON.parse(payload); return jsonPayload; }, @@ -33,67 +31,38 @@ const Webhooks = { signature: { verifySignature: function ( payload: WebhookPayload, - signatureHeader: WebhookHeader = '', - timestampHeader: WebhookHeader = '', - publicKey: string, + signatureHeader: WebhookHeader | undefined, + timestampHeader: string, + publicKey: Uint8Array, tolerance?: number, ) { - payload = Buffer.isBuffer(payload) ? payload.toString('utf8') : payload; - timestampHeader = Buffer.isBuffer(timestampHeader) - ? timestampHeader.toString('utf8') - : timestampHeader; - const payloadBuffer = Buffer.from( `${timestampHeader}|${payload}`, 'utf8', ); + const signature = signatureHeader || Buffer.from('', 'base64'); let verification; try { // https://bun.sh/guides/binary/buffer-to-typedarray - if (signatureHeader instanceof Uint8Array) { - // TODO: this cast is a workaround as the types are not compatible and this `method` is outdated - verification = nacl.sign.detached.verify( - payloadBuffer, - Buffer.from( - new TextDecoder('utf8').decode(signatureHeader), - 'base64', - ), - Buffer.from(publicKey, 'base64'), - ); - } else { - // TODO: this cast is a workaround as the types are not compatible and this `method` is outdated - verification = nacl.sign.detached.verify( - payloadBuffer, - Buffer.from(signatureHeader, 'base64'), - Buffer.from(publicKey, 'base64'), - ); - } - } catch (_e) { - throwSignatureVerificationError( - payload, - signatureHeader, - timestampHeader, + verification = nacl.sign.detached.verify( + payloadBuffer, + signature, + publicKey, ); + } catch (_e) { + console.log(_e); + + throwSignatureVerificationError(payload, signature, timestampHeader); } if (!verification) { - throwSignatureVerificationError( - payload, - signatureHeader, - timestampHeader, - ); + throwSignatureVerificationError(payload, signature, timestampHeader); } const timestampAge = - Math.floor(Date.now() / 1000) - - parseInt( - timestampHeader instanceof Uint8Array - ? new TextDecoder('utf8').decode(timestampHeader) - : timestampHeader, - 10, - ); + Math.floor(Date.now() / 1000) - parseInt(timestampHeader); if (tolerance && tolerance > 0 && timestampAge > tolerance) { throw new TelnyxError.TelnyxSignatureVerificationError({ @@ -114,7 +83,7 @@ const Webhooks = { function throwSignatureVerificationError( payload: unknown, signatureHeader: WebhookHeader, - timestampHeader: WebhookHeader, + timestampHeader: string, ) { throw new TelnyxError.TelnyxSignatureVerificationError({ message: 'Signature is invalid and does not match the payload', diff --git a/src/resources/MessagingProfileMetrics.ts b/src/resources/MessagingProfileMetrics.ts new file mode 100644 index 0000000..9ac132d --- /dev/null +++ b/src/resources/MessagingProfileMetrics.ts @@ -0,0 +1,6 @@ +import TelnyxResource from '../TelnyxResource'; + +export const MessagingProfileMetrics = TelnyxResource.extend({ + path: 'messaging_profile_metrics', + includeBasic: ['list'], +}); diff --git a/src/telnyx.ts b/src/telnyx.ts index d7e14b1..d80bfd2 100644 --- a/src/telnyx.ts +++ b/src/telnyx.ts @@ -7,6 +7,7 @@ import * as utils from './utils'; // TODO: convert other resources to ts import {Balance} from './resources/Balance'; +import {MessagingProfileMetrics} from './resources/MessagingProfileMetrics'; import {MessagingProfiles} from './resources/MessagingProfiles'; // @@ -45,6 +46,7 @@ export function createTelnyx() { // TODO: convert other resources to ts const resources = { Balance, + MessagingProfileMetrics, MessagingProfiles, }; // diff --git a/src/test/Webhook.test.ts b/src/test/Webhooks.test.ts similarity index 84% rename from src/test/Webhook.test.ts rename to src/test/Webhooks.test.ts index 04192b3..90e058b 100644 --- a/src/test/Webhook.test.ts +++ b/src/test/Webhooks.test.ts @@ -30,7 +30,6 @@ const EVENT_PAYLOAD = { const EVENT_PAYLOAD_STRING = JSON.stringify(EVENT_PAYLOAD, null, 2); const KEY_PAIR = nacl.sign.keyPair.fromSeed(crypto.randomBytes(32)); -const PUBLIC_KEY = new TextDecoder('utf8').decode(KEY_PAIR.publicKey); describe('Webhooks', function () { describe('.constructEvent', function () { @@ -45,7 +44,7 @@ describe('Webhooks', function () { EVENT_PAYLOAD_STRING, signature, timestamp, - PUBLIC_KEY, + KEY_PAIR.publicKey, ); expect(event.data.id).toBe(EVENT_PAYLOAD.data.id); @@ -62,7 +61,7 @@ describe('Webhooks', function () { '} I am not valid JSON; 123][', signature, timestamp, - PUBLIC_KEY, + KEY_PAIR.publicKey, ); }).toThrow(/Unexpected token/); }); @@ -74,9 +73,9 @@ describe('Webhooks', function () { expect(function () { telnyx.webhooks.constructEvent( EVENT_PAYLOAD_STRING, - signature, + Buffer.from(signature), timestamp, - PUBLIC_KEY, + KEY_PAIR.publicKey, ); }).toThrow(/Signature is invalid and does not match the payload/); }); @@ -93,18 +92,9 @@ describe('Webhooks', function () { expect(function () { telnyx.webhooks.signature.verifySignature( EVENT_PAYLOAD_STRING, - signature, - timestamp, - PUBLIC_KEY, - ); - }).toThrow(expectedMessage); - - expect(function () { - telnyx.webhooks.signature.verifySignature( - EVENT_PAYLOAD_STRING, - '', + Buffer.from(signature), timestamp, - PUBLIC_KEY, + KEY_PAIR.publicKey, ); }).toThrow(expectedMessage); @@ -113,7 +103,7 @@ describe('Webhooks', function () { EVENT_PAYLOAD_STRING, undefined, timestamp, - PUBLIC_KEY, + KEY_PAIR.publicKey, ); }).toThrow(expectedMessage); @@ -122,7 +112,7 @@ describe('Webhooks', function () { EVENT_PAYLOAD_STRING, Buffer.from('foo', 'ascii'), timestamp, - PUBLIC_KEY, + KEY_PAIR.publicKey, ); }).toThrow(expectedMessage); }); @@ -138,7 +128,7 @@ describe('Webhooks', function () { EVENT_PAYLOAD_STRING, signature, timestamp, - PUBLIC_KEY, + KEY_PAIR.publicKey, 10, ); }).toThrow(/Timestamp outside the tolerance zone/); @@ -158,7 +148,7 @@ describe('Webhooks', function () { EVENT_PAYLOAD_STRING, signature, timestamp, - PUBLIC_KEY, + KEY_PAIR.publicKey, 10, ), ).toBe(true); @@ -181,28 +171,11 @@ describe('Webhooks', function () { EVENT_PAYLOAD_STRING, signature, timestamp, - PUBLIC_KEY, + KEY_PAIR.publicKey, ), ).toBe(true); }, ); - - test('should accept Buffer instances for the payload and header', function () { - const timestamp = Math.floor(Date.now() / 1000).toString(); - const signature = generateSignature({ - timestamp: timestamp, - }); - - expect( - telnyx.webhooks.signature.verifySignature( - Buffer.from(EVENT_PAYLOAD_STRING), - Buffer.from(signature), - Buffer.from(timestamp), - PUBLIC_KEY, - 10, - ), - ).toBe(true); - }); }); }); diff --git a/src/test/resources/MessagingProfileMetrics.test.ts b/src/test/resources/MessagingProfileMetrics.test.ts new file mode 100644 index 0000000..d5b5b9c --- /dev/null +++ b/src/test/resources/MessagingProfileMetrics.test.ts @@ -0,0 +1,29 @@ +import {utils as testUtils} from '../utils'; + +const telnyx = testUtils.getTelnyxMock(); +const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); + +describe('MessagingProfileMetrics Resource', function () { + describe('list', function () { + function responseFn(response) { + expect(response.data[0]).toHaveProperty('inbound'); + expect(response.data[0]).toHaveProperty('outbound'); + expect(response.data[0]).toHaveProperty('phone_numbers'); + expect(response.data[0]).toHaveProperty('messaging_profile_id'); + expect(response.data[0]).toMatchObject({ + record_type: 'messaging_profile_metrics', + }); + } + + it('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.messagingProfileMetrics.list().then(responseFn); + }); + it('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.messagingProfileMetrics + .list(TEST_AUTH_KEY) + .then(responseFn); + }); + }); +}); diff --git a/src/test/resources/MessagingProfiles.test.ts b/src/test/resources/MessagingProfiles.test.ts new file mode 100644 index 0000000..b62bc49 --- /dev/null +++ b/src/test/resources/MessagingProfiles.test.ts @@ -0,0 +1,245 @@ +import {utils as testUtils} from '../utils'; +import * as utils from '../../utils'; + +const telnyx = testUtils.getTelnyxMock(); + +const TEST_AUTH_KEY = + 'KEY187557EC22404DB39975C43ACE661A58_9QdDI7XD5bvyahtaWx1YQo'; +const TEST_UUID = '123e4567-e89b-12d3-a456-426614174000'; + +const METHODS = ['phone_numbers', 'short_codes', 'del']; + +describe('MessagingProfiles Resource', function () { + function responseFn(response) { + expect(response.data).toHaveProperty('name'); + expect(response.data).toMatchObject({record_type: 'messaging_profile'}); + } + + describe('retrieve', function () { + it('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.messagingProfiles.retrieve(TEST_UUID).then(responseFn); + }); + + it('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.messagingProfiles + .retrieve(TEST_UUID, TEST_AUTH_KEY) + .then(responseFn); + }); + }); + + describe('create', function () { + it('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.messagingProfiles + .create({name: 'Summer Campaign'}) + .then(responseFn); + }); + + it('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.messagingProfiles + .create({name: 'Summer Campaign'}, TEST_AUTH_KEY) + .then(responseFn); + }); + + it('Sends the correct request [with specified auth in options]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.messagingProfiles + .create({name: 'Summer Campaign'}, {api_key: TEST_AUTH_KEY}) + .then(responseFn); + }); + }); + + describe('update', function () { + it('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.messagingProfiles + .update(TEST_UUID, {name: 'Foo "baz"'}) + .then(responseFn); + }); + }); + + describe('list', function () { + function responseFn(response) { + expect(response.data[0]).toHaveProperty('id'); + expect(response.data[0]).toHaveProperty('name'); + expect(response.data[0]).toMatchObject({ + record_type: 'messaging_profile', + }); + } + + it('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.messagingProfiles.list().then(responseFn); + }); + + it('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.messagingProfiles.list(TEST_AUTH_KEY).then(responseFn); + }); + }); + + describe('PhoneNumbers methods', function () { + function responseFn(response) { + expect(response.data[0]).toHaveProperty('id'); + expect(response.data[0]).toHaveProperty('phone_number'); + expect(response.data[0]).toHaveProperty('messaging_profile_id'); + expect(response.data[0]).toMatchObject({ + record_type: 'messaging_settings', + }); + } + + describe('listPhoneNumbers', function () { + it('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.messagingProfiles + .listPhoneNumbers(TEST_UUID) + .then(responseFn); + }); + + it('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.messagingProfiles + .listPhoneNumbers(TEST_UUID, TEST_AUTH_KEY) + .then(responseFn); + }); + }); + }); + + describe('ShortCodes methods', function () { + function responseFn(response) { + expect(response.data[0]).toHaveProperty('id'); + expect(response.data[0]).toHaveProperty('short_code'); + expect(response.data[0]).toHaveProperty('messaging_profile_id'); + expect(response.data[0]).toMatchObject({record_type: 'short_code'}); + } + + describe('listShortCodes', function () { + it('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.messagingProfiles + .listShortCodes(TEST_UUID) + .then(responseFn); + }); + + it('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.messagingProfiles + .listShortCodes(TEST_UUID, TEST_AUTH_KEY) + .then(responseFn); + }); + }); + }); + + describe('Nested', function () { + function responseFn(response) { + if (response.data.length) { + expect(response.data[0]).toHaveProperty('id'); + expect(response.data[0]).toHaveProperty('record_type'); + expect(response.data[0]).toHaveProperty('messaging_profile_id'); + } else { + expect(response.data).toHaveProperty('id'); + } + } + + METHODS.forEach(function (action) { + describe(action, function () { + const camelCaseAction = utils.snakeToCamelCase(action); + + it('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.messagingProfiles + .create({name: 'Summer Campaign'}) + .then(function (response) { + const mp = response.data; + return mp[action]().then(responseFn); + }); + }); + it('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.messagingProfiles + .create({name: 'Summer Campaign'}) + .then(function (response) { + const mp = response.data; + return mp[action](TEST_AUTH_KEY).then(responseFn); + }); + }); + + describe(camelCaseAction, function () { + it('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.messagingProfiles + .create({name: 'Summer Campaign'}) + .then(function (response) { + const mp = response.data; + return mp[camelCaseAction]().then(responseFn); + }); + }); + it('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.messagingProfiles + .create({name: 'Summer Campaign'}) + .then(function (response) { + const mp = response.data; + return mp[camelCaseAction](TEST_AUTH_KEY).then(responseFn); + }); + }); + }); + }); + }); + + describe('Metrics methods', function () { + function metricsNestedResponseFn(response) { + expect(response.data).toHaveProperty('detailed'); + expect(response.data).toHaveProperty('overview'); + expect(response.data.overview).toHaveProperty('inbound'); + expect(response.data.overview).toHaveProperty('outbound'); + expect(response.data.overview).toHaveProperty('phone_numbers'); + expect(response.data.overview).toHaveProperty('messaging_profile_id'); + expect(response.data.overview).toMatchObject({ + record_type: 'messaging_profile_metrics', + }); + expect(response.data.detailed[0]).toHaveProperty('metrics'); + } + + describe('retrieveMetrics', function () { + it('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.messagingProfiles + .retrieveMetrics(TEST_UUID) + .then(metricsNestedResponseFn); + }); + + it('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.messagingProfiles + .retrieveMetrics(TEST_UUID, TEST_AUTH_KEY) + .then(metricsNestedResponseFn); + }); + }); + + describe('nested metrics', function () { + it('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.messagingProfiles + .create({name: 'Summer Campaign'}) + .then(function (response) { + const mp = response.data; + return mp.metrics().then(metricsNestedResponseFn); + }); + }); + it('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.messagingProfiles + .retrieve(TEST_UUID) + .then(function (response) { + const mp = response.data; + return mp.metrics(TEST_AUTH_KEY).then(metricsNestedResponseFn); + }); + }); + }); + }); + }); +}); diff --git a/src/test/utils.test.ts b/src/test/utils.test.ts index ea7b61e..c6c06ee 100644 --- a/src/test/utils.test.ts +++ b/src/test/utils.test.ts @@ -49,7 +49,7 @@ describe('utils', function () { utils.stringifyRequestData({ a: [{b: 'c'}, {b: 'd'}], }), - ).toBe('a[][b]=c&a[][b]=d'); + ).toBe('a[0][b]=c&a[1][b]=d'); }); test('Handles indexed arrays', function () { @@ -106,62 +106,50 @@ describe('utils', function () { describe('getDataFromArgs', function () { test('handles an empty list', function () { - expect(utils.getDataFromArgs([])).toBe({}); + expect(utils.getDataFromArgs([])).toStrictEqual({}); }); test('handles a list with no object', function () { const args = [1, 3]; - expect(utils.getDataFromArgs(args)).toBe({}); + expect(utils.getDataFromArgs(args)).toStrictEqual({}); expect(args.length).toBe(2); }); - test('ignores a hash with only options', function (done) { - const args = [{api_key: 'foo'}]; + test('ignores a hash with only options', function () { + jest.spyOn(console, 'warn'); - handleWarnings( - function () { - expect(utils.getDataFromArgs(args)).toBe({}); - expect(args.length).toBe(1); + const args = [{api_key: 'foo'}]; - done(); - }, - function (message: string) { - throw new Error('Should not have warned, but did: ' + message); - }, - ); + expect(utils.getDataFromArgs(args)).toStrictEqual({}); + expect(console.warn).not.toHaveBeenCalled(); }); - test('warns if the hash contains both data and options', function (done) { + test('warns if the hash contains both data and options', function () { + jest.spyOn(process, 'emitWarning'); const args = [{foo: 'bar', api_key: 'foo'}]; - handleWarnings( - function () { - utils.getDataFromArgs(args); - }, - function (message: string) { - expect(message).toBe( - 'Telnyx: Options found in arguments (api_key).' + - ' Did you mean to pass an options object? See https://github.com/telnyx/telnyx-node/wiki/Passing-Options.', - ); + utils.getDataFromArgs(args); - done(); - }, + // assert the expected warning + expect(process.emitWarning).toHaveBeenCalledWith( + 'Options found in arguments (api_key). Did you mean to pass an options object?', + 'Telnyx', ); }); test('finds the data', function () { const args = [{foo: 'bar'}, {api_key: 'foo'}]; - expect(utils.getDataFromArgs(args)).toBe({foo: 'bar'}); + expect(utils.getDataFromArgs(args)).toStrictEqual({foo: 'bar'}); expect(args.length).toBe(1); }); }); describe('getOptsFromArgs', function () { test('handles an empty list', function () { - expect(utils.getOptionsFromArgs([])).toBe({ + expect(utils.getOptionsFromArgs([])).toStrictEqual({ auth: null, headers: {}, }); }); test('handles an list with no object', function () { const args = [1, 3]; - expect(utils.getOptionsFromArgs(args)).toBe({ + expect(utils.getOptionsFromArgs(args)).toStrictEqual({ auth: null, headers: {}, }); @@ -169,7 +157,7 @@ describe('utils', function () { }); test('ignores a non-options object', function () { const args = [{foo: 'bar'}]; - expect(utils.getOptionsFromArgs(args)).toBe({ + expect(utils.getOptionsFromArgs(args)).toStrictEqual({ auth: null, headers: {}, }); @@ -179,13 +167,15 @@ describe('utils', function () { const args = [ 'KEY187557EC22404DB39975C43ACE661A58_9QdDI7XD5bvyahtaWx1YQo', ]; - expect(utils.getOptionsFromArgs(args)).toBe({ + expect(utils.getOptionsFromArgs(args)).toStrictEqual({ auth: 'KEY187557EC22404DB39975C43ACE661A58_9QdDI7XD5bvyahtaWx1YQo', headers: {}, }); expect(args.length).toBe(0); }); - test('warns if the hash contains something that does not belong', function (done) { + test('warns if the hash contains something that does not belong', function () { + jest.spyOn(process, 'emitWarning'); + const args = [ {foo: 'bar'}, { @@ -195,17 +185,12 @@ describe('utils', function () { }, ]; - handleWarnings( - function () { - utils.getOptionsFromArgs(args); - }, - function (message: string) { - expect(message).toBe( - 'Telnyx: Invalid options found (fishsticks, custard); ignoring.', - ); + utils.getOptionsFromArgs(args); - done(); - }, + // assert the expected warning + expect(process.emitWarning).toHaveBeenCalledWith( + 'Invalid options found (fishsticks, custard); ignoring.', + 'Telnyx', ); }); }); @@ -232,36 +217,3 @@ describe('utils', function () { }); }); }); - -function handleWarnings( - doWithShimmedConsoleWarn: () => void, - onWarn: (message: string) => void, -) { - if (typeof process.emitWarning !== 'function') { - /* eslint-disable no-console */ - - // Shim `console.warn` - const _warn = console.warn; - console.warn = onWarn; - - doWithShimmedConsoleWarn(); - - // Un-shim `console.warn`, - console.warn = _warn; - - /* eslint-enable no-console */ - } else { - function onProcessWarn(warning: {name: string; message: string}) { - /* eslint-disable-line no-inner-declarations */ - onWarn(warning.name + ': ' + warning.message); - } - - process.on('warning', onProcessWarn); - - doWithShimmedConsoleWarn(); - - process.nextTick(function () { - process.removeListener('warning', onProcessWarn); - }); - } -} diff --git a/src/utils.ts b/src/utils.ts index b9dc64d..2d47db2 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -65,6 +65,17 @@ export function removeEmpty( return obj; } +/** + * snake_case to camelCase + */ +export function snakeToCamelCase(name: string) { + const words = name.split('_'); + + return words.reduce(function (acc, nextWord) { + return acc + nextWord.charAt(0).toUpperCase() + nextWord.slice(1); + }); +} + export function callbackifyPromiseWithTimeout( promise: Promise, callback: ((error: unknown, result: T | null) => void) | null, diff --git a/types/MessagingProfileMetricsResource.d.ts b/types/MessagingProfileMetricsResource.d.ts new file mode 100644 index 0000000..dab0492 --- /dev/null +++ b/types/MessagingProfileMetricsResource.d.ts @@ -0,0 +1,18 @@ +import {paths} from './TelnyxAPI.js'; + +declare module 'telnyx' { + namespace Telnyx { + type MessagingProfilesListMetricsParams = + paths['/messaging_profile_metrics']['get']['parameters']['query']; + + type MessagingProfilesListMetricsResponse = + paths['/messaging_profile_metrics']['get']['responses']['200']['content']['application/json']['data']; + + class MessagingProfileMetricsResource { + listMetrics( + params?: MessagingProfilesListMetricsParams, + options?: RequestOptions, + ): Promise>; + } + } +} diff --git a/types/MessagingProfilesResource.d.ts b/types/MessagingProfilesResource.d.ts index 663dd95..0dbf711 100644 --- a/types/MessagingProfilesResource.d.ts +++ b/types/MessagingProfilesResource.d.ts @@ -2,11 +2,17 @@ import {paths} from './TelnyxAPI.js'; declare module 'telnyx' { namespace Telnyx { + type MessagingProfilesRetrieveId = + paths['/messaging_profiles/{id}']['get']['parameters']['path']['id']; + type MessagingProfilesRetrieveParams = paths['/messaging_profiles/{id}']['get']['parameters']['query']; + type MessagingProfilesDeleteId = + paths['/messaging_profiles/{id}']['delete']['parameters']['path']['id']; + type MessagingProfilesDeleteParams = - paths['/messaging_profiles/{id}']['delete']['parameters']['path']; + paths['/messaging_profiles/{id}']['delete']['parameters']['query']; type MessagingProfilesRetrieveResponse = paths['/messaging_profiles/{id}']['get']['responses']['200']['content']['application/json']['data']; @@ -26,6 +32,27 @@ declare module 'telnyx' { type MessagingProfilesCreateResponse = paths['/messaging_profiles']['post']['responses']['200']['content']['application/json']['data']; + type MessagingProfilesListPhoneNumbersParams = + paths['/messaging_profiles/{id}/phone_numbers']['get']['parameters']['query']; + + type MessagingProfilesListPhoneNumbersResponse = + paths['/messaging_profiles/{id}/phone_numbers']['get']['responses']['200']['content']['application/json']['data']; + + type MessagingProfilesListShortCodesParams = + paths['/messaging_profiles/{id}/short_codes']['get']['parameters']['query']; + + type MessagingProfilesListShortCodesResponse = + paths['/messaging_profiles/{id}/short_codes']['get']['responses']['200']['content']['application/json']['data']; + + type MessagingProfilesRetrieveMetricsId = + paths['/messaging_profiles/{id}/metrics']['get']['parameters']['path']['id']; + + type MessagingProfilesRetrieveMetricsParams = + paths['/messaging_profiles/{id}/metrics']['get']['parameters']['query']; + + type MessagingProfilesRetrieveMetricsResponse = + paths['/messaging_profiles/{id}/metrics']['get']['responses']['200']['content']['application/json']['data']; + class MessagingProfilesResource { create( params?: MessagingProfilesCreateParams, @@ -38,7 +65,7 @@ declare module 'telnyx' { ): Promise>; retrieve( - params?: MessagingProfilesRetrieveParams, + id?: MessagingProfilesRetrieveId, options?: RequestOptions, ): Promise>; @@ -46,6 +73,28 @@ declare module 'telnyx' { params?: MessagingProfilesListParams, options?: RequestOptions, ): Promise>; + + listPhoneNumbers( + params?: MessagingProfilesListPhoneNumbersParams, + options?: RequestOptions, + ): Promise< + Telnyx.Response + >; + + listShortCodes( + params?: MessagingProfilesListShortCodesParams, + options?: RequestOptions, + ): Promise< + Telnyx.Response + >; + + retrieveMetrics( + id?: MessagingProfilesRetrieveMetricsId, + params?: MessagingProfilesRetrieveMetricsParams, + options?: RequestOptions, + ): Promise< + Telnyx.Response + >; } } } diff --git a/types/index.d.ts b/types/index.d.ts index 1944f20..12d1a55 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -8,6 +8,7 @@ // Imports: The beginning of the section generated from our OpenAPI spec /// /// +/// // Imports: The end of the section generated from our OpenAPI spec declare module 'telnyx' { From 54fdce55accb8dc913f86a580008250a199c8749 Mon Sep 17 00:00:00 2001 From: Lucas Rosa Date: Tue, 24 Sep 2024 21:40:03 -0300 Subject: [PATCH 05/59] fix autoPagination specs --- .env.local | 4 + .gitignore | 1 + README.md | 14 +- package-lock.json | 1683 +++++++++++++++++++++++++++- package.json | 1 + setup_env.sh | 8 + src/TelnyxResource.ts | 11 +- src/autoPagination.ts | 14 - src/test/autoPagination.test.ts | 1856 ++++++++++++++++--------------- src/test/utils.test.ts | 2 +- src/utils.ts | 1 + 11 files changed, 2662 insertions(+), 933 deletions(-) create mode 100644 .env.local create mode 100755 setup_env.sh diff --git a/.env.local b/.env.local new file mode 100644 index 0000000..9ba327f --- /dev/null +++ b/.env.local @@ -0,0 +1,4 @@ +NODE_ENV=development +TELNYX_MOCK_PORT=12111 +TELNYX_MOCK_OPEN_API_URI=https://raw.githubusercontent.com/team-telnyx/openapi/master/openapi/spec3.json +TELNYX_API_BASE= diff --git a/.gitignore b/.gitignore index d42d993..71d5346 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ dist tags .nyc_output coverage +.env \ No newline at end of file diff --git a/README.md b/README.md index f477ba7..c6625b2 100644 --- a/README.md +++ b/README.md @@ -316,16 +316,20 @@ const allMessagingProfiles = await telnyx.messagingProfiles ### Setup -The test suite depends on the [Prism Mock Server](https://github.com/stoplightio/prism). +Run the following scripts to setup your envs ```bash -npm install -g @stoplight/prism-cli +cp .env.local .env ``` -Once installed, start the prism mock service with the following command: +> Don't forget to update your local envs accordingly. + +The test suite depends on the [Prism Mock Server](https://github.com/stoplightio/prism). + +Start the prism mock service with the following command: ```bash -prism mock https://raw.githubusercontent.com/team-telnyx/openapi/master/openapi/spec3.json +npx prism mock https://raw.githubusercontent.com/team-telnyx/openapi/master/openapi/spec3.json ``` --- @@ -352,7 +356,7 @@ $ npm test Run all tests with a custom `telnyx-mock` port: ```bash -$ TELNYX_MOCK_PORT=12000 npm test +$ TELNYX_MOCK_PORT=12111 npm test ``` Run a single test suite: diff --git a/package-lock.json b/package-lock.json index 2dfff6b..be2a9f1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,6 +13,7 @@ }, "devDependencies": { "@eslint/js": "^9.10.0", + "@stoplight/prism-cli": "^5.10.0", "@types/eslint__js": "^8.42.3", "@types/jest": "^29.5.13", "@types/qs": "^6.9.15", @@ -717,6 +718,17 @@ "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, + "node_modules/@faker-js/faker": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/@faker-js/faker/-/faker-6.3.1.tgz", + "integrity": "sha512-8YXBE2ZcU/pImVOHX7MWrSR/X5up7t6rPWZlk34RwZEcdr3ua6X+32pSd6XuOQRN+vbuvYNfA6iey8NbrjuMFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.0.0", + "npm": ">=6.0.0" + } + }, "node_modules/@humanwhocodes/config-array": { "version": "0.11.14", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", @@ -1233,6 +1245,13 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, + "node_modules/@jsdevtools/ono": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/@jsdevtools/ono/-/ono-7.1.3.tgz", + "integrity": "sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg==", + "dev": true, + "license": "MIT" + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -1313,6 +1332,344 @@ "@sinonjs/commons": "^3.0.0" } }, + "node_modules/@stoplight/http-spec": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@stoplight/http-spec/-/http-spec-7.1.0.tgz", + "integrity": "sha512-Z2XqKX2SV8a1rrgSzFqccX2TolfcblT+l4pNvUU+THaLl50tKDoeidwWWZTzYUzqU0+UV97ponvqEbWWN3PaXg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@stoplight/json": "^3.18.1", + "@stoplight/json-schema-generator": "1.0.2", + "@stoplight/types": "14.1.0", + "@types/json-schema": "7.0.11", + "@types/swagger-schema-official": "~2.0.22", + "@types/type-is": "^1.6.3", + "fnv-plus": "^1.3.1", + "lodash": "^4.17.21", + "openapi3-ts": "^2.0.2", + "postman-collection": "^4.1.3", + "tslib": "^2.6.2", + "type-is": "^1.6.18" + }, + "engines": { + "node": ">=14.13" + } + }, + "node_modules/@stoplight/http-spec/node_modules/@stoplight/types": { + "version": "14.1.0", + "resolved": "https://registry.npmjs.org/@stoplight/types/-/types-14.1.0.tgz", + "integrity": "sha512-fL8Nzw03+diALw91xHEHA5Q0WCGeW9WpPgZQjodNUWogAgJ56aJs03P9YzsQ1J6fT7/XjDqHMgn7/RlsBzB/SQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.4", + "utility-types": "^3.10.0" + }, + "engines": { + "node": "^12.20 || >=14.13" + } + }, + "node_modules/@stoplight/http-spec/node_modules/@types/json-schema": { + "version": "7.0.11", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", + "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@stoplight/json": { + "version": "3.21.7", + "resolved": "https://registry.npmjs.org/@stoplight/json/-/json-3.21.7.tgz", + "integrity": "sha512-xcJXgKFqv/uCEgtGlPxy3tPA+4I+ZI4vAuMJ885+ThkTHFVkC+0Fm58lA9NlsyjnkpxFh4YiQWpH+KefHdbA0A==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@stoplight/ordered-object-literal": "^1.0.3", + "@stoplight/path": "^1.3.2", + "@stoplight/types": "^13.6.0", + "jsonc-parser": "~2.2.1", + "lodash": "^4.17.21", + "safe-stable-stringify": "^1.1" + }, + "engines": { + "node": ">=8.3.0" + } + }, + "node_modules/@stoplight/json-schema-generator": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@stoplight/json-schema-generator/-/json-schema-generator-1.0.2.tgz", + "integrity": "sha512-FzSLFoIZc6Lmw3oRE7kU6YUrl5gBmUs//rY59jdFipBoSyTPv5NyqeyTg5mvT6rY1F3qTLU3xgzRi/9Pb9eZpA==", + "dev": true, + "license": "MIT", + "dependencies": { + "cross-fetch": "^3.1.5", + "json-promise": "1.1.x", + "minimist": "1.2.6", + "mkdirp": "0.5.x", + "pretty-data": "0.40.x" + }, + "bin": { + "json-schema-generator": "bin/cli.js" + } + }, + "node_modules/@stoplight/json-schema-merge-allof": { + "version": "0.7.8", + "resolved": "https://registry.npmjs.org/@stoplight/json-schema-merge-allof/-/json-schema-merge-allof-0.7.8.tgz", + "integrity": "sha512-JTDt6GYpCWQSb7+UW1P91IAp/pcLWis0mmEzWVFcLsrNgtUYK7JLtYYz0ZPSR4QVL0fJ0YQejM+MPq5iNDFO4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "compute-lcm": "^1.1.0", + "json-schema-compare": "^0.2.2", + "lodash": "^4.17.4" + } + }, + "node_modules/@stoplight/json-schema-ref-parser": { + "version": "9.2.7", + "resolved": "https://registry.npmjs.org/@stoplight/json-schema-ref-parser/-/json-schema-ref-parser-9.2.7.tgz", + "integrity": "sha512-1vNzJ7iSrFTAFNbZHPyhI6GiJJw74+WaV61bARUQEDR4Jm80f9s0Tq9uCvGoMYwIFmWDJAoTiyegnUs6SvVxDw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jsdevtools/ono": "^7.1.3", + "@stoplight/path": "^1.3.2", + "@stoplight/yaml": "^4.0.2", + "call-me-maybe": "^1.0.1", + "fastestsmallesttextencoderdecoder": "^1.0.22", + "isomorphic-fetch": "^3.0.0", + "node-abort-controller": "^3.0.1" + } + }, + "node_modules/@stoplight/json-schema-sampler": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@stoplight/json-schema-sampler/-/json-schema-sampler-0.3.0.tgz", + "integrity": "sha512-G7QImi2xr9+8iPEg0D9YUi1BWhIiiEm19aMb91oWBSdxuhezOAqqRP3XNY6wczHV9jLWW18f+KkghTy9AG0BQA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/json-schema": "^7.0.7", + "json-pointer": "^0.6.1" + } + }, + "node_modules/@stoplight/json/node_modules/@stoplight/types": { + "version": "13.20.0", + "resolved": "https://registry.npmjs.org/@stoplight/types/-/types-13.20.0.tgz", + "integrity": "sha512-2FNTv05If7ib79VPDA/r9eUet76jewXFH2y2K5vuge6SXbRHtWBhcaRmu+6QpF4/WRNoJj5XYRSwLGXDxysBGA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.4", + "utility-types": "^3.10.0" + }, + "engines": { + "node": "^12.20 || >=14.13" + } + }, + "node_modules/@stoplight/ordered-object-literal": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@stoplight/ordered-object-literal/-/ordered-object-literal-1.0.5.tgz", + "integrity": "sha512-COTiuCU5bgMUtbIFBuyyh2/yVVzlr5Om0v5utQDgBCuQUOPgU1DwoffkTfg4UBQOvByi5foF4w4T+H9CoRe5wg==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/@stoplight/path": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@stoplight/path/-/path-1.3.2.tgz", + "integrity": "sha512-lyIc6JUlUA8Ve5ELywPC8I2Sdnh1zc1zmbYgVarhXIp9YeAB0ReeqmGEOWNtlHkbP2DAA1AL65Wfn2ncjK/jtQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/@stoplight/prism-cli": { + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/@stoplight/prism-cli/-/prism-cli-5.10.0.tgz", + "integrity": "sha512-U7XMCAlXZFh2GPvzpZeMJ4u5V47ncYxgIxbLy4Y8rjsBCKWKQqqUCFoENXDub2O6ibZKSQctIvO0HiMZlIWERw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@stoplight/json": "3.21.7", + "@stoplight/json-schema-ref-parser": "9.2.7", + "@stoplight/prism-core": "^5.8.0", + "@stoplight/prism-http": "5.10.0", + "@stoplight/prism-http-server": "^5.10.0", + "@stoplight/types": "^14.1.0", + "chalk": "^4.1.2", + "chokidar": "^3.5.2", + "fp-ts": "^2.11.5", + "json-schema-faker": "0.5.6", + "lodash": "^4.17.21", + "node-fetch": "^2.6.5", + "pino": "^6.13.3", + "signale": "^1.4.0", + "split2": "^3.2.2", + "tslib": "^2.3.1", + "uri-template-lite": "^22.9.0", + "urijs": "^1.19.11", + "yargs": "^16.2.0" + }, + "bin": { + "prism": "dist/index.js" + }, + "engines": { + "node": ">=18.20.1" + } + }, + "node_modules/@stoplight/prism-core": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@stoplight/prism-core/-/prism-core-5.8.0.tgz", + "integrity": "sha512-fmH7n6e0thzOGcD5uZBu/Xx1iFNfpc9ACTxPie+lFD54SJ214M2FIFXD7kV+NCFlC+w5OFw+lJRaYM859uMnAg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "fp-ts": "^2.11.5", + "lodash": "^4.17.21", + "pino": "^6.13.3", + "tslib": "^2.3.1" + }, + "engines": { + "node": ">=18.20.1" + } + }, + "node_modules/@stoplight/prism-http": { + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/@stoplight/prism-http/-/prism-http-5.10.0.tgz", + "integrity": "sha512-OlWSv9XobxkNu4D1xfDfwjMSETrw4wNFkWcbKzQmepNERqJ6uuWDDjkIR2f1F7SYU61ElwhaXf1bA9dlze6U6g==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@faker-js/faker": "^6.0.0", + "@stoplight/http-spec": "^7.0.3", + "@stoplight/json": "3.21.7", + "@stoplight/json-schema-merge-allof": "0.7.8", + "@stoplight/json-schema-ref-parser": "9.2.7", + "@stoplight/json-schema-sampler": "0.3.0", + "@stoplight/prism-core": "^5.8.0", + "@stoplight/types": "^14.1.0", + "@stoplight/yaml": "^4.2.3", + "abstract-logging": "^2.0.1", + "accepts": "^1.3.7", + "ajv": "^8.4.0", + "ajv-formats": "^2.1.1", + "caseless": "^0.12.0", + "chalk": "^4.1.2", + "content-type": "^1.0.4", + "fp-ts": "^2.11.5", + "http-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.0", + "json-schema-faker": "0.5.6", + "lodash": "^4.17.21", + "node-fetch": "^2.6.5", + "parse-multipart-data": "^1.5.0", + "pino": "^6.13.3", + "tslib": "^2.3.1", + "type-is": "^1.6.18", + "uri-template-lite": "^22.9.0", + "whatwg-mimetype": "^3.0.0" + }, + "engines": { + "node": ">=18.20.1" + } + }, + "node_modules/@stoplight/prism-http-server": { + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/@stoplight/prism-http-server/-/prism-http-server-5.10.0.tgz", + "integrity": "sha512-7sdMNzBY4+/96fLQn7/LR6ItDfNwcvCY9XCWrpruWeq5fHJHrb5OynpHvZs9vHcTpZNITBs/sgmukXn35wB5Sw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@stoplight/prism-core": "^5.8.0", + "@stoplight/prism-http": "^5.10.0", + "@stoplight/types": "^14.1.0", + "fast-xml-parser": "^4.2.0", + "fp-ts": "^2.11.5", + "io-ts": "^2.2.16", + "lodash": "^4.17.21", + "micri": "^4.3.0", + "node-fetch": "^2.6.5", + "parse-prefer-header": "1.0.0", + "tslib": "^2.3.1", + "type-is": "^1.6.18" + }, + "engines": { + "node": ">=18.20.1" + } + }, + "node_modules/@stoplight/prism-http/node_modules/ajv": { + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", + "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/@stoplight/prism-http/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true, + "license": "MIT" + }, + "node_modules/@stoplight/types": { + "version": "14.1.1", + "resolved": "https://registry.npmjs.org/@stoplight/types/-/types-14.1.1.tgz", + "integrity": "sha512-/kjtr+0t0tjKr+heVfviO9FrU/uGLc+QNX3fHJc19xsCNYqU7lVhaXxDmEID9BZTjG+/r9pK9xP/xU02XGg65g==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.4", + "utility-types": "^3.10.0" + }, + "engines": { + "node": "^12.20 || >=14.13" + } + }, + "node_modules/@stoplight/yaml": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@stoplight/yaml/-/yaml-4.3.0.tgz", + "integrity": "sha512-JZlVFE6/dYpP9tQmV0/ADfn32L9uFarHWxfcRhReKUnljz1ZiUM5zpX+PH8h5CJs6lao3TuFqnPm9IJJCEkE2w==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@stoplight/ordered-object-literal": "^1.0.5", + "@stoplight/types": "^14.1.1", + "@stoplight/yaml-ast-parser": "0.0.50", + "tslib": "^2.2.0" + }, + "engines": { + "node": ">=10.8" + } + }, + "node_modules/@stoplight/yaml-ast-parser": { + "version": "0.0.50", + "resolved": "https://registry.npmjs.org/@stoplight/yaml-ast-parser/-/yaml-ast-parser-0.0.50.tgz", + "integrity": "sha512-Pb6M8TDO9DtSVla9yXSTAxmo9GVEouq5P40DWXdOie69bXogZTkgvopCq+yEvTMA0F6PEvdJmbtTV3ccIp11VQ==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/@tootallnate/once": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", + "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10" + } + }, "node_modules/@tsconfig/node10": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz", @@ -1478,6 +1835,23 @@ "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==", "dev": true }, + "node_modules/@types/swagger-schema-official": { + "version": "2.0.25", + "resolved": "https://registry.npmjs.org/@types/swagger-schema-official/-/swagger-schema-official-2.0.25.tgz", + "integrity": "sha512-T92Xav+Gf/Ik1uPW581nA+JftmjWPgskw/WBf4TJzxRG/SJ+DfNnNE+WuZ4mrXuzflQMqMkm1LSYjzYW7MB1Cg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/type-is": { + "version": "1.6.6", + "resolved": "https://registry.npmjs.org/@types/type-is/-/type-is-1.6.6.tgz", + "integrity": "sha512-fs1KHv/f9OvmTMsu4sBNaUu32oyda9Y9uK25naJG8gayxNrfqGIjPQsbLIYyfe7xFkppnPlJB+BuTldOaX9bXw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/yargs": { "version": "17.0.33", "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.33.tgz", @@ -1717,6 +2091,27 @@ "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", "dev": true }, + "node_modules/abstract-logging": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/abstract-logging/-/abstract-logging-2.0.1.tgz", + "integrity": "sha512-2BjRTZxTPvheOvGbBslFSYOUkr+SjPtOnrLP33f+VIWLzezQpZcqVg7ja3L4dBXmzzgwT+a029jRx5PCi3JuiA==", + "dev": true, + "license": "MIT" + }, + "node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "dev": true, + "license": "MIT", + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, "node_modules/acorn": { "version": "8.12.1", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", @@ -1751,6 +2146,19 @@ "node": ">=0.4.0" } }, + "node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, "node_modules/aggregate-error": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", @@ -1780,6 +2188,48 @@ "url": "https://github.com/sponsors/epoberezkin" } }, + "node_modules/ajv-formats": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz", + "integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^8.0.0" + }, + "peerDependencies": { + "ajv": "^8.0.0" + }, + "peerDependenciesMeta": { + "ajv": { + "optional": true + } + } + }, + "node_modules/ajv-formats/node_modules/ajv": { + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", + "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ajv-formats/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true, + "license": "MIT" + }, "node_modules/ansi-escapes": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", @@ -1885,6 +2335,16 @@ "dev": true, "license": "MIT" }, + "node_modules/atomic-sleep": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/atomic-sleep/-/atomic-sleep-1.0.0.tgz", + "integrity": "sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.0.0" + } + }, "node_modules/babel-jest": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz", @@ -2002,6 +2462,26 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, + "node_modules/binary-extensions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/bluebird": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", + "dev": true, + "license": "MIT" + }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -2118,6 +2598,13 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/call-me-maybe": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.2.tgz", + "integrity": "sha512-HpX65o1Hnr9HH25ojC1YGs7HCQLq0GCOibSaWER0eNpgJ/Z1MZv2mTc7+xh6WOPxbRVcmgbv4hGU+uSQ/2xFZQ==", + "dev": true, + "license": "MIT" + }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -2156,6 +2643,13 @@ } ] }, + "node_modules/caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==", + "dev": true, + "license": "Apache-2.0" + }, "node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -2181,6 +2675,54 @@ "node": ">=10" } }, + "node_modules/charset": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/charset/-/charset-1.0.1.tgz", + "integrity": "sha512-6dVyOOYjpfFcL1Y4qChrAoQLRHvj2ziyhcm0QJlhOcAhykL/k1kTUPbeo+87MNRTRdk2OIIsIXbuF3x2wi5EXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/chokidar/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/ci-info": { "version": "3.9.0", "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", @@ -2211,14 +2753,26 @@ "node": ">=6" } }, - "node_modules/co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", + "node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", "dev": true, - "engines": { - "iojs": ">= 1.0.0", - "node": ">= 0.12.0" + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", + "dev": true, + "engines": { + "iojs": ">= 1.0.0", + "node": ">= 0.12.0" } }, "node_modules/collect-v8-coverage": { @@ -2251,12 +2805,45 @@ "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==", "dev": true }, + "node_modules/compute-gcd": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/compute-gcd/-/compute-gcd-1.2.1.tgz", + "integrity": "sha512-TwMbxBNz0l71+8Sc4czv13h4kEqnchV9igQZBi6QUaz09dnz13juGnnaWWJTRsP3brxOoxeB4SA2WELLw1hCtg==", + "dev": true, + "dependencies": { + "validate.io-array": "^1.0.3", + "validate.io-function": "^1.0.2", + "validate.io-integer-array": "^1.0.0" + } + }, + "node_modules/compute-lcm": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/compute-lcm/-/compute-lcm-1.1.2.tgz", + "integrity": "sha512-OFNPdQAXnQhDSKioX8/XYT6sdUlXwpeMjfd6ApxMJfyZ4GxmLR1xvMERctlYhlHwIiz6CSpBc2+qYKjHGZw4TQ==", + "dev": true, + "dependencies": { + "compute-gcd": "^1.2.1", + "validate.io-array": "^1.0.3", + "validate.io-function": "^1.0.2", + "validate.io-integer-array": "^1.0.0" + } + }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "dev": true }, + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, "node_modules/convert-source-map": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", @@ -2291,6 +2878,16 @@ "dev": true, "license": "MIT" }, + "node_modules/cross-fetch": { + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.8.tgz", + "integrity": "sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==", + "dev": true, + "license": "MIT", + "dependencies": { + "node-fetch": "^2.6.12" + } + }, "node_modules/cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -2856,6 +3453,60 @@ "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", "dev": true }, + "node_modules/fast-redact": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/fast-redact/-/fast-redact-3.5.0.tgz", + "integrity": "sha512-dwsoQlS7h9hMeYUq1W++23NDcBLV4KqONnITDV9DjfS3q1SgDGVrBdvvTLUotWtPSD7asWDV9/CmsZPy8Hf70A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/fast-safe-stringify": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz", + "integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-uri": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.1.tgz", + "integrity": "sha512-MWipKbbYiYI0UC7cl8m/i/IWTqfC8YXsqjzybjddLsFjStroQzsHXkc73JutMvBiXmOvapk+axIl79ig5t55Bw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-xml-parser": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.5.0.tgz", + "integrity": "sha512-/PlTQCI96+fZMAOLMZK4CWG1ItCbfZ/0jx7UIJFChPNrx7tcEgerUgWbeieCM9MfHInUDyK8DWYZ+YrywDJuTg==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + }, + { + "type": "paypal", + "url": "https://paypal.me/naturalintelligence" + } + ], + "license": "MIT", + "dependencies": { + "strnum": "^1.0.5" + }, + "bin": { + "fxparser": "src/cli/cli.js" + } + }, + "node_modules/fastestsmallesttextencoderdecoder": { + "version": "1.0.22", + "resolved": "https://registry.npmjs.org/fastestsmallesttextencoderdecoder/-/fastestsmallesttextencoderdecoder-1.0.22.tgz", + "integrity": "sha512-Pb8d48e+oIuY4MaM64Cd7OW1gt4nxCHs7/ddPPZ/Ic3sg8yVGM7O9wDvZ7us6ScaUupzM+pfBolwtYhN1IxBIw==", + "dev": true, + "license": "CC0-1.0" + }, "node_modules/fastq": { "version": "1.17.1", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", @@ -2874,6 +3525,29 @@ "bser": "2.1.1" } }, + "node_modules/figures": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", + "integrity": "sha512-Oa2M9atig69ZkfwiApY8F2Yy+tzMbazyvqv21R0NsSC8floSOC09BbT1ITWAdoMGQvJ/aZnR1KMwdx9tvHnTNA==", + "dev": true, + "license": "MIT", + "dependencies": { + "escape-string-regexp": "^1.0.5" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/figures/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, "node_modules/file-entry-cache": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", @@ -2886,6 +3560,16 @@ "node": "^10.12.0 || >=12.0.0" } }, + "node_modules/file-type": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-3.9.0.tgz", + "integrity": "sha512-RLoqTXE8/vPmMuTI88DAzhMYC99I8BWv7zYP4A1puo5HIjEJ5EX48ighy4ZyKMG9EDXxBgW6e++cn7d1xuFghA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/filelist": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz", @@ -2978,12 +3662,33 @@ "node": "^10.12.0 || >=12.0.0" } }, + "node_modules/flatstr": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/flatstr/-/flatstr-1.0.12.tgz", + "integrity": "sha512-4zPxDyhCyiN2wIAtSLI6gc82/EjqZc1onI4Mz/l0pWrAlsSfYH/2ZIcU+e3oA2wDwbzIWNKwa23F8rh6+DRWkw==", + "dev": true, + "license": "MIT" + }, "node_modules/flatted": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", "dev": true }, + "node_modules/fnv-plus": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/fnv-plus/-/fnv-plus-1.3.1.tgz", + "integrity": "sha512-Gz1EvfOneuFfk4yG458dJ3TLJ7gV19q3OM/vVvvHf7eT02Hm1DleB4edsia6ahbKgAYxO9gvyQ1ioWZR+a00Yw==", + "dev": true, + "license": "MIT" + }, + "node_modules/foreach": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.6.tgz", + "integrity": "sha512-k6GAGDyqLe9JaebCsFCoudPPWfihKu8pylYXRlqP1J7ms39iPoTtk2fviNglIeQEwdh0bQeKJ01ZPyuyQvKzwg==", + "dev": true, + "license": "MIT" + }, "node_modules/foreground-child": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-2.0.0.tgz", @@ -2997,6 +3702,20 @@ "node": ">=8.0.0" } }, + "node_modules/format-util": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/format-util/-/format-util-1.0.5.tgz", + "integrity": "sha512-varLbTj0e0yVyRpqQhuWV+8hlePAgaoFRhNFj50BNjEIrw1/DphHSObtqwskVCPWNgzwPoQrZAbfa/SBiicNeg==", + "dev": true, + "license": "MIT" + }, + "node_modules/fp-ts": { + "version": "2.16.9", + "resolved": "https://registry.npmjs.org/fp-ts/-/fp-ts-2.16.9.tgz", + "integrity": "sha512-+I2+FnVB+tVaxcYyQkHUq7ZdKScaBlX53A41mxQtpIccsfyv8PzdzP7fzp2AY832T4aoK6UZ5WRX/ebGd8uZuQ==", + "dev": true, + "license": "MIT" + }, "node_modules/fromentries": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/fromentries/-/fromentries-1.3.2.tgz", @@ -3155,6 +3874,13 @@ "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", "dev": true }, + "node_modules/handler-agent": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/handler-agent/-/handler-agent-0.2.0.tgz", + "integrity": "sha512-cUduQxa5p3TFtGmb55mrRbkk/3EJCsLSeFrCIuTakQHQlYVWXeW2L9IUQUHyoHLI4UgpBNaN2JrZ0He1jPu+vg==", + "dev": true, + "license": "MIT" + }, "node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -3243,6 +3969,42 @@ "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", "dev": true }, + "node_modules/http-proxy-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", + "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@tootallnate/once": "2", + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/http-reasons": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/http-reasons/-/http-reasons-0.1.0.tgz", + "integrity": "sha512-P6kYh0lKZ+y29T2Gqz+RlC9WBLhKe8kDmcJ+A+611jFfxdPsbMRQ5aNmFRM3lENqFkK+HTTL+tlQviAiv0AbLQ==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "dev": true, + "license": "MIT", + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/human-signals": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", @@ -3252,6 +4014,19 @@ "node": ">=10.17.0" } }, + "node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/ignore": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", @@ -3331,12 +4106,35 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, + "node_modules/io-ts": { + "version": "2.2.21", + "resolved": "https://registry.npmjs.org/io-ts/-/io-ts-2.2.21.tgz", + "integrity": "sha512-zz2Z69v9ZIC3mMLYWIeoUcwWD6f+O7yP92FMVVaXEOSZH1jnVBmET/urd/uoarD1WGBY4rCj8TAyMPzsGNzMFQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "fp-ts": "^2.5.0" + } + }, "node_modules/is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", "dev": true }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "license": "MIT", + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/is-core-module": { "version": "2.15.1", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.1.tgz", @@ -3442,6 +4240,17 @@ "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", "dev": true }, + "node_modules/isomorphic-fetch": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-3.0.0.tgz", + "integrity": "sha512-qvUtwJ3j6qwsF3jLxkZ72qCgjMysPzDfeV240JHiGZsANBYd+EEuu35v7dfrJ9Up0Ak07D7GGSkGhCHTqg/5wA==", + "dev": true, + "license": "MIT", + "dependencies": { + "node-fetch": "^2.6.1", + "whatwg-fetch": "^3.4.1" + } + }, "node_modules/istanbul-lib-coverage": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", @@ -4279,12 +5088,76 @@ "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", "dev": true }, + "node_modules/json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "dev": true, + "license": "MIT" + }, "node_modules/json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", "dev": true }, + "node_modules/json-pointer": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/json-pointer/-/json-pointer-0.6.2.tgz", + "integrity": "sha512-vLWcKbOaXlO+jvRy4qNd+TI1QUPZzfJj1tpJ3vAXDych5XJf93ftpUKe5pKCrzyIIwgBJcOcCVRUfqQP25afBw==", + "dev": true, + "license": "MIT", + "dependencies": { + "foreach": "^2.0.4" + } + }, + "node_modules/json-promise": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/json-promise/-/json-promise-1.1.8.tgz", + "integrity": "sha512-rz31P/7VfYnjQFrF60zpPTT0egMPlc8ZvIQHWs4ZtNZNnAXRmXo6oS+6eyWr5sEMG03OVhklNrTXxiIRYzoUgQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "bluebird": "*" + } + }, + "node_modules/json-schema-compare": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/json-schema-compare/-/json-schema-compare-0.2.2.tgz", + "integrity": "sha512-c4WYmDKyJXhs7WWvAWm3uIYnfyWFoIp+JEoX34rctVvEkMYCPGhXtvmFFXiffBbxfZsvQ0RNnV5H7GvDF5HCqQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "lodash": "^4.17.4" + } + }, + "node_modules/json-schema-faker": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/json-schema-faker/-/json-schema-faker-0.5.6.tgz", + "integrity": "sha512-u/cFC26/GDxh2vPiAC8B8xVvpXAW+QYtG2mijEbKrimCk8IHtiwQBjCE8TwvowdhALWq9IcdIWZ+/8ocXvdL3Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "json-schema-ref-parser": "^6.1.0", + "jsonpath-plus": "^7.2.0" + }, + "bin": { + "jsf": "bin/gen.cjs" + } + }, + "node_modules/json-schema-ref-parser": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/json-schema-ref-parser/-/json-schema-ref-parser-6.1.0.tgz", + "integrity": "sha512-pXe9H1m6IgIpXmE5JSb8epilNTGsmTb2iPohAXpOdhqGFbQjNeHHsZxU+C8w6T81GZxSPFLeUoqDJmzxx5IGuw==", + "deprecated": "Please switch to @apidevtools/json-schema-ref-parser", + "dev": true, + "license": "MIT", + "dependencies": { + "call-me-maybe": "^1.0.1", + "js-yaml": "^3.12.1", + "ono": "^4.0.11" + } + }, "node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", @@ -4315,6 +5188,23 @@ "node": ">=6" } }, + "node_modules/jsonc-parser": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-2.2.1.tgz", + "integrity": "sha512-o6/yDBYccGvTz1+QFevz6l6OBZ2+fMVu2JZ9CIhzsYRX4mjaK5IyX9eldUdCmga16zlgQxyrj5pt9kzuj2C02w==", + "dev": true, + "license": "MIT" + }, + "node_modules/jsonpath-plus": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-7.2.0.tgz", + "integrity": "sha512-zBfiUPM5nD0YZSBT/o/fbCUlCcepMIdP0CJZxM1+KgA4f2T206f6VAg9e7mX35+KlMaIc5qXW34f3BnwJ3w+RA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + } + }, "node_modules/keyv": { "version": "4.5.4", "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", @@ -4361,6 +5251,56 @@ "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", "dev": true }, + "node_modules/liquid-json": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/liquid-json/-/liquid-json-0.3.1.tgz", + "integrity": "sha512-wUayTU8MS827Dam6MxgD72Ui+KOSF+u/eIqpatOtjnvgJ0+mnDq33uC2M7J0tPK+upe/DpUAuK4JUU89iBoNKQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=4" + } + }, + "node_modules/load-json-file": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha512-Kx8hMakjX03tiGTLAIdJ+lL0htKnXjEZN6hk/tozf/WOuYGdZBJrZ+rCJRbVCugsjB3jMLn9746NsQIf5VjBMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/load-json-file/node_modules/parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==", + "dev": true, + "license": "MIT", + "dependencies": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/load-json-file/node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, "node_modules/locate-path": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", @@ -4376,6 +5316,20 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true, + "license": "MIT" + }, + "node_modules/lodash.camelcase": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", + "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==", + "dev": true, + "license": "MIT" + }, "node_modules/lodash.flattendeep": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", @@ -4441,6 +5395,16 @@ "tmpl": "1.0.5" } }, + "node_modules/media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, "node_modules/merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", @@ -4456,6 +5420,19 @@ "node": ">= 8" } }, + "node_modules/micri": { + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/micri/-/micri-4.5.1.tgz", + "integrity": "sha512-AtvnSBGFglNr+iqs5gufpHT9xRXUabgu9vYEnQYPXSBs+nLSBvmUS5Mzg+3LJ9eQBrNA1o5M49WeqiX1f+d2sg==", + "dev": true, + "license": "MIT", + "dependencies": { + "handler-agent": "0.2.0" + }, + "engines": { + "node": ">= 12.0.0" + } + }, "node_modules/micromatch": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", @@ -4469,8 +5446,41 @@ "node": ">=8.6" } }, - "node_modules/mimic-fn": { - "version": "2.1.0", + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-format": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/mime-format/-/mime-format-2.0.1.tgz", + "integrity": "sha512-XxU3ngPbEnrYnNbIX+lYSaYg0M01v6p2ntd2YaFksTu0vayaw5OJvbdRyWs07EYRlLED5qadUZ+xo+XhOvFhwg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "charset": "^1.0.0" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dev": true, + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mimic-fn": { + "version": "2.1.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", "dev": true, @@ -4490,6 +5500,26 @@ "node": "*" } }, + "node_modules/minimist": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", + "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/mkdirp": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "dev": true, + "license": "MIT", + "dependencies": { + "minimist": "^1.2.6" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, "node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -4502,6 +5532,16 @@ "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", "dev": true }, + "node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, "node_modules/nock": { "version": "13.5.5", "resolved": "https://registry.npmjs.org/nock/-/nock-13.5.5.tgz", @@ -4516,6 +5556,34 @@ "node": ">= 10.13" } }, + "node_modules/node-abort-controller": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/node-abort-controller/-/node-abort-controller-3.1.1.tgz", + "integrity": "sha512-AGK2yQKIjRuqnc6VkX2Xj5d+QW8xZ87pa1UK6yA6ouUyuxfHuMP6umE5QK7UmTeOAymo+Zx1Fxiuw9rVx8taHQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, "node_modules/node-int64": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", @@ -4786,6 +5854,26 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/ono": { + "version": "4.0.11", + "resolved": "https://registry.npmjs.org/ono/-/ono-4.0.11.tgz", + "integrity": "sha512-jQ31cORBFE6td25deYeD80wxKBMj+zBmHTrVxnc6CKhx8gho6ipmWM5zj/oeoqioZ99yqBls9Z/9Nss7J26G2g==", + "dev": true, + "license": "MIT", + "dependencies": { + "format-util": "^1.0.3" + } + }, + "node_modules/openapi3-ts": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/openapi3-ts/-/openapi3-ts-2.0.2.tgz", + "integrity": "sha512-TxhYBMoqx9frXyOgnRHufjQfPXomTIHYKhSKJ6jHfj13kS8OEIhvmE8CTuQyKtjjWttAjX5DPxM1vmalEpo8Qw==", + "dev": true, + "license": "MIT", + "dependencies": { + "yaml": "^1.10.2" + } + }, "node_modules/optionator": { "version": "0.9.4", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", @@ -4899,6 +5987,23 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/parse-multipart-data": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/parse-multipart-data/-/parse-multipart-data-1.5.0.tgz", + "integrity": "sha512-ck5zaMF0ydjGfejNMnlo5YU2oJ+pT+80Jb1y4ybanT27j+zbVP/jkYmCrUGsEln0Ox/hZmuvgy8Ra7AxbXP2Mw==", + "dev": true, + "license": "MIT" + }, + "node_modules/parse-prefer-header": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/parse-prefer-header/-/parse-prefer-header-1.0.0.tgz", + "integrity": "sha512-+WJ3ncCrKOExuxF06XyKWS8bLkLttnlm6YPMZIFIUXNd09Xy0N2JISudxCaY+luDm43yTnHMHVU3zte4G2gN4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "lodash.camelcase": "^4.3.0" + } + }, "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -4950,6 +6055,42 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/pino": { + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/pino/-/pino-6.14.0.tgz", + "integrity": "sha512-iuhEDel3Z3hF9Jfe44DPXR8l07bhjuFY3GMHIXbjnY9XcafbyDDwl2sN2vw2GjMPf5Nkoe+OFao7ffn9SXaKDg==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-redact": "^3.0.0", + "fast-safe-stringify": "^2.0.8", + "flatstr": "^1.0.12", + "pino-std-serializers": "^3.1.0", + "process-warning": "^1.0.0", + "quick-format-unescaped": "^4.0.3", + "sonic-boom": "^1.0.2" + }, + "bin": { + "pino": "bin.js" + } + }, + "node_modules/pino-std-serializers": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/pino-std-serializers/-/pino-std-serializers-3.2.0.tgz", + "integrity": "sha512-EqX4pwDPrt3MuOAAUBMU0Tk5kR/YcCM5fNPEzgCO2zJ5HfX0vbiH9HbJglnyeQsN96Kznae6MWD47pZB5avTrg==", + "dev": true, + "license": "MIT" + }, "node_modules/pirates": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", @@ -4959,6 +6100,93 @@ "node": ">= 6" } }, + "node_modules/pkg-conf": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-2.1.0.tgz", + "integrity": "sha512-C+VUP+8jis7EsQZIhDYmS5qlNtjv2yP4SNtjXK9AP1ZcTRlnSfuumaTnRfYZnYgUUYVIKqL0fRvmUGDV2fmp6g==", + "dev": true, + "license": "MIT", + "dependencies": { + "find-up": "^2.0.0", + "load-json-file": "^4.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/pkg-conf/node_modules/find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/pkg-conf/node_modules/locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/pkg-conf/node_modules/p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-try": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/pkg-conf/node_modules/p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^1.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/pkg-conf/node_modules/p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/pkg-conf/node_modules/path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, "node_modules/pkg-dir": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", @@ -5023,6 +6251,72 @@ "node": ">=8" } }, + "node_modules/postman-collection": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/postman-collection/-/postman-collection-4.5.0.tgz", + "integrity": "sha512-152JSW9pdbaoJihwjc7Q8lc3nPg/PC9lPTHdMk7SHnHhu/GBJB7b2yb9zG7Qua578+3PxkQ/HYBuXpDSvsf7GQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@faker-js/faker": "5.5.3", + "file-type": "3.9.0", + "http-reasons": "0.1.0", + "iconv-lite": "0.6.3", + "liquid-json": "0.3.1", + "lodash": "4.17.21", + "mime-format": "2.0.1", + "mime-types": "2.1.35", + "postman-url-encoder": "3.0.5", + "semver": "7.6.3", + "uuid": "8.3.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/postman-collection/node_modules/@faker-js/faker": { + "version": "5.5.3", + "resolved": "https://registry.npmjs.org/@faker-js/faker/-/faker-5.5.3.tgz", + "integrity": "sha512-R11tGE6yIFwqpaIqcfkcg7AICXzFg14+5h5v0TfF/9+RMDL6jhzCy/pxHVOfbALGdtVYdt6JdR21tuxEgl34dw==", + "dev": true, + "license": "MIT" + }, + "node_modules/postman-collection/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/postman-collection/node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "dev": true, + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/postman-url-encoder": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/postman-url-encoder/-/postman-url-encoder-3.0.5.tgz", + "integrity": "sha512-jOrdVvzUXBC7C+9gkIkpDJ3HIxOHTIqjpQ4C1EMt1ZGeMvSEpbFCKq23DEfgsj46vMnDgyQf+1ZLp2Wm+bKSsA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "punycode": "^2.1.1" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -5059,6 +6353,16 @@ "node": ">=6.0.0" } }, + "node_modules/pretty-data": { + "version": "0.40.0", + "resolved": "https://registry.npmjs.org/pretty-data/-/pretty-data-0.40.0.tgz", + "integrity": "sha512-YFLnEdDEDnkt/GEhet5CYZHCvALw6+Elyb/tp8kQG03ZSIuzeaDWpZYndCXwgqu4NAjh1PI534dhDS1mHarRnQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "*" + } + }, "node_modules/pretty-format": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", @@ -5097,6 +6401,13 @@ "node": ">=8" } }, + "node_modules/process-warning": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/process-warning/-/process-warning-1.0.0.tgz", + "integrity": "sha512-du4wfLyj4yCZq1VupnVSZmRsPJsNuxoDQFdCFHLaYiEbFBD7QE0a+I4D7hOxrVnh78QE/YipFAj9lXHiXocV+Q==", + "dev": true, + "license": "MIT" + }, "node_modules/prompts": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", @@ -5179,12 +6490,47 @@ } ] }, + "node_modules/quick-format-unescaped": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/quick-format-unescaped/-/quick-format-unescaped-4.0.4.tgz", + "integrity": "sha512-tYC1Q1hgyRuHgloV/YXs2w15unPVh8qfu/qCTfhTYamaw7fyhumKa2yGpdSo87vY32rIclj+4fWYQXUMs9EHvg==", + "dev": true, + "license": "MIT" + }, "node_modules/react-is": { "version": "18.3.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", "dev": true }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, "node_modules/release-zalgo": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/release-zalgo/-/release-zalgo-1.0.0.tgz", @@ -5206,6 +6552,16 @@ "node": ">=0.10.0" } }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/require-main-filename": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", @@ -5359,6 +6715,20 @@ ], "license": "MIT" }, + "node_modules/safe-stable-stringify": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-1.1.1.tgz", + "integrity": "sha512-ERq4hUjKDbJfE4+XtZLFPCDi8Vb1JqaxAPTxWFLBx8XcAlf9Bda/ZJdVezs/NAfsMQScyIlUMx+Yeu7P7rx5jw==", + "dev": true, + "license": "MIT" + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true, + "license": "MIT" + }, "node_modules/semver": { "version": "6.3.1", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", @@ -5436,6 +6806,99 @@ "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", "dev": true }, + "node_modules/signale": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/signale/-/signale-1.4.0.tgz", + "integrity": "sha512-iuh+gPf28RkltuJC7W5MRi6XAjTDCAPC/prJUpQoG4vIP3MJZ+GTydVnodXA7pwvTKb2cA0m9OFZW/cdWy/I/w==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^2.3.2", + "figures": "^2.0.0", + "pkg-conf": "^2.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/signale/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/signale/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/signale/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/signale/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true, + "license": "MIT" + }, + "node_modules/signale/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/signale/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/signale/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/sisteransi": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", @@ -5451,6 +6914,17 @@ "node": ">=8" } }, + "node_modules/sonic-boom": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-1.4.1.tgz", + "integrity": "sha512-LRHh/A8tpW7ru89lrlkU4AszXt1dbwSjVWguGrmlxE7tawVmDBlI1PILMkXAxJTwqhgsEeTHzj36D5CmHgQmNg==", + "dev": true, + "license": "MIT", + "dependencies": { + "atomic-sleep": "^1.0.0", + "flatstr": "^1.0.12" + } + }, "node_modules/source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -5487,6 +6961,16 @@ "node": ">=8" } }, + "node_modules/split2": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/split2/-/split2-3.2.2.tgz", + "integrity": "sha512-9NThjpgZnifTkJpzTZ7Eue85S49QwpNhZTq6GRJwObb6jnLFNGB7Qm73V5HewTROPyxD0C29xqmaI68bQtV+hg==", + "dev": true, + "license": "ISC", + "dependencies": { + "readable-stream": "^3.0.0" + } + }, "node_modules/sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", @@ -5514,6 +6998,16 @@ "node": ">=8" } }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, "node_modules/string-length": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", @@ -5583,6 +7077,13 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/strnum": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/strnum/-/strnum-1.0.5.tgz", + "integrity": "sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==", + "dev": true, + "license": "MIT" + }, "node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -5708,6 +7209,13 @@ "node": ">=8.0" } }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "dev": true, + "license": "MIT" + }, "node_modules/ts-api-utils": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz", @@ -5882,6 +7390,20 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } + }, "node_modules/typedarray-to-buffer": { "version": "3.1.5", "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", @@ -5973,6 +7495,37 @@ "punycode": "^2.1.0" } }, + "node_modules/uri-template-lite": { + "version": "22.9.0", + "resolved": "https://registry.npmjs.org/uri-template-lite/-/uri-template-lite-22.9.0.tgz", + "integrity": "sha512-cmGZaykSWEQ5UXKaGKnUS8zFvfp8j1Jvn7dlq3P7tGd5XeybXcfo0xnVBRWiNEp80nO1GYgCLwoaRJ8WMmmk3Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/urijs": { + "version": "1.19.11", + "resolved": "https://registry.npmjs.org/urijs/-/urijs-1.19.11.tgz", + "integrity": "sha512-HXgFDgDommxn5/bIv0cnQZsPhHDA90NPHD6+c/v21U5+Sx5hoP8+dP9IZXBU1gIfvdRfhG8cel9QNPeionfcCQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true, + "license": "MIT" + }, + "node_modules/utility-types": { + "version": "3.11.0", + "resolved": "https://registry.npmjs.org/utility-types/-/utility-types-3.11.0.tgz", + "integrity": "sha512-6Z7Ma2aVEWisaL6TvBCy7P8rm2LQoPv6dJ7ecIaIixHcwfbJ0x7mWdbcwlIM5IGQxPZSFYeqRCqlOOeKoJYMkw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, "node_modules/uuid": { "version": "9.0.1", "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", @@ -6013,6 +7566,44 @@ "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", "dev": true }, + "node_modules/validate.io-array": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/validate.io-array/-/validate.io-array-1.0.6.tgz", + "integrity": "sha512-DeOy7CnPEziggrOO5CZhVKJw6S3Yi7e9e65R1Nl/RTN1vTQKnzjfvks0/8kQ40FP/dsjRAOd4hxmJ7uLa6vxkg==", + "dev": true, + "license": "MIT" + }, + "node_modules/validate.io-function": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/validate.io-function/-/validate.io-function-1.0.2.tgz", + "integrity": "sha512-LlFybRJEriSuBnUhQyG5bwglhh50EpTL2ul23MPIuR1odjO7XaMLFV8vHGwp7AZciFxtYOeiSCT5st+XSPONiQ==", + "dev": true + }, + "node_modules/validate.io-integer": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/validate.io-integer/-/validate.io-integer-1.0.5.tgz", + "integrity": "sha512-22izsYSLojN/P6bppBqhgUDjCkr5RY2jd+N2a3DCAUey8ydvrZ/OkGvFPR7qfOpwR2LC5p4Ngzxz36g5Vgr/hQ==", + "dev": true, + "dependencies": { + "validate.io-number": "^1.0.3" + } + }, + "node_modules/validate.io-integer-array": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/validate.io-integer-array/-/validate.io-integer-array-1.0.0.tgz", + "integrity": "sha512-mTrMk/1ytQHtCY0oNO3dztafHYyGU88KL+jRxWuzfOmQb+4qqnWmI+gykvGp8usKZOM0H7keJHEbRaFiYA0VrA==", + "dev": true, + "dependencies": { + "validate.io-array": "^1.0.3", + "validate.io-integer": "^1.0.4" + } + }, + "node_modules/validate.io-number": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/validate.io-number/-/validate.io-number-1.0.3.tgz", + "integrity": "sha512-kRAyotcbNaSYoDnXvb4MHg/0a1egJdLwS6oJ38TJY7aw9n93Fl/3blIXdyYvPOp55CNxywooG/3BcrwNrBpcSg==", + "dev": true + }, "node_modules/walker": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", @@ -6022,6 +7613,41 @@ "makeerror": "1.0.12" } }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "dev": true, + "license": "BSD-2-Clause" + }, + "node_modules/whatwg-fetch": { + "version": "3.6.20", + "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.6.20.tgz", + "integrity": "sha512-EqhiFU6daOA8kpjOWTL0olhVOF3i7OrFzSYiGsEMB8GcXS+RrzauAERX65xMeNWVqxA6HXH2m69Z9LaKKdisfg==", + "dev": true, + "license": "MIT" + }, + "node_modules/whatwg-mimetype": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz", + "integrity": "sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + } + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dev": true, + "license": "MIT", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -6102,6 +7728,45 @@ "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", "dev": true }, + "node_modules/yaml": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", + "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">= 6" + } + }, + "node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, "node_modules/yn": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", diff --git a/package.json b/package.json index 0c44276..3c63b36 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,7 @@ "types": "dist/types/index.d.ts", "devDependencies": { "@eslint/js": "^9.10.0", + "@stoplight/prism-cli": "^5.10.0", "@types/eslint__js": "^8.42.3", "@types/jest": "^29.5.13", "@types/qs": "^6.9.15", diff --git a/setup_env.sh b/setup_env.sh new file mode 100755 index 0000000..820aed7 --- /dev/null +++ b/setup_env.sh @@ -0,0 +1,8 @@ +if [ -f .env ]; then + cp .env.local .env + export $(cat .env | xargs) + export CMS_BRANCH=$(git rev-parse --abbrev-ref HEAD) + echo "✅ Loaded envs" +else + echo ".env file Not Found" +fi \ No newline at end of file diff --git a/src/TelnyxResource.ts b/src/TelnyxResource.ts index 1f52f57..1516402 100644 --- a/src/TelnyxResource.ts +++ b/src/TelnyxResource.ts @@ -187,8 +187,13 @@ TelnyxResource.prototype = { self._telnyx._emitter.emit('response', responseEvent); + let responseBody: + | { + [key: string]: unknown; + } + | undefined; try { - const responseBody = utils.tryParseJSON(response); + responseBody = utils.tryParseJSON(response); if (responseBody.errors) { const error = {} as TelnyxError.TelnyxRawError; @@ -218,13 +223,13 @@ TelnyxResource.prototype = { } // Expose res object - Object.defineProperty(response, 'lastResponse', { + Object.defineProperty(responseBody, 'lastResponse', { enumerable: false, writable: false, value: res, }); // parsed json and found no errors so this is a valid response payload - callback.call(self, null, response as unknown as ResponsePayload); + callback.call(self, null, responseBody as unknown as ResponsePayload); }); }; }, diff --git a/src/autoPagination.ts b/src/autoPagination.ts index 8e1e655..cc62ee7 100644 --- a/src/autoPagination.ts +++ b/src/autoPagination.ts @@ -109,10 +109,6 @@ export function makeAutoPaginationMethods( return listResult.meta.page_size; } - // function getNextPageToken(listResult) { - // return listResult.meta.next_page_token; - // } - function asyncIteratorNext(): Promise { return memoizedPromise( promiseCache, @@ -215,16 +211,6 @@ function getItemCallback(args: Array): IterationItemCallback | undefined { }; } -// function getLastId(listResult) { -// const lastIdx = listResult.data.length - 1; -// const lastItem = listResult.data[lastIdx]; -// const lastId = lastItem && lastItem.id; -// if (!lastId) { -// throw Error('Unexpected: No `id` found on the last item while auto-paging a list.'); -// } -// return lastId; -// } - /** * If a user calls `.next()` multiple times in parallel, * return the same result until something has resolved diff --git a/src/test/autoPagination.test.ts b/src/test/autoPagination.test.ts index b5bc4c5..6ef2305 100644 --- a/src/test/autoPagination.test.ts +++ b/src/test/autoPagination.test.ts @@ -24,985 +24,1039 @@ describe('auto pagination', function () { jest.setTimeout(20000); describe('callbacks', function () { - test('lets you call `next()` to iterate and `next(false)` to break', function () { - return expect( - new Promise(function (resolve, reject) { - realMessagingProfileIds = ['1', '2', '3']; - const messagingProfileIds: string[] = []; - function onMessagingProfile( - messagingProfile: TelnyxRecord, - next: (iterate?: boolean) => void, - ) { - messagingProfileIds.push(messagingProfile.id); - if (messagingProfileIds.length === LIMIT) { - next(false); - } else { - expect(messagingProfileIds.length).toBeLessThan(LIMIT); - next(); - } - } - function onDone(err: unknown) { - if (err) { - reject(err); - } else { - resolve(messagingProfileIds); - } + test('lets you call `next()` to iterate and `next(false)` to break', function (done) { + realMessagingProfileIds = ['1', '2', '3']; + const messagingProfileIds: string[] = []; + function onMessagingProfile( + messagingProfile: TelnyxRecord, + next: (iterate?: boolean) => void, + ) { + messagingProfileIds.push(messagingProfile.id); + if (messagingProfileIds.length === LIMIT) { + next(false); + } else { + try { + expect(messagingProfileIds.length).toBeLessThan(LIMIT); + } catch (err: unknown) { + done(err); } - const options = { - host: telnyx.getConstant('DEFAULT_HOST'), - path: '/v2/messaging_profiles', - }; - nock('https://' + options.host + ':443') - .get(options.path) - .query({page: {size: 1}}) - .reply(200, { - data: [{record_type: 'messaging_profile', id: 1}], - meta: {total_pages: 3, page_number: 1, page_size: 1}, - }) - .get(options.path) - .query({page: {number: 2, size: 1}}) - .reply(200, { - data: [{record_type: 'messaging_profile', id: 2}], - meta: {total_pages: 3, page_number: 2, page_size: 1}, - }) - .get(options.path) - .query({page: {number: 3, size: 1}}) - .reply(200, { - data: [{record_type: 'messaging_profile', id: 3}], - meta: {total_pages: 3, page_number: 3, page_size: 1}, - }); + next(); + } + } - // @ts-expect-error TODO: import .d.ts files under src/test folder - realTelnyx.messagingProfiles - .list({page: {size: 1}}) - .autoPagingEach(onMessagingProfile, onDone); - }), - ).toBe(realMessagingProfileIds.slice(0, LIMIT)); - }); + const options = { + host: telnyx.getConstant('DEFAULT_HOST'), + path: '/v2/messaging_profiles', + }; + nock('https://' + options.host + ':443') + .get(options.path) + .query({page: {size: 1}}) + .reply(200, { + data: [{record_type: 'messaging_profile', id: '1'}], + meta: {total_pages: 3, page_number: 1, page_size: 1}, + }) + .get(options.path) + .query({page: {number: 2, size: 1}}) + .reply(200, { + data: [{record_type: 'messaging_profile', id: '2'}], + meta: {total_pages: 3, page_number: 2, page_size: 1}, + }) + .get(options.path) + .query({page: {number: 3, size: 1}}) + .reply(200, { + data: [{record_type: 'messaging_profile', id: '3'}], + meta: {total_pages: 3, page_number: 3, page_size: 1}, + }); - test('lets you ignore the second arg and `return false` to break', function () { - return expect( - new Promise(function (resolve, reject) { - realMessagingProfileIds = ['1', '2', '3']; - const messagingProfileIds: string[] = []; - function onMessagingProfile(messagingProfile: TelnyxRecord) { - messagingProfileIds.push(messagingProfile.id); - if (messagingProfileIds.length === LIMIT) { - return false; - } else { - expect(messagingProfileIds.length).toBeLessThan(LIMIT); + // @ts-expect-error TODO: import .d.ts files under src/test folder + realTelnyx.messagingProfiles + .list({page: {size: 1}}) + .autoPagingEach(onMessagingProfile, (err: unknown) => { + if (err) { + done(err); + } else { + try { + expect(messagingProfileIds).toStrictEqual( + realMessagingProfileIds.slice(0, LIMIT), + ); + done(); + } catch (err: unknown) { + done(err); } } - function onDone(err: unknown) { - if (err) { - reject(err); - } else { - resolve(messagingProfileIds); - } + }); + }); + + test('lets you ignore the second arg and `return false` to break', function (done) { + realMessagingProfileIds = ['1', '2', '3']; + const messagingProfileIds: string[] = []; + function onMessagingProfile(messagingProfile: TelnyxRecord) { + messagingProfileIds.push(messagingProfile.id); + if (messagingProfileIds.length === LIMIT) { + return false; + } else { + try { + expect(messagingProfileIds.length).toBeLessThan(LIMIT); + } catch (err: unknown) { + done(err); } - const options = { - host: telnyx.getConstant('DEFAULT_HOST'), - path: '/v2/messaging_profiles', - }; - nock('https://' + options.host + ':443') - .get(options.path) - .query({page: {size: 1}}) - .reply(200, { - data: [{record_type: 'messaging_profile', id: 1}], - meta: {total_pages: 3, page_number: 1, page_size: 1}, - }) - .get(options.path) - .query({page: {number: 2, size: 1}}) - .reply(200, { - data: [{record_type: 'messaging_profile', id: 2}], - meta: {total_pages: 3, page_number: 2, page_size: 1}, - }) - .get(options.path) - .query({page: {number: 3, size: 1}}) - .reply(200, { - data: [{record_type: 'messaging_profile', id: 3}], - meta: {total_pages: 3, page_number: 3, page_size: 1}, - }); + } + } - // @ts-expect-error TODO: import .d.ts files under src/test folder - realTelnyx.messagingProfiles - .list({page: {size: 1}}) - .autoPagingEach(onMessagingProfile, onDone); - }), - ).toBe(realMessagingProfileIds.slice(0, LIMIT)); - }); + const options = { + host: telnyx.getConstant('DEFAULT_HOST'), + path: '/v2/messaging_profiles', + }; + nock('https://' + options.host + ':443') + .get(options.path) + .query({page: {size: 1}}) + .reply(200, { + data: [{record_type: 'messaging_profile', id: '1'}], + meta: {total_pages: 3, page_number: 1, page_size: 1}, + }) + .get(options.path) + .query({page: {number: 2, size: 1}}) + .reply(200, { + data: [{record_type: 'messaging_profile', id: '2'}], + meta: {total_pages: 3, page_number: 2, page_size: 1}, + }) + .get(options.path) + .query({page: {number: 3, size: 1}}) + .reply(200, { + data: [{record_type: 'messaging_profile', id: '3'}], + meta: {total_pages: 3, page_number: 3, page_size: 1}, + }); - test('lets you ignore the second arg and return a Promise which returns `false` to break', function () { - return expect( - new Promise(function (resolve, reject) { - realMessagingProfileIds = ['1', '2', '3']; - const messagingProfileIds: string[] = []; - function onMessagingProfile(messagingProfile: TelnyxRecord) { - messagingProfileIds.push(messagingProfile.id); - if (messagingProfileIds.length === LIMIT) { - return Promise.resolve(false); - } else { - expect(messagingProfileIds.length).toBeLessThan(LIMIT); - return Promise.resolve(); + // @ts-expect-error TODO: import .d.ts files under src/test folder + realTelnyx.messagingProfiles + .list({page: {size: 1}}) + .autoPagingEach(onMessagingProfile, (err: unknown) => { + if (err) { + done(err); + } else { + try { + expect(messagingProfileIds).toStrictEqual( + realMessagingProfileIds.slice(0, LIMIT), + ); + done(); + } catch (err: unknown) { + done(err); } } - function onDone(err: Error) { - if (err) { - reject(err); - } else { - resolve(messagingProfileIds); - } + }); + }); + + test('lets you ignore the second arg and return a Promise which returns `false` to break', function (done) { + realMessagingProfileIds = ['1', '2', '3']; + const messagingProfileIds: string[] = []; + function onMessagingProfile(messagingProfile: TelnyxRecord) { + messagingProfileIds.push(messagingProfile.id); + if (messagingProfileIds.length === LIMIT) { + return Promise.resolve(false); + } else { + expect(messagingProfileIds.length).toBeLessThan(LIMIT); + return Promise.resolve(); + } + } + function onDone(err: Error) { + if (err) { + done(err); + } else { + try { + expect(messagingProfileIds).toStrictEqual( + realMessagingProfileIds.slice(0, LIMIT), + ); + done(); + } catch (err: unknown) { + done(err); } - const options = { - host: telnyx.getConstant('DEFAULT_HOST'), - path: '/v2/messaging_profiles', - }; - nock('https://' + options.host + ':443') - .get(options.path) - .query({page: {size: 1}}) - .reply(200, { - data: [{record_type: 'messaging_profile', id: 1}], - meta: {total_pages: 3, page_number: 1, page_size: 1}, - }) - .get(options.path) - .query({page: {number: 2, size: 1}}) - .reply(200, { - data: [{record_type: 'messaging_profile', id: 2}], - meta: {total_pages: 3, page_number: 2, page_size: 1}, - }) - .get(options.path) - .query({page: {number: 3, size: 1}}) - .reply(200, { - data: [{record_type: 'messaging_profile', id: 3}], - meta: {total_pages: 3, page_number: 3, page_size: 1}, - }); + } + } + const options = { + host: telnyx.getConstant('DEFAULT_HOST'), + path: '/v2/messaging_profiles', + }; + nock('https://' + options.host + ':443') + .get(options.path) + .query({page: {size: 1}}) + .reply(200, { + data: [{record_type: 'messaging_profile', id: '1'}], + meta: {total_pages: 3, page_number: 1, page_size: 1}, + }) + .get(options.path) + .query({page: {number: 2, size: 1}}) + .reply(200, { + data: [{record_type: 'messaging_profile', id: '2'}], + meta: {total_pages: 3, page_number: 2, page_size: 1}, + }) + .get(options.path) + .query({page: {number: 3, size: 1}}) + .reply(200, { + data: [{record_type: 'messaging_profile', id: '3'}], + meta: {total_pages: 3, page_number: 3, page_size: 1}, + }); - // @ts-expect-error TODO: import .d.ts files under src/test folder - realTelnyx.messagingProfiles - .list({page: {size: 1}}) - .autoPagingEach(onMessagingProfile, onDone); - }), - ).toBe(realMessagingProfileIds.slice(0, LIMIT)); + // @ts-expect-error TODO: import .d.ts files under src/test folder + realTelnyx.messagingProfiles + .list({page: {size: 1}}) + .autoPagingEach(onMessagingProfile, onDone); }); - test('can use a promise instead of a callback for onDone', function () { - return expect( - new Promise(function (resolve, reject) { - realMessagingProfileIds = ['1', '2', '3']; - const messagingProfileIds: string[] = []; - function onMessagingProfile(messagingProfile: TelnyxRecord) { - messagingProfileIds.push(messagingProfile.id); - } - function onDone() { - resolve(messagingProfileIds); - } - const options = { - host: telnyx.getConstant('DEFAULT_HOST'), - path: '/v2/messaging_profiles', - }; - nock('https://' + options.host + ':443') - .get(options.path) - .query({page: {size: 1}}) - .reply(200, { - data: [{record_type: 'messaging_profile', id: 1}], - meta: {total_pages: 3, page_number: 1, page_size: 1}, - }) - .get(options.path) - .query({page: {number: 2, size: 1}}) - .reply(200, { - data: [{record_type: 'messaging_profile', id: 2}], - meta: {total_pages: 3, page_number: 2, page_size: 1}, - }) - .get(options.path) - .query({page: {number: 3, size: 1}}) - .reply(200, { - data: [{record_type: 'messaging_profile', id: 3}], - meta: {total_pages: 3, page_number: 3, page_size: 1}, - }); + test('can use a promise instead of a callback for onDone', function (done) { + realMessagingProfileIds = ['1', '2', '3']; + const messagingProfileIds: string[] = []; + function onMessagingProfile(messagingProfile: TelnyxRecord) { + messagingProfileIds.push(messagingProfile.id); + } + function onDone() { + try { + expect(messagingProfileIds).toStrictEqual(realMessagingProfileIds); + done(); + } catch (err: unknown) { + done(err); + } + } + const options = { + host: telnyx.getConstant('DEFAULT_HOST'), + path: '/v2/messaging_profiles', + }; + nock('https://' + options.host + ':443') + .get(options.path) + .query({page: {size: 1}}) + .reply(200, { + data: [{record_type: 'messaging_profile', id: '1'}], + meta: {total_pages: 3, page_number: 1, page_size: 1}, + }) + .get(options.path) + .query({page: {number: 2, size: 1}}) + .reply(200, { + data: [{record_type: 'messaging_profile', id: '2'}], + meta: {total_pages: 3, page_number: 2, page_size: 1}, + }) + .get(options.path) + .query({page: {number: 3, size: 1}}) + .reply(200, { + data: [{record_type: 'messaging_profile', id: '3'}], + meta: {total_pages: 3, page_number: 3, page_size: 1}, + }); - // @ts-expect-error TODO: import .d.ts files under src/test folder - realTelnyx.messagingProfiles - .list({page: {size: 1}}) - .autoPagingEach(onMessagingProfile) - .then(onDone) - .catch(reject); - }), - ).toBe(realMessagingProfileIds); + // @ts-expect-error TODO: import .d.ts files under src/test folder + realTelnyx.messagingProfiles + .list({page: {size: 1}}) + .autoPagingEach(onMessagingProfile) + .then(onDone) + .catch((err: unknown) => { + done(err); + }); }); - test('handles the end of a list properly when the last page is full', function () { - return expect( - new Promise(function (resolve, reject) { - realMessagingProfileIds = ['1', '2', '3', '4']; - const messagingProfileIds: string[] = []; - const options = { - host: telnyx.getConstant('DEFAULT_HOST'), - path: '/v2/messaging_profiles', - }; - nock('https://' + options.host + ':443') - .get(options.path) - .query({page: {size: 2}}) - .reply(200, { - data: [ - {record_type: 'messaging_profile', id: 1}, - {record_type: 'messaging_profile', id: 2}, - ], - meta: {total_pages: 2, page_number: 1, page_size: 2}, - }) - .get(options.path) - .query({page: {number: 2, size: 2}}) - .reply(200, { - data: [ - {record_type: 'messaging_profile', id: 3}, - {record_type: 'messaging_profile', id: 4}, - ], - meta: {total_pages: 2, page_number: 2, page_size: 2}, - }); + test('handles the end of a list properly when the last page is full', function (done) { + realMessagingProfileIds = ['1', '2', '3', '4']; + const messagingProfileIds: string[] = []; + const options = { + host: telnyx.getConstant('DEFAULT_HOST'), + path: '/v2/messaging_profiles', + }; + nock('https://' + options.host + ':443') + .get(options.path) + .query({page: {size: 2}}) + .reply(200, { + data: [ + {record_type: 'messaging_profile', id: '1'}, + {record_type: 'messaging_profile', id: '2'}, + ], + meta: {total_pages: 2, page_number: 1, page_size: 2}, + }) + .get(options.path) + .query({page: {number: 2, size: 2}}) + .reply(200, { + data: [ + {record_type: 'messaging_profile', id: '3'}, + {record_type: 'messaging_profile', id: '4'}, + ], + meta: {total_pages: 2, page_number: 2, page_size: 2}, + }); - // @ts-expect-error TODO: import .d.ts files under src/test folder - return realTelnyx.messagingProfiles - .list({page: {size: 2}}) - .autoPagingEach(function (messagingProfile: TelnyxRecord) { - messagingProfileIds.push(messagingProfile.id); - }) - .catch(reject) - .then(function () { - resolve(messagingProfileIds); - }); - }), - ).toBe(realMessagingProfileIds); + // @ts-expect-error TODO: import .d.ts files under src/test folder + realTelnyx.messagingProfiles + .list({page: {size: 2}}) + .autoPagingEach(function (messagingProfile: TelnyxRecord) { + messagingProfileIds.push(messagingProfile.id); + }) + .catch((err: unknown) => { + done(err); + }) + .then(function () { + try { + expect(messagingProfileIds).toStrictEqual(realMessagingProfileIds); + done(); + } catch (err: unknown) { + done(err); + } + }); }); - test('handles the end of a list properly when the last page is not full', function () { - return expect( - new Promise(function (resolve, reject) { - realMessagingProfileIds = ['1', '2', '3']; - const messagingProfileIds: string[] = []; - const options = { - host: telnyx.getConstant('DEFAULT_HOST'), - path: '/v2/messaging_profiles', - }; - nock('https://' + options.host + ':443') - .get(options.path) - .query({page: {size: 2}}) - .reply(200, { - data: [ - {record_type: 'messaging_profile', id: 1}, - {record_type: 'messaging_profile', id: 2}, - ], - meta: {total_pages: 2, page_number: 1, page_size: 2}, - }) - .get(options.path) - .query({page: {number: 2, size: 2}}) - .reply(200, { - data: [{record_type: 'messaging_profile', id: 3}], - meta: {total_pages: 2, page_number: 2, page_size: 2}, - }); - // @ts-expect-error TODO: import .d.ts files under src/test folder - return realTelnyx.messagingProfiles - .list({page: {size: 2}}) - .autoPagingEach(function (messagingProfile: TelnyxRecord) { - messagingProfileIds.push(messagingProfile.id); - }) - .catch(reject) - .then(function () { - resolve(messagingProfileIds); - }); - }), - ).toBe(realMessagingProfileIds); + test('handles the end of a list properly when the last page is not full', function (done) { + realMessagingProfileIds = ['1', '2', '3']; + const messagingProfileIds: string[] = []; + const options = { + host: telnyx.getConstant('DEFAULT_HOST'), + path: '/v2/messaging_profiles', + }; + nock('https://' + options.host + ':443') + .get(options.path) + .query({page: {size: 2}}) + .reply(200, { + data: [ + {record_type: 'messaging_profile', id: '1'}, + {record_type: 'messaging_profile', id: '2'}, + ], + meta: {total_pages: 2, page_number: 1, page_size: 2}, + }) + .get(options.path) + .query({page: {number: 2, size: 2}}) + .reply(200, { + data: [{record_type: 'messaging_profile', id: '3'}], + meta: {total_pages: 2, page_number: 2, page_size: 2}, + }); + // @ts-expect-error TODO: import .d.ts files under src/test folder + realTelnyx.messagingProfiles + .list({page: {size: 2}}) + .autoPagingEach(function (messagingProfile: TelnyxRecord) { + messagingProfileIds.push(messagingProfile.id); + }) + .catch((err: unknown) => { + done(err); + }) + .then(function () { + try { + expect(messagingProfileIds).toStrictEqual(realMessagingProfileIds); + done(); + } catch (err: unknown) { + done(err); + } + }); }); - test('handles a list which is shorter than the page size properly', function () { - return expect( - new Promise(function (resolve, reject) { - realMessagingProfileIds = ['1', '2']; - const messagingProfileIds: string[] = []; - const options = { - host: telnyx.getConstant('DEFAULT_HOST'), - path: '/v2/messaging_profiles', - }; - nock('https://' + options.host + ':443') - .get(options.path) - .query({page: {size: TOTAL_OBJECTS + 2}}) - .reply(200, { - data: [ - {record_type: 'messaging_profile', id: 1}, - {record_type: 'messaging_profile', id: 2}, - ], - meta: { - total_pages: 1, - page_number: 1, - page_size: TOTAL_OBJECTS + 2, - }, - }); + test('handles a list which is shorter than the page size properly', function (done) { + realMessagingProfileIds = ['1', '2']; + const messagingProfileIds: string[] = []; + const options = { + host: telnyx.getConstant('DEFAULT_HOST'), + path: '/v2/messaging_profiles', + }; + nock('https://' + options.host + ':443') + .get(options.path) + .query({page: {size: TOTAL_OBJECTS + 2}}) + .reply(200, { + data: [ + {record_type: 'messaging_profile', id: '1'}, + {record_type: 'messaging_profile', id: '2'}, + ], + meta: { + total_pages: 1, + page_number: 1, + page_size: TOTAL_OBJECTS + 2, + }, + }); - // @ts-expect-error TODO: import .d.ts files under src/test folder - return realTelnyx.messagingProfiles - .list({page: {size: TOTAL_OBJECTS + 2}}) - .autoPagingEach(function (messagingProfile: TelnyxRecord) { - messagingProfileIds.push(messagingProfile.id); - }) - .catch(reject) - .then(function () { - resolve(messagingProfileIds); - }); - }), - ).toBe(realMessagingProfileIds); + // @ts-expect-error TODO: import .d.ts files under src/test folder + realTelnyx.messagingProfiles + .list({page: {size: TOTAL_OBJECTS + 2}}) + .autoPagingEach(function (messagingProfile: TelnyxRecord) { + messagingProfileIds.push(messagingProfile.id); + }) + .catch((err: unknown) => { + done(err); + }) + .then(function () { + try { + expect(messagingProfileIds).toStrictEqual(realMessagingProfileIds); + done(); + } catch (err: unknown) { + done(err); + } + }); }); - test('handles errors after the first page correctly (callback)', function () { - return expect( - new Promise(function (resolve, reject) { - let i = 0; - function onmessagingProfile() { - i += 1; - if (i > 2) { - throw Error('Simulated error'); - } - } + test('handles errors after the first page correctly (callback)', function (done) { + let i = 0; + function onmessagingProfile() { + i += 1; + if (i > 2) { + throw Error('Simulated error'); + } + } - realMessagingProfileIds = ['1', '2', '3']; - const options = { - host: telnyx.getConstant('DEFAULT_HOST'), - path: '/v2/messaging_profiles', - }; - nock('https://' + options.host + ':443') - .get(options.path) - .query({page: {size: 2}}) - .reply(200, { - data: [ - {record_type: 'messaging_profile', id: 1}, - {record_type: 'messaging_profile', id: 2}, - ], - meta: {total_pages: 2, page_number: 1, page_size: 2}, - }) - .get(options.path) - .query({page: {number: 2, size: 2}}) - .reply(200, { - data: [{record_type: 'messaging_profile', id: 3}], - meta: {total_pages: 2, page_number: 2, page_size: 2}, - }); + realMessagingProfileIds = ['1', '2', '3']; + const options = { + host: telnyx.getConstant('DEFAULT_HOST'), + path: '/v2/messaging_profiles', + }; + nock('https://' + options.host + ':443') + .get(options.path) + .query({page: {size: 2}}) + .reply(200, { + data: [ + {record_type: 'messaging_profile', id: '1'}, + {record_type: 'messaging_profile', id: '2'}, + ], + meta: {total_pages: 2, page_number: 1, page_size: 2}, + }) + .get(options.path) + .query({page: {number: 2, size: 2}}) + .reply(200, { + data: [{record_type: 'messaging_profile', id: '3'}], + meta: {total_pages: 2, page_number: 2, page_size: 2}, + }); - // @ts-expect-error TODO: import .d.ts files under src/test folder - return realTelnyx.messagingProfiles - .list({page: {size: 2}}) - .autoPagingEach(onmessagingProfile, function (err: Error) { - if (err) { - resolve(err.message); - } else { - reject(Error('Expected an error, did not get one.')); - } - }); - }), - ).toBe('Simulated error'); + // @ts-expect-error TODO: import .d.ts files under src/test folder + realTelnyx.messagingProfiles + .list({page: {size: 2}}) + .autoPagingEach(onmessagingProfile, function (err: Error) { + if (err) { + try { + expect(err.message).toBe('Simulated error'); + done(); + } catch (err: unknown) { + done(err); + } + } else { + done(Error('Expected an error, did not get one.')); + } + }); }); - test('handles errors after the first page correctly (promise)', function () { - return expect( - new Promise(function (resolve, reject) { - let i = 0; - function onmessagingProfile() { - i += 1; - if (i > 2) { - throw Error('Simulated error'); - } + test('handles errors after the first page correctly (promise)', function (done) { + let i = 0; + function onmessagingProfile() { + i += 1; + if (i > 2) { + throw Error('Simulated error'); + } + } + realMessagingProfileIds = ['1', '2', '3']; + const options = { + host: telnyx.getConstant('DEFAULT_HOST'), + path: '/v2/messaging_profiles', + }; + nock('https://' + options.host + ':443') + .get(options.path) + .query({page: {size: 2}}) + .reply(200, { + data: [ + {record_type: 'messaging_profile', id: '1'}, + {record_type: 'messaging_profile', id: '2'}, + ], + meta: {total_pages: 2, page_number: 1, page_size: 2}, + }) + .get(options.path) + .query({page: {number: 2, size: 2}}) + .reply(200, { + data: [{record_type: 'messaging_profile', id: '3'}], + meta: {total_pages: 2, page_number: 2, page_size: 2}, + }); + // @ts-expect-error TODO: import .d.ts files under src/test folder + realTelnyx.messagingProfiles + .list({page: {size: 2}}) + .autoPagingEach(onmessagingProfile) + .then(function () { + done(Error('Expected an error, did not get one.')); + }) + .catch(function (err: unknown) { + try { + expect((err as Error)?.message).toBe('Simulated error'); + done(); + } catch (err: unknown) { + done(err); } - realMessagingProfileIds = ['1', '2', '3']; - const options = { - host: telnyx.getConstant('DEFAULT_HOST'), - path: '/v2/messaging_profiles', - }; - nock('https://' + options.host + ':443') - .get(options.path) - .query({page: {size: 2}}) - .reply(200, { - data: [ - {record_type: 'messaging_profile', id: 1}, - {record_type: 'messaging_profile', id: 2}, - ], - meta: {total_pages: 2, page_number: 1, page_size: 2}, - }) - .get(options.path) - .query({page: {number: 2, size: 2}}) - .reply(200, { - data: [{record_type: 'messaging_profile', id: 3}], - meta: {total_pages: 2, page_number: 2, page_size: 2}, - }); - // @ts-expect-error TODO: import .d.ts files under src/test folder - return realTelnyx.messagingProfiles - .list({page: {size: 2}}) - .autoPagingEach(onmessagingProfile) - .then(function () { - reject(Error('Expected an error, did not get one.')); - }) - .catch(function (err: unknown) { - resolve((err as Error)?.message); - }); - }), - ).toBe('Simulated error'); + }); }); }); describe('async iterators', function () { - test('works with `for await` when that feature exists (user break)', function () { - return expect( - new Promise(function (resolve, reject) { - realMessagingProfileIds = ['1', '2', '3']; - const options = { - host: telnyx.getConstant('DEFAULT_HOST'), - path: '/v2/messaging_profiles', - }; - nock('https://' + options.host + ':443') - .get(options.path) - .query({page: {size: 2}}) - .reply(200, { - data: [ - {record_type: 'messaging_profile', id: 1}, - {record_type: 'messaging_profile', id: 2}, - ], - meta: {total_pages: 2, page_number: 1, page_size: 2}, - }) - .get(options.path) - .query({page: {number: 2, size: 2}}) - .reply(200, { - data: [{record_type: 'messaging_profile', id: 3}], - meta: {total_pages: 2, page_number: 2, page_size: 2}, - }); + test('works with `for await` when that feature exists (user break)', function (done) { + realMessagingProfileIds = ['1', '2', '3']; + const options = { + host: telnyx.getConstant('DEFAULT_HOST'), + path: '/v2/messaging_profiles', + }; + nock('https://' + options.host + ':443') + .get(options.path) + .query({page: {size: 2}}) + .reply(200, { + data: [ + {record_type: 'messaging_profile', id: '1'}, + {record_type: 'messaging_profile', id: '2'}, + ], + meta: {total_pages: 2, page_number: 1, page_size: 2}, + }) + .get(options.path) + .query({page: {number: 2, size: 2}}) + .reply(200, { + data: [{record_type: 'messaging_profile', id: '3'}], + meta: {total_pages: 2, page_number: 2, page_size: 2}, + }); - forAwaitUntil( - // @ts-expect-error TODO: import .d.ts files under src/test folder - realTelnyx.messagingProfiles.list({page: {size: 2}}), - LIMIT, - ) - .then(function (messagingProfiles: TelnyxRecord[]) { - resolve( - messagingProfiles.map(function ( - messagingProfile: TelnyxRecord, - ) { - return messagingProfile.id; - }), - ); - }) - .catch(reject); - }), - ).toBe(realMessagingProfileIds.slice(0, LIMIT)); + forAwaitUntil( + // @ts-expect-error TODO: import .d.ts files under src/test folder + realTelnyx.messagingProfiles.list({page: {size: 2}}), + LIMIT, + ) + .then(function (messagingProfiles: TelnyxRecord[]) { + try { + expect( + messagingProfiles.map(function (messagingProfile: TelnyxRecord) { + return messagingProfile.id; + }), + ).toStrictEqual(realMessagingProfileIds.slice(0, LIMIT)); + done(); + } catch (err: unknown) { + done(err); + } + }) + .catch((err: unknown) => { + done(err); + }); }); - test('works with `for await` when that feature exists (end of list)', function () { - return expect( - new Promise(function (resolve, reject) { - realMessagingProfileIds = ['1', '2', '3']; - const options = { - host: telnyx.getConstant('DEFAULT_HOST'), - path: '/v2/messaging_profiles', - }; - nock('https://' + options.host + ':443') - .get(options.path) - .query({page: {size: 2}}) - .reply(200, { - data: [ - {record_type: 'messaging_profile', id: 1}, - {record_type: 'messaging_profile', id: 2}, - ], - meta: {total_pages: 2, page_number: 1, page_size: 2}, - }) - .get(options.path) - .query({page: {number: 2, size: 2}}) - .reply(200, { - data: [{record_type: 'messaging_profile', id: 3}], - meta: {total_pages: 2, page_number: 2, page_size: 2}, - }); + test('works with `for await` when that feature exists (end of list)', function (done) { + realMessagingProfileIds = ['1', '2', '3']; + const options = { + host: telnyx.getConstant('DEFAULT_HOST'), + path: '/v2/messaging_profiles', + }; + nock('https://' + options.host + ':443') + .get(options.path) + .query({page: {size: 2}}) + .reply(200, { + data: [ + {record_type: 'messaging_profile', id: '1'}, + {record_type: 'messaging_profile', id: '2'}, + ], + meta: {total_pages: 2, page_number: 1, page_size: 2}, + }) + .get(options.path) + .query({page: {number: 2, size: 2}}) + .reply(200, { + data: [{record_type: 'messaging_profile', id: '3'}], + meta: {total_pages: 2, page_number: 2, page_size: 2}, + }); - forAwaitUntil( - // @ts-expect-error TODO: import .d.ts files under src/test folder - realTelnyx.messagingProfiles.list({page: {size: 2}}), - TOTAL_OBJECTS + 1, - ) - .then(function (messagingProfiles: TelnyxRecord[]) { - resolve( - messagingProfiles.map(function ( - messagingProfile: TelnyxRecord, - ) { - return messagingProfile.id; - }), - ); - }) - .catch(reject); - }), - ).toBe(realMessagingProfileIds); + forAwaitUntil( + // @ts-expect-error TODO: import .d.ts files under src/test folder + realTelnyx.messagingProfiles.list({page: {size: 2}}), + TOTAL_OBJECTS + 1, + ) + .then(function (messagingProfiles: TelnyxRecord[]) { + try { + expect( + messagingProfiles.map(function (messagingProfile: TelnyxRecord) { + return messagingProfile.id; + }), + ).toStrictEqual(realMessagingProfileIds); + done(); + } catch (err: unknown) { + done(err); + } + }) + .catch((err: unknown) => { + done(err); + }); }); - test('works with `await` and a while loop when await exists', function () { - return expect( - new Promise(function (resolve, reject) { - realMessagingProfileIds = ['1', '2', '3']; - const options = { - host: telnyx.getConstant('DEFAULT_HOST'), - path: '/v2/messaging_profiles', - }; - nock('https://' + options.host + ':443') - .get(options.path) - .query({page: {size: 2}}) - .reply(200, { - data: [ - {record_type: 'messaging_profile', id: 1}, - {record_type: 'messaging_profile', id: 2}, - ], - meta: {total_pages: 2, page_number: 1, page_size: 2}, - }) - .get(options.path) - .query({page: {number: 2, size: 2}}) - .reply(200, { - data: [{record_type: 'messaging_profile', id: 3}], - meta: {total_pages: 2, page_number: 2, page_size: 2}, - }); + test('works with `await` and a while loop when await exists', function (done) { + realMessagingProfileIds = ['1', '2', '3']; + const options = { + host: telnyx.getConstant('DEFAULT_HOST'), + path: '/v2/messaging_profiles', + }; + nock('https://' + options.host + ':443') + .get(options.path) + .query({page: {size: 2}}) + .reply(200, { + data: [ + {record_type: 'messaging_profile', id: '1'}, + {record_type: 'messaging_profile', id: '2'}, + ], + meta: {total_pages: 2, page_number: 1, page_size: 2}, + }) + .get(options.path) + .query({page: {number: 2, size: 2}}) + .reply(200, { + data: [{record_type: 'messaging_profile', id: '3'}], + meta: {total_pages: 2, page_number: 2, page_size: 2}, + }); - awaitUntil( - // @ts-expect-error TODO: import .d.ts files under src/test folder - realTelnyx.messagingProfiles.list({page: {size: 2}}), - LIMIT, - ) - .then(function (messagingProfiles: TelnyxRecord[]) { - resolve( - messagingProfiles.map(function ( - messagingProfile: TelnyxRecord, - ) { - return messagingProfile.id; - }), - ); - }) - .catch(reject); - }), - ).toBe(realMessagingProfileIds.slice(0, LIMIT)); + awaitUntil( + // @ts-expect-error TODO: import .d.ts files under src/test folder + realTelnyx.messagingProfiles.list({page: {size: 2}}), + LIMIT, + ) + .then(function (messagingProfiles: TelnyxRecord[]) { + try { + expect( + messagingProfiles.map(function (messagingProfile: TelnyxRecord) { + return messagingProfile.id; + }), + ).toStrictEqual(realMessagingProfileIds.slice(0, LIMIT)); + done(); + } catch (err: unknown) { + done(err); + } + }) + .catch((err: unknown) => { + done(err); + }); }); - test('returns an empty object from .return() so that `break;` works in for-await', function () { - return expect( - new Promise(function (resolve, reject) { - realMessagingProfileIds = ['1', '2', '3']; - const options = { - host: telnyx.getConstant('DEFAULT_HOST'), - path: '/v2/messaging_profiles', - }; - nock('https://' + options.host + ':443') - .get(options.path) - .query({page: {size: 2}}) - .reply(200, { - data: [ - {record_type: 'messaging_profile', id: 1}, - {record_type: 'messaging_profile', id: 2}, - ], - meta: {total_pages: 2, page_number: 1, page_size: 2}, - }) - .get(options.path) - .query({page: {number: 2, size: 2}}) - .reply(200, { - data: [{record_type: 'messaging_profile', id: 3}], - meta: {total_pages: 2, page_number: 2, page_size: 2}, - }); - // @ts-expect-error TODO: import .d.ts files under src/test folder - const iter = realTelnyx.messagingProfiles.list({page: {size: 2}}); + test('returns an empty object from .return() so that `break;` works in for-await', function (done) { + realMessagingProfileIds = ['1', '2', '3']; + const options = { + host: telnyx.getConstant('DEFAULT_HOST'), + path: '/v2/messaging_profiles', + }; + nock('https://' + options.host + ':443') + .get(options.path) + .query({page: {size: 2}}) + .reply(200, { + data: [ + {record_type: 'messaging_profile', id: '1'}, + {record_type: 'messaging_profile', id: '2'}, + ], + meta: {total_pages: 2, page_number: 1, page_size: 2}, + }) + .get(options.path) + .query({page: {number: 2, size: 2}}) + .reply(200, { + data: [{record_type: 'messaging_profile', id: '3'}], + meta: {total_pages: 2, page_number: 2, page_size: 2}, + }); + // @ts-expect-error TODO: import .d.ts files under src/test folder + const iter = realTelnyx.messagingProfiles.list({page: {size: 2}}); - const messagingProfileIds: string[] = []; - function handleIter(result: {value: TelnyxRecord}) { - messagingProfileIds.push(result.value.id); - expect(iter.return()).toBe({}); - } + const messagingProfileIds: string[] = []; + function handleIter(result: {value: TelnyxRecord}) { + messagingProfileIds.push(result.value.id); + expect(iter.return()).toStrictEqual({}); + } - iter - .next() - .then(handleIter) - .then(function () { - resolve(messagingProfileIds); - }) - .catch(reject); - }), - ).toBe(realMessagingProfileIds.slice(0, 1)); + iter + .next() + .then(handleIter) + .then(function () { + try { + expect(messagingProfileIds).toStrictEqual( + realMessagingProfileIds.slice(0, 1), + ); + done(); + } catch (err: unknown) { + done(err); + } + }) + .catch((err: unknown) => { + done(err); + }); }); - test('works when you call it sequentially', function () { - return expect( - new Promise(function (resolve, reject) { - realMessagingProfileIds = ['1', '2', '3']; - const options = { - host: telnyx.getConstant('DEFAULT_HOST'), - path: '/v2/messaging_profiles', - }; - nock('https://' + options.host + ':443') - .get(options.path) - .query({page: {size: 2}}) - .reply(200, { - data: [ - {record_type: 'messaging_profile', id: 1}, - {record_type: 'messaging_profile', id: 2}, - ], - meta: {total_pages: 2, page_number: 1, page_size: 2}, - }) - .get(options.path) - .query({page: {number: 2, size: 2}}) - .reply(200, { - data: [{record_type: 'messaging_profile', id: 3}], - meta: {total_pages: 2, page_number: 2, page_size: 2}, - }); + test('works when you call it sequentially', function (done) { + realMessagingProfileIds = ['1', '2', '3']; + const options = { + host: telnyx.getConstant('DEFAULT_HOST'), + path: '/v2/messaging_profiles', + }; + nock('https://' + options.host + ':443') + .get(options.path) + .query({page: {size: 2}}) + .reply(200, { + data: [ + {record_type: 'messaging_profile', id: '1'}, + {record_type: 'messaging_profile', id: '2'}, + ], + meta: {total_pages: 2, page_number: 1, page_size: 2}, + }) + .get(options.path) + .query({page: {number: 2, size: 2}}) + .reply(200, { + data: [{record_type: 'messaging_profile', id: '3'}], + meta: {total_pages: 2, page_number: 2, page_size: 2}, + }); - // @ts-expect-error TODO: import .d.ts files under src/test folder - const iter = realTelnyx.messagingProfiles.list({page: {size: 2}}); + // @ts-expect-error TODO: import .d.ts files under src/test folder + const iter = realTelnyx.messagingProfiles.list({page: {size: 2}}); - const messagingProfileIds: string[] = []; - function handleIter(result: {value: TelnyxRecord}) { - messagingProfileIds.push(result.value.id); - if (messagingProfileIds.length < 3) { - return iter.next().then(handleIter); - } + const messagingProfileIds: string[] = []; + function handleIter(result: {value: TelnyxRecord}) { + messagingProfileIds.push(result.value.id); + if (messagingProfileIds.length < 3) { + return iter.next().then(handleIter); + } + } + iter + .next() + .then(handleIter) + .then(function () { + try { + expect(messagingProfileIds).toStrictEqual( + realMessagingProfileIds.slice(0, LIMIT), + ); + done(); + } catch (err: unknown) { + done(err); } - iter - .next() - .then(handleIter) - .then(function () { - resolve(messagingProfileIds); - }) - .catch(reject); - }), - ).toBe(realMessagingProfileIds.slice(0, LIMIT)); + }) + .catch((err: unknown) => { + done(err); + }); }); - test('gives you the same result each time when you call it multiple times in parallel', function () { - return expect( - new Promise(function (resolve, reject) { - realMessagingProfileIds = ['1', '2', '3', '4']; - const options = { - host: telnyx.getConstant('DEFAULT_HOST'), - path: '/v2/messaging_profiles', - }; - nock('https://' + options.host + ':443') - .get(options.path) - .query({page: {size: 3}}) - .reply(200, { - data: [ - {record_type: 'messaging_profile', id: 1}, - {record_type: 'messaging_profile', id: 2}, - {record_type: 'messaging_profile', id: 3}, - ], - meta: {total_pages: 3, page_number: 1, page_size: 3}, - }) - .get(options.path) - .query({page: {number: 2, size: 3}}) - .reply(200, { - data: [ - {record_type: 'messaging_profile', id: 4}, - {record_type: 'messaging_profile', id: 5}, - {record_type: 'messaging_profile', id: 6}, - ], - meta: {total_pages: 3, page_number: 2, page_size: 3}, - }) - .get(options.path) - .query({page: {number: 3, size: 3}}) - .reply(200, { - data: [ - {record_type: 'messaging_profile', id: 7}, - {record_type: 'messaging_profile', id: 8}, - {record_type: 'messaging_profile', id: 9}, - ], - meta: {total_pages: 3, page_number: 3, page_size: 3}, - }); + test('gives you the same result each time when you call it multiple times in parallel', function (done) { + realMessagingProfileIds = ['1', '2', '3', '4']; + const options = { + host: telnyx.getConstant('DEFAULT_HOST'), + path: '/v2/messaging_profiles', + }; + nock('https://' + options.host + ':443') + .get(options.path) + .query({page: {size: 3}}) + .reply(200, { + data: [ + {record_type: 'messaging_profile', id: '1'}, + {record_type: 'messaging_profile', id: '2'}, + {record_type: 'messaging_profile', id: '3'}, + ], + meta: {total_pages: 3, page_number: 1, page_size: 3}, + }) + .get(options.path) + .query({page: {number: 2, size: 3}}) + .reply(200, { + data: [ + {record_type: 'messaging_profile', id: '4'}, + {record_type: 'messaging_profile', id: '5'}, + {record_type: 'messaging_profile', id: '6'}, + ], + meta: {total_pages: 3, page_number: 2, page_size: 3}, + }) + .get(options.path) + .query({page: {number: 3, size: 3}}) + .reply(200, { + data: [ + {record_type: 'messaging_profile', id: '7'}, + {record_type: 'messaging_profile', id: '8'}, + {record_type: 'messaging_profile', id: '9'}, + ], + meta: {total_pages: 3, page_number: 3, page_size: 3}, + }); - // @ts-expect-error TODO: import .d.ts files under src/test folder - const iter = realTelnyx.messagingProfiles.list({page: {size: 3}}); + // @ts-expect-error TODO: import .d.ts files under src/test folder + const iter = realTelnyx.messagingProfiles.list({page: {size: 3}}); - const messagingProfileIds: string[] = []; - function handleIter(result: {value: TelnyxRecord}) { - messagingProfileIds.push(result.value.id); - } + const messagingProfileIds: string[] = []; + function handleIter(result: {value: TelnyxRecord}) { + messagingProfileIds.push(result.value.id); + } - Promise.all([ - iter.next().then(handleIter), - iter - .next() - .then(handleIter) - .then(function () { - return Promise.all([ - iter.next().then(handleIter), - iter.next().then(handleIter), - ]); - }) - .then(function () { - return Promise.all([ - iter.next().then(handleIter), - iter.next().then(handleIter), - ]); - }) - .then(function () { - return Promise.all([ - iter.next().then(handleIter), - iter.next().then(handleIter), - ]); - }), - ]) - .then(function () { - resolve(messagingProfileIds); - }) - .catch(reject); - }), - ).toBe( - realMessagingProfileIds.reduce(function (acc: string[], x) { - acc.push(x); - acc.push(x); - return acc; - }, []), - ); + Promise.all([ + iter.next().then(handleIter), + iter + .next() + .then(handleIter) + .then(function () { + return Promise.all([ + iter.next().then(handleIter), + iter.next().then(handleIter), + ]); + }) + .then(function () { + return Promise.all([ + iter.next().then(handleIter), + iter.next().then(handleIter), + ]); + }) + .then(function () { + return Promise.all([ + iter.next().then(handleIter), + iter.next().then(handleIter), + ]); + }), + ]) + .then(function () { + try { + expect(messagingProfileIds).toStrictEqual( + realMessagingProfileIds.reduce(function (acc: string[], x) { + acc.push(x); + acc.push(x); + return acc; + }, []), + ); + done(); + } catch (err: unknown) { + done(err); + } + }) + .catch((err: unknown) => { + done(err); + }); }); }); describe('autoPagingToArray', function () { - test('can go to the end', function () { - return expect( - new Promise(function (resolve, reject) { - realMessagingProfileIds = ['1', '2', '3']; - const options = { - host: telnyx.getConstant('DEFAULT_HOST'), - path: '/v2/messaging_profiles', - }; - nock('https://' + options.host + ':443') - .get(options.path) - .query({page: {size: 2}}) - .reply(200, { - data: [ - {record_type: 'messaging_profile', id: 1}, - {record_type: 'messaging_profile', id: 2}, - ], - meta: {total_pages: 2, page_number: 1, page_size: 2}, - }) - .get(options.path) - .query({page: {number: 2, size: 2}}) - .reply(200, { - data: [{record_type: 'messaging_profile', id: 3}], - meta: {total_pages: 2, page_number: 2, page_size: 2}, - }); + test('can go to the end', function (done) { + realMessagingProfileIds = ['1', '2', '3']; + const options = { + host: telnyx.getConstant('DEFAULT_HOST'), + path: '/v2/messaging_profiles', + }; + nock('https://' + options.host + ':443') + .get(options.path) + .query({page: {size: 2}}) + .reply(200, { + data: [ + {record_type: 'messaging_profile', id: '1'}, + {record_type: 'messaging_profile', id: '2'}, + ], + meta: {total_pages: 2, page_number: 1, page_size: 2}, + }) + .get(options.path) + .query({page: {number: 2, size: 2}}) + .reply(200, { + data: [{record_type: 'messaging_profile', id: '3'}], + meta: {total_pages: 2, page_number: 2, page_size: 2}, + }); - // @ts-expect-error TODO: import .d.ts files under src/test folder - realTelnyx.messagingProfiles - .list({page: {size: 2}}) - .autoPagingToArray({limit: LIMIT}) - .then(function (messagingProfiles: TelnyxRecord[]) { - return messagingProfiles.map(function ( - messagingProfile: TelnyxRecord, - ) { - return messagingProfile.id; - }); - }) - .then(resolve) - .catch(reject); - }), - ).toBe(realMessagingProfileIds); - }); - - test('returns a promise of an array', function () { - return expect( - new Promise(function (resolve, reject) { - realMessagingProfileIds = ['1', '2', '3']; - const options = { - host: telnyx.getConstant('DEFAULT_HOST'), - path: '/v2/messaging_profiles', - }; - nock('https://' + options.host + ':443') - .get(options.path) - .query({page: {size: 2}}) - .reply(200, { - data: [ - {record_type: 'messaging_profile', id: 1}, - {record_type: 'messaging_profile', id: 2}, - ], - meta: {total_pages: 2, page_number: 1, page_size: 2}, - }) - .get(options.path) - .query({page: {number: 2, size: 2}}) - .reply(200, { - data: [{record_type: 'messaging_profile', id: 3}], - meta: {total_pages: 2, page_number: 2, page_size: 2}, - }); - - // @ts-expect-error TODO: import .d.ts files under src/test folder - realTelnyx.messagingProfiles - .list({page: {size: 2}}) - .autoPagingToArray({limit: LIMIT}) - .then(function (messagingProfiles: TelnyxRecord[]) { - return messagingProfiles.map(function ( - messagingProfile: TelnyxRecord, - ) { - return messagingProfile.id; - }); - }) - .then(resolve) - .catch(reject); - }), - ).toBe(realMessagingProfileIds.slice(0, LIMIT)); - }); - - test('accepts an onDone callback, passing an array', function () { - return expect( - new Promise(function (resolve, reject) { - function onDone(err: unknown, messagingProfiles: TelnyxRecord[]) { - if (err) { - reject(err); - } else { - resolve( - messagingProfiles.map(function ( - messagingProfile: TelnyxRecord, - ) { - return messagingProfile.id; - }), - ); - } + // @ts-expect-error TODO: import .d.ts files under src/test folder + realTelnyx.messagingProfiles + .list({page: {size: 2}}) + .autoPagingToArray({limit: LIMIT}) + .then(function (messagingProfiles: TelnyxRecord[]) { + return messagingProfiles.map(function ( + messagingProfile: TelnyxRecord, + ) { + return messagingProfile.id; + }); + }) + .then((data: unknown) => { + try { + expect(data).toStrictEqual(realMessagingProfileIds); + done(); + } catch (err: unknown) { + done(err); } - realMessagingProfileIds = ['1', '2', '3']; - const options = { - host: telnyx.getConstant('DEFAULT_HOST'), - path: '/v2/messaging_profiles', - }; - nock('https://' + options.host + ':443') - .get(options.path) - .query({page: {size: 2}}) - .reply(200, { - data: [ - {record_type: 'messaging_profile', id: 1}, - {record_type: 'messaging_profile', id: 2}, - ], - meta: {total_pages: 2, page_number: 1, page_size: 2}, - }) - .get(options.path) - .query({page: {number: 2, size: 2}}) - .reply(200, { - data: [{record_type: 'messaging_profile', id: 3}], - meta: {total_pages: 2, page_number: 2, page_size: 2}, - }); - - // @ts-expect-error TODO: import .d.ts files under src/test folder - realTelnyx.messagingProfiles - .list({page: {size: 2}}) - .autoPagingToArray({limit: LIMIT}, onDone); - }), - ).toBe(realMessagingProfileIds.slice(0, LIMIT)); + }) + .catch((err: unknown) => { + done(err); + }); }); - test('enforces a `limit` arg', function () { - return expect( - new Promise(function (resolve, reject) { - realMessagingProfileIds = ['1', '2', '3']; - const options = { - host: telnyx.getConstant('DEFAULT_HOST'), - path: '/v2/messaging_profiles', - }; - nock('https://' + options.host + ':443') - .get(options.path) - .query({page: {size: 2}}) - .reply(200, { - data: [ - {record_type: 'messaging_profile', id: 1}, - {record_type: 'messaging_profile', id: 2}, - ], - meta: {total_pages: 2, page_number: 1, page_size: 2}, - }) - .get(options.path) - .query({page: {number: 2, size: 2}}) - .reply(200, { - data: [{record_type: 'messaging_profile', id: 3}], - meta: {total_pages: 2, page_number: 2, page_size: 2}, - }); + test('returns a promise of an array', function (done) { + realMessagingProfileIds = ['1', '2', '3']; + const options = { + host: telnyx.getConstant('DEFAULT_HOST'), + path: '/v2/messaging_profiles', + }; + nock('https://' + options.host + ':443') + .get(options.path) + .query({page: {size: 2}}) + .reply(200, { + data: [ + {record_type: 'messaging_profile', id: '1'}, + {record_type: 'messaging_profile', id: '2'}, + ], + meta: {total_pages: 2, page_number: 1, page_size: 2}, + }) + .get(options.path) + .query({page: {number: 2, size: 2}}) + .reply(200, { + data: [{record_type: 'messaging_profile', id: '3'}], + meta: {total_pages: 2, page_number: 2, page_size: 2}, + }); + // @ts-expect-error TODO: import .d.ts files under src/test folder + realTelnyx.messagingProfiles + .list({page: {size: 2}}) + .autoPagingToArray({limit: LIMIT}) + .then(function (messagingProfiles: TelnyxRecord[]) { + return messagingProfiles.map(function ( + messagingProfile: TelnyxRecord, + ) { + return messagingProfile.id; + }); + }) + .then((data: unknown) => { try { - // @ts-expect-error TODO: import .d.ts files under src/test folder - realTelnyx.messagingProfiles - .list({page: {size: 3}}) - .autoPagingToArray(); - reject(Error('Should have thrown.')); + expect(data).toStrictEqual(realMessagingProfileIds.slice(0, LIMIT)); + done(); } catch (err: unknown) { - resolve((err as Error)?.message); + done(err); } - }), - ).toBe( - 'You must pass a `limit` option to autoPagingToArray, eg; `autoPagingToArray({limit: 1000});`.', - ); + }) + .catch((err: unknown) => { + done(err); + }); }); - test('caps the `limit` arg to a reasonable ceiling', function () { - return expect( - new Promise(function (resolve, reject) { + test('accepts an onDone callback, passing an array', function (done) { + function onDone(err: unknown, messagingProfiles: TelnyxRecord[]) { + if (err) { + done(err); + } else { try { - // @ts-expect-error TODO: import .d.ts files under src/test folder - realTelnyx.messagingProfiles - .list({page: {size: 3}}) - .autoPagingToArray({limit: 1000000}); - reject(Error('Should have thrown.')); + expect( + messagingProfiles.map(function (messagingProfile: TelnyxRecord) { + return messagingProfile.id; + }), + ).toStrictEqual(realMessagingProfileIds.slice(0, LIMIT)); + done(); } catch (err: unknown) { - resolve((err as Error)?.message); + done(err); } - }), - ).toBe( - 'You cannot specify a limit of more than 10,000 items to fetch in `autoPagingToArray`; use `autoPagingEach` to iterate through longer lists.', - ); + } + } + realMessagingProfileIds = ['1', '2', '3']; + const options = { + host: telnyx.getConstant('DEFAULT_HOST'), + path: '/v2/messaging_profiles', + }; + nock('https://' + options.host + ':443') + .get(options.path) + .query({page: {size: 2}}) + .reply(200, { + data: [ + {record_type: 'messaging_profile', id: '1'}, + {record_type: 'messaging_profile', id: '2'}, + ], + meta: {total_pages: 2, page_number: 1, page_size: 2}, + }) + .get(options.path) + .query({page: {number: 2, size: 2}}) + .reply(200, { + data: [{record_type: 'messaging_profile', id: '3'}], + meta: {total_pages: 2, page_number: 2, page_size: 2}, + }); + + // @ts-expect-error TODO: import .d.ts files under src/test folder + realTelnyx.messagingProfiles + .list({page: {size: 2}}) + .autoPagingToArray({limit: LIMIT}, onDone); + }); + + test('enforces a `limit` arg', function (done) { + realMessagingProfileIds = ['1', '2', '3']; + const options = { + host: telnyx.getConstant('DEFAULT_HOST'), + path: '/v2/messaging_profiles', + }; + nock('https://' + options.host + ':443') + .get(options.path) + .query({page: {size: 2}}) + .reply(200, { + data: [ + {record_type: 'messaging_profile', id: '1'}, + {record_type: 'messaging_profile', id: '2'}, + ], + meta: {total_pages: 2, page_number: 1, page_size: 2}, + }) + .get(options.path) + .query({page: {number: 2, size: 2}}) + .reply(200, { + data: [{record_type: 'messaging_profile', id: '3'}], + meta: {total_pages: 2, page_number: 2, page_size: 2}, + }); + + try { + // @ts-expect-error TODO: import .d.ts files under src/test folder + realTelnyx.messagingProfiles + .list({page: {size: 3}}) + .autoPagingToArray(); + done(Error('Should have thrown.')); + } catch (err: unknown) { + expect((err as Error)?.message).toBe( + 'You must pass a `limit` option to autoPagingToArray, e.g., `autoPagingToArray({limit: 1000});`.', + ); + done(); + } + }); + + test('caps the `limit` arg to a reasonable ceiling', function (done) { + try { + // @ts-expect-error TODO: import .d.ts files under src/test folder + realTelnyx.messagingProfiles + .list({page: {size: 3}}) + .autoPagingToArray({limit: 1000000}); + done(Error('Should have thrown.')); + } catch (err: unknown) { + expect((err as Error)?.message).toBe( + 'You cannot specify a limit of more than 10,000 items to fetch in `autoPagingToArray`; use `autoPagingEach` to iterate through longer lists.', + ); + done(); + } }); }); describe('api compat edge cases', function () { - test('lets you listen to the first request as its own promise, and separately each item, but only sends one request for the first page.', function () { - return expect( - new Promise(function (resolve, reject) { - realMessagingProfileIds = ['1', '2', '3']; - const options = { - host: telnyx.getConstant('DEFAULT_HOST'), - path: '/v2/messaging_profiles', - }; - nock('https://' + options.host + ':443') - .get(options.path) - .query({page: {size: 2}}) - .reply(200, { - data: [ - {record_type: 'messaging_profile', id: 1}, - {record_type: 'messaging_profile', id: 2}, - ], - meta: {total_pages: 2, page_number: 1, page_size: 2}, - }) - .get(options.path) - .query({page: {number: 2, size: 2}}) - .reply(200, { - data: [{record_type: 'messaging_profile', id: 3}], - meta: {total_pages: 2, page_number: 2, page_size: 2}, + // TODO: fix throwing TelnyxError.TelnyxConnectionError + test.skip('lets you listen to the first request as its own promise, and separately each item, but only sends one request for the first page.', function (done) { + realMessagingProfileIds = ['1', '2', '3']; + const options = { + host: telnyx.getConstant('DEFAULT_HOST'), + path: '/v2/messaging_profiles', + }; + nock('https://' + options.host + ':443') + .get(options.path) + .query({page: {size: 2}}) + .reply(200, { + data: [ + {record_type: 'messaging_profile', id: '1'}, + {record_type: 'messaging_profile', id: '2'}, + ], + meta: {total_pages: 2, page_number: 1, page_size: 2}, + }) + .get(options.path) + .query({page: {number: 2, size: 2}}) + .reply(200, { + data: [{record_type: 'messaging_profile', id: '3'}], + meta: {total_pages: 2, page_number: 2, page_size: 2}, + }); + // Count requests: we want one for the first page (not two), and then one for the second page. + let reqCount = 0; + function onRequest() { + reqCount += 1; + } + realTelnyx.on('request', onRequest); + + const messagingProfileIds: string[] = []; + // @ts-expect-error TODO: import .d.ts files under src/test folder + const p = realTelnyx.messagingProfiles.list({page: {size: 2}}); + Promise.all([ + p, + p.autoPagingEach(function (messagingProfile: TelnyxRecord) { + messagingProfileIds.push(messagingProfile.id); + }), + ]) + .then(function (results) { + realTelnyx.off('request', onRequest); + expect(reqCount).toBe(2); // not 3. + + try { + expect({ + firstReq: results[0].data.map(function ( + messagingProfile: TelnyxRecord, + ) { + return messagingProfile.id; + }), + paginated: messagingProfileIds, + }).toStrictEqual({ + firstReq: realMessagingProfileIds.slice(0, 2), + paginated: realMessagingProfileIds, }); - // Count requests: we want one for the first page (not two), and then one for the second page. - let reqCount = 0; - function onRequest() { - reqCount += 1; + done(); + } catch (err: unknown) { + done(err); } - realTelnyx.on('request', onRequest); - - const messagingProfileIds: string[] = []; - // @ts-expect-error TODO: import .d.ts files under src/test folder - const p = realTelnyx.messagingProfiles.list({page: {size: 2}}); - Promise.all([ - p, - p.autoPagingEach(function (messagingProfile: TelnyxRecord) { - messagingProfileIds.push(messagingProfile.id); - }), - ]) - .then(function (results) { - realTelnyx.off('request', onRequest); - expect(reqCount).toBe(2); // not 3. - - resolve({ - firstReq: results[0].data.map(function ( - messagingProfile: TelnyxRecord, - ) { - return messagingProfile.id; - }), - paginated: messagingProfileIds, - }); - }) - .catch(reject); - }), - ).toBe({ - firstReq: realMessagingProfileIds.slice(0, 2), - paginated: realMessagingProfileIds, - }); + }) + .catch((err: unknown) => { + done(err); + }); }); }); }); diff --git a/src/test/utils.test.ts b/src/test/utils.test.ts index c6c06ee..f366191 100644 --- a/src/test/utils.test.ts +++ b/src/test/utils.test.ts @@ -49,7 +49,7 @@ describe('utils', function () { utils.stringifyRequestData({ a: [{b: 'c'}, {b: 'd'}], }), - ).toBe('a[0][b]=c&a[1][b]=d'); + ).toBe('a[][b]=c&a[][b]=d'); }); test('Handles indexed arrays', function () { diff --git a/src/utils.ts b/src/utils.ts index 2d47db2..d3a7894 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -255,6 +255,7 @@ export function stringifyRequestData(data: RequestData | string): string { return ( qs .stringify(data, { + arrayFormat: 'brackets', serializeDate: (d: Date) => Math.floor(d.getTime() / 1000).toString(), }) // Don't use strict form encoding by changing the square bracket control From d6a15552dd980a3bbd955a52f03a14b1b6001795 Mon Sep 17 00:00:00 2001 From: Lucas Rosa Date: Tue, 24 Sep 2024 21:52:01 -0300 Subject: [PATCH 06/59] perform nock cleanup --- src/test/autoPagination.test.ts | 34 +++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/src/test/autoPagination.test.ts b/src/test/autoPagination.test.ts index 6ef2305..b69b0ac 100644 --- a/src/test/autoPagination.test.ts +++ b/src/test/autoPagination.test.ts @@ -24,6 +24,10 @@ describe('auto pagination', function () { jest.setTimeout(20000); describe('callbacks', function () { + beforeAll(() => { + nock.cleanAll(); + }); + test('lets you call `next()` to iterate and `next(false)` to break', function (done) { realMessagingProfileIds = ['1', '2', '3']; const messagingProfileIds: string[] = []; @@ -475,6 +479,10 @@ describe('auto pagination', function () { }); describe('async iterators', function () { + beforeAll(() => { + nock.cleanAll(); + }); + test('works with `for await` when that feature exists (user break)', function (done) { realMessagingProfileIds = ['1', '2', '3']; const options = { @@ -801,6 +809,10 @@ describe('auto pagination', function () { }); describe('autoPagingToArray', function () { + beforeAll(() => { + nock.cleanAll(); + }); + test('can go to the end', function (done) { realMessagingProfileIds = ['1', '2', '3']; const options = { @@ -978,6 +990,22 @@ describe('auto pagination', function () { }); test('caps the `limit` arg to a reasonable ceiling', function (done) { + const options = { + host: telnyx.getConstant('DEFAULT_HOST'), + path: '/v2/messaging_profiles', + }; + nock('https://' + options.host + ':443') + .get(options.path) + .query({page: {size: 3}}) + .reply(200, { + data: [ + {record_type: 'messaging_profile', id: '1'}, + {record_type: 'messaging_profile', id: '2'}, + {record_type: 'messaging_profile', id: '3'}, + ], + meta: {total_pages: 1, page_number: 1, page_size: 3}, + }); + try { // @ts-expect-error TODO: import .d.ts files under src/test folder realTelnyx.messagingProfiles @@ -994,8 +1022,10 @@ describe('auto pagination', function () { }); describe('api compat edge cases', function () { - // TODO: fix throwing TelnyxError.TelnyxConnectionError - test.skip('lets you listen to the first request as its own promise, and separately each item, but only sends one request for the first page.', function (done) { + beforeAll(() => { + nock.cleanAll(); + }); + test('lets you listen to the first request as its own promise, and separately each item, but only sends one request for the first page.', function (done) { realMessagingProfileIds = ['1', '2', '3']; const options = { host: telnyx.getConstant('DEFAULT_HOST'), From d9d5ddd4712ce654747c5dad3619d5d2a6ff8825 Mon Sep 17 00:00:00 2001 From: Lucas Rosa Date: Tue, 24 Sep 2024 22:30:32 -0300 Subject: [PATCH 07/59] fix Resources tests --- src/resources/MessagingProfiles.ts | 2 +- src/test/resources/Balance.test.ts | 4 +- .../resources/MessagingProfileMetrics.test.ts | 12 +- src/test/resources/MessagingProfiles.test.ts | 150 +++++++++++++----- src/utils.ts | 6 +- types/MessagingProfilesResource.d.ts | 17 +- 6 files changed, 141 insertions(+), 50 deletions(-) diff --git a/src/resources/MessagingProfiles.ts b/src/resources/MessagingProfiles.ts index 581cdfb..c475d48 100644 --- a/src/resources/MessagingProfiles.ts +++ b/src/resources/MessagingProfiles.ts @@ -53,7 +53,7 @@ const transformResponseData = ( export const MessagingProfiles = TelnyxResource.extend({ path: 'messaging_profiles', - includeBasic: ['list', 'del'], + includeBasic: ['list', 'del', 'update'], create: telnyxMethod({ method: 'POST', diff --git a/src/test/resources/Balance.test.ts b/src/test/resources/Balance.test.ts index 47740ff..a3d530a 100644 --- a/src/test/resources/Balance.test.ts +++ b/src/test/resources/Balance.test.ts @@ -8,7 +8,9 @@ describe('Balance Resource', function () { describe('retrieve', function () { test('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.balance.retrieve().then(function (response) { + return telnyx.balance.retrieve().then(function ( + response: Record, + ) { expect(response.data).toHaveProperty('record_type', 'balance'); expect(response.data).toHaveProperty('balance'); expect(response.data).toHaveProperty('available_credit'); diff --git a/src/test/resources/MessagingProfileMetrics.test.ts b/src/test/resources/MessagingProfileMetrics.test.ts index d5b5b9c..e23e851 100644 --- a/src/test/resources/MessagingProfileMetrics.test.ts +++ b/src/test/resources/MessagingProfileMetrics.test.ts @@ -3,9 +3,19 @@ import {utils as testUtils} from '../utils'; const telnyx = testUtils.getTelnyxMock(); const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); +type ResponsePayloadList = { + data: { + record_type: string; + messaging_profile_id: string; + inbound: object; + outbound: object; + phone_numbers: number; + }[]; +}; + describe('MessagingProfileMetrics Resource', function () { describe('list', function () { - function responseFn(response) { + function responseFn(response: ResponsePayloadList) { expect(response.data[0]).toHaveProperty('inbound'); expect(response.data[0]).toHaveProperty('outbound'); expect(response.data[0]).toHaveProperty('phone_numbers'); diff --git a/src/test/resources/MessagingProfiles.test.ts b/src/test/resources/MessagingProfiles.test.ts index b62bc49..aa4a757 100644 --- a/src/test/resources/MessagingProfiles.test.ts +++ b/src/test/resources/MessagingProfiles.test.ts @@ -1,3 +1,7 @@ +/* eslint-disable @typescript-eslint/ban-ts-comment */ + +// @ts-nocheck - needed due to dynamic method testing: mp[action] + import {utils as testUtils} from '../utils'; import * as utils from '../../utils'; @@ -9,23 +13,53 @@ const TEST_UUID = '123e4567-e89b-12d3-a456-426614174000'; const METHODS = ['phone_numbers', 'short_codes', 'del']; +type ResponsePayloadList = { + data: {id: string; name: string}[]; +}; + +type ResponsePayload = { + data: { + id: string; + name: string; + }; +}; + +type ResponsePayloadMetrics = { + data: { + id: string; + name: string; + overview: Record; + detailed: {metrics: object}[]; + }; +}; + describe('MessagingProfiles Resource', function () { - function responseFn(response) { + function responseFn(response: ResponsePayload) { expect(response.data).toHaveProperty('name'); expect(response.data).toMatchObject({record_type: 'messaging_profile'}); } + function errorFn(err: unknown) { + console.log(err); + + throw err; + } + describe('retrieve', function () { it('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.messagingProfiles.retrieve(TEST_UUID).then(responseFn); + return telnyx.messagingProfiles + .retrieve(TEST_UUID) + .then(responseFn) + .catch(errorFn); }); it('Sends the correct request [with specified auth]', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder return telnyx.messagingProfiles .retrieve(TEST_UUID, TEST_AUTH_KEY) - .then(responseFn); + .then(responseFn) + .catch(errorFn); }); }); @@ -33,22 +67,31 @@ describe('MessagingProfiles Resource', function () { it('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder return telnyx.messagingProfiles - .create({name: 'Summer Campaign'}) - .then(responseFn); + .create({name: 'Summer Campaign', whitelisted_destinations: ['US']}) + .then(responseFn) + .catch(errorFn); }); it('Sends the correct request [with specified auth]', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder return telnyx.messagingProfiles - .create({name: 'Summer Campaign'}, TEST_AUTH_KEY) - .then(responseFn); + .create( + {name: 'Summer Campaign', whitelisted_destinations: ['US']}, + TEST_AUTH_KEY, + ) + .then(responseFn) + .catch(errorFn); }); it('Sends the correct request [with specified auth in options]', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder return telnyx.messagingProfiles - .create({name: 'Summer Campaign'}, {api_key: TEST_AUTH_KEY}) - .then(responseFn); + .create( + {name: 'Summer Campaign', whitelisted_destinations: ['US']}, + {api_key: TEST_AUTH_KEY}, + ) + .then(responseFn) + .catch(errorFn); }); }); @@ -57,12 +100,13 @@ describe('MessagingProfiles Resource', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder return telnyx.messagingProfiles .update(TEST_UUID, {name: 'Foo "baz"'}) - .then(responseFn); + .then(responseFn) + .catch(errorFn); }); }); describe('list', function () { - function responseFn(response) { + function responseFn(response: ResponsePayloadList) { expect(response.data[0]).toHaveProperty('id'); expect(response.data[0]).toHaveProperty('name'); expect(response.data[0]).toMatchObject({ @@ -72,17 +116,20 @@ describe('MessagingProfiles Resource', function () { it('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.messagingProfiles.list().then(responseFn); + return telnyx.messagingProfiles.list().then(responseFn).catch(errorFn); }); it('Sends the correct request [with specified auth]', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.messagingProfiles.list(TEST_AUTH_KEY).then(responseFn); + return telnyx.messagingProfiles + .list(TEST_AUTH_KEY) + .then(responseFn) + .catch(errorFn); }); }); describe('PhoneNumbers methods', function () { - function responseFn(response) { + function responseFn(response: ResponsePayloadList) { expect(response.data[0]).toHaveProperty('id'); expect(response.data[0]).toHaveProperty('phone_number'); expect(response.data[0]).toHaveProperty('messaging_profile_id'); @@ -96,20 +143,22 @@ describe('MessagingProfiles Resource', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder return telnyx.messagingProfiles .listPhoneNumbers(TEST_UUID) - .then(responseFn); + .then(responseFn) + .catch(errorFn); }); it('Sends the correct request [with specified auth]', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder return telnyx.messagingProfiles .listPhoneNumbers(TEST_UUID, TEST_AUTH_KEY) - .then(responseFn); + .then(responseFn) + .catch(errorFn); }); }); }); describe('ShortCodes methods', function () { - function responseFn(response) { + function responseFn(response: ResponsePayloadList) { expect(response.data[0]).toHaveProperty('id'); expect(response.data[0]).toHaveProperty('short_code'); expect(response.data[0]).toHaveProperty('messaging_profile_id'); @@ -121,20 +170,22 @@ describe('MessagingProfiles Resource', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder return telnyx.messagingProfiles .listShortCodes(TEST_UUID) - .then(responseFn); + .then(responseFn) + .catch(errorFn); }); it('Sends the correct request [with specified auth]', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder return telnyx.messagingProfiles .listShortCodes(TEST_UUID, TEST_AUTH_KEY) - .then(responseFn); + .then(responseFn) + .catch(errorFn); }); }); }); describe('Nested', function () { - function responseFn(response) { + function responseFn(response: ResponsePayloadList) { if (response.data.length) { expect(response.data[0]).toHaveProperty('id'); expect(response.data[0]).toHaveProperty('record_type'); @@ -151,19 +202,22 @@ describe('MessagingProfiles Resource', function () { it('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder return telnyx.messagingProfiles - .create({name: 'Summer Campaign'}) - .then(function (response) { + .create({name: 'Summer Campaign', whitelisted_destinations: ['US']}) + .then(function (response: ResponsePayload) { const mp = response.data; - return mp[action]().then(responseFn); + // @ts-expect-error TODO: import .d.ts files under src/test folder + return mp[action]().then(responseFn).catch(errorFn); }); }); it('Sends the correct request [with specified auth]', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder return telnyx.messagingProfiles - .create({name: 'Summer Campaign'}) - .then(function (response) { + .create({name: 'Summer Campaign', whitelisted_destinations: ['US']}) + .then(function (response: ResponsePayload) { const mp = response.data; - return mp[action](TEST_AUTH_KEY).then(responseFn); + + // @ts-expect-error TODO: import .d.ts files under src/test folder + return mp[action](TEST_AUTH_KEY).then(responseFn).catch(errorFn); }); }); @@ -171,19 +225,31 @@ describe('MessagingProfiles Resource', function () { it('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder return telnyx.messagingProfiles - .create({name: 'Summer Campaign'}) - .then(function (response) { + .create({ + name: 'Summer Campaign', + whitelisted_destinations: ['US'], + }) + .then(function (response: ResponsePayload) { const mp = response.data; - return mp[camelCaseAction]().then(responseFn); + + // @ts-expect-error TODO: import .d.ts files under src/test folder + return mp[camelCaseAction]().then(responseFn).catch(errorFn); }); }); it('Sends the correct request [with specified auth]', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder return telnyx.messagingProfiles - .create({name: 'Summer Campaign'}) - .then(function (response) { + .create({ + name: 'Summer Campaign', + whitelisted_destinations: ['US'], + }) + .then(function (response: ResponsePayload) { const mp = response.data; - return mp[camelCaseAction](TEST_AUTH_KEY).then(responseFn); + + // @ts-expect-error TODO: import .d.ts files under src/test folder + return mp[camelCaseAction](TEST_AUTH_KEY) + .then(responseFn) + .catch(errorFn); }); }); }); @@ -191,7 +257,7 @@ describe('MessagingProfiles Resource', function () { }); describe('Metrics methods', function () { - function metricsNestedResponseFn(response) { + function metricsNestedResponseFn(response: ResponsePayloadMetrics) { expect(response.data).toHaveProperty('detailed'); expect(response.data).toHaveProperty('overview'); expect(response.data.overview).toHaveProperty('inbound'); @@ -224,20 +290,22 @@ describe('MessagingProfiles Resource', function () { it('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder return telnyx.messagingProfiles - .create({name: 'Summer Campaign'}) - .then(function (response) { + .create({name: 'Summer Campaign', whitelisted_destinations: ['US']}) + .then(function (response: ResponsePayload) { const mp = response.data; + // @ts-expect-error TODO: import .d.ts files under src/test folder return mp.metrics().then(metricsNestedResponseFn); }); }); it('Sends the correct request [with specified auth]', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.messagingProfiles - .retrieve(TEST_UUID) - .then(function (response) { - const mp = response.data; - return mp.metrics(TEST_AUTH_KEY).then(metricsNestedResponseFn); - }); + return telnyx.messagingProfiles.retrieve(TEST_UUID).then(function ( + response: ResponsePayload, + ) { + const mp = response.data; + // @ts-expect-error TODO: import .d.ts files under src/test folder + return mp.metrics(TEST_AUTH_KEY).then(metricsNestedResponseFn); + }); }); }); }); diff --git a/src/utils.ts b/src/utils.ts index d3a7894..3ea18e4 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -37,7 +37,6 @@ export function isObject(obj: unknown): boolean { return (type === 'function' || type === 'object') && !!obj; } -// const utils = { export function isOptionsHash(o: unknown): boolean | unknown { return ( o && @@ -147,10 +146,7 @@ export function createNestedMethods( {}; names.forEach(function (name) { - // @ts-expect-error TODO: type name key by method names - methods[name] = methods[utils.snakeToCamelCase(name)] = telnyxMethod( - spec(name), - ); + methods[name] = methods[snakeToCamelCase(name)] = telnyxMethod(spec(name)); }); return methods; diff --git a/types/MessagingProfilesResource.d.ts b/types/MessagingProfilesResource.d.ts index 0dbf711..e7bb411 100644 --- a/types/MessagingProfilesResource.d.ts +++ b/types/MessagingProfilesResource.d.ts @@ -14,12 +14,21 @@ declare module 'telnyx' { type MessagingProfilesDeleteParams = paths['/messaging_profiles/{id}']['delete']['parameters']['query']; + type MessagingProfilesUpdateId = + paths['/messaging_profiles/{id}']['patch']['parameters']['path']['id']; + + type MessagingProfilesUpdateParams = + paths['/messaging_profiles/{id}']['patch']['requestBody']['content']['application/json']; + type MessagingProfilesRetrieveResponse = paths['/messaging_profiles/{id}']['get']['responses']['200']['content']['application/json']['data']; type MessagingProfilesDeleteResponse = paths['/messaging_profiles/{id}']['delete']['responses']['200']['content']['application/json']['data']; + type MessagingProfilesUpdateResponse = + paths['/messaging_profiles/{id}']['patch']['responses']['200']['content']['application/json']['data']; + type MessagingProfilesListParams = paths['/messaging_profiles']['get']['parameters']['query']; @@ -60,10 +69,16 @@ declare module 'telnyx' { ): Promise>; del( - params?: MessagingProfilesDeleteParams, + id?: MessagingProfilesDeleteId, options?: RequestOptions, ): Promise>; + update( + id?: MessagingProfilesUpdateId, + params?: MessagingProfilesUpdateParams, + options?: RequestOptions, + ): Promise>; + retrieve( id?: MessagingProfilesRetrieveId, options?: RequestOptions, From ba2dd15220165d9b8d9ff215864b57fcad95e70d Mon Sep 17 00:00:00 2001 From: Lucas Rosa Date: Tue, 24 Sep 2024 22:49:48 -0300 Subject: [PATCH 08/59] fix Telnyx Module tests --- src/telnyx.ts | 1 + src/test/telnyx.test.ts | 185 ++++++++++++++++++++-------------------- 2 files changed, 95 insertions(+), 91 deletions(-) diff --git a/src/telnyx.ts b/src/telnyx.ts index d80bfd2..0e512c6 100644 --- a/src/telnyx.ts +++ b/src/telnyx.ts @@ -236,6 +236,7 @@ export function createTelnyx() { setMaxNetworkRetries: function (maxNetworkRetries: number) { if ( (maxNetworkRetries && typeof maxNetworkRetries !== 'number') || + typeof maxNetworkRetries === 'undefined' || arguments.length < 1 ) { throw new Error('maxNetworkRetries must be a number.'); diff --git a/src/test/telnyx.test.ts b/src/test/telnyx.test.ts index 243ec0b..6f13f35 100644 --- a/src/test/telnyx.test.ts +++ b/src/test/telnyx.test.ts @@ -61,38 +61,43 @@ describe('Telnyx Module', function () { }); describe('GetClientUserAgent', function () { - test('Should return a user-agent serialized JSON object', function () { - return expect( - new Promise(function (resolve, _reject) { - realTelnyx.getClientUserAgent(function (c) { - resolve(JSON.parse(c)); - }); - }), - ).toHaveProperty('lang', 'node'); + test('Should return a user-agent serialized JSON object', function (done) { + realTelnyx.getClientUserAgent(function (c) { + try { + expect(JSON.parse(c)).toHaveProperty('lang', 'node'); + done(); + } catch (err: unknown) { + done(err); + } + }); }); }); describe('GetClientUserAgentSeeded', function () { - test('Should return a user-agent serialized JSON object', function () { + test('Should return a user-agent serialized JSON object', function (done) { const userAgent = {lang: 'node'}; - return expect( - new Promise(function (resolve, _reject) { - realTelnyx.getClientUserAgentSeeded(userAgent, function (c) { - resolve(JSON.parse(c)); - }); - }), - ).toHaveProperty('lang', 'node'); + + realTelnyx.getClientUserAgentSeeded(userAgent, function (c) { + try { + expect(JSON.parse(c)).toHaveProperty('lang', 'node'); + done(); + } catch (err: unknown) { + done(err); + } + }); }); - test('Should URI-encode user-agent fields', function () { + test('Should URI-encode user-agent fields', function (done) { const userAgent = {lang: 'ï'}; - return expect( - new Promise(function (resolve, _reject) { - realTelnyx.getClientUserAgentSeeded(userAgent, function (c) { - resolve(JSON.parse(c)); - }); - }), - ).toHaveProperty('lang', '%C3%AF'); + + realTelnyx.getClientUserAgentSeeded(userAgent, function (c) { + try { + expect(JSON.parse(c)).toHaveProperty('lang', '%C3%AF'); + done(); + } catch (err: unknown) { + done(err); + } + }); }); }); @@ -206,84 +211,82 @@ describe('Telnyx Module', function () { realTelnyx._setAppInfo(appInfo); realTelnyx.getClientUserAgent(function (uaString) { - expect(JSON.parse(uaString).application).toMatchObject(appInfo); + try { + expect(JSON.parse(uaString).application).toMatchObject(appInfo); - expect(realTelnyx.getAppInfoAsString()).toMatchObject( - appInfo.name + '/' + appInfo.version + ' (' + appInfo.url + ')', - ); + expect(realTelnyx.getAppInfoAsString()).toBe( + appInfo.name + '/' + appInfo.version + ' (' + appInfo.url + ')', + ); - done(); + done(); + } catch (err: unknown) { + done(err); + } }); }); }); describe('Callback support', function () { describe('Any given endpoint', function () { - test('Will call a callback if successful', function () { - return expect( - new Promise(function (resolve, _reject) { - // @ts-expect-error TODO: import .d.ts files under src/test folder - realTelnyx.messagingProfiles.create( - MESSAGING_PROFILE_DETAILS, - function (_err: unknown, _mp: unknown) { - resolve('Called!'); - }, - ); - }), - ).toBe('Called!'); + test('Will call a callback if successful', function (done) { + // @ts-expect-error TODO: import .d.ts files under src/test folder + realTelnyx.messagingProfiles.create( + MESSAGING_PROFILE_DETAILS, + function (_err: unknown, _mp: unknown) { + try { + done(); + } catch (err: unknown) { + done(err); + } + }, + ); }); - test('Will expose HTTP response object', function () { - return expect( - new Promise(function (resolve, _reject) { - const options = { - host: realTelnyx.getConstant('DEFAULT_HOST'), - path: '/v2/messaging_profiles', - }; - nock('https://' + options.host + ':443') - .post(options.path) - .reply( - 200, - {data: {record_type: 'messaging_profile', id: 1}}, - {'request-id': 'foo'}, - ); - - // @ts-expect-error TODO: import .d.ts files under src/test folder - realTelnyx.messagingProfiles.create( - MESSAGING_PROFILE_DETAILS, - function ( - _err: unknown, - mp: {lastResponse: {headers: object; statusCode: number}}, - ) { - const headers = mp.lastResponse.headers; - expect(headers).toHaveProperty('request-id'); - - expect(mp.lastResponse.statusCode).toBe(200); - expect(nock.isDone()); - - resolve('Called!'); - }, - ); - }), - ).toBe('Called!'); + test('Will expose HTTP response object', function (done) { + const options = { + host: realTelnyx.getConstant('DEFAULT_HOST'), + path: '/v2/messaging_profiles', + }; + nock('https://' + options.host + ':443') + .post(options.path) + .reply( + 200, + {data: {record_type: 'messaging_profile', id: 1}}, + {'request-id': 'foo'}, + ); + + // @ts-expect-error TODO: import .d.ts files under src/test folder + realTelnyx.messagingProfiles.create( + MESSAGING_PROFILE_DETAILS, + function ( + _err: unknown, + mp: {lastResponse: {headers: object; statusCode: number}}, + ) { + try { + const headers = mp.lastResponse.headers; + expect(headers).toHaveProperty('request-id'); + expect(mp.lastResponse.statusCode).toBe(200); + expect(nock.isDone()); + done(); + } catch (err: unknown) { + done(err); + } + }, + ); }); - test('Given an error the callback will receive it', function () { - return expect( - new Promise(function (resolve, reject) { - // @ts-expect-error TODO: import .d.ts files under src/test folder - realTelnyx.messagingProfiles.create( - MESSAGING_PROFILE_DETAILS, - function (err: unknown, _messagingProfile: unknown) { - if (err) { - resolve('ErrorWasPassed'); - } else { - reject(new Error('NoErrorPassed')); - } - }, - ); - }), - ).toBe('ErrorWasPassed'); + test('Given an error the callback will receive it', function (done) { + // @ts-expect-error TODO: import .d.ts files under src/test folder + realTelnyx.messagingProfiles.create( + MESSAGING_PROFILE_DETAILS, + function (err: unknown, _messagingProfile: unknown) { + if (err) { + done(); + } else { + done(new Error('NoErrorPassed')); + } + }, + ); }); }); }); @@ -300,7 +303,7 @@ describe('Telnyx Module', function () { describe('setMaxNetworkRetries', function () { describe('when given an empty or non-number variable', function () { - test('should error', function () { + test('should throw an error', function () { expect(function () { realTelnyx.setMaxNetworkRetries('foo' as unknown as number); }).toThrow(/maxNetworkRetries must be a number/); From e0044fa4ef26d1424ab2127217d2615e6c405341 Mon Sep 17 00:00:00 2001 From: Lucas Rosa Date: Tue, 24 Sep 2024 22:54:33 -0300 Subject: [PATCH 09/59] update workflow to avoid timeouts --- .github/workflows/node.js.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index dc06b0f..fb46545 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -15,6 +15,7 @@ jobs: env: TELNYX_MOCK_OPEN_API_URI: https://raw.githubusercontent.com/team-telnyx/openapi/master/openapi/spec3.json strategy: + max-parallel: 1 # to make sure proxy server doesn't cause timeout on each individual run matrix: node-version: [18.x, 20.x, 22.x] From d5c96c3aed45966572e62bad8760c366cb822d5e Mon Sep 17 00:00:00 2001 From: Lucas Rosa Date: Tue, 24 Sep 2024 23:07:45 -0300 Subject: [PATCH 10/59] update test setup for Node 18 --- src/test/utils/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/utils/index.ts b/src/test/utils/index.ts index db70d1f..586efe2 100644 --- a/src/test/utils/index.ts +++ b/src/test/utils/index.ts @@ -106,7 +106,7 @@ export const utils = { ); telnyxInstance.setHost( - 'localhost', + '127.0.0.1', // Node 18.x only recognizes this as localhost process.env.TELNYX_MOCK_PORT || '12111', 'http', ); From b59ac84ab85c66e9e664aed73daeb3cd3d7fb332 Mon Sep 17 00:00:00 2001 From: Lucas Rosa Date: Wed, 25 Sep 2024 11:32:12 -0300 Subject: [PATCH 11/59] add all resources --- CHANGELOG.md | 1 + src/resources/AI.ts | 43 ++++++ src/resources/AccessIpAddress.ts | 6 + src/resources/AccessIpRanges.ts | 6 + src/resources/AccessTokens.ts | 6 + src/resources/Actions.ts | 9 ++ src/resources/ActionsSimCards.ts | 16 ++ .../ActivateDeactivateBulkCredentials.ts | 22 +++ src/resources/Addresses.ts | 50 ++++++ src/resources/AdvancedOptinoptout.ts | 18 +++ src/resources/AuthenticationProviders.ts | 6 + src/resources/Autorechargepreferences.ts | 12 ++ src/resources/AvailablePhoneNumbers.ts | 6 + src/resources/Billing.ts | 12 ++ src/resources/BillingGroups.ts | 6 + src/resources/Brands.ts | 33 ++++ src/resources/Bucket.ts | 13 ++ src/resources/BucketUsage.ts | 18 +++ src/resources/BulkCreation.ts | 55 +++++++ src/resources/BulkCredentials.ts | 17 +++ src/resources/BulkPhoneNumberCampaigns.ts | 22 +++ src/resources/BulkPhoneNumberOperations.ts | 29 ++++ src/resources/BulkSoleProprietorCreation.ts | 22 +++ src/resources/BulkTelephonyCredentials.ts | 49 ++++++ src/resources/BusinessIdentity.ts | 17 +++ src/resources/CallControlApplications.ts | 57 +++++++ src/resources/CallEvents.ts | 6 + src/resources/CallInformation.ts | 12 ++ src/resources/CallRecordings.ts | 24 +++ src/resources/Calls.ts | 76 ++++++++++ src/resources/Campaign.ts | 87 +++++++++++ src/resources/CampaignBuilder.ts | 43 ++++++ src/resources/CdrUsageReports.ts | 12 ++ src/resources/Channelzones.ts | 24 +++ src/resources/ClientStateUpdate.ts | 6 + src/resources/Conferences.ts | 68 +++++++++ src/resources/Connections.ts | 6 + src/resources/CredentialConnections.ts | 6 + src/resources/Credentials.ts | 26 ++++ src/resources/CsvDownloads.ts | 17 +++ src/resources/CustomerServiceRecord.ts | 20 +++ src/resources/Debugging.ts | 12 ++ src/resources/DetailRecords.ts | 11 ++ src/resources/DialogflowIntegration.ts | 12 ++ src/resources/DocumentLinks.ts | 6 + src/resources/Documents.ts | 53 +++++++ src/resources/DynamicEmergency.ts | 10 ++ src/resources/DynamicEmergencyAddresses.ts | 6 + src/resources/DynamicEmergencyEndpoints.ts | 6 + src/resources/Events.ts | 6 + src/resources/ExternalConnections.ts | 73 +++++++++ src/resources/FaxApplications.ts | 53 +++++++ src/resources/Faxes.ts | 51 +++++++ src/resources/FqdnConnections.ts | 53 +++++++ src/resources/Fqdns.ts | 53 +++++++ src/resources/GlobalIps.ts | 44 ++++++ src/resources/InboundChannels.ts | 12 ++ src/resources/InventoryCoverage.ts | 11 ++ src/resources/InventoryLevel.ts | 12 ++ src/resources/IpAddresses.ts | 17 +++ src/resources/IpConnections.ts | 53 +++++++ src/resources/IpRanges.ts | 17 +++ src/resources/Ips.ts | 53 +++++++ src/resources/ManagedAccounts.ts | 60 ++++++++ src/resources/MdrDetailReports.ts | 21 +++ src/resources/MdrUsageReports.ts | 21 +++ src/resources/MediaStorageApi.ts | 20 +++ src/resources/Messages.ts | 11 ++ src/resources/MessagesAlphanumericSenderId.ts | 6 + src/resources/MessagingHostedNumber.ts | 27 ++++ src/resources/MessagingHostedNumberOrders.ts | 6 + src/resources/MessagingHostedNumbers.ts | 6 + src/resources/MessagingPhoneNumbers.ts | 6 + src/resources/MessagingProfiles.ts | 4 +- src/resources/MessagingSenderIds.ts | 6 + src/resources/MessagingShortCodes.ts | 6 + .../MessagingTollfreeVerification.ts | 17 +++ src/resources/MessagingUrlDomains.ts | 12 ++ src/resources/MobileNetworkOperators.ts | 12 ++ src/resources/MobileOperatorNetworks.ts | 6 + src/resources/Networks.ts | 24 +++ src/resources/NumberBackgroundJobs.ts | 22 +++ src/resources/NumberLookup.ts | 6 + src/resources/NumberOrderDocuments.ts | 12 ++ src/resources/NumberOrders.ts | 6 + src/resources/NumberPortouts.ts | 74 +++++++++ src/resources/NumberReservations.ts | 30 ++++ src/resources/NumbersFeatures.ts | 12 ++ src/resources/Object.ts | 18 +++ src/resources/OtaUpdates.ts | 16 ++ src/resources/Outbound.ts | 58 +++++++ src/resources/OutboundVoiceProfiles.ts | 16 ++ .../PhoneNumberAssignmentByProfile.ts | 58 +++++++ src/resources/PhoneNumberBlockOrders.ts | 17 +++ .../PhoneNumberBlocksBackgroundJobs.ts | 21 +++ src/resources/PhoneNumberCampaigns.ts | 17 +++ src/resources/PhoneNumberOrderDocuments.ts | 17 +++ .../PhoneNumberRegulatoryRequirements.ts | 7 + src/resources/PhoneNumberSearch.ts | 16 ++ src/resources/PhoneNumbers.ts | 49 ++++++ src/resources/PhoneNumbersInboundChannels.ts | 37 +++++ src/resources/PhoneNumbersMessaging.ts | 6 + src/resources/PhoneNumbersVoice.ts | 6 + src/resources/PortabilityChecks.ts | 10 ++ src/resources/PortingOrders.ts | 105 +++++++++++++ src/resources/PortingPhoneNumbers.ts | 6 + src/resources/PortoutRequests.ts | 51 +++++++ src/resources/PresignedObjectUrls.ts | 13 ++ src/resources/PrivateWirelessGateways.ts | 16 ++ src/resources/PublicInternetGateways.ts | 16 ++ src/resources/PublicKey.ts | 10 ++ src/resources/PushCredentials.ts | 17 +++ src/resources/Queues.ts | 68 +++++++++ src/resources/RecordingsCommands.ts | 13 ++ src/resources/Regions.ts | 12 ++ src/resources/RegisterCall.ts | 6 + src/resources/RegulatoryRequirements.ts | 7 + src/resources/Reporting.ts | 16 ++ src/resources/Reports.ts | 16 ++ src/resources/ReportsMdrs.ts | 6 + src/resources/RequirementTypes.ts | 16 ++ src/resources/Requirements.ts | 16 ++ src/resources/RoomCompositions.ts | 6 + src/resources/RoomParticipants.ts | 6 + src/resources/RoomRecordings.ts | 17 +++ src/resources/RoomSessions.ts | 41 +++++ src/resources/Rooms.ts | 6 + src/resources/RoomsClientToken.ts | 16 ++ src/resources/RoomsClientTokens.ts | 18 +++ src/resources/SharedCampaigns.ts | 17 +++ src/resources/ShortCodes.ts | 37 +++++ src/resources/SimCardActions.ts | 24 +++ src/resources/SimCardGroupActions.ts | 16 ++ src/resources/SimCardGroups.ts | 53 +++++++ src/resources/SimCardOrders.ts | 6 + src/resources/SimCards.ts | 142 ++++++++++++++++++ src/resources/SslCertificates.ts | 17 +++ src/resources/TeXMLApplication.ts | 6 + src/resources/TelephonyCredentials.ts | 57 +++++++ src/resources/UpdateClientState.ts | 25 +++ src/resources/Verifications.ts | 70 +++++++++ src/resources/VerifiedCallsDisplayProfile.ts | 22 +++ src/resources/VerifiedCallsDisplayProfiles.ts | 11 ++ src/resources/VerifiedNumbers.ts | 6 + src/resources/Verify.ts | 52 +++++++ src/resources/VerifyProfiles.ts | 62 ++++++++ src/resources/VirtualCrossConnects.ts | 28 ++++ src/resources/WdrDetailReports.ts | 12 ++ src/resources/Webhooks.ts | 6 + src/resources/WireguardInterfaces.ts | 36 +++++ src/resources/WirelessDetailRecordReports.ts | 6 + types/BalanceResource.d.ts | 4 +- 152 files changed, 3641 insertions(+), 4 deletions(-) create mode 100644 src/resources/AI.ts create mode 100644 src/resources/AccessIpAddress.ts create mode 100644 src/resources/AccessIpRanges.ts create mode 100644 src/resources/AccessTokens.ts create mode 100644 src/resources/Actions.ts create mode 100644 src/resources/ActionsSimCards.ts create mode 100644 src/resources/ActivateDeactivateBulkCredentials.ts create mode 100644 src/resources/Addresses.ts create mode 100644 src/resources/AdvancedOptinoptout.ts create mode 100644 src/resources/AuthenticationProviders.ts create mode 100644 src/resources/Autorechargepreferences.ts create mode 100644 src/resources/AvailablePhoneNumbers.ts create mode 100644 src/resources/Billing.ts create mode 100644 src/resources/BillingGroups.ts create mode 100644 src/resources/Brands.ts create mode 100644 src/resources/Bucket.ts create mode 100644 src/resources/BucketUsage.ts create mode 100644 src/resources/BulkCreation.ts create mode 100644 src/resources/BulkCredentials.ts create mode 100644 src/resources/BulkPhoneNumberCampaigns.ts create mode 100644 src/resources/BulkPhoneNumberOperations.ts create mode 100644 src/resources/BulkSoleProprietorCreation.ts create mode 100644 src/resources/BulkTelephonyCredentials.ts create mode 100644 src/resources/BusinessIdentity.ts create mode 100644 src/resources/CallControlApplications.ts create mode 100644 src/resources/CallEvents.ts create mode 100644 src/resources/CallInformation.ts create mode 100644 src/resources/CallRecordings.ts create mode 100644 src/resources/Calls.ts create mode 100644 src/resources/Campaign.ts create mode 100644 src/resources/CampaignBuilder.ts create mode 100644 src/resources/CdrUsageReports.ts create mode 100644 src/resources/Channelzones.ts create mode 100644 src/resources/ClientStateUpdate.ts create mode 100644 src/resources/Conferences.ts create mode 100644 src/resources/Connections.ts create mode 100644 src/resources/CredentialConnections.ts create mode 100644 src/resources/Credentials.ts create mode 100644 src/resources/CsvDownloads.ts create mode 100644 src/resources/CustomerServiceRecord.ts create mode 100644 src/resources/Debugging.ts create mode 100644 src/resources/DetailRecords.ts create mode 100644 src/resources/DialogflowIntegration.ts create mode 100644 src/resources/DocumentLinks.ts create mode 100644 src/resources/Documents.ts create mode 100644 src/resources/DynamicEmergency.ts create mode 100644 src/resources/DynamicEmergencyAddresses.ts create mode 100644 src/resources/DynamicEmergencyEndpoints.ts create mode 100644 src/resources/Events.ts create mode 100644 src/resources/ExternalConnections.ts create mode 100644 src/resources/FaxApplications.ts create mode 100644 src/resources/Faxes.ts create mode 100644 src/resources/FqdnConnections.ts create mode 100644 src/resources/Fqdns.ts create mode 100644 src/resources/GlobalIps.ts create mode 100644 src/resources/InboundChannels.ts create mode 100644 src/resources/InventoryCoverage.ts create mode 100644 src/resources/InventoryLevel.ts create mode 100644 src/resources/IpAddresses.ts create mode 100644 src/resources/IpConnections.ts create mode 100644 src/resources/IpRanges.ts create mode 100644 src/resources/Ips.ts create mode 100644 src/resources/ManagedAccounts.ts create mode 100644 src/resources/MdrDetailReports.ts create mode 100644 src/resources/MdrUsageReports.ts create mode 100644 src/resources/MediaStorageApi.ts create mode 100644 src/resources/Messages.ts create mode 100644 src/resources/MessagesAlphanumericSenderId.ts create mode 100644 src/resources/MessagingHostedNumber.ts create mode 100644 src/resources/MessagingHostedNumberOrders.ts create mode 100644 src/resources/MessagingHostedNumbers.ts create mode 100644 src/resources/MessagingPhoneNumbers.ts create mode 100644 src/resources/MessagingSenderIds.ts create mode 100644 src/resources/MessagingShortCodes.ts create mode 100644 src/resources/MessagingTollfreeVerification.ts create mode 100644 src/resources/MessagingUrlDomains.ts create mode 100644 src/resources/MobileNetworkOperators.ts create mode 100644 src/resources/MobileOperatorNetworks.ts create mode 100644 src/resources/Networks.ts create mode 100644 src/resources/NumberBackgroundJobs.ts create mode 100644 src/resources/NumberLookup.ts create mode 100644 src/resources/NumberOrderDocuments.ts create mode 100644 src/resources/NumberOrders.ts create mode 100644 src/resources/NumberPortouts.ts create mode 100644 src/resources/NumberReservations.ts create mode 100644 src/resources/NumbersFeatures.ts create mode 100644 src/resources/Object.ts create mode 100644 src/resources/OtaUpdates.ts create mode 100644 src/resources/Outbound.ts create mode 100644 src/resources/OutboundVoiceProfiles.ts create mode 100644 src/resources/PhoneNumberAssignmentByProfile.ts create mode 100644 src/resources/PhoneNumberBlockOrders.ts create mode 100644 src/resources/PhoneNumberBlocksBackgroundJobs.ts create mode 100644 src/resources/PhoneNumberCampaigns.ts create mode 100644 src/resources/PhoneNumberOrderDocuments.ts create mode 100644 src/resources/PhoneNumberRegulatoryRequirements.ts create mode 100644 src/resources/PhoneNumberSearch.ts create mode 100644 src/resources/PhoneNumbers.ts create mode 100644 src/resources/PhoneNumbersInboundChannels.ts create mode 100644 src/resources/PhoneNumbersMessaging.ts create mode 100644 src/resources/PhoneNumbersVoice.ts create mode 100644 src/resources/PortabilityChecks.ts create mode 100644 src/resources/PortingOrders.ts create mode 100644 src/resources/PortingPhoneNumbers.ts create mode 100644 src/resources/PortoutRequests.ts create mode 100644 src/resources/PresignedObjectUrls.ts create mode 100644 src/resources/PrivateWirelessGateways.ts create mode 100644 src/resources/PublicInternetGateways.ts create mode 100644 src/resources/PublicKey.ts create mode 100644 src/resources/PushCredentials.ts create mode 100644 src/resources/Queues.ts create mode 100644 src/resources/RecordingsCommands.ts create mode 100644 src/resources/Regions.ts create mode 100644 src/resources/RegisterCall.ts create mode 100644 src/resources/RegulatoryRequirements.ts create mode 100644 src/resources/Reporting.ts create mode 100644 src/resources/Reports.ts create mode 100644 src/resources/ReportsMdrs.ts create mode 100644 src/resources/RequirementTypes.ts create mode 100644 src/resources/Requirements.ts create mode 100644 src/resources/RoomCompositions.ts create mode 100644 src/resources/RoomParticipants.ts create mode 100644 src/resources/RoomRecordings.ts create mode 100644 src/resources/RoomSessions.ts create mode 100644 src/resources/Rooms.ts create mode 100644 src/resources/RoomsClientToken.ts create mode 100644 src/resources/RoomsClientTokens.ts create mode 100644 src/resources/SharedCampaigns.ts create mode 100644 src/resources/ShortCodes.ts create mode 100644 src/resources/SimCardActions.ts create mode 100644 src/resources/SimCardGroupActions.ts create mode 100644 src/resources/SimCardGroups.ts create mode 100644 src/resources/SimCardOrders.ts create mode 100644 src/resources/SimCards.ts create mode 100644 src/resources/SslCertificates.ts create mode 100644 src/resources/TeXMLApplication.ts create mode 100644 src/resources/TelephonyCredentials.ts create mode 100644 src/resources/UpdateClientState.ts create mode 100644 src/resources/Verifications.ts create mode 100644 src/resources/VerifiedCallsDisplayProfile.ts create mode 100644 src/resources/VerifiedCallsDisplayProfiles.ts create mode 100644 src/resources/VerifiedNumbers.ts create mode 100644 src/resources/Verify.ts create mode 100644 src/resources/VerifyProfiles.ts create mode 100644 src/resources/VirtualCrossConnects.ts create mode 100644 src/resources/WdrDetailReports.ts create mode 100644 src/resources/Webhooks.ts create mode 100644 src/resources/WireguardInterfaces.ts create mode 100644 src/resources/WirelessDetailRecordReports.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index fac5ea7..57272db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ - Moved to `moduleResolution` Bundler to support better imports and tests with `Jest` - Enabled `esModuleInterop` for Jest - Update files included when publishing +- Remove custom resource get `generateAccessTokenFromCredential` from `TelephonyCredentials` ## v1 diff --git a/src/resources/AI.ts b/src/resources/AI.ts new file mode 100644 index 0000000..fa22875 --- /dev/null +++ b/src/resources/AI.ts @@ -0,0 +1,43 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const AI = TelnyxResource.extend({ + path: 'public_endpoints', + includeBasic: ['list', 'retrieve', 'create', 'delete'], + + GetEmbeddingTask: telnyxMethod({ + method: 'GET', + path: '/ai/embeddings/{task/id}', + urlParams: ['task_id'], + }), + PostEmbedding: telnyxMethod({ + method: 'POST', + path: '/ai/embeddings', + }), + embedding_bucket_files_public_embedding_buckets__bucket_name__delete: + telnyxMethod({ + method: 'DELETE', + path: '/ai/embeddings_buckets/{bucket_name}', + urlParams: ['bucket_name'], + }), + PostInferenceStream: telnyxMethod({ + method: 'POST', + path: '/ai/generate/stream', + }), + PostInference: telnyxMethod({ + method: 'POST', + path: '/ai/generate', + }), + PostSummary: telnyxMethod({ + method: 'POST', + path: '/ai/summarize', + }), + PostEmbeddingSimilaritySearch: telnyxMethod({ + method: 'POST', + path: '/ai/embeddings/similarity-search', + }), + GetEmbeddingBuckets: telnyxMethod({ + method: 'GET', + path: '/ai/embeddings_buckets', + }), +}); diff --git a/src/resources/AccessIpAddress.ts b/src/resources/AccessIpAddress.ts new file mode 100644 index 0000000..3f332cd --- /dev/null +++ b/src/resources/AccessIpAddress.ts @@ -0,0 +1,6 @@ +import TelnyxResource from '../TelnyxResource'; + +export const AccessIpAddress = TelnyxResource.extend({ + path: 'access_ip_address', + includeBasic: ['list', 'create', 'retrieve', 'del'], +}); diff --git a/src/resources/AccessIpRanges.ts b/src/resources/AccessIpRanges.ts new file mode 100644 index 0000000..0b83825 --- /dev/null +++ b/src/resources/AccessIpRanges.ts @@ -0,0 +1,6 @@ +import TelnyxResource from '../TelnyxResource'; + +export const AccessIpRanges = TelnyxResource.extend({ + path: 'access_ip_ranges', + includeBasic: ['list', 'create', 'retrieve', 'del'], +}); diff --git a/src/resources/AccessTokens.ts b/src/resources/AccessTokens.ts new file mode 100644 index 0000000..a721609 --- /dev/null +++ b/src/resources/AccessTokens.ts @@ -0,0 +1,6 @@ +import TelnyxResource from '../TelnyxResource'; + +export const AccessTokens = TelnyxResource.extend({ + path: 'access_ip_ranges', + includeBasic: ['create'], +}); diff --git a/src/resources/Actions.ts b/src/resources/Actions.ts new file mode 100644 index 0000000..5e4256f --- /dev/null +++ b/src/resources/Actions.ts @@ -0,0 +1,9 @@ +import TelnyxResource from '../TelnyxResource'; +import {ActionsSimCards} from './ActionsSimCards'; +export const Actions = TelnyxResource.extend({ + path: 'actions', + + nestedResources: { + SimCards: ActionsSimCards, + }, +}); diff --git a/src/resources/ActionsSimCards.ts b/src/resources/ActionsSimCards.ts new file mode 100644 index 0000000..3aed7f6 --- /dev/null +++ b/src/resources/ActionsSimCards.ts @@ -0,0 +1,16 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const ActionsSimCards = TelnyxResource.extend({ + path: 'actions', + + register: telnyxMethod({ + method: 'POST', + path: '/register/sim_cards', + }), + + bulkNetworkPreferences: telnyxMethod({ + method: 'PUT', + path: '/network_preferences/sim_cards', + }), +}); diff --git a/src/resources/ActivateDeactivateBulkCredentials.ts b/src/resources/ActivateDeactivateBulkCredentials.ts new file mode 100644 index 0000000..f4d3a06 --- /dev/null +++ b/src/resources/ActivateDeactivateBulkCredentials.ts @@ -0,0 +1,22 @@ +import TelnyxResource from '../TelnyxResource'; +import {ResponsePayload, TelnyxObject} from '../Types'; +import * as utils from '../utils'; +const telnyxMethod = TelnyxResource.method; + +function transformResponseData( + response: ResponsePayload, + telnyx: TelnyxObject, +) { + return utils.addResourceToResponseData(response, telnyx, 'actions', {}); +} + +export const ActivateDeactivateBulkCredentials = TelnyxResource.extend({ + path: 'actions', + + create: telnyxMethod({ + method: 'POST', + path: '/{action}/telephony_credentials', + urlParams: ['action'], + transformResponseData: transformResponseData, + }), +}); diff --git a/src/resources/Addresses.ts b/src/resources/Addresses.ts new file mode 100644 index 0000000..f54a35d --- /dev/null +++ b/src/resources/Addresses.ts @@ -0,0 +1,50 @@ +import TelnyxResource from '../TelnyxResource'; +import * as utils from '../utils'; +const telnyxMethod = TelnyxResource.method; + +import {ResponsePayload, TelnyxObject} from '../Types'; + +function transformResponseData( + response: ResponsePayload, + telnyx: TelnyxObject, +) { + return utils.addResourceToResponseData(response, telnyx, 'addresses', { + del: telnyxMethod({ + method: 'DELETE', + path: '/{addressId}', + urlParams: ['addressId'], + paramsValues: [response.data.id as string], + paramsNames: ['id'], + }), + }); +} + +export const Addresses = TelnyxResource.extend({ + path: 'account/addresses', + + list: telnyxMethod({ + method: 'GET', + methodType: 'list', + + transformResponseData: transformResponseData, + }), + + create: telnyxMethod({ + method: 'POST', + + transformResponseData: transformResponseData, + }), + + retrieve: telnyxMethod({ + method: 'GET', + path: '/{id}', + urlParams: ['id'], + + transformResponseData: transformResponseData, + }), + + validate: telnyxMethod({ + method: 'POST', + path: '/actions/validate', + }), +}); diff --git a/src/resources/AdvancedOptinoptout.ts b/src/resources/AdvancedOptinoptout.ts new file mode 100644 index 0000000..48684d7 --- /dev/null +++ b/src/resources/AdvancedOptinoptout.ts @@ -0,0 +1,18 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const AdvancedOptinoptout = TelnyxResource.extend({ + path: 'advanced_optinoptout', + includeBasic: ['delete', 'list', 'retrieve'], + + DeleteAutorespConfig: telnyxMethod({ + method: 'DELETE', + path: '/messaging_profiles/{profile_id}/autoresp_configs/{autoresp_cfg_id}', + urlParams: ['profile_id', 'autoresp_cfg_id'], + }), + GetAutorespConfigs: telnyxMethod({ + method: 'GET', + path: '/messaging_profiles/{profile/id}/autoresp_configs', + urlParams: ['profile_id'], + }), +}); diff --git a/src/resources/AuthenticationProviders.ts b/src/resources/AuthenticationProviders.ts new file mode 100644 index 0000000..0586391 --- /dev/null +++ b/src/resources/AuthenticationProviders.ts @@ -0,0 +1,6 @@ +import TelnyxResource from '../TelnyxResource'; + +export const AuthenticationProviders = TelnyxResource.extend({ + path: 'authentication_providers', + includeBasic: ['list', 'create', 'retrieve', 'update', 'del'], +}); diff --git a/src/resources/Autorechargepreferences.ts b/src/resources/Autorechargepreferences.ts new file mode 100644 index 0000000..3b75808 --- /dev/null +++ b/src/resources/Autorechargepreferences.ts @@ -0,0 +1,12 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const Autorechargepreferences = TelnyxResource.extend({ + path: 'autorechargepreferences', + includeBasic: ['list', 'retrieve'], + + GetAutoRechargePrefs: telnyxMethod({ + method: 'GET', + path: '/payment/auto/recharge/prefs', + }), +}); diff --git a/src/resources/AvailablePhoneNumbers.ts b/src/resources/AvailablePhoneNumbers.ts new file mode 100644 index 0000000..28d93f7 --- /dev/null +++ b/src/resources/AvailablePhoneNumbers.ts @@ -0,0 +1,6 @@ +import TelnyxResource from '../TelnyxResource'; + +export const AvailablePhoneNumbers = TelnyxResource.extend({ + path: 'available_phone_numbers', + includeBasic: ['list', 'retrieve'], +}); diff --git a/src/resources/Billing.ts b/src/resources/Billing.ts new file mode 100644 index 0000000..23ead26 --- /dev/null +++ b/src/resources/Billing.ts @@ -0,0 +1,12 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const Billing = TelnyxResource.extend({ + path: 'billing', + includeBasic: ['list', 'retrieve'], + + GetUserBalance: telnyxMethod({ + method: 'GET', + path: '/balance', + }), +}); diff --git a/src/resources/BillingGroups.ts b/src/resources/BillingGroups.ts new file mode 100644 index 0000000..aedd37a --- /dev/null +++ b/src/resources/BillingGroups.ts @@ -0,0 +1,6 @@ +import TelnyxResource from '../TelnyxResource'; + +export const BillingGroups = TelnyxResource.extend({ + path: 'billing_groups', + includeBasic: ['list', 'create', 'retrieve', 'del', 'update'], +}); diff --git a/src/resources/Brands.ts b/src/resources/Brands.ts new file mode 100644 index 0000000..bcb24c2 --- /dev/null +++ b/src/resources/Brands.ts @@ -0,0 +1,33 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const Brands = TelnyxResource.extend({ + path: 'brand', + basePath: '/10dlc/', + includeBasic: ['create', 'list', 'retrieve', 'update', 'delete'], + + ListExternalVettings: telnyxMethod({ + method: 'GET', + path: '/brand/{brandId}/externalVetting', + urlParams: ['brandId'], + }), + GetBrands: telnyxMethod({ + method: 'GET', + path: '/brand', + }), + RevetBrand: telnyxMethod({ + method: 'PUT', + path: '/brand/{brandId}/revet', + urlParams: ['brandId'], + }), + DeleteBrand: telnyxMethod({ + method: 'DELETE', + path: '/brand/{brandId}', + urlParams: ['brandId'], + }), + GetBrandFeedbackById: telnyxMethod({ + method: 'GET', + path: '/brand/feedback/{brandId}', + urlParams: ['brandId'], + }), +}); diff --git a/src/resources/Bucket.ts b/src/resources/Bucket.ts new file mode 100644 index 0000000..194851d --- /dev/null +++ b/src/resources/Bucket.ts @@ -0,0 +1,13 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const Bucket = TelnyxResource.extend({ + path: 'bucket', + includeBasic: ['delete'], + + DeleteBucket: telnyxMethod({ + method: 'DELETE', + path: '/{bucketName}', + urlParams: ['bucketName'], + }), +}); diff --git a/src/resources/BucketUsage.ts b/src/resources/BucketUsage.ts new file mode 100644 index 0000000..8df86c4 --- /dev/null +++ b/src/resources/BucketUsage.ts @@ -0,0 +1,18 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const BucketUsage = TelnyxResource.extend({ + path: 'bucket_usage', + includeBasic: ['list', 'retrieve'], + + GetBucketSnapshot: telnyxMethod({ + method: 'GET', + path: '/storage/buckets/{bucketName}/snapshot', + urlParams: ['bucketName'], + }), + GetBucketUsage: telnyxMethod({ + method: 'GET', + path: '/storage/buckets/{bucketName}/usage', + urlParams: ['bucketName'], + }), +}); diff --git a/src/resources/BulkCreation.ts b/src/resources/BulkCreation.ts new file mode 100644 index 0000000..d183e44 --- /dev/null +++ b/src/resources/BulkCreation.ts @@ -0,0 +1,55 @@ +import TelnyxResource from '../TelnyxResource'; +import * as utils from '../utils'; +const telnyxMethod = TelnyxResource.method; + +import {ResponsePayload, TelnyxObject} from '../Types'; + +function transformResponseData( + response: ResponsePayload, + telnyx: TelnyxObject, +) { + return utils.addResourceToResponseData(response, telnyx, 'bulkCreation', { + del: telnyxMethod({ + method: 'DELETE', + path: '/bulkCreation', + urlParams: ['bulkCreation'], + paramsValues: [response.data.id as string], + paramsNames: ['id'], + }), + + update: telnyxMethod({ + method: 'PATCH', + path: '/bulkCreation', + urlParams: ['bulkCreation'], + paramsValues: [response.data.id as string], + paramsNames: ['id'], + }), + }); +} + +export const BulkCreation = TelnyxResource.extend({ + path: 'bulkCreation', + list: telnyxMethod({ + method: 'GET', + transformResponseData: transformResponseData, + }), + create: telnyxMethod({ + method: 'POST', + transformResponseData: transformResponseData, + }), + + retrieveTaskStatus: telnyxMethod({ + method: 'GET', + path: '/{taskId}', + urlParams: ['taskId'], + + transformResponseData: transformResponseData, + }), + retrieveDetailedTaskStatus: telnyxMethod({ + method: 'GET', + path: '/{taskId}/detailedStatus', + urlParams: ['taskId'], + + transformResponseData: transformResponseData, + }), +}); diff --git a/src/resources/BulkCredentials.ts b/src/resources/BulkCredentials.ts new file mode 100644 index 0000000..18c1634 --- /dev/null +++ b/src/resources/BulkCredentials.ts @@ -0,0 +1,17 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const BulkCredentials = TelnyxResource.extend({ + path: 'bulk_credentials', + includeBasic: ['create', 'delete'], + + BulkCredentialAction: telnyxMethod({ + method: 'POST', + path: '/actions/{action}/telephony_credentials', + urlParams: ['action'], + }), + DeleteTelephonyCredentials: telnyxMethod({ + method: 'DELETE', + path: '/actions/bulk/telephony_credentials', + }), +}); diff --git a/src/resources/BulkPhoneNumberCampaigns.ts b/src/resources/BulkPhoneNumberCampaigns.ts new file mode 100644 index 0000000..fabba8c --- /dev/null +++ b/src/resources/BulkPhoneNumberCampaigns.ts @@ -0,0 +1,22 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const BulkPhoneNumberCampaigns = TelnyxResource.extend({ + path: 'bulk_phone_number_campaigns', + includeBasic: ['list', 'retrieve', 'create'], + + GetPhoneNumberStatus: telnyxMethod({ + method: 'GET', + path: '/phoneNumberAssignmentByProfile/{taskId}/phoneNumbers', + urlParams: ['taskId'], + }), + GetAssignmentTaskStatus: telnyxMethod({ + method: 'GET', + path: '/phoneNumberAssignmentByProfile/{taskId}', + urlParams: ['taskId'], + }), + PostAssignMessagingProfileToCampaign: telnyxMethod({ + method: 'POST', + path: '/phoneNumberAssignmentByProfile', + }), +}); diff --git a/src/resources/BulkPhoneNumberOperations.ts b/src/resources/BulkPhoneNumberOperations.ts new file mode 100644 index 0000000..f24dab3 --- /dev/null +++ b/src/resources/BulkPhoneNumberOperations.ts @@ -0,0 +1,29 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const BulkPhoneNumberOperations = TelnyxResource.extend({ + path: 'bulk_phone_number_operations', + includeBasic: ['list', 'retrieve', 'create'], + + RetrievePhoneNumbersJob: telnyxMethod({ + method: 'GET', + path: '/phone_numbers_jobs/{id}', + urlParams: ['id'], + }), + CreateUpdatePhoneNumbersJob: telnyxMethod({ + method: 'POST', + path: '/phone_numbers_jobs/update/phone_numbers', + }), + ListPhoneNumbersJobs: telnyxMethod({ + method: 'GET', + path: '/phone_numbers_jobs', + }), + CreateDeletePhoneNumbersJob: telnyxMethod({ + method: 'POST', + path: '/phone_numbers_jobs/delete/phone_numbers', + }), + CreatePhoneNumbersJobUpdateEmergencySettings: telnyxMethod({ + method: 'POST', + path: '/phone_numbers_jobs/update/emergency_settings', + }), +}); diff --git a/src/resources/BulkSoleProprietorCreation.ts b/src/resources/BulkSoleProprietorCreation.ts new file mode 100644 index 0000000..3d8fd2c --- /dev/null +++ b/src/resources/BulkSoleProprietorCreation.ts @@ -0,0 +1,22 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const BulkSoleProprietorCreation = TelnyxResource.extend({ + path: 'bulk_sole_proprietor_creation', + includeBasic: ['list', 'retrieve'], + + GetBulkCreationTaskStatus: telnyxMethod({ + method: 'GET', + path: '/bulkCreation/{taskId}', + urlParams: ['taskId'], + }), + GetAllTasks: telnyxMethod({ + method: 'GET', + path: '/bulkCreation', + }), + GetTaskDetailedStatus: telnyxMethod({ + method: 'GET', + path: '/bulkCreation/{taskId}/detailedStatus', + urlParams: ['taskId'], + }), +}); diff --git a/src/resources/BulkTelephonyCredentials.ts b/src/resources/BulkTelephonyCredentials.ts new file mode 100644 index 0000000..7b0b136 --- /dev/null +++ b/src/resources/BulkTelephonyCredentials.ts @@ -0,0 +1,49 @@ +import TelnyxResource from '../TelnyxResource'; +import * as utils from '../utils'; +const telnyxMethod = TelnyxResource.method; + +import {ResponsePayload, TelnyxObject} from '../Types'; + +function transformResponseData( + response: ResponsePayload, + telnyx: TelnyxObject, +) { + return utils.addResourceToResponseData( + response, + telnyx, + 'bulkTelephonyCredentials', + { + del: telnyxMethod({ + method: 'DELETE', + path: 'actions/bulk/telephony_credentials', + urlParams: ['bulkTelephonyCredentials'], + paramsValues: [response.data.id as string], + paramsNames: ['id'], + }), + + update: telnyxMethod({ + method: 'PATCH', + path: 'actions/bulk/telephony_credentials', + urlParams: ['bulkTelephonyCredentials'], + paramsValues: [response.data.id as string], + paramsNames: ['id'], + }), + }, + ); +} + +export const BulkTelephonyCredentials = TelnyxResource.extend({ + path: 'actions/bulk/telephony_credentials', + updateCredentials: telnyxMethod({ + method: 'PATCH', + transformResponseData: transformResponseData, + }), + deleteCredentials: telnyxMethod({ + method: 'DELETE', + transformResponseData: transformResponseData, + }), + create: telnyxMethod({ + method: 'POST', + transformResponseData: transformResponseData, + }), +}); diff --git a/src/resources/BusinessIdentity.ts b/src/resources/BusinessIdentity.ts new file mode 100644 index 0000000..3cfb084 --- /dev/null +++ b/src/resources/BusinessIdentity.ts @@ -0,0 +1,17 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const BusinessIdentity = TelnyxResource.extend({ + path: 'business_identity', + includeBasic: ['list', 'retrieve', 'delete'], + + ListBusinessIdentities: telnyxMethod({ + method: 'GET', + path: '/business/identities', + }), + DeleteBusinessIdentity: telnyxMethod({ + method: 'DELETE', + path: '/business/identities/{id}', + urlParams: ['id'], + }), +}); diff --git a/src/resources/CallControlApplications.ts b/src/resources/CallControlApplications.ts new file mode 100644 index 0000000..7f9ce95 --- /dev/null +++ b/src/resources/CallControlApplications.ts @@ -0,0 +1,57 @@ +import TelnyxResource from '../TelnyxResource'; +import * as utils from '../utils'; +const telnyxMethod = TelnyxResource.method; + +import {ResponsePayload, TelnyxObject} from '../Types'; + +function transformResponseData( + response: ResponsePayload, + telnyx: TelnyxObject, +) { + return utils.addResourceToResponseData( + response, + telnyx, + 'callControlApplications', + { + del: telnyxMethod({ + method: 'DELETE', + path: '/{callControlId}', + urlParams: ['callControlId'], + paramsValues: [response.data.id as string], + paramsNames: ['id'], + }), + + update: telnyxMethod({ + method: 'PATCH', + path: '/{callControlId}', + urlParams: ['callControlId'], + paramsValues: [response.data.id as string], + paramsNames: ['id'], + }), + }, + ); +} + +export const CallControlApplications = TelnyxResource.extend({ + path: 'call_control_applications', + + list: telnyxMethod({ + method: 'GET', + methodType: 'list', + + transformResponseData: transformResponseData, + }), + + create: telnyxMethod({ + method: 'POST', + transformResponseData: transformResponseData, + }), + + retrieve: telnyxMethod({ + method: 'GET', + path: '/{id}', + urlParams: ['id'], + + transformResponseData: transformResponseData, + }), +}); diff --git a/src/resources/CallEvents.ts b/src/resources/CallEvents.ts new file mode 100644 index 0000000..a14635e --- /dev/null +++ b/src/resources/CallEvents.ts @@ -0,0 +1,6 @@ +import TelnyxResource from '../TelnyxResource'; + +export const CallEvents = TelnyxResource.extend({ + path: 'call_events', + includeBasic: ['list'], +}); diff --git a/src/resources/CallInformation.ts b/src/resources/CallInformation.ts new file mode 100644 index 0000000..b3af035 --- /dev/null +++ b/src/resources/CallInformation.ts @@ -0,0 +1,12 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const CallInformation = TelnyxResource.extend({ + path: 'call_information', + includeBasic: ['list', 'retrieve'], + + ListConnectionActiveCalls: telnyxMethod({ + method: 'GET', + path: '/connections/{connection/id}/active_calls', + }), +}); diff --git a/src/resources/CallRecordings.ts b/src/resources/CallRecordings.ts new file mode 100644 index 0000000..c8a60ae --- /dev/null +++ b/src/resources/CallRecordings.ts @@ -0,0 +1,24 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const CallRecordings = TelnyxResource.extend({ + path: 'recordings', + includeBasic: ['list', 'retrieve', 'del'], + + GetRecordings: telnyxMethod({ + method: 'GET', + path: '/recordings', + }), + DeleteRecording: telnyxMethod({ + method: 'DELETE', + path: '/recordings/{recording/id}', + }), + DeleteRecordings: telnyxMethod({ + method: 'DELETE', + path: '/recordings/actions/delete', + }), + DeleteCustomStorageCredentials: telnyxMethod({ + method: 'DELETE', + path: '/custom/storage/credentials/{connection/id}', + }), +}); diff --git a/src/resources/Calls.ts b/src/resources/Calls.ts new file mode 100644 index 0000000..22773c5 --- /dev/null +++ b/src/resources/Calls.ts @@ -0,0 +1,76 @@ +import TelnyxResource from '../TelnyxResource'; +import * as utils from '../utils'; +const telnyxMethod = TelnyxResource.method; + +const CALL_COMMANDS = [ + 'answer', + 'reject', + 'hangup', + 'bridge', + 'speak', + 'fork_start', + 'fork_stop', + 'gather', + 'gather_using_audio', + 'gather_using_speak', + 'gather_stop', + 'playback_start', + 'playback_stop', + 'record_start', + 'record_stop', + 'record_pause', + 'record_resume', + 'refer', + 'send_dtmf', + 'streaming_start', + 'streaming_stop', + 'suppression_start', + 'suppression_stop', + 'transfer', + 'transcription_start', + 'transcription_stop', + 'enqueue', + 'leave_queue', +]; + +function getSpec(callControlId?: string) { + return function (methodName: string) { + return { + method: 'POST', + path: `/{call_control_id}/actions/${methodName}`, + urlParams: ['call_control_id'], + paramsValues: [callControlId as string], + paramsNames: ['call_control_id'], + methodType: 'create', + }; + }; +} + +export const Calls = TelnyxResource.extend({ + path: 'calls', + includeBasic: ['retrieve'], // status method + + create: telnyxMethod({ + // dial method + method: 'POST', + + transformResponseData: function (response, telnyx) { + return utils.addResourceToResponseData( + response, + telnyx, + 'calls', + utils.createNestedMethods( + telnyxMethod, + CALL_COMMANDS, + getSpec(response.data.call_control_id as string), + ), + ); + }, + }), + + instanceMethods: utils.createNestedMethods( + telnyxMethod, + CALL_COMMANDS, + getSpec(), + ), +}); diff --git a/src/resources/Campaign.ts b/src/resources/Campaign.ts new file mode 100644 index 0000000..25b9f64 --- /dev/null +++ b/src/resources/Campaign.ts @@ -0,0 +1,87 @@ +import TelnyxResource from '../TelnyxResource'; +import * as utils from '../utils'; +const telnyxMethod = TelnyxResource.method; + +import {ResponsePayload, TelnyxObject} from '../Types'; + +function transformResponseData( + response: ResponsePayload, + telnyx: TelnyxObject, +) { + return utils.addResourceToResponseData(response, telnyx, '/campaign', { + del: telnyxMethod({ + method: 'DELETE', + path: '/campaign', + urlParams: ['campaign'], + paramsValues: [response.data.id as string], + paramsNames: ['id'], + }), + + update: telnyxMethod({ + method: 'PATCH', + path: '/campaign', + urlParams: ['campaign'], + paramsValues: [response.data.id as string], + paramsNames: ['id'], + }), + }); +} + +export const Campaign = TelnyxResource.extend({ + path: 'campaign', + includeBasic: ['create', 'list'], + + acceptShareCampaign: telnyxMethod({ + method: 'POST', + transformResponseData: transformResponseData, + path: '/acceptSharing/{campaignId}', + }), + getCampaignCost: telnyxMethod({ + method: 'GET', + transformResponseData: transformResponseData, + path: '/usecase/cost', + }), + retrieveCampaignId: telnyxMethod({ + method: 'GET', + path: '/{campaignId}', + urlParams: ['campaignId'], + + transformResponseData: transformResponseData, + }), + updateCampaignId: telnyxMethod({ + method: 'PATCH', + path: '/{campaignId}', + urlParams: ['campaignId'], + transformResponseData: transformResponseData, + }), + deactivateCampaignId: telnyxMethod({ + method: 'DELETE', + path: '/{campaignId}', + urlParams: ['campaignId'], + transformResponseData: transformResponseData, + }), + retrieveMnoMetadata: telnyxMethod({ + method: 'GET', + path: '/{campaignId}/mnoMetadata', + urlParams: ['campaignId'], + + transformResponseData: transformResponseData, + }), + retrieveOperationStatus: telnyxMethod({ + method: 'GET', + path: '/{campaignId}/operationStatus', + urlParams: ['campaignId'], + + transformResponseData: transformResponseData, + }), + retrieveOsrCampaignAttributes: telnyxMethod({ + method: 'GET', + path: '/{campaignId}/osr/attributes', + urlParams: ['campaignId'], + }), + retrieveSharingStatus: telnyxMethod({ + method: 'GET', + path: '/{campaignId}/sharing', + urlParams: ['campaignId'], + }), +}); diff --git a/src/resources/CampaignBuilder.ts b/src/resources/CampaignBuilder.ts new file mode 100644 index 0000000..217211d --- /dev/null +++ b/src/resources/CampaignBuilder.ts @@ -0,0 +1,43 @@ +import TelnyxResource from '../TelnyxResource'; +import * as utils from '../utils'; +const telnyxMethod = TelnyxResource.method; + +import {ResponsePayload, TelnyxObject} from '../Types'; + +function transformResponseData( + response: ResponsePayload, + telnyx: TelnyxObject, +) { + return utils.addResourceToResponseData(response, telnyx, '/campaignBuilder', { + del: telnyxMethod({ + method: 'DELETE', + path: '/campaignBuilder', + urlParams: ['campaignBuilder'], + paramsValues: [response.data.id as string], + paramsNames: ['id'], + }), + + update: telnyxMethod({ + method: 'PATCH', + path: '/campaignBuilder', + urlParams: ['campaignBuilder'], + paramsValues: [response.data.id as string], + paramsNames: ['id'], + }), + }); +} + +export const CampaignBuilder = TelnyxResource.extend({ + path: '/campaignBuilder', + basePath: '/10dlc/', + create: telnyxMethod({ + method: 'POST', + transformResponseData: transformResponseData, + }), + retrieveQualifyByUsecase: telnyxMethod({ + method: 'GET', + path: '/brand/{brandId}/usecase/{usecase}', + urlParams: ['brandId', 'usecase'], + transformResponseData: transformResponseData, + }), +}); diff --git a/src/resources/CdrUsageReports.ts b/src/resources/CdrUsageReports.ts new file mode 100644 index 0000000..b905531 --- /dev/null +++ b/src/resources/CdrUsageReports.ts @@ -0,0 +1,12 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const CdrUsageReports = TelnyxResource.extend({ + path: 'cdr_usage_reports', + includeBasic: ['list', 'retrieve'], + + GetUsageReportSync: telnyxMethod({ + method: 'GET', + path: '/reports/cdr_usage_reports/sync', + }), +}); diff --git a/src/resources/Channelzones.ts b/src/resources/Channelzones.ts new file mode 100644 index 0000000..4c99b70 --- /dev/null +++ b/src/resources/Channelzones.ts @@ -0,0 +1,24 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const Channelzones = TelnyxResource.extend({ + path: 'channelzones', + includeBasic: ['list', 'retrieve', 'delete'], + + GetChannelZone: telnyxMethod({ + method: 'GET', + path: '/channel_zones/{channel/zone/id}', + }), + UnassignPhoneNumber: telnyxMethod({ + method: 'DELETE', + path: '/channel_zones/{channel/zone/id}/channel_zone_phone_numbers/{phone_number}', + }), + GetChannelZones: telnyxMethod({ + method: 'GET', + path: '/channel/zones', + }), + GetPhoneNumbers: telnyxMethod({ + method: 'GET', + path: '/channel_zones/{channel_zone_id}/channel_zone_phone_numbers', + }), +}); diff --git a/src/resources/ClientStateUpdate.ts b/src/resources/ClientStateUpdate.ts new file mode 100644 index 0000000..b71dda0 --- /dev/null +++ b/src/resources/ClientStateUpdate.ts @@ -0,0 +1,6 @@ +import TelnyxResource from '../TelnyxResource'; + +export const ClientStateUpdate = TelnyxResource.extend({ + path: '/actions/client_state_update', + includeBasic: ['update'], +}); diff --git a/src/resources/Conferences.ts b/src/resources/Conferences.ts new file mode 100644 index 0000000..1a9b2e7 --- /dev/null +++ b/src/resources/Conferences.ts @@ -0,0 +1,68 @@ +import TelnyxResource from '../TelnyxResource'; +import * as utils from '../utils'; +const telnyxMethod = TelnyxResource.method; + +const CONFERENCES = [ + 'join', + 'mute', + 'unmute', + 'hold', + 'unhold', + 'speak', + 'play', + 'stop', + 'record_start', + 'record_stop', + 'update', + 'leave', + 'dial_participant', + 'resume', +]; + +function getSpec(conferenceId?: string) { + return function (methodName: string) { + return { + method: 'POST', + path: `/{conferenceId}/actions/${methodName}`, + urlParams: ['conferenceId'], + paramsValues: [conferenceId as string], + paramsNames: ['id'], + methodType: 'create', + }; + }; +} + +export const Conferences = TelnyxResource.extend({ + path: 'conferences', + includeBasic: ['list', 'retrieve'], + + create: telnyxMethod({ + method: 'POST', + + transformResponseData: function (response, telnyx) { + return utils.addResourceToResponseData( + response, + telnyx, + 'conferences', + utils.createNestedMethods( + telnyxMethod, + CONFERENCES, + getSpec(response.data.id as string), + ), + ); + }, + }), + + participants: telnyxMethod({ + method: 'GET', + + path: '/{conferenceId}/participants', + urlParams: ['conferenceId'], + }), + + instanceMethods: utils.createNestedMethods( + telnyxMethod, + CONFERENCES, + getSpec(), + ), +}); diff --git a/src/resources/Connections.ts b/src/resources/Connections.ts new file mode 100644 index 0000000..6405374 --- /dev/null +++ b/src/resources/Connections.ts @@ -0,0 +1,6 @@ +import TelnyxResource from '../TelnyxResource'; + +export const Connections = TelnyxResource.extend({ + path: 'connections', + includeBasic: ['list', 'retrieve'], +}); diff --git a/src/resources/CredentialConnections.ts b/src/resources/CredentialConnections.ts new file mode 100644 index 0000000..30069f8 --- /dev/null +++ b/src/resources/CredentialConnections.ts @@ -0,0 +1,6 @@ +import TelnyxResource from '../TelnyxResource'; + +export const CredentialConnections = TelnyxResource.extend({ + path: 'credential_connections', + includeBasic: ['list', 'create', 'retrieve', 'del', 'update'], +}); diff --git a/src/resources/Credentials.ts b/src/resources/Credentials.ts new file mode 100644 index 0000000..b1837b3 --- /dev/null +++ b/src/resources/Credentials.ts @@ -0,0 +1,26 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const Credentials = TelnyxResource.extend({ + path: 'credentials', + includeBasic: ['create', 'list', 'retrieve', 'delete'], + + PerformCredentialAction: telnyxMethod({ + method: 'POST', + path: '/telephony_credentials/{id}/actions/{action}', + urlParams: ['id', 'action'], + }), + FindTelephonyCredentials: telnyxMethod({ + method: 'GET', + path: '/telephony_credentials', + }), + ListTags: telnyxMethod({ + method: 'GET', + path: '/telephony/credentials/tags', + }), + DeleteTelephonyCredential: telnyxMethod({ + method: 'DELETE', + path: '/telephony_credentials/{id}', + urlParams: ['id'], + }), +}); diff --git a/src/resources/CsvDownloads.ts b/src/resources/CsvDownloads.ts new file mode 100644 index 0000000..b372428 --- /dev/null +++ b/src/resources/CsvDownloads.ts @@ -0,0 +1,17 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const CsvDownloads = TelnyxResource.extend({ + path: 'csv_downloads', + includeBasic: ['list', 'retrieve'], + + GetCsvDownload: telnyxMethod({ + method: 'GET', + path: '/phone_numbers_csv_downloads/{id}', + urlParams: ['id'], + }), + ListCsvDownloads: telnyxMethod({ + method: 'GET', + path: '/phone_numbers_csv_downloads', + }), +}); diff --git a/src/resources/CustomerServiceRecord.ts b/src/resources/CustomerServiceRecord.ts new file mode 100644 index 0000000..0a8c591 --- /dev/null +++ b/src/resources/CustomerServiceRecord.ts @@ -0,0 +1,20 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const CustomerServiceRecord = TelnyxResource.extend({ + path: 'customer_service_record', + includeBasic: ['list', 'retrieve', 'create'], + + ListCustomerServiceRecords: telnyxMethod({ + method: 'GET', + path: '/customer_service_records', + }), + VerifyPhoneNumberCoverage: telnyxMethod({ + method: 'POST', + path: '/customer_service_records/phone_number-coverages', + }), + GetCustomerServiceRecord: telnyxMethod({ + method: 'GET', + path: '/customer_service_records/{customer_service_record_id}', + }), +}); diff --git a/src/resources/Debugging.ts b/src/resources/Debugging.ts new file mode 100644 index 0000000..d1e1fff --- /dev/null +++ b/src/resources/Debugging.ts @@ -0,0 +1,12 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const Debugging = TelnyxResource.extend({ + path: 'debugging', + includeBasic: ['list', 'retrieve'], + + ListCallEvents: telnyxMethod({ + method: 'GET', + path: '/call_events', + }), +}); diff --git a/src/resources/DetailRecords.ts b/src/resources/DetailRecords.ts new file mode 100644 index 0000000..c5fd80c --- /dev/null +++ b/src/resources/DetailRecords.ts @@ -0,0 +1,11 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const DetailRecords = TelnyxResource.extend({ + path: 'detail_records', + + query: telnyxMethod({ + method: 'GET', + methodType: 'list', + }), +}); diff --git a/src/resources/DialogflowIntegration.ts b/src/resources/DialogflowIntegration.ts new file mode 100644 index 0000000..42ca78f --- /dev/null +++ b/src/resources/DialogflowIntegration.ts @@ -0,0 +1,12 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const DialogflowIntegration = TelnyxResource.extend({ + path: 'dialogflow_integration', + includeBasic: ['delete'], + + DeleteDialogflowConnection: telnyxMethod({ + method: 'DELETE', + path: '/dialogflow_connections/{connection_id}', + }), +}); diff --git a/src/resources/DocumentLinks.ts b/src/resources/DocumentLinks.ts new file mode 100644 index 0000000..dfe5fe2 --- /dev/null +++ b/src/resources/DocumentLinks.ts @@ -0,0 +1,6 @@ +import TelnyxResource from '../TelnyxResource'; + +export const DocumentLinks = TelnyxResource.extend({ + path: '/document_links', + includeBasic: ['list'], +}); diff --git a/src/resources/Documents.ts b/src/resources/Documents.ts new file mode 100644 index 0000000..268ed4e --- /dev/null +++ b/src/resources/Documents.ts @@ -0,0 +1,53 @@ +import TelnyxResource from '../TelnyxResource'; +import * as utils from '../utils'; +const telnyxMethod = TelnyxResource.method; + +import {ResponsePayload, TelnyxObject} from '../Types'; + +function transformResponseData( + response: ResponsePayload, + telnyx: TelnyxObject, +) { + return utils.addResourceToResponseData(response, telnyx, 'documents', {}); +} + +export const Documents = TelnyxResource.extend({ + path: 'documents', + list: telnyxMethod({ + method: 'GET', + transformResponseData: transformResponseData, + }), + update: telnyxMethod({ + method: 'PATCH', + path: '/{id}', + urlParams: ['id'], + transformResponseData: transformResponseData, + }), + del: telnyxMethod({ + method: 'DELETE', + path: '{id}', + urlParams: ['id'], + transformResponseData: transformResponseData, + }), + upload: telnyxMethod({ + method: 'POST', + transformResponseData: transformResponseData, + }), + retrieveDocumentId: telnyxMethod({ + method: 'GET', + path: '/{id}', + urlParams: ['id'], + + transformResponseData: transformResponseData, + }), + retrieveDownloadDocument: telnyxMethod({ + method: 'GET', + path: '/{id}/download', + urlParams: ['id'], + headers: { + 'Content-Type': '*', + }, + + transformResponseData: transformResponseData, + }), +}); diff --git a/src/resources/DynamicEmergency.ts b/src/resources/DynamicEmergency.ts new file mode 100644 index 0000000..7ff5868 --- /dev/null +++ b/src/resources/DynamicEmergency.ts @@ -0,0 +1,10 @@ +import TelnyxResource from '../TelnyxResource'; +import {DynamicEmergencyAddresses} from './DynamicEmergencyAddresses'; +import {DynamicEmergencyEndpoints} from './DynamicEmergencyEndpoints'; + +export const DynamicEmergency = TelnyxResource.extend({ + nestedResources: { + Addresses: DynamicEmergencyAddresses, + Endpoints: DynamicEmergencyEndpoints, + }, +}); diff --git a/src/resources/DynamicEmergencyAddresses.ts b/src/resources/DynamicEmergencyAddresses.ts new file mode 100644 index 0000000..8fc8913 --- /dev/null +++ b/src/resources/DynamicEmergencyAddresses.ts @@ -0,0 +1,6 @@ +import TelnyxResource from '../TelnyxResource'; + +export const DynamicEmergencyAddresses = TelnyxResource.extend({ + path: 'dynamic_emergency_addresses', + includeBasic: ['list', 'retrieve', 'create', 'del'], +}); diff --git a/src/resources/DynamicEmergencyEndpoints.ts b/src/resources/DynamicEmergencyEndpoints.ts new file mode 100644 index 0000000..d71a3a0 --- /dev/null +++ b/src/resources/DynamicEmergencyEndpoints.ts @@ -0,0 +1,6 @@ +import TelnyxResource from '../TelnyxResource'; + +export const DynamicEmergencyEndpoints = TelnyxResource.extend({ + path: 'dynamic_emergency_endpoints', + includeBasic: ['list', 'retrieve', 'create', 'del'], +}); diff --git a/src/resources/Events.ts b/src/resources/Events.ts new file mode 100644 index 0000000..73f60be --- /dev/null +++ b/src/resources/Events.ts @@ -0,0 +1,6 @@ +import TelnyxResource from '../TelnyxResource'; + +export const Events = TelnyxResource.extend({ + path: 'events', + includeBasic: ['list', 'retrieve'], +}); diff --git a/src/resources/ExternalConnections.ts b/src/resources/ExternalConnections.ts new file mode 100644 index 0000000..c96b3ed --- /dev/null +++ b/src/resources/ExternalConnections.ts @@ -0,0 +1,73 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const ExternalConnections = TelnyxResource.extend({ + path: 'external_connections', + includeBasic: ['list', 'retrieve', 'create', 'delete'], + + GetExternalConnectionUploadsStatus: telnyxMethod({ + method: 'GET', + path: '/external_connections/{id}/uploads/status', + }), + ListExternalConnectionReleases: telnyxMethod({ + method: 'GET', + path: '/external_connections/{id}/releases', + }), + RetryUpload: telnyxMethod({ + method: 'POST', + path: '/external_connections/{id}/uploads/{ticketIid}/retry', + }), + DeleteExternalConnection: telnyxMethod({ + method: 'DELETE', + path: '/external_connections/{id}', + }), + updateLocation: telnyxMethod({ + method: 'PATCH', + path: '/v2/external_connections/{id}/locations/{location_id}', + urlParams: ['id', 'location_id'], + }), + DeleteExternalConnectionLogMessage: telnyxMethod({ + method: 'DELETE', + path: '/external_connections/log/messages/{id}', + }), + GetExternalConnectionCivicAddress: telnyxMethod({ + method: 'GET', + path: '/external_connections/{id}/civic/addresses/{address_id}', + }), + ListExternalConnectionPhoneNumbers: telnyxMethod({ + method: 'GET', + path: '/external_connections/{id}/phone/numbers', + }), + ListExternalConnections: telnyxMethod({ + method: 'GET', + path: '/external_connections', + }), + GetExternalConnectionPhoneNumber: telnyxMethod({ + method: 'GET', + path: '/external_connections/{id}/phone/numbers/{phone_number_id}', + }), + ListCivicAddresses: telnyxMethod({ + method: 'GET', + path: '/external_connections/{id}/civic_addresses', + }), + ListExternalConnectionLogMessages: telnyxMethod({ + method: 'GET', + path: '/external_connections/log/messages', + }), + GetExternalConnectionUpload: telnyxMethod({ + method: 'GET', + path: '/external_connections/{id}/uploads/{ticket_id}', + }), + RefreshExternalConnectionUploads: telnyxMethod({ + method: 'POST', + path: '/external_connections/{id}/uploads/refresh', + }), + GetExternalConnectionRelease: telnyxMethod({ + method: 'GET', + path: '/external_connections/{id}/releases/{release_id}', + }), + ListExternalConnectionUploads: telnyxMethod({ + method: 'GET', + path: '/external_connections/{id}/uploads', + }), +}); diff --git a/src/resources/FaxApplications.ts b/src/resources/FaxApplications.ts new file mode 100644 index 0000000..b7ffef5 --- /dev/null +++ b/src/resources/FaxApplications.ts @@ -0,0 +1,53 @@ +import TelnyxResource from '../TelnyxResource'; +import * as utils from '../utils'; +const telnyxMethod = TelnyxResource.method; + +import {ResponsePayload, TelnyxObject} from '../Types'; + +function transformResponseData( + response: ResponsePayload, + telnyx: TelnyxObject, +) { + return utils.addResourceToResponseData(response, telnyx, 'faxApplications', { + del: telnyxMethod({ + method: 'DELETE', + path: '/{faxApplicationId}', + urlParams: ['faxApplicationId'], + paramsValues: [response.data.id as string], + paramsNames: ['id'], + }), + + update: telnyxMethod({ + method: 'PATCH', + path: '/{faxApplicationId}', + urlParams: ['faxApplicationId'], + paramsValues: [response.data.id as string], + paramsNames: ['id'], + }), + }); +} + +export const FaxApplications = TelnyxResource.extend({ + path: 'fax_applications', + + list: telnyxMethod({ + method: 'GET', + methodType: 'list', + + transformResponseData: transformResponseData, + }), + + create: telnyxMethod({ + method: 'POST', + + transformResponseData: transformResponseData, + }), + + retrieve: telnyxMethod({ + method: 'GET', + path: '/{id}', + urlParams: ['id'], + + transformResponseData: transformResponseData, + }), +}); diff --git a/src/resources/Faxes.ts b/src/resources/Faxes.ts new file mode 100644 index 0000000..c6c2343 --- /dev/null +++ b/src/resources/Faxes.ts @@ -0,0 +1,51 @@ +import TelnyxResource from '../TelnyxResource'; +import * as utils from '../utils'; +const telnyxMethod = TelnyxResource.method; + +import {ResponsePayload, TelnyxObject} from '../Types'; + +function transformResponseData( + response: ResponsePayload, + telnyx: TelnyxObject, +) { + return utils.addResourceToResponseData(response, telnyx, 'faxes', { + del: telnyxMethod({ + method: 'DELETE', + path: '/{faxId}', + urlParams: ['faxId'], + paramsValues: [response.data.id as string], + paramsNames: ['id'], + }), + }); +} + +export const Faxes = TelnyxResource.extend({ + path: 'faxes', + + list: telnyxMethod({ + method: 'GET', + methodType: 'list', + + transformResponseData: transformResponseData, + }), + + create: telnyxMethod({ + method: 'POST', + + transformResponseData: transformResponseData, + }), + + send: telnyxMethod({ + method: 'POST', + + transformResponseData: transformResponseData, + }), + + retrieve: telnyxMethod({ + method: 'GET', + path: '/{id}', + urlParams: ['id'], + + transformResponseData: transformResponseData, + }), +}); diff --git a/src/resources/FqdnConnections.ts b/src/resources/FqdnConnections.ts new file mode 100644 index 0000000..5f08031 --- /dev/null +++ b/src/resources/FqdnConnections.ts @@ -0,0 +1,53 @@ +import TelnyxResource from '../TelnyxResource'; +import * as utils from '../utils'; +const telnyxMethod = TelnyxResource.method; + +import {ResponsePayload, TelnyxObject} from '../Types'; + +function transformResponseData( + response: ResponsePayload, + telnyx: TelnyxObject, +) { + return utils.addResourceToResponseData(response, telnyx, 'fqdnConnections', { + del: telnyxMethod({ + method: 'DELETE', + path: '/{fqdnConnectionId}', + urlParams: ['fqdnConnectionId'], + paramsValues: [response.data.id as string], + paramsNames: ['id'], + }), + + update: telnyxMethod({ + method: 'PATCH', + path: '/{fqdnConnectionId}', + urlParams: ['fqdnConnectionId'], + paramsValues: [response.data.id as string], + paramsNames: ['id'], + }), + }); +} + +export const FqdnConnections = TelnyxResource.extend({ + path: 'fqdn_connections', + + list: telnyxMethod({ + method: 'GET', + methodType: 'list', + + transformResponseData: transformResponseData, + }), + + create: telnyxMethod({ + method: 'POST', + + transformResponseData: transformResponseData, + }), + + retrieve: telnyxMethod({ + method: 'GET', + path: '/{id}', + urlParams: ['id'], + + transformResponseData: transformResponseData, + }), +}); diff --git a/src/resources/Fqdns.ts b/src/resources/Fqdns.ts new file mode 100644 index 0000000..35b9e44 --- /dev/null +++ b/src/resources/Fqdns.ts @@ -0,0 +1,53 @@ +import TelnyxResource from '../TelnyxResource'; +import * as utils from '../utils'; +const telnyxMethod = TelnyxResource.method; + +import {ResponsePayload, TelnyxObject} from '../Types'; + +function transformResponseData( + response: ResponsePayload, + telnyx: TelnyxObject, +) { + return utils.addResourceToResponseData(response, telnyx, 'fqdns', { + del: telnyxMethod({ + method: 'DELETE', + path: '/{fqdnId}', + urlParams: ['fqdnId'], + paramsValues: [response.data.id as string], + paramsNames: ['id'], + }), + + update: telnyxMethod({ + method: 'PATCH', + path: '/{fqdnId}', + urlParams: ['fqdnId'], + paramsValues: [response.data.id as string], + paramsNames: ['id'], + }), + }); +} + +export const Fqdns = TelnyxResource.extend({ + path: 'fqdns', + + list: telnyxMethod({ + method: 'GET', + methodType: 'list', + + transformResponseData: transformResponseData, + }), + + create: telnyxMethod({ + method: 'POST', + + transformResponseData: transformResponseData, + }), + + retrieve: telnyxMethod({ + method: 'GET', + path: '/{id}', + urlParams: ['id'], + + transformResponseData: transformResponseData, + }), +}); diff --git a/src/resources/GlobalIps.ts b/src/resources/GlobalIps.ts new file mode 100644 index 0000000..5ceba59 --- /dev/null +++ b/src/resources/GlobalIps.ts @@ -0,0 +1,44 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const GlobalIps = TelnyxResource.extend({ + path: 'global_ips', + includeBasic: ['delete', 'list', 'retrieve'], + + DeleteGlobalIpAssignment: telnyxMethod({ + method: 'DELETE', + path: '/global_ip_assignments/{id}', + }), + DeleteGlobalIpHealthCheck: telnyxMethod({ + method: 'DELETE', + path: '/global_ip_health/checks/{id}', + }), + DeleteGlobalIp: telnyxMethod({ + method: 'DELETE', + path: '/global/ips/{id}', + }), + ListGlobalIpAssignments: telnyxMethod({ + method: 'GET', + path: '/global_ip_assignments', + }), + ListGlobalIpProtocols: telnyxMethod({ + method: 'GET', + path: '/global_ip_protocols', + }), + ListGlobalIps: telnyxMethod({ + method: 'GET', + path: '/global/ips', + }), + ListGlobalIpHealthChecks: telnyxMethod({ + method: 'GET', + path: '/global_ip_health/checks', + }), + ListGlobalIpAllowedPorts: telnyxMethod({ + method: 'GET', + path: '/global_ip_allowed/ports', + }), + ListGlobalIpHealthCheckTypes: telnyxMethod({ + method: 'GET', + path: '/global_ip_health/check/types', + }), +}); diff --git a/src/resources/InboundChannels.ts b/src/resources/InboundChannels.ts new file mode 100644 index 0000000..ae91c21 --- /dev/null +++ b/src/resources/InboundChannels.ts @@ -0,0 +1,12 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const InboundChannels = TelnyxResource.extend({ + path: 'inbound_channels', + includeBasic: ['list', 'retrieve'], + + ListInboundChannels: telnyxMethod({ + method: 'GET', + path: '/phone_numbers/inbound_channels', + }), +}); diff --git a/src/resources/InventoryCoverage.ts b/src/resources/InventoryCoverage.ts new file mode 100644 index 0000000..619a12e --- /dev/null +++ b/src/resources/InventoryCoverage.ts @@ -0,0 +1,11 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const InventoryCoverage = TelnyxResource.extend({ + path: 'inventory_coverage', + + request: telnyxMethod({ + method: 'GET', + methodType: 'list', + }), +}); diff --git a/src/resources/InventoryLevel.ts b/src/resources/InventoryLevel.ts new file mode 100644 index 0000000..f3b76e7 --- /dev/null +++ b/src/resources/InventoryLevel.ts @@ -0,0 +1,12 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const InventoryLevel = TelnyxResource.extend({ + path: 'inventory_level', + includeBasic: ['list', 'retrieve'], + + CreateInventoryCoverage: telnyxMethod({ + method: 'GET', + path: '/inventory_coverage', + }), +}); diff --git a/src/resources/IpAddresses.ts b/src/resources/IpAddresses.ts new file mode 100644 index 0000000..bee4e32 --- /dev/null +++ b/src/resources/IpAddresses.ts @@ -0,0 +1,17 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const IpAddresses = TelnyxResource.extend({ + path: 'ip_addresses', + includeBasic: ['list', 'retrieve', 'delete'], + + ListAccessIpAddresses: telnyxMethod({ + method: 'GET', + path: '/access_ip_address', + }), + DeleteAccessIpAddress: telnyxMethod({ + method: 'DELETE', + path: '/access_ip_address_{access_ip_address_id}', + urlParams: ['access_ip_address_id'], + }), +}); diff --git a/src/resources/IpConnections.ts b/src/resources/IpConnections.ts new file mode 100644 index 0000000..72325a6 --- /dev/null +++ b/src/resources/IpConnections.ts @@ -0,0 +1,53 @@ +import TelnyxResource from '../TelnyxResource'; +import * as utils from '../utils'; +const telnyxMethod = TelnyxResource.method; + +import {ResponsePayload, TelnyxObject} from '../Types'; + +function transformResponseData( + response: ResponsePayload, + telnyx: TelnyxObject, +) { + return utils.addResourceToResponseData(response, telnyx, 'ipConnections', { + del: telnyxMethod({ + method: 'DELETE', + path: '/{ipConnectionId}', + urlParams: ['ipConnectionId'], + paramsValues: [response.data.id as string], + paramsNames: ['id'], + }), + + update: telnyxMethod({ + method: 'PATCH', + path: '/{ipConnectionId}', + urlParams: ['ipConnectionId'], + paramsValues: [response.data.id as string], + paramsNames: ['id'], + }), + }); +} + +export const IpConnections = TelnyxResource.extend({ + path: 'ip_connections', + + list: telnyxMethod({ + method: 'GET', + methodType: 'list', + + transformResponseData: transformResponseData, + }), + + create: telnyxMethod({ + method: 'POST', + + transformResponseData: transformResponseData, + }), + + retrieve: telnyxMethod({ + method: 'GET', + path: '/{id}', + urlParams: ['id'], + + transformResponseData: transformResponseData, + }), +}); diff --git a/src/resources/IpRanges.ts b/src/resources/IpRanges.ts new file mode 100644 index 0000000..87f8ebd --- /dev/null +++ b/src/resources/IpRanges.ts @@ -0,0 +1,17 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const IpRanges = TelnyxResource.extend({ + path: 'ip_ranges', + includeBasic: ['list', 'retrieve', 'delete'], + + ListAccessIpRanges: telnyxMethod({ + method: 'GET', + path: '/access_ip_ranges', + }), + undefined: telnyxMethod({ + method: 'DELETE', + path: '/access_ip_ranges/{access_ip_range_id}', + urlParams: ['access_ip_range_id'], + }), +}); diff --git a/src/resources/Ips.ts b/src/resources/Ips.ts new file mode 100644 index 0000000..f402595 --- /dev/null +++ b/src/resources/Ips.ts @@ -0,0 +1,53 @@ +import TelnyxResource from '../TelnyxResource'; +import * as utils from '../utils'; +const telnyxMethod = TelnyxResource.method; + +import {ResponsePayload, TelnyxObject} from '../Types'; + +function transformResponseData( + response: ResponsePayload, + telnyx: TelnyxObject, +) { + return utils.addResourceToResponseData(response, telnyx, 'ips', { + del: telnyxMethod({ + method: 'DELETE', + path: '/{ipId}', + urlParams: ['ipId'], + paramsValues: [response.data.id as string], + paramsNames: ['id'], + }), + + update: telnyxMethod({ + method: 'PATCH', + path: '/{ipId}', + urlParams: ['ipId'], + paramsValues: [response.data.id as string], + paramsNames: ['id'], + }), + }); +} + +export const Ips = TelnyxResource.extend({ + path: 'ips', + + list: telnyxMethod({ + method: 'GET', + methodType: 'list', + + transformResponseData: transformResponseData, + }), + + create: telnyxMethod({ + method: 'POST', + + transformResponseData: transformResponseData, + }), + + retrieve: telnyxMethod({ + method: 'GET', + path: '/{id}', + urlParams: ['id'], + + transformResponseData: transformResponseData, + }), +}); diff --git a/src/resources/ManagedAccounts.ts b/src/resources/ManagedAccounts.ts new file mode 100644 index 0000000..2340427 --- /dev/null +++ b/src/resources/ManagedAccounts.ts @@ -0,0 +1,60 @@ +import TelnyxResource from '../TelnyxResource'; +import * as utils from '../utils'; +const telnyxMethod = TelnyxResource.method; + +import {ResponsePayload, TelnyxObject} from '../Types'; + +function transformResponseData( + response: ResponsePayload, + telnyx: TelnyxObject, +) { + return utils.addResourceToResponseData(response, telnyx, 'managedAccounts', { + update: telnyxMethod({ + method: 'PATCH', + path: '/managed_accounts/{id}', + paramsValues: [response.data.id as string], + paramsNames: ['id'], + }), + }); +} + +export const ManagedAccounts = TelnyxResource.extend({ + path: '/managed_accounts', + list: telnyxMethod({ + method: 'GET', + transformResponseData: transformResponseData, + }), + create: telnyxMethod({ + method: 'POST', + + transformResponseData: transformResponseData, + }), + retrieveManagedAccount: telnyxMethod({ + method: 'GET', + path: '/{id}', + urlParams: ['id'], + + transformResponseData: transformResponseData, + }), + updateManagedAccount: telnyxMethod({ + method: 'PATCH', + path: '/{id}', + urlParams: ['id'], + + transformResponseData: transformResponseData, + }), + disableAccount: telnyxMethod({ + method: 'POST', + path: '/{id}/actions/disable', + urlParams: ['id'], + + transformResponseData: transformResponseData, + }), + enableAccount: telnyxMethod({ + method: 'POST', + path: '/{id}/actions/enable', + urlParams: ['id'], + + transformResponseData: transformResponseData, + }), +}); diff --git a/src/resources/MdrDetailReports.ts b/src/resources/MdrDetailReports.ts new file mode 100644 index 0000000..6d73d29 --- /dev/null +++ b/src/resources/MdrDetailReports.ts @@ -0,0 +1,21 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const MdrDetailReports = TelnyxResource.extend({ + path: 'mdr_detail_reports', + includeBasic: ['list', 'retrieve', 'delete'], + + GetCdrRequests: telnyxMethod({ + method: 'GET', + path: '/reports/batch_mdr_reports', + }), + GetPaginatedMdrs: telnyxMethod({ + method: 'GET', + path: '/reports/mdrs', + }), + DeleteMdrRequest: telnyxMethod({ + method: 'DELETE', + path: '/reports/batch_mdr_reports/{id}', + urlParams: ['id'], + }), +}); diff --git a/src/resources/MdrUsageReports.ts b/src/resources/MdrUsageReports.ts new file mode 100644 index 0000000..b927df1 --- /dev/null +++ b/src/resources/MdrUsageReports.ts @@ -0,0 +1,21 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const MdrUsageReports = TelnyxResource.extend({ + path: 'mdr_usage_reports', + includeBasic: ['delete', 'list', 'retrieve'], + + DeleteUsageReport: telnyxMethod({ + method: 'DELETE', + path: '/reports/mdr_/usage_reports/{id}', + urlParams: ['id'], + }), + GetUsageReportSync: telnyxMethod({ + method: 'GET', + path: '/reports/mdr_/usage_reports/sync', + }), + GetUsageReports: telnyxMethod({ + method: 'GET', + path: '/reports/mdr_/usage_reports', + }), +}); diff --git a/src/resources/MediaStorageApi.ts b/src/resources/MediaStorageApi.ts new file mode 100644 index 0000000..ed30280 --- /dev/null +++ b/src/resources/MediaStorageApi.ts @@ -0,0 +1,20 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const MediaStorageApi = TelnyxResource.extend({ + path: 'media_storage_api', + includeBasic: ['delete', 'list', 'retrieve'], + + DeleteMediaStorage: telnyxMethod({ + method: 'DELETE', + path: '/media/{media/name}', + }), + DownloadMedia: telnyxMethod({ + method: 'GET', + path: '/media/{media_name}/download', + }), + ListMediaStorage: telnyxMethod({ + method: 'GET', + path: '/media', + }), +}); diff --git a/src/resources/Messages.ts b/src/resources/Messages.ts new file mode 100644 index 0000000..94024b2 --- /dev/null +++ b/src/resources/Messages.ts @@ -0,0 +1,11 @@ +import TelnyxResource from '../TelnyxResource'; +import {MessagesAlphanumericSenderId} from './MessagesAlphanumericSenderId'; + +export const Messages = TelnyxResource.extend({ + path: 'messages', + includeBasic: ['create', 'retrieve'], + + nestedResources: { + AlphanumericSenderId: MessagesAlphanumericSenderId, + }, +}); diff --git a/src/resources/MessagesAlphanumericSenderId.ts b/src/resources/MessagesAlphanumericSenderId.ts new file mode 100644 index 0000000..b5ab906 --- /dev/null +++ b/src/resources/MessagesAlphanumericSenderId.ts @@ -0,0 +1,6 @@ +import TelnyxResource from '../TelnyxResource'; + +export const MessagesAlphanumericSenderId = TelnyxResource.extend({ + path: 'messages/alphanumeric_sender_id', + includeBasic: ['create'], +}); diff --git a/src/resources/MessagingHostedNumber.ts b/src/resources/MessagingHostedNumber.ts new file mode 100644 index 0000000..43307a1 --- /dev/null +++ b/src/resources/MessagingHostedNumber.ts @@ -0,0 +1,27 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const MessagingHostedNumber = TelnyxResource.extend({ + path: 'messaging_hosted_number', + includeBasic: ['list', 'retrieve', 'delete', 'create'], + + ListMessagingHostedNumberOrders: telnyxMethod({ + method: 'GET', + path: '/messaging_hosted_number_orders', + }), + DeleteMessagingHostedNumber: telnyxMethod({ + method: 'DELETE', + path: '/messaging_hosted_numbers/{id}', + urlParams: ['id'], + }), + GetMessagingHostedNumberOrder: telnyxMethod({ + method: 'GET', + path: '/messaging_hosted_number_orders/{id}', + urlParams: ['id'], + }), + UploadMessagingHostedNumberOrderFile: telnyxMethod({ + method: 'POST', + path: '/messaging_hosted_number_orders/{id}/actions/file_upload', + urlParams: ['id'], + }), +}); diff --git a/src/resources/MessagingHostedNumberOrders.ts b/src/resources/MessagingHostedNumberOrders.ts new file mode 100644 index 0000000..2b4bd60 --- /dev/null +++ b/src/resources/MessagingHostedNumberOrders.ts @@ -0,0 +1,6 @@ +import TelnyxResource from '../TelnyxResource'; + +export const MessagingHostedNumberOrders = TelnyxResource.extend({ + path: 'messaging_hosted_number_orders', + includeBasic: ['list', 'retrieve', 'create', 'del'], +}); diff --git a/src/resources/MessagingHostedNumbers.ts b/src/resources/MessagingHostedNumbers.ts new file mode 100644 index 0000000..5595286 --- /dev/null +++ b/src/resources/MessagingHostedNumbers.ts @@ -0,0 +1,6 @@ +import TelnyxResource from '../TelnyxResource'; + +export const MessagingHostedNumbers = TelnyxResource.extend({ + path: '../id/actions/file_upload', + includeBasic: ['retrieve'], +}); diff --git a/src/resources/MessagingPhoneNumbers.ts b/src/resources/MessagingPhoneNumbers.ts new file mode 100644 index 0000000..d74e67e --- /dev/null +++ b/src/resources/MessagingPhoneNumbers.ts @@ -0,0 +1,6 @@ +import TelnyxResource from '../TelnyxResource'; + +export const MessagingPhoneNumbers = TelnyxResource.extend({ + path: 'messaging_phone_numbers', + includeBasic: ['list', 'retrieve', 'update'], +}); diff --git a/src/resources/MessagingProfiles.ts b/src/resources/MessagingProfiles.ts index c475d48..a94a2fa 100644 --- a/src/resources/MessagingProfiles.ts +++ b/src/resources/MessagingProfiles.ts @@ -12,13 +12,13 @@ const ACTIONS = [ 'metrics', ]; -function getSpec(messagingProfileId: string) { +function getSpec(messagingProfileId?: string) { return function (methodName: string) { return { method: 'GET', path: `/{messagingProfileId}/${methodName}`, urlParams: ['messagingProfileId'], - paramsValues: [messagingProfileId], + paramsValues: [messagingProfileId as string], paramsNames: ['id'], methodType: 'list', }; diff --git a/src/resources/MessagingSenderIds.ts b/src/resources/MessagingSenderIds.ts new file mode 100644 index 0000000..b469e29 --- /dev/null +++ b/src/resources/MessagingSenderIds.ts @@ -0,0 +1,6 @@ +import TelnyxResource from '../TelnyxResource'; + +export const MessagingSenderIds = TelnyxResource.extend({ + path: 'alphanumeric_sender_ids', // THIS URL DOES NOT EXISTS ON DOCS + includeBasic: ['list', 'retrieve', 'create', 'del'], +}); diff --git a/src/resources/MessagingShortCodes.ts b/src/resources/MessagingShortCodes.ts new file mode 100644 index 0000000..483f3dd --- /dev/null +++ b/src/resources/MessagingShortCodes.ts @@ -0,0 +1,6 @@ +import TelnyxResource from '../TelnyxResource'; + +export const MessagingShortCodes = TelnyxResource.extend({ + path: 'short_codes', + includeBasic: ['list', 'retrieve', 'update'], +}); diff --git a/src/resources/MessagingTollfreeVerification.ts b/src/resources/MessagingTollfreeVerification.ts new file mode 100644 index 0000000..420ffc9 --- /dev/null +++ b/src/resources/MessagingTollfreeVerification.ts @@ -0,0 +1,17 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const MessagingTollfreeVerification = TelnyxResource.extend({ + path: 'messaging/tollfree_verification', + includeBasic: ['list', 'retrieve', 'delete'], + + ListVerificationRequests: telnyxMethod({ + method: 'GET', + path: '/messaging/tollfree_verification_requests', + }), + DeleteVerificationRequest: telnyxMethod({ + method: 'DELETE', + path: '/messaging/tollfree_verification_requests_{id}', + urlParams: ['id'], + }), +}); diff --git a/src/resources/MessagingUrlDomains.ts b/src/resources/MessagingUrlDomains.ts new file mode 100644 index 0000000..00a1ae4 --- /dev/null +++ b/src/resources/MessagingUrlDomains.ts @@ -0,0 +1,12 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const MessagingUrlDomains = TelnyxResource.extend({ + path: 'messaging/url_domains', + includeBasic: ['list', 'retrieve'], + + ListMessagingUrlDomains: telnyxMethod({ + method: 'GET', + path: '/messaging/url_domains', + }), +}); diff --git a/src/resources/MobileNetworkOperators.ts b/src/resources/MobileNetworkOperators.ts new file mode 100644 index 0000000..bb771c4 --- /dev/null +++ b/src/resources/MobileNetworkOperators.ts @@ -0,0 +1,12 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const MobileNetworkOperators = TelnyxResource.extend({ + path: 'mobile_network_operators', + includeBasic: ['list', 'retrieve'], + + GetMobileNetworkOperators: telnyxMethod({ + method: 'GET', + path: '/mobile_network_operators', + }), +}); diff --git a/src/resources/MobileOperatorNetworks.ts b/src/resources/MobileOperatorNetworks.ts new file mode 100644 index 0000000..dcee071 --- /dev/null +++ b/src/resources/MobileOperatorNetworks.ts @@ -0,0 +1,6 @@ +import TelnyxResource from '../TelnyxResource'; + +export const MobileOperatorNetworks = TelnyxResource.extend({ + path: 'mobile_operator_networks', + includeBasic: ['list'], +}); diff --git a/src/resources/Networks.ts b/src/resources/Networks.ts new file mode 100644 index 0000000..eb4af33 --- /dev/null +++ b/src/resources/Networks.ts @@ -0,0 +1,24 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const Networks = TelnyxResource.extend({ + path: 'networks', + includeBasic: ['delete', 'list', 'retrieve'], + + DeleteNetwork: telnyxMethod({ + method: 'DELETE', + path: '/networks/{id}', + }), + ListNetworkInterfaces: telnyxMethod({ + method: 'GET', + path: '/networks/{id}/network_interfaces', + }), + ListNetworks: telnyxMethod({ + method: 'GET', + path: '/networks', + }), + DeleteDefaultGateway: telnyxMethod({ + method: 'DELETE', + path: '/networks/{id}/default_gateway', + }), +}); diff --git a/src/resources/NumberBackgroundJobs.ts b/src/resources/NumberBackgroundJobs.ts new file mode 100644 index 0000000..85761de --- /dev/null +++ b/src/resources/NumberBackgroundJobs.ts @@ -0,0 +1,22 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const NumberBackgroundJobs = TelnyxResource.extend({ + path: 'phone_numbers/jobs', + includeBasic: ['list', 'retrieve'], + + updateEmergencySettings: telnyxMethod({ + method: 'POST', + path: '/update_emergency_settings', + }), + + updateNumbers: telnyxMethod({ + method: 'POST', + path: '/update_phone_numbers', + }), + + deleteNumbers: telnyxMethod({ + method: 'POST', + path: '/delete_phone_numbers', + }), +}); diff --git a/src/resources/NumberLookup.ts b/src/resources/NumberLookup.ts new file mode 100644 index 0000000..a9b9c6d --- /dev/null +++ b/src/resources/NumberLookup.ts @@ -0,0 +1,6 @@ +import TelnyxResource from '../TelnyxResource'; + +export const NumberLookup = TelnyxResource.extend({ + path: 'number_lookup', + includeBasic: ['retrieve'], +}); diff --git a/src/resources/NumberOrderDocuments.ts b/src/resources/NumberOrderDocuments.ts new file mode 100644 index 0000000..f7d23b0 --- /dev/null +++ b/src/resources/NumberOrderDocuments.ts @@ -0,0 +1,12 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const NumberOrderDocuments = TelnyxResource.extend({ + path: 'number_order_documents', + includeBasic: ['list', 'retrieve', 'update'], + + upload: telnyxMethod({ + method: 'POST', + methodType: 'create', + }), +}); diff --git a/src/resources/NumberOrders.ts b/src/resources/NumberOrders.ts new file mode 100644 index 0000000..ade46b9 --- /dev/null +++ b/src/resources/NumberOrders.ts @@ -0,0 +1,6 @@ +import TelnyxResource from '../TelnyxResource'; + +export const NumberOrders = TelnyxResource.extend({ + path: 'number_orders', + includeBasic: ['list', 'retrieve', 'create', 'update'], +}); diff --git a/src/resources/NumberPortouts.ts b/src/resources/NumberPortouts.ts new file mode 100644 index 0000000..27cf428 --- /dev/null +++ b/src/resources/NumberPortouts.ts @@ -0,0 +1,74 @@ +import TelnyxResource from '../TelnyxResource'; +import * as utils from '../utils'; +const telnyxMethod = TelnyxResource.method; + +import {ResponsePayload, TelnyxObject} from '../Types'; + +function transformResponseData( + response: ResponsePayload, + telnyx: TelnyxObject, +) { + return utils.addResourceToResponseData(response, telnyx, 'numberPortouts', { + del: telnyxMethod({ + method: 'DELETE', + path: '/portouts', + urlParams: ['portouts'], + paramsValues: [response.data.id as string], + paramsNames: ['id'], + }), + + update: telnyxMethod({ + method: 'PATCH', + path: '/portouts', + urlParams: ['portouts'], + paramsValues: [response.data.id as string], + paramsNames: ['id'], + }), + }); +} + +export const NumberPortouts = TelnyxResource.extend({ + path: 'portouts', + list: telnyxMethod({ + method: 'GET', + transformResponseData: transformResponseData, + }), + retrieve: telnyxMethod({ + method: 'GET', + path: '/{id}', + urlParams: ['id'], + + transformResponseData: transformResponseData, + }), + retrieveComments: telnyxMethod({ + method: 'GET', + path: '/{id}/comments', + urlParams: ['id'], + + transformResponseData: transformResponseData, + }), + create: telnyxMethod({ + path: '/{id}/comments', + urlParams: ['id'], + method: 'POST', + transformResponseData: transformResponseData, + }), + listSupportingDocuments: telnyxMethod({ + method: 'GET', + path: '/{id}/supporting_documents', + urlParams: ['id'], + transformResponseData: transformResponseData, + }), + createListOfSupportingDocuments: telnyxMethod({ + method: 'POST', + path: '/{id}/supporting_documents', + urlParams: ['id'], + transformResponseData: transformResponseData, + }), + updateStatus: telnyxMethod({ + method: 'PATCH', + path: '/{id}/{status}', + urlParams: ['id'], + transformResponseData: transformResponseData, + }), +}); diff --git a/src/resources/NumberReservations.ts b/src/resources/NumberReservations.ts new file mode 100644 index 0000000..877550c --- /dev/null +++ b/src/resources/NumberReservations.ts @@ -0,0 +1,30 @@ +import TelnyxResource from '../TelnyxResource'; +import * as utils from '../utils'; +const telnyxMethod = TelnyxResource.method; + +export const NumberReservations = TelnyxResource.extend({ + path: 'number_reservations', + includeBasic: ['list', 'retrieve'], + + create: telnyxMethod({ + method: 'POST', + + transformResponseData: function (response, telnyx) { + return utils.addResourceToResponseData( + response, + telnyx, + 'numberReservations', + { + extend: telnyxMethod({ + method: 'POST', + path: '/{numberReservationId}/actions/extend', + urlParams: ['numberReservationId'], + paramsValues: [response.data.id as string], + paramsNames: ['id'], + methodType: 'create', + }), + }, + ); + }, + }), +}); diff --git a/src/resources/NumbersFeatures.ts b/src/resources/NumbersFeatures.ts new file mode 100644 index 0000000..5cb832e --- /dev/null +++ b/src/resources/NumbersFeatures.ts @@ -0,0 +1,12 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const NumbersFeatures = TelnyxResource.extend({ + path: 'numbers_features', + includeBasic: ['create'], + + PostNumbersFeatures: telnyxMethod({ + method: 'POST', + path: '/numbers_features', + }), +}); diff --git a/src/resources/Object.ts b/src/resources/Object.ts new file mode 100644 index 0000000..fb3be4d --- /dev/null +++ b/src/resources/Object.ts @@ -0,0 +1,18 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const Object = TelnyxResource.extend({ + path: 'object', + includeBasic: ['delete'], + + DeleteObject: telnyxMethod({ + method: 'DELETE', + path: '/{bucketName}/{objectName}', + urlParams: ['bucketName', 'objectName'], + }), + DeleteBucket: telnyxMethod({ + method: 'DELETE', + path: '/{bucketName}', + urlParams: ['bucketName'], + }), +}); diff --git a/src/resources/OtaUpdates.ts b/src/resources/OtaUpdates.ts new file mode 100644 index 0000000..f5168ff --- /dev/null +++ b/src/resources/OtaUpdates.ts @@ -0,0 +1,16 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const OtaUpdates = TelnyxResource.extend({ + path: 'ota_updates', + includeBasic: ['list', 'retrieve'], + + GetOtaUpdate: telnyxMethod({ + method: 'GET', + path: '/ota_updates/{id}', + }), + ListOtaUpdates: telnyxMethod({ + method: 'GET', + path: '/ota_updates', + }), +}); diff --git a/src/resources/Outbound.ts b/src/resources/Outbound.ts new file mode 100644 index 0000000..7956f3e --- /dev/null +++ b/src/resources/Outbound.ts @@ -0,0 +1,58 @@ +import TelnyxResource from '../TelnyxResource'; +import * as utils from '../utils'; +const telnyxMethod = TelnyxResource.method; + +import {ResponsePayload, TelnyxObject} from '../Types'; + +function transformResponseData( + response: ResponsePayload, + telnyx: TelnyxObject, +) { + return utils.addResourceToResponseData( + response, + telnyx, + 'outboundVoiceProfiles', + { + del: telnyxMethod({ + method: 'DELETE', + path: '/{outboundId}', + urlParams: ['outboundId'], + paramsValues: [response.data.id as string], + paramsNames: ['id'], + }), + + update: telnyxMethod({ + method: 'PATCH', + path: '/{outboundId}', + urlParams: ['outboundId'], + paramsValues: [response.data.id as string], + paramsNames: ['id'], + }), + }, + ); +} + +export const Outbound = TelnyxResource.extend({ + path: 'outbound_voice_profiles', + + list: telnyxMethod({ + method: 'GET', + methodType: 'list', + + transformResponseData: transformResponseData, + }), + + create: telnyxMethod({ + method: 'POST', + + transformResponseData: transformResponseData, + }), + + retrieve: telnyxMethod({ + method: 'GET', + path: '/{id}', + urlParams: ['id'], + + transformResponseData: transformResponseData, + }), +}); diff --git a/src/resources/OutboundVoiceProfiles.ts b/src/resources/OutboundVoiceProfiles.ts new file mode 100644 index 0000000..62a8aaa --- /dev/null +++ b/src/resources/OutboundVoiceProfiles.ts @@ -0,0 +1,16 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const OutboundVoiceProfiles = TelnyxResource.extend({ + path: 'outbound_voice_profiles', + includeBasic: ['list', 'retrieve', 'delete'], + + ListOutboundVoiceProfiles: telnyxMethod({ + method: 'GET', + path: '/outbound_voice_profiles', + }), + DeleteOutboundVoiceProfile: telnyxMethod({ + method: 'DELETE', + path: '/outbound_voice_profiles/{id}', + }), +}); diff --git a/src/resources/PhoneNumberAssignmentByProfile.ts b/src/resources/PhoneNumberAssignmentByProfile.ts new file mode 100644 index 0000000..28f3078 --- /dev/null +++ b/src/resources/PhoneNumberAssignmentByProfile.ts @@ -0,0 +1,58 @@ +import TelnyxResource from '../TelnyxResource'; +import * as utils from '../utils'; +const telnyxMethod = TelnyxResource.method; + +import {ResponsePayload, TelnyxObject} from '../Types'; + +function transformResponseData( + response: ResponsePayload, + telnyx: TelnyxObject, +) { + return utils.addResourceToResponseData( + response, + telnyx, + 'phoneNumberAssignmentByProfile', + { + del: telnyxMethod({ + method: 'DELETE', + path: '/{phoneNumberAssignmentByProfileId}', + urlParams: ['phoneNumberAssignmentByProfileId'], + paramsValues: [response.data.id as string], + paramsNames: ['id'], + }), + + update: telnyxMethod({ + method: 'PATCH', + path: '/{phoneNumberAssignmentByProfileId}', + urlParams: ['phoneNumberAssignmentByProfileId'], + paramsValues: [response.data.id as string], + paramsNames: ['id'], + }), + }, + ); +} + +export const PhoneNumberAssignmentByProfile = TelnyxResource.extend({ + path: 'phoneNumberAssignmentByProfile', + + create: telnyxMethod({ + method: 'POST', + transformResponseData: transformResponseData, + }), + + retrieveTaskStatus: telnyxMethod({ + method: 'GET', + path: '/{taskId}', + urlParams: ['taskId'], + + transformResponseData: transformResponseData, + }), + + retrievePhoneNumberStatus: telnyxMethod({ + method: 'GET', + path: '/{taskId}/phoneNumbers', + urlParams: ['taskId'], + + transformResponseData: transformResponseData, + }), +}); diff --git a/src/resources/PhoneNumberBlockOrders.ts b/src/resources/PhoneNumberBlockOrders.ts new file mode 100644 index 0000000..514bb6d --- /dev/null +++ b/src/resources/PhoneNumberBlockOrders.ts @@ -0,0 +1,17 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const PhoneNumberBlockOrders = TelnyxResource.extend({ + path: 'phone_number_block_orders', + includeBasic: ['list', 'retrieve'], + + RetrieveNumberBlockOrder: telnyxMethod({ + method: 'GET', + path: '/number_block_orders/{number_block_order_id}', + urlParams: ['number_block_order_id'], + }), + ListNumberBlockOrders: telnyxMethod({ + method: 'GET', + path: '/number_block_orders', + }), +}); diff --git a/src/resources/PhoneNumberBlocksBackgroundJobs.ts b/src/resources/PhoneNumberBlocksBackgroundJobs.ts new file mode 100644 index 0000000..9ac80cb --- /dev/null +++ b/src/resources/PhoneNumberBlocksBackgroundJobs.ts @@ -0,0 +1,21 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const PhoneNumberBlocksBackgroundJobs = TelnyxResource.extend({ + path: 'phone_number_blocks_background_jobs', + includeBasic: ['create', 'list', 'retrieve'], + + CreatePhoneNumberBlockDeletionJob: telnyxMethod({ + method: 'POST', + path: 'phone_number_blocks_jobs/delete/phone_number_block', + }), + GetPhoneNumberBlocksJob: telnyxMethod({ + method: 'GET', + path: 'phone_number_blocks_jobs{id}', + urlParams: ['id'], + }), + ListPhoneNumberBlocksJobs: telnyxMethod({ + method: 'GET', + path: '/phone_number_blocks_jobs', + }), +}); diff --git a/src/resources/PhoneNumberCampaigns.ts b/src/resources/PhoneNumberCampaigns.ts new file mode 100644 index 0000000..e580d80 --- /dev/null +++ b/src/resources/PhoneNumberCampaigns.ts @@ -0,0 +1,17 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const PhoneNumberCampaigns = TelnyxResource.extend({ + path: 'phone_number_campaigns', + includeBasic: ['delete', 'list', 'retrieve'], + + DeletePhoneNumberCampaign: telnyxMethod({ + method: 'DELETE', + path: '/phone_number_campaigns/{phoneNumber}', + urlParams: ['phoneNumber'], + }), + GetAllPhoneNumberCampaigns: telnyxMethod({ + method: 'GET', + path: '/phone_number_campaigns', + }), +}); diff --git a/src/resources/PhoneNumberOrderDocuments.ts b/src/resources/PhoneNumberOrderDocuments.ts new file mode 100644 index 0000000..f7f840c --- /dev/null +++ b/src/resources/PhoneNumberOrderDocuments.ts @@ -0,0 +1,17 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const PhoneNumberOrderDocuments = TelnyxResource.extend({ + path: 'phone_number_order_documents', + includeBasic: ['list', 'retrieve'], + + ListNumberOrderDocuments: telnyxMethod({ + method: 'GET', + path: '/number_order_documents', + }), + RetrieveNumberOrderDocument: telnyxMethod({ + method: 'GET', + path: '/number_order_documents/{number_order_document_id}', + urlParams: ['number_order_document_id'], + }), +}); diff --git a/src/resources/PhoneNumberRegulatoryRequirements.ts b/src/resources/PhoneNumberRegulatoryRequirements.ts new file mode 100644 index 0000000..48a5441 --- /dev/null +++ b/src/resources/PhoneNumberRegulatoryRequirements.ts @@ -0,0 +1,7 @@ +import TelnyxResource from '../TelnyxResource'; + +export const PhoneNumberRegulatoryRequirements = TelnyxResource.extend({ + path: 'phone_numbers_regulatory_requirements', + + includeBasic: ['list'], +}); diff --git a/src/resources/PhoneNumberSearch.ts b/src/resources/PhoneNumberSearch.ts new file mode 100644 index 0000000..fa7c6ee --- /dev/null +++ b/src/resources/PhoneNumberSearch.ts @@ -0,0 +1,16 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const PhoneNumberSearch = TelnyxResource.extend({ + path: 'phone_number_search', + includeBasic: ['list', 'retrieve'], + + ListAvailablePhoneNumbers: telnyxMethod({ + method: 'GET', + path: '/available_phone_numbers', + }), + ListAvailablePhoneNumberBlocks: telnyxMethod({ + method: 'GET', + path: '/available_phone_number_blocks', + }), +}); diff --git a/src/resources/PhoneNumbers.ts b/src/resources/PhoneNumbers.ts new file mode 100644 index 0000000..b14ed1e --- /dev/null +++ b/src/resources/PhoneNumbers.ts @@ -0,0 +1,49 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +import {PhoneNumbersMessaging} from './PhoneNumbersMessaging'; +import {PhoneNumbersVoice} from './PhoneNumbersVoice'; +import {PhoneNumbersInboundChannels} from './PhoneNumbersInboundChannels'; + +export const PhoneNumbers = TelnyxResource.extend({ + path: 'phone_numbers', + includeBasic: ['list', 'retrieve', 'update', 'del'], + + nestedResources: { + Messaging: PhoneNumbersMessaging, + Voice: PhoneNumbersVoice, + Inbound: PhoneNumbersInboundChannels, + }, + + retrieveVoiceSettings: telnyxMethod({ + method: 'GET', + path: '/{id}/voice', + urlParams: ['id'], + methodType: 'retrieve', + }), + + updateVoiceSettings: telnyxMethod({ + method: 'PATCH', + path: '/{id}/voice', + urlParams: ['id'], + }), + + retrieveMessagingSettings: telnyxMethod({ + method: 'GET', + path: '/{id}/messaging', + urlParams: ['id'], + methodType: 'retrieve', + }), + + updateMessagingSettings: telnyxMethod({ + method: 'PATCH', + path: '/{id}/messaging', + urlParams: ['id'], + }), + + setEmergencySettings: telnyxMethod({ + method: 'POST', + path: '/{id}/actions/enable_emergency', + urlParams: ['id'], + }), +}); diff --git a/src/resources/PhoneNumbersInboundChannels.ts b/src/resources/PhoneNumbersInboundChannels.ts new file mode 100644 index 0000000..37501d5 --- /dev/null +++ b/src/resources/PhoneNumbersInboundChannels.ts @@ -0,0 +1,37 @@ +import TelnyxResource from '../TelnyxResource'; +import * as utils from '../utils'; +const telnyxMethod = TelnyxResource.method; + +import {ResponsePayload, TelnyxObject} from '../Types'; + +function transformResponseData( + response: ResponsePayload, + telnyx: TelnyxObject, +) { + return utils.addResourceToResponseData( + response, + telnyx, + 'phoneNumbersInboundChannels', + { + update: telnyxMethod({ + method: 'PATCH', + path: '', + urlParams: ['channels'], + paramsValues: [response.data.id as string], + paramsNames: ['channels'], + }), + }, + ); +} + +export const PhoneNumbersInboundChannels = TelnyxResource.extend({ + path: 'phone_numbers/inbound_channels', + + retrieve: telnyxMethod({ + method: 'GET', + path: '', + urlParams: [], + + transformResponseData: transformResponseData, + }), +}); diff --git a/src/resources/PhoneNumbersMessaging.ts b/src/resources/PhoneNumbersMessaging.ts new file mode 100644 index 0000000..626aa61 --- /dev/null +++ b/src/resources/PhoneNumbersMessaging.ts @@ -0,0 +1,6 @@ +import TelnyxResource from '../TelnyxResource'; + +export const PhoneNumbersMessaging = TelnyxResource.extend({ + path: 'phone_numbers/messaging', + includeBasic: ['list'], +}); diff --git a/src/resources/PhoneNumbersVoice.ts b/src/resources/PhoneNumbersVoice.ts new file mode 100644 index 0000000..684fdb4 --- /dev/null +++ b/src/resources/PhoneNumbersVoice.ts @@ -0,0 +1,6 @@ +import TelnyxResource from '../TelnyxResource'; + +export const PhoneNumbersVoice = TelnyxResource.extend({ + path: 'phone_numbers/voice', + includeBasic: ['list'], +}); diff --git a/src/resources/PortabilityChecks.ts b/src/resources/PortabilityChecks.ts new file mode 100644 index 0000000..2b8bc34 --- /dev/null +++ b/src/resources/PortabilityChecks.ts @@ -0,0 +1,10 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const PortabilityChecks = TelnyxResource.extend({ + path: 'portability_checks', + + run: telnyxMethod({ + method: 'POST', + }), +}); diff --git a/src/resources/PortingOrders.ts b/src/resources/PortingOrders.ts new file mode 100644 index 0000000..7460538 --- /dev/null +++ b/src/resources/PortingOrders.ts @@ -0,0 +1,105 @@ +import TelnyxResource from '../TelnyxResource'; +import * as utils from '../utils'; +const telnyxMethod = TelnyxResource.method; + +import {ResponsePayload, TelnyxObject} from '../Types'; + +function transformResponseData( + response: ResponsePayload, + telnyx: TelnyxObject, +) { + return utils.addResourceToResponseData(response, telnyx, 'portingOrders', { + del: telnyxMethod({ + method: 'DELETE', + path: '/{portingOrderId}', + urlParams: ['portingOrderId'], + paramsValues: [response.data.id as string], + paramsNames: ['id'], + }), + + update: telnyxMethod({ + method: 'PATCH', + path: '/{portingOrderId}', + urlParams: ['portingOrderId'], + paramsValues: [response.data.id as string], + paramsNames: ['id'], + }), + }); +} + +export const PortingOrders = TelnyxResource.extend({ + path: 'porting_orders', + + list: telnyxMethod({ + method: 'GET', + methodType: 'list', + + transformResponseData: transformResponseData, + }), + + create: telnyxMethod({ + method: 'POST', + methodType: 'create', + + transformResponseData: transformResponseData, + }), + + // include_phone_numbers query param + retrieve: telnyxMethod({ + method: 'GET', + path: '/{id}', + urlParams: ['id'], + + transformResponseData: transformResponseData, + }), + + listExceptionTypes: telnyxMethod({ + method: 'GET', + path: '/exception_types', + methodType: 'list', + }), + + listActivationJobs: telnyxMethod({ + method: 'GET', + path: '/{id}/activation_jobs', + methodType: 'list', + urlParams: ['id'], + }), + + cancelOrder: telnyxMethod({ + method: 'POST', + path: '/{id}/actions/cancel', + urlParams: ['id'], + }), + + listAllowedFocWindows: telnyxMethod({ + method: 'GET', + path: '/{id}/allowed_foc_windows', + methodType: 'list', + urlParams: ['id'], + }), + + retrieveLoaTemplate: telnyxMethod({ + method: 'GET', + path: '/{id}/loa_template', + urlParams: ['id'], + }), + + confirmOrder: telnyxMethod({ + method: 'POST', + path: '/{id}/actions/confirm', + urlParams: ['id'], + }), + createComment: telnyxMethod({ + method: 'POST', + path: '/{id}/comments', + methodType: 'create', + urlParams: ['id'], + }), + listComments: telnyxMethod({ + method: 'GET', + path: '/{id}/comments', + methodType: 'list', + urlParams: ['id'], + }), +}); diff --git a/src/resources/PortingPhoneNumbers.ts b/src/resources/PortingPhoneNumbers.ts new file mode 100644 index 0000000..c3e5b27 --- /dev/null +++ b/src/resources/PortingPhoneNumbers.ts @@ -0,0 +1,6 @@ +import TelnyxResource from '../TelnyxResource'; + +export const PortingPhoneNumbers = TelnyxResource.extend({ + path: 'porting_phone_numbers', + includeBasic: ['list'], +}); diff --git a/src/resources/PortoutRequests.ts b/src/resources/PortoutRequests.ts new file mode 100644 index 0000000..4f89196 --- /dev/null +++ b/src/resources/PortoutRequests.ts @@ -0,0 +1,51 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const PortoutRequests = TelnyxResource.extend({ + path: 'portouts', + includeBasic: ['list', 'retrieve'], + + updateStatus: telnyxMethod({ + method: 'PATCH', + path: '/{id}/{status}', + urlParams: ['id', 'status'], + }), + + listComments: telnyxMethod({ + method: 'GET', + path: '/{id}/comments', + urlParams: ['id'], + methodType: 'list', + }), + + createComment: telnyxMethod({ + method: 'POST', + path: '/{id}/comments', + urlParams: ['id'], + methodType: 'create', + }), + retrieveRequest: telnyxMethod({ + method: 'GET', + path: '/{id}', + urlParams: ['id'], + methodType: 'retrieve', + }), + retrieveComment: telnyxMethod({ + method: 'GET', + path: '/{id}/comments', + urlParams: ['id'], + methodType: 'retrieve', + }), + listDocuments: telnyxMethod({ + method: 'GET', + path: '/{id}/supporting_documents', + urlParams: ['id'], + methodType: 'list', + }), + createDocuments: telnyxMethod({ + method: 'POST', + path: '/{id}/supporting_documents', + urlParams: ['id'], + methodType: 'create', + }), +}); diff --git a/src/resources/PresignedObjectUrls.ts b/src/resources/PresignedObjectUrls.ts new file mode 100644 index 0000000..bfc29f2 --- /dev/null +++ b/src/resources/PresignedObjectUrls.ts @@ -0,0 +1,13 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const PresignedObjectUrls = TelnyxResource.extend({ + path: 'presigned_object_urls', + includeBasic: ['create'], + + GetPresignedObjectUrl: telnyxMethod({ + method: 'POST', + path: '/storage_buckets/{bucketName}/{objectName}/presigned_url', + urlParams: ['bucketName', 'objectName'], + }), +}); diff --git a/src/resources/PrivateWirelessGateways.ts b/src/resources/PrivateWirelessGateways.ts new file mode 100644 index 0000000..0114bb9 --- /dev/null +++ b/src/resources/PrivateWirelessGateways.ts @@ -0,0 +1,16 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const PrivateWirelessGateways = TelnyxResource.extend({ + path: 'private_wireless_gateways', + includeBasic: ['list', 'retrieve', 'delete'], + + GetPrivateWirelessGateways: telnyxMethod({ + method: 'GET', + path: '/private_wireless_gateways', + }), + DeleteWirelessGateway: telnyxMethod({ + method: 'DELETE', + path: '/private_wireless_gateways/{id}', + }), +}); diff --git a/src/resources/PublicInternetGateways.ts b/src/resources/PublicInternetGateways.ts new file mode 100644 index 0000000..3cbbb9c --- /dev/null +++ b/src/resources/PublicInternetGateways.ts @@ -0,0 +1,16 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const PublicInternetGateways = TelnyxResource.extend({ + path: 'public_internet_gateways', + includeBasic: ['delete', 'list', 'retrieve'], + + DeletePublicInternetGateway: telnyxMethod({ + method: 'DELETE', + path: '/public_internet_gateways/{id}', + }), + ListPublicInternetGateways: telnyxMethod({ + method: 'GET', + path: '/public_internet_gateways', + }), +}); diff --git a/src/resources/PublicKey.ts b/src/resources/PublicKey.ts new file mode 100644 index 0000000..b321322 --- /dev/null +++ b/src/resources/PublicKey.ts @@ -0,0 +1,10 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const PublicKey = TelnyxResource.extend({ + path: 'public_key', + + retrieve: telnyxMethod({ + method: 'GET', + }), +}); diff --git a/src/resources/PushCredentials.ts b/src/resources/PushCredentials.ts new file mode 100644 index 0000000..05846d4 --- /dev/null +++ b/src/resources/PushCredentials.ts @@ -0,0 +1,17 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const PushCredentials = TelnyxResource.extend({ + path: 'push_credentials', + includeBasic: ['list', 'retrieve', 'delete'], + + ListPushCredentials: telnyxMethod({ + method: 'GET', + path: '/mobile_push_credentials', + }), + DeletePushCredentialById: telnyxMethod({ + method: 'DELETE', + path: '/mobile_push_credentials/{push/credential/id}', + urlParams: ['push_credential_id'], + }), +}); diff --git a/src/resources/Queues.ts b/src/resources/Queues.ts new file mode 100644 index 0000000..102415c --- /dev/null +++ b/src/resources/Queues.ts @@ -0,0 +1,68 @@ +import TelnyxResource from '../TelnyxResource'; +import {ResponsePayload, TelnyxObject} from '../Types'; +import * as utils from '../utils'; +const telnyxMethod = TelnyxResource.method; + +const ACTIONS = ['calls']; + +function getSpec(queueName?: string) { + return function (methodName: string) { + return { + method: 'GET', + path: `/{queueName}/${methodName}`, + urlParams: ['queueName'], + paramsValues: [queueName as string], + paramsNames: ['queueName'], + methodType: 'list', + }; + }; +} + +function transformResponseData( + response: ResponsePayload, + telnyx: TelnyxObject, +) { + const methods = utils.createNestedMethods( + telnyxMethod, + ACTIONS, + getSpec(response.data.name as string), + ); + + methods.retrieve = telnyxMethod({ + method: 'GET', + path: '/{call_control_id}', + urlParams: ['call_control_id'], + paramsValues: [response.data.call_control_id as string], + paramsNames: ['call_control_id'], + }); + + return utils.addResourceToResponseData(response, telnyx, 'queues', methods); +} + +export const Queues = TelnyxResource.extend({ + path: 'queues', + + retrieve: telnyxMethod({ + method: 'GET', + path: '/{queue_name}', + urlParams: ['queue_name'], + + transformResponseData: transformResponseData, + }), + + list_calls: telnyxMethod({ + method: 'GET', + path: '/{queue_name}/calls', + urlParams: ['queue_name'], + + transformResponseData: transformResponseData, + }), + + retrieve_call: telnyxMethod({ + method: 'GET', + path: '/{queue_name}/calls/{call_control_id}', + urlParams: ['queue_name', 'call_control_id'], + + transformResponseData: transformResponseData, + }), +}); diff --git a/src/resources/RecordingsCommands.ts b/src/resources/RecordingsCommands.ts new file mode 100644 index 0000000..5c6112e --- /dev/null +++ b/src/resources/RecordingsCommands.ts @@ -0,0 +1,13 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const RecordingsCommands = TelnyxResource.extend({ + path: 'recordings_commands', + includeBasic: ['list', 'retrieve'], + + RetrieveRecording: telnyxMethod({ + method: 'GET', + path: '/recordings/{id}', + urlParams: ['id'], + }), +}); diff --git a/src/resources/Regions.ts b/src/resources/Regions.ts new file mode 100644 index 0000000..b5d1c07 --- /dev/null +++ b/src/resources/Regions.ts @@ -0,0 +1,12 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const Regions = TelnyxResource.extend({ + path: 'regions', + includeBasic: ['list', 'retrieve'], + + ListRegions: telnyxMethod({ + method: 'GET', + path: '/regions', + }), +}); diff --git a/src/resources/RegisterCall.ts b/src/resources/RegisterCall.ts new file mode 100644 index 0000000..3662ed3 --- /dev/null +++ b/src/resources/RegisterCall.ts @@ -0,0 +1,6 @@ +import TelnyxResource from '../TelnyxResource'; + +export const RegisterCall = TelnyxResource.extend({ + path: '/calls/register', + includeBasic: ['create'], +}); diff --git a/src/resources/RegulatoryRequirements.ts b/src/resources/RegulatoryRequirements.ts new file mode 100644 index 0000000..32f4766 --- /dev/null +++ b/src/resources/RegulatoryRequirements.ts @@ -0,0 +1,7 @@ +import TelnyxResource from '../TelnyxResource'; + +export const RegulatoryRequirements = TelnyxResource.extend({ + path: 'regulatory_requirements', + + includeBasic: ['list', 'retrieve'], +}); diff --git a/src/resources/Reporting.ts b/src/resources/Reporting.ts new file mode 100644 index 0000000..4458bb4 --- /dev/null +++ b/src/resources/Reporting.ts @@ -0,0 +1,16 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const Reporting = TelnyxResource.extend({ + path: 'reporting', + includeBasic: ['list', 'retrieve', 'delete'], + + GetWdrReports: telnyxMethod({ + method: 'GET', + path: '/wireless_detail_records/reports', + }), + DeleteWdrReport: telnyxMethod({ + method: 'DELETE', + path: '/wireless_detail_records/reports/{id}', + }), +}); diff --git a/src/resources/Reports.ts b/src/resources/Reports.ts new file mode 100644 index 0000000..af2882b --- /dev/null +++ b/src/resources/Reports.ts @@ -0,0 +1,16 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const Reports = TelnyxResource.extend({ + path: 'reports', + includeBasic: ['list', 'retrieve', 'create'], + + GetBillingGroupReport: telnyxMethod({ + method: 'GET', + path: '/ledger/billing_group/reports/{id}', + }), + CreateBillingGroupReport: telnyxMethod({ + method: 'POST', + path: '/ledger/billing_group/reports', + }), +}); diff --git a/src/resources/ReportsMdrs.ts b/src/resources/ReportsMdrs.ts new file mode 100644 index 0000000..4f45c6f --- /dev/null +++ b/src/resources/ReportsMdrs.ts @@ -0,0 +1,6 @@ +import TelnyxResource from '../TelnyxResource'; + +export const ReportsMdrs = TelnyxResource.extend({ + path: '/reports/mdrs', + includeBasic: ['list'], +}); diff --git a/src/resources/RequirementTypes.ts b/src/resources/RequirementTypes.ts new file mode 100644 index 0000000..3bd773f --- /dev/null +++ b/src/resources/RequirementTypes.ts @@ -0,0 +1,16 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const RequirementTypes = TelnyxResource.extend({ + path: 'requirement_types', + includeBasic: ['list', 'retrieve'], + + RetrieveRequirementType: telnyxMethod({ + method: 'GET', + path: '/requirement_types/{id}', + }), + ListRequirementTypes: telnyxMethod({ + method: 'GET', + path: '/requirement_types', + }), +}); diff --git a/src/resources/Requirements.ts b/src/resources/Requirements.ts new file mode 100644 index 0000000..e64c581 --- /dev/null +++ b/src/resources/Requirements.ts @@ -0,0 +1,16 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const Requirements = TelnyxResource.extend({ + path: 'requirements', + includeBasic: ['list', 'retrieve'], + + ListRequirements: telnyxMethod({ + method: 'GET', + path: '/requirements', + }), + RetrieveDocumentRequirements: telnyxMethod({ + method: 'GET', + path: '/requirements/{id}', + }), +}); diff --git a/src/resources/RoomCompositions.ts b/src/resources/RoomCompositions.ts new file mode 100644 index 0000000..62d8fe1 --- /dev/null +++ b/src/resources/RoomCompositions.ts @@ -0,0 +1,6 @@ +import TelnyxResource from '../TelnyxResource'; + +export const RoomCompositions = TelnyxResource.extend({ + path: '/room_compositions', + includeBasic: ['list', 'retrieve', 'create', 'del'], +}); diff --git a/src/resources/RoomParticipants.ts b/src/resources/RoomParticipants.ts new file mode 100644 index 0000000..aa3a06c --- /dev/null +++ b/src/resources/RoomParticipants.ts @@ -0,0 +1,6 @@ +import TelnyxResource from '../TelnyxResource'; + +export const RoomParticipants = TelnyxResource.extend({ + path: '/room_participants', + includeBasic: ['list', 'retrieve'], +}); diff --git a/src/resources/RoomRecordings.ts b/src/resources/RoomRecordings.ts new file mode 100644 index 0000000..1df0e9e --- /dev/null +++ b/src/resources/RoomRecordings.ts @@ -0,0 +1,17 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const RoomRecordings = TelnyxResource.extend({ + path: 'room_recordings', + includeBasic: ['delete'], + + DeleteRoomRecording: telnyxMethod({ + method: 'DELETE', + path: '/room_recordings/{room/recording/id}', + urlParams: ['room_recording_id'], + }), + DeleteRoomRecordings: telnyxMethod({ + method: 'DELETE', + path: '/room_recordings', + }), +}); diff --git a/src/resources/RoomSessions.ts b/src/resources/RoomSessions.ts new file mode 100644 index 0000000..cd577dc --- /dev/null +++ b/src/resources/RoomSessions.ts @@ -0,0 +1,41 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const RoomSessions = TelnyxResource.extend({ + path: '/room_sessions', + + list: telnyxMethod({ + method: 'GET', + }), + + retrieveRoomSessionId: telnyxMethod({ + method: 'GET', + path: '/{room_session_id}', + urlParams: ['room_session_id'], + }), + muteSession: telnyxMethod({ + method: 'POST', + path: '/{room_session_id}/actions/mute', + urlParams: ['room_session_id'], + }), + unmuteSession: telnyxMethod({ + method: 'POST', + path: '/{room_session_id}/actions/unmute', + urlParams: ['room_session_id'], + }), + kickParticipant: telnyxMethod({ + method: 'POST', + path: '/{room_session_id}/actions/kick', + urlParams: ['room_session_id'], + }), + endSession: telnyxMethod({ + method: 'POST', + path: '/{room_session_id}/actions/end', + urlParams: ['room_session_id'], + }), + retrieveParticipants: telnyxMethod({ + method: 'GET', + path: '/{room_session_id}/participants', + urlParams: ['room_session_id'], + }), +}); diff --git a/src/resources/Rooms.ts b/src/resources/Rooms.ts new file mode 100644 index 0000000..f8780db --- /dev/null +++ b/src/resources/Rooms.ts @@ -0,0 +1,6 @@ +import TelnyxResource from '../TelnyxResource'; + +export const Rooms = TelnyxResource.extend({ + path: 'rooms', + includeBasic: ['list', 'create', 'retrieve', 'update', 'del'], +}); diff --git a/src/resources/RoomsClientToken.ts b/src/resources/RoomsClientToken.ts new file mode 100644 index 0000000..c4676d6 --- /dev/null +++ b/src/resources/RoomsClientToken.ts @@ -0,0 +1,16 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const RoomsClientToken = TelnyxResource.extend({ + path: 'rooms/{room_id}/actions', + retrieveGenerateJoinClientToken: telnyxMethod({ + method: 'POST', + path: '/generate_join_client_token', + urlParams: ['room_id'], + }), + retrieveRefreshClientToken: telnyxMethod({ + method: 'POST', + path: '/refresh_client_token', + urlParams: ['room_id'], + }), +}); diff --git a/src/resources/RoomsClientTokens.ts b/src/resources/RoomsClientTokens.ts new file mode 100644 index 0000000..c3d3a25 --- /dev/null +++ b/src/resources/RoomsClientTokens.ts @@ -0,0 +1,18 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const RoomsClientTokens = TelnyxResource.extend({ + path: 'rooms_client_tokens', + includeBasic: ['create'], + + RefreshRoomClientToken: telnyxMethod({ + method: 'POST', + path: '/rooms/{room/id}/actions/refresh/client_token', + urlParams: ['room_id'], + }), + CreateRoomClientToken: telnyxMethod({ + method: 'POST', + path: '/rooms/{room/id}/actions/generate/join/client_token', + urlParams: ['room_id'], + }), +}); diff --git a/src/resources/SharedCampaigns.ts b/src/resources/SharedCampaigns.ts new file mode 100644 index 0000000..64c7548 --- /dev/null +++ b/src/resources/SharedCampaigns.ts @@ -0,0 +1,17 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const SharedCampaigns = TelnyxResource.extend({ + path: 'shared_campaigns', + includeBasic: ['list', 'retrieve'], + + GetPartnerCampaignsSharedByUser: telnyxMethod({ + method: 'GET', + path: '/partnerCampaign/sharedByMe', + }), + GetCampaignSharingStatus: telnyxMethod({ + method: 'GET', + path: '/partnerCampaign/{campaignId}/sharing', + urlParams: ['campaignId'], + }), +}); diff --git a/src/resources/ShortCodes.ts b/src/resources/ShortCodes.ts new file mode 100644 index 0000000..668a40c --- /dev/null +++ b/src/resources/ShortCodes.ts @@ -0,0 +1,37 @@ +import TelnyxResource from '../TelnyxResource'; +import * as utils from '../utils'; +const telnyxMethod = TelnyxResource.method; + +import {ResponsePayload, TelnyxObject} from '../Types'; + +function transformResponseData( + response: ResponsePayload, + telnyx: TelnyxObject, +) { + return utils.addResourceToResponseData(response, telnyx, 'shortCodes', { + update: telnyxMethod({ + method: 'PATCH', + path: '/{shortCodeId}', + urlParams: ['shortCodeId'], + paramsValues: [response.data.id as string], + paramsNames: ['id'], + }), + }); +} + +export const ShortCodes = TelnyxResource.extend({ + path: 'short_codes', + + list: telnyxMethod({ + method: 'GET', + methodType: 'list', + }), + + retrieve: telnyxMethod({ + method: 'GET', + path: '/{id}', + urlParams: ['id'], + + transformResponseData: transformResponseData, + }), +}); diff --git a/src/resources/SimCardActions.ts b/src/resources/SimCardActions.ts new file mode 100644 index 0000000..76a8589 --- /dev/null +++ b/src/resources/SimCardActions.ts @@ -0,0 +1,24 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const SimCardActions = TelnyxResource.extend({ + path: 'sim_card_actions', + includeBasic: ['list', 'retrieve'], + + ListSimCardActions: telnyxMethod({ + method: 'GET', + path: '/sim/card/actions', + }), + ListBulkSimCardActions: telnyxMethod({ + method: 'GET', + path: '/bulk/sim/card/actions', + }), + GetBulkSimCardAction: telnyxMethod({ + method: 'GET', + path: '/bulk/sim/card/actions/{id}', + }), + GetSimCardAction: telnyxMethod({ + method: 'GET', + path: '/sim/card/actions/{id}', + }), +}); diff --git a/src/resources/SimCardGroupActions.ts b/src/resources/SimCardGroupActions.ts new file mode 100644 index 0000000..82e0d50 --- /dev/null +++ b/src/resources/SimCardGroupActions.ts @@ -0,0 +1,16 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const SimCardGroupActions = TelnyxResource.extend({ + path: 'sim_card_group_actions', + includeBasic: ['list', 'retrieve'], + + GetSimCardGroupAction: telnyxMethod({ + method: 'GET', + path: '/sim_card_group/actions/{id}', + }), + GetSimCardGroupActions: telnyxMethod({ + method: 'GET', + path: '/sim_card_group/actions', + }), +}); diff --git a/src/resources/SimCardGroups.ts b/src/resources/SimCardGroups.ts new file mode 100644 index 0000000..58b60a3 --- /dev/null +++ b/src/resources/SimCardGroups.ts @@ -0,0 +1,53 @@ +import TelnyxResource from '../TelnyxResource'; +import * as utils from '../utils'; +const telnyxMethod = TelnyxResource.method; + +import {ResponsePayload, TelnyxObject} from '../Types'; + +function transformResponseData( + response: ResponsePayload, + telnyx: TelnyxObject, +) { + return utils.addResourceToResponseData(response, telnyx, 'simCardGroups', { + del: telnyxMethod({ + method: 'DELETE', + path: '/{simCardGroupId}', + urlParams: ['simCardGroupId'], + paramsValues: [response.data.id as string], + paramsNames: ['id'], + }), + + update: telnyxMethod({ + method: 'PATCH', + path: '/{simCardGroupId}', + urlParams: ['simCardGroupId'], + paramsValues: [response.data.id as string], + paramsNames: ['id'], + }), + }); +} + +export const SimCardGroups = TelnyxResource.extend({ + path: 'sim_card_groups', + + list: telnyxMethod({ + method: 'GET', + methodType: 'list', + + transformResponseData: transformResponseData, + }), + + create: telnyxMethod({ + method: 'POST', + + transformResponseData: transformResponseData, + }), + + retrieve: telnyxMethod({ + method: 'GET', + path: '/{id}', + urlParams: ['id'], + + transformResponseData: transformResponseData, + }), +}); diff --git a/src/resources/SimCardOrders.ts b/src/resources/SimCardOrders.ts new file mode 100644 index 0000000..1078690 --- /dev/null +++ b/src/resources/SimCardOrders.ts @@ -0,0 +1,6 @@ +import TelnyxResource from '../TelnyxResource'; + +export const SimCardOrders = TelnyxResource.extend({ + path: 'sim_card_orders', + includeBasic: ['list', 'retrieve'], +}); diff --git a/src/resources/SimCards.ts b/src/resources/SimCards.ts new file mode 100644 index 0000000..ea61d57 --- /dev/null +++ b/src/resources/SimCards.ts @@ -0,0 +1,142 @@ +import TelnyxResource from '../TelnyxResource'; +import * as utils from '../utils'; +const telnyxMethod = TelnyxResource.method; + +import {ResponsePayload, TelnyxObject} from '../Types'; + +function transformResponseData( + response: ResponsePayload, + telnyx: TelnyxObject, +) { + return utils.addResourceToResponseData(response, telnyx, 'simCards', { + del: telnyxMethod({ + method: 'DELETE', + path: '/{sim_card_id}', + urlParams: ['sim_card_id'], + paramsValues: [response.data.id as string], + paramsNames: ['id'], + }), + + save: telnyxMethod({ + method: 'PATCH', + path: '/{sim_card_id}', + urlParams: ['sim_card_id'], + paramsValues: [response.data.id as string], + paramsNames: ['id'], + }), + + activate: telnyxMethod({ + method: 'POST', + path: '/{sim_card_id}/actions/enable', + urlParams: ['sim_card_id'], + paramsValues: [response.data.id as string], + paramsNames: ['id'], + }), + + deactivate: telnyxMethod({ + method: 'POST', + path: '/{sim_card_id}/actions/disable', + urlParams: ['sim_card_id'], + paramsValues: [response.data.id as string], + paramsNames: ['id'], + }), + + enable: telnyxMethod({ + method: 'POST', + path: '/{sim_card_id}/actions/enable', + urlParams: ['sim_card_id'], + paramsValues: [response.data.id as string], + paramsNames: ['id'], + }), + + disable: telnyxMethod({ + method: 'POST', + path: '/{sim_card_id}/actions/disable', + urlParams: ['sim_card_id'], + paramsValues: [response.data.id as string], + paramsNames: ['id'], + }), + + setStandby: telnyxMethod({ + method: 'POST', + path: '/{sim_card_id}/actions/set_standby', + urlParams: ['sim_card_id'], + paramsValues: [response.data.id as string], + paramsNames: ['id'], + }), + + retrieveNetworkPreferences: telnyxMethod({ + method: 'GET', + path: '/{sim_card_id}/network_preferences', + urlParams: ['sim_card_id'], + paramsValues: [response.data.id as string], + paramsNames: ['id'], + }), + + setNetworkPreferences: telnyxMethod({ + method: 'PUT', + path: '/{sim_card_id}/network_preferences', + urlParams: ['sim_card_id'], + paramsValues: [response.data.id as string], + paramsNames: ['id'], + }), + + deleteNetworkPreferences: telnyxMethod({ + method: 'DELETE', + path: '/{sim_card_id}/network_preferences', + urlParams: ['sim_card_id'], + paramsValues: [response.data.id as string], + paramsNames: ['id'], + }), + + retrievePublicIP: telnyxMethod({ + method: 'GET', + path: '/{sim_card_id}/public_ip', + urlParams: ['sim_card_id'], + paramsValues: [response.data.id as string], + paramsNames: ['id'], + }), + + setPublicIP: telnyxMethod({ + method: 'POST', + path: '/{sim_card_id}/public_ip', + urlParams: ['sim_card_id'], + paramsValues: [response.data.id as string], + paramsNames: ['id'], + }), + + deletePublicIP: telnyxMethod({ + method: 'DELETE', + path: '/{sim_card_id}/public_ip', + urlParams: ['sim_card_id'], + paramsValues: [response.data.id as string], + paramsNames: ['id'], + }), + }); +} + +export const SimCards = TelnyxResource.extend({ + path: 'sim_cards', + includeBasic: ['update'], + + list: telnyxMethod({ + method: 'GET', + methodType: 'list', + + transformResponseData: transformResponseData, + }), + + create: telnyxMethod({ + method: 'POST', + + transformResponseData: transformResponseData, + }), + + retrieve: telnyxMethod({ + method: 'GET', + path: '/{id}', + urlParams: ['id'], + + transformResponseData: transformResponseData, + }), +}); diff --git a/src/resources/SslCertificates.ts b/src/resources/SslCertificates.ts new file mode 100644 index 0000000..c979a7d --- /dev/null +++ b/src/resources/SslCertificates.ts @@ -0,0 +1,17 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const SslCertificates = TelnyxResource.extend({ + path: 'ssl_certificates', + includeBasic: ['delete', 'list', 'retrieve'], + + RemoveStorageSSLCertificate: telnyxMethod({ + method: 'DELETE', + path: '/storage/ssl_certificates/{ssl/certificate/id}', + urlParams: ['ssl_certificate_id'], + }), + GetStorageSSLCertificates: telnyxMethod({ + method: 'GET', + path: '/storage/ssl_certificates', + }), +}); diff --git a/src/resources/TeXMLApplication.ts b/src/resources/TeXMLApplication.ts new file mode 100644 index 0000000..5b972de --- /dev/null +++ b/src/resources/TeXMLApplication.ts @@ -0,0 +1,6 @@ +import TelnyxResource from '../TelnyxResource'; + +export const TeXMLApplication = TelnyxResource.extend({ + path: 'texml_applications', + includeBasic: ['list', 'create', 'retrieve', 'del', 'update'], +}); diff --git a/src/resources/TelephonyCredentials.ts b/src/resources/TelephonyCredentials.ts new file mode 100644 index 0000000..1383aa2 --- /dev/null +++ b/src/resources/TelephonyCredentials.ts @@ -0,0 +1,57 @@ +import TelnyxResource from '../TelnyxResource'; +import * as utils from '../utils'; +const telnyxMethod = TelnyxResource.method; + +import {ResponsePayload, TelnyxObject} from '../Types'; + +function transformResponseData( + response: ResponsePayload, + telnyx: TelnyxObject, +) { + return utils.addResourceToResponseData( + response, + telnyx, + 'telephonyCredentials', + { + del: telnyxMethod({ + method: 'DELETE', + path: '/{telephony_credential_id}', + urlParams: ['telephony_credential_id'], + paramsValues: [response.data.id as string], + paramsNames: ['id'], + }), + }, + ); +} + +const telephonyCredentialResource = { + path: 'telephony_credentials', + + includeBasic: ['del', 'list', 'update'], + + create: telnyxMethod({ + method: 'POST', + + transformResponseData: transformResponseData, + }), + + retrieve: telnyxMethod({ + method: 'POST', + path: '/{id}/token', + urlParams: ['id'], + + transformResponseData: transformResponseData, + }), + + retrieveCredential: telnyxMethod({ + method: 'GET', + path: '/{id}', + urlParams: ['id'], + + transformResponseData: transformResponseData, + }), +}; + +export const TelephonyCredentials = TelnyxResource.extend( + telephonyCredentialResource, +); diff --git a/src/resources/UpdateClientState.ts b/src/resources/UpdateClientState.ts new file mode 100644 index 0000000..d7bd119 --- /dev/null +++ b/src/resources/UpdateClientState.ts @@ -0,0 +1,25 @@ +import TelnyxResource from '../TelnyxResource'; +import * as utils from '../utils'; +const telnyxMethod = TelnyxResource.method; + +import {ResponsePayload, TelnyxObject} from '../Types'; + +function transformResponseData( + response: ResponsePayload, + telnyx: TelnyxObject, +) { + return utils.addResourceToResponseData( + response, + telnyx, + 'updateClientState', + {}, + ); +} +export const UpdateClientState = TelnyxResource.extend({ + path: 'calls/{call_control_id}/actions/client_state_update', + update: telnyxMethod({ + urlParams: ['call_control_id'], + method: 'PUT', + transformResponseData: transformResponseData, + }), +}); diff --git a/src/resources/Verifications.ts b/src/resources/Verifications.ts new file mode 100644 index 0000000..49aef79 --- /dev/null +++ b/src/resources/Verifications.ts @@ -0,0 +1,70 @@ +import TelnyxResource from '../TelnyxResource'; +import * as utils from '../utils'; +const telnyxMethod = TelnyxResource.method; + +import {ResponsePayload, TelnyxObject} from '../Types'; + +function transformResponseData( + response: ResponsePayload, + telnyx: TelnyxObject, +) { + return utils.addResourceToResponseData(response, telnyx, 'verification', { + sms: telnyxMethod({ + method: 'POST', + path: '/sms', + + transformResponseData: transformResponseData, + }), + + call: telnyxMethod({ + method: 'POST', + path: '/call', + + transformResponseData: transformResponseData, + }), + + flashcall: telnyxMethod({ + method: 'POST', + path: '/flashcall', + + transformResponseData: transformResponseData, + }), + + byPhoneNumber: telnyxMethod({ + method: 'GET', + path: '/verifications/by_phone_number/{phone_number}', + urlParams: ['phone_number'], + paramsValues: [response.data.id as string], + paramsNames: ['id'], + }), + + verifyVerificationCodeByPhoneNumber: telnyxMethod({ + method: 'POST', + path: '/by_phone_number/{phone_number}/actions/verify', + urlParams: ['phone_number'], + paramsValues: [response.data.id as string], + paramsNames: ['id'], + }), + + verifyVerificationCodeById: telnyxMethod({ + method: 'POST', + path: '/by_phone_number/{verification_id}/actions/verify', + urlParams: ['verification_id'], + paramsValues: [response.data.id as string], + paramsNames: ['id'], + }), + }); +} + +export const Verifications = TelnyxResource.extend({ + path: 'verifications', + includeBasic: ['update'], + + retrieve: telnyxMethod({ + method: 'GET', + path: '/{verification_id}', + urlParams: ['verification_id'], + + transformResponseData: transformResponseData, + }), +}); diff --git a/src/resources/VerifiedCallsDisplayProfile.ts b/src/resources/VerifiedCallsDisplayProfile.ts new file mode 100644 index 0000000..b805600 --- /dev/null +++ b/src/resources/VerifiedCallsDisplayProfile.ts @@ -0,0 +1,22 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const VerifiedCallsDisplayProfile = TelnyxResource.extend({ + path: 'verified_calls_display_profile', + includeBasic: ['delete', 'list', 'retrieve', 'create'], + + DeleteProfile: telnyxMethod({ + method: 'DELETE', + path: '/verified_calls_display_profiles/{id}', + urlParams: ['id'], + }), + ListProfiles: telnyxMethod({ + method: 'GET', + path: '/verified_calls_display_profiles', + }), + CreateProfileVerificationRequest: telnyxMethod({ + method: 'POST', + path: '/verified_calls_display_profiles/{id}/verification_request', + urlParams: ['id'], + }), +}); diff --git a/src/resources/VerifiedCallsDisplayProfiles.ts b/src/resources/VerifiedCallsDisplayProfiles.ts new file mode 100644 index 0000000..fa022b3 --- /dev/null +++ b/src/resources/VerifiedCallsDisplayProfiles.ts @@ -0,0 +1,11 @@ +import TelnyxResource from '../TelnyxResource'; + +export const VerifiedCallsDisplayProfiles = TelnyxResource.extend({ + path: 'verified_calls_display_profiles', + + create: TelnyxResource.method({ + method: 'POST', + path: '/{id}/verification_request', + urlParams: ['id'], + }), +}); diff --git a/src/resources/VerifiedNumbers.ts b/src/resources/VerifiedNumbers.ts new file mode 100644 index 0000000..6662710 --- /dev/null +++ b/src/resources/VerifiedNumbers.ts @@ -0,0 +1,6 @@ +import TelnyxResource from '../TelnyxResource'; + +export const VerifiedNumbers = TelnyxResource.extend({ + path: 'verified_numbers', + includeBasic: ['list', 'retrieve', 'del'], +}); diff --git a/src/resources/Verify.ts b/src/resources/Verify.ts new file mode 100644 index 0000000..6689edf --- /dev/null +++ b/src/resources/Verify.ts @@ -0,0 +1,52 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const Verify = TelnyxResource.extend({ + path: 'verify', + includeBasic: ['list', 'retrieve', 'create', 'delete'], + + RetrieveVerification: telnyxMethod({ + method: 'GET', + path: '/verifications/{verification/id}', + urlParams: ['verification_id'], + }), + CreateFlashcallVerification: telnyxMethod({ + method: 'POST', + path: '/verifications/flashcall', + }), + VerifyVerificationCode: telnyxMethod({ + method: 'POST', + path: '/verifications/by_phone_number/{phone/number}/actions/verify', + urlParams: ['phone_number'], + }), + CreateVerificationSms: telnyxMethod({ + method: 'POST', + path: '/verifications/sms', + }), + CreateVerificationPsd2: telnyxMethod({ + method: 'POST', + path: '/verifications/psd2', + }), + ListVerifications: telnyxMethod({ + method: 'GET', + path: '/verifications/by_phone_number/{phone/number}', + urlParams: ['phone_number'], + }), + ListProfiles: telnyxMethod({ + method: 'GET', + path: '/verify_profiles', + }), + CreateVerificationWhatsapp: telnyxMethod({ + method: 'POST', + path: '/verifications/whatsapp', + }), + DeleteProfile: telnyxMethod({ + method: 'DELETE', + path: '/verify_profiles/{verify/profile/id}', + urlParams: ['verify_profile_id'], + }), + CreateVerificationCall: telnyxMethod({ + method: 'POST', + path: '/verifications/call', + }), +}); diff --git a/src/resources/VerifyProfiles.ts b/src/resources/VerifyProfiles.ts new file mode 100644 index 0000000..aaec359 --- /dev/null +++ b/src/resources/VerifyProfiles.ts @@ -0,0 +1,62 @@ +import TelnyxResource from '../TelnyxResource'; +import * as utils from '../utils'; +const telnyxMethod = TelnyxResource.method; + +import {ResponsePayload, TelnyxObject} from '../Types'; + +function transformResponseData( + response: ResponsePayload, + telnyx: TelnyxObject, +) { + return utils.addResourceToResponseData(response, telnyx, 'verifyProfiles', { + retrieveVerifyProfileMessageTemplates: telnyxMethod({ + method: 'GET', + path: '/verify_profiles/templates', + }), + }); +} + +export const VerifyProfiles = TelnyxResource.extend({ + path: 'sim_cards', + includeBasic: ['update'], + + delete: telnyxMethod({ + method: 'DELETE', + path: '/{verify_profile_id}', + urlParams: ['verify_profile_id'], + paramsNames: ['id'], + + transformResponseData: transformResponseData, + }), + + save: telnyxMethod({ + method: 'PATCH', + path: '/{verify_profile_id}', + urlParams: ['verify_profile_id'], + paramsNames: ['id'], + + transformResponseData: transformResponseData, + }), + + retrieve: telnyxMethod({ + method: 'GET', + path: '/{verify_profile_id}', + urlParams: ['verify_profile_id'], + paramsNames: ['id'], + + transformResponseData: transformResponseData, + }), + + list: telnyxMethod({ + method: 'GET', + methodType: 'list', + + transformResponseData: transformResponseData, + }), + + create: telnyxMethod({ + method: 'POST', + + transformResponseData: transformResponseData, + }), +}); diff --git a/src/resources/VirtualCrossConnects.ts b/src/resources/VirtualCrossConnects.ts new file mode 100644 index 0000000..8afc4d9 --- /dev/null +++ b/src/resources/VirtualCrossConnects.ts @@ -0,0 +1,28 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const VirtualCrossConnects = TelnyxResource.extend({ + path: 'virtual_cross_connects', + includeBasic: ['list', 'retrieve', 'delete', 'create'], + + ListVirtualCrossConnectRegions: telnyxMethod({ + method: 'GET', + path: '/virtual_cross_connect/regions', + }), + DeleteVirtualCrossConnect: telnyxMethod({ + method: 'DELETE', + path: '/virtual_cross_connects/{id}', + }), + GetVirtualCrossConnectRegion: telnyxMethod({ + method: 'GET', + path: '/virtual_cross_connect/regions/{id}', + }), + ListVirtualCrossConnects: telnyxMethod({ + method: 'GET', + path: '/virtual_cross_connects', + }), + ProvisionVirtualCrossConnect: telnyxMethod({ + method: 'POST', + path: '/virtual_cross_connects/{id}/actions/provision', + }), +}); diff --git a/src/resources/WdrDetailReports.ts b/src/resources/WdrDetailReports.ts new file mode 100644 index 0000000..fc5ae27 --- /dev/null +++ b/src/resources/WdrDetailReports.ts @@ -0,0 +1,12 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const WdrDetailReports = TelnyxResource.extend({ + path: 'wdr_detail_reports', + includeBasic: ['list', 'retrieve'], + + GetPaginatedWdrs: telnyxMethod({ + method: 'GET', + path: '/reports/wdrs', + }), +}); diff --git a/src/resources/Webhooks.ts b/src/resources/Webhooks.ts new file mode 100644 index 0000000..a1c1cf2 --- /dev/null +++ b/src/resources/Webhooks.ts @@ -0,0 +1,6 @@ +import TelnyxResource from '../TelnyxResource'; + +export const Webhooks = TelnyxResource.extend({ + path: 'webhook_deliveries', + includeBasic: ['list', 'retrieve'], +}); diff --git a/src/resources/WireguardInterfaces.ts b/src/resources/WireguardInterfaces.ts new file mode 100644 index 0000000..f4fefe2 --- /dev/null +++ b/src/resources/WireguardInterfaces.ts @@ -0,0 +1,36 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const WireguardInterfaces = TelnyxResource.extend({ + path: 'wireguard_interfaces', + includeBasic: ['list', 'retrieve', 'delete'], + + GetWireguardPeerAllowedIp: telnyxMethod({ + method: 'GET', + path: '/wireguard_peers/{id}/allowed_ips/{child_id}', + }), + DeleteWireguardInterface: telnyxMethod({ + method: 'DELETE', + path: '/wireguard_interfaces/{id}', + }), + DeleteWireguardPeer: telnyxMethod({ + method: 'DELETE', + path: '/wireguard_peers/{id}', + }), + ListWireguardPeers: telnyxMethod({ + method: 'GET', + path: '/wireguard_peers', + }), + GetWireguardPeerConfig: telnyxMethod({ + method: 'GET', + path: '/wireguard_peers/{id}/config', + }), + ListWireguardInterfaces: telnyxMethod({ + method: 'GET', + path: '/wireguard_interfaces', + }), + ListWireguardPeerAllowedIps: telnyxMethod({ + method: 'GET', + path: '/wireguard_peers/{id}/allowed_ips', + }), +}); diff --git a/src/resources/WirelessDetailRecordReports.ts b/src/resources/WirelessDetailRecordReports.ts new file mode 100644 index 0000000..0e3f65b --- /dev/null +++ b/src/resources/WirelessDetailRecordReports.ts @@ -0,0 +1,6 @@ +import TelnyxResource from '../TelnyxResource'; + +export const WirelessDetailRecordReports = TelnyxResource.extend({ + path: 'wireless/detail_records_reports', + includeBasic: ['list', 'retrieve', 'create', 'del'], +}); diff --git a/types/BalanceResource.d.ts b/types/BalanceResource.d.ts index 065c431..99afb8e 100644 --- a/types/BalanceResource.d.ts +++ b/types/BalanceResource.d.ts @@ -5,7 +5,7 @@ declare module 'telnyx' { type BalanceRetrieveParams = paths['/balance']['get']['parameters']['query']; - type Balance = + type BalanceRetrieveResponse = paths['/balance']['get']['responses']['200']['content']['application/json']['data']; class BalanceResource { @@ -13,7 +13,7 @@ declare module 'telnyx' { retrieve( params?: BalanceRetrieveParams, options?: RequestOptions, - ): Promise>; + ): Promise>; } } } From e0661882a046fcc8dff8751e6dd66f5ca3c41ca7 Mon Sep 17 00:00:00 2001 From: Lucas Rosa Date: Wed, 25 Sep 2024 12:17:06 -0300 Subject: [PATCH 12/59] update legacy Payment resource --- src/resources/Autorechargepreferences.ts | 12 ------------ src/resources/Payment.ts | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 12 deletions(-) delete mode 100644 src/resources/Autorechargepreferences.ts create mode 100644 src/resources/Payment.ts diff --git a/src/resources/Autorechargepreferences.ts b/src/resources/Autorechargepreferences.ts deleted file mode 100644 index 3b75808..0000000 --- a/src/resources/Autorechargepreferences.ts +++ /dev/null @@ -1,12 +0,0 @@ -import TelnyxResource from '../TelnyxResource'; -const telnyxMethod = TelnyxResource.method; - -export const Autorechargepreferences = TelnyxResource.extend({ - path: 'autorechargepreferences', - includeBasic: ['list', 'retrieve'], - - GetAutoRechargePrefs: telnyxMethod({ - method: 'GET', - path: '/payment/auto/recharge/prefs', - }), -}); diff --git a/src/resources/Payment.ts b/src/resources/Payment.ts new file mode 100644 index 0000000..31a4eb2 --- /dev/null +++ b/src/resources/Payment.ts @@ -0,0 +1,16 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const Payment = TelnyxResource.extend({ + path: 'payment', + + getAutoRechargePrefs: telnyxMethod({ + method: 'GET', + path: '/auto_recharge_prefs', + }), + + updateAutoRechargePrefs: telnyxMethod({ + method: 'PATCH', + path: '/auto_recharge_prefs', + }), +}); From 9f2f7a6f612f35c15a3b44cfcb64400fd7721fe4 Mon Sep 17 00:00:00 2001 From: Lucas Rosa Date: Wed, 25 Sep 2024 12:18:04 -0300 Subject: [PATCH 13/59] add import to Resources --- CHANGELOG.md | 6 +- src/telnyx.ts | 302 +++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 304 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 57272db..83f03b0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,15 +8,17 @@ - Bump default Node version to `20` - Update README on [Development](./README.md#development) instructions - Remove `yarn` in favor of `npm` 10 -- Convert SDK files to typescript +- Convert SDK files to Typescript +- Convert Resources to Typescript - Use ES Modules syntax - Update package `main` entrypoint to be compiled version of [src telnyx.ts](./src/telnyx.ts) -- Added `Jest` and create tests in `Typescript` +- Added `Jest` and create tests in Typescript - Make `setApiKey` TelnyxObject prototype method private - Moved to `moduleResolution` Bundler to support better imports and tests with `Jest` - Enabled `esModuleInterop` for Jest - Update files included when publishing - Remove custom resource get `generateAccessTokenFromCredential` from `TelephonyCredentials` +- Update `AutoRechargePreferences` resource to match API spec ## v1 diff --git a/src/telnyx.ts b/src/telnyx.ts index 0e512c6..4330cf4 100644 --- a/src/telnyx.ts +++ b/src/telnyx.ts @@ -5,10 +5,159 @@ import {exec} from 'child_process'; import {AppInfo, TelnyxObject} from './Types'; import * as utils from './utils'; -// TODO: convert other resources to ts +//#region Resources +import {AccessIpAddress} from './resources/AccessIpAddress'; +import {AccessIpRanges} from './resources/AccessIpRanges'; +import {AccessTokens} from './resources/AccessTokens'; +import {Actions} from './resources/Actions'; +import {ActionsSimCards} from './resources/ActionsSimCards'; +import {ActivateDeactivateBulkCredentials} from './resources/ActivateDeactivateBulkCredentials'; +import {Addresses} from './resources/Addresses'; +import {AdvancedOptinoptout} from './resources/AdvancedOptinoptout'; +import {AI} from './resources/AI'; +import {AuthenticationProviders} from './resources/AuthenticationProviders'; +import {AvailablePhoneNumbers} from './resources/AvailablePhoneNumbers'; import {Balance} from './resources/Balance'; +import {Billing} from './resources/Billing'; +import {BillingGroups} from './resources/BillingGroups'; +import {Brands} from './resources/Brands'; +import {Bucket} from './resources/Bucket'; +import {BucketUsage} from './resources/BucketUsage'; +import {BulkCreation} from './resources/BulkCreation'; +import {BulkCredentials} from './resources/BulkCredentials'; +import {BulkPhoneNumberCampaigns} from './resources/BulkPhoneNumberCampaigns'; +import {BulkPhoneNumberOperations} from './resources/BulkPhoneNumberOperations'; +import {BulkSoleProprietorCreation} from './resources/BulkSoleProprietorCreation'; +import {BulkTelephonyCredentials} from './resources/BulkTelephonyCredentials'; +import {BusinessIdentity} from './resources/BusinessIdentity'; +import {CallControlApplications} from './resources/CallControlApplications'; +import {CallEvents} from './resources/CallEvents'; +import {CallInformation} from './resources/CallInformation'; +import {CallRecordings} from './resources/CallRecordings'; +import {Calls} from './resources/Calls'; +import {Campaign} from './resources/Campaign'; +import {CampaignBuilder} from './resources/CampaignBuilder'; +import {CdrUsageReports} from './resources/CdrUsageReports'; +import {Channelzones} from './resources/Channelzones'; +import {ClientStateUpdate} from './resources/ClientStateUpdate'; +import {Conferences} from './resources/Conferences'; +import {Connections} from './resources/Connections'; +import {CredentialConnections} from './resources/CredentialConnections'; +import {Credentials} from './resources/Credentials'; +import {CsvDownloads} from './resources/CsvDownloads'; +import {CustomerServiceRecord} from './resources/CustomerServiceRecord'; +import {Debugging} from './resources/Debugging'; +import {DetailRecords} from './resources/DetailRecords'; +import {DialogflowIntegration} from './resources/DialogflowIntegration'; +import {DocumentLinks} from './resources/DocumentLinks'; +import {Documents} from './resources/Documents'; +import {DynamicEmergency} from './resources/DynamicEmergency'; +import {DynamicEmergencyAddresses} from './resources/DynamicEmergencyAddresses'; +import {DynamicEmergencyEndpoints} from './resources/DynamicEmergencyEndpoints'; +import {Events} from './resources/Events'; +import {ExternalConnections} from './resources/ExternalConnections'; +import {FaxApplications} from './resources/FaxApplications'; +import {Faxes} from './resources/Faxes'; +import {FqdnConnections} from './resources/FqdnConnections'; +import {Fqdns} from './resources/Fqdns'; +import {GlobalIps} from './resources/GlobalIps'; +import {InboundChannels} from './resources/InboundChannels'; +import {InventoryCoverage} from './resources/InventoryCoverage'; +import {InventoryLevel} from './resources/InventoryLevel'; +import {IpAddresses} from './resources/IpAddresses'; +import {IpConnections} from './resources/IpConnections'; +import {IpRanges} from './resources/IpRanges'; +import {Ips} from './resources/Ips'; +import {ManagedAccounts} from './resources/ManagedAccounts'; +import {MdrDetailReports} from './resources/MdrDetailReports'; +import {MdrUsageReports} from './resources/MdrUsageReports'; +import {MediaStorageApi} from './resources/MediaStorageApi'; +import {Messages} from './resources/Messages'; +import {MessagesAlphanumericSenderId} from './resources/MessagesAlphanumericSenderId'; +import {MessagingHostedNumber} from './resources/MessagingHostedNumber'; +import {MessagingHostedNumberOrders} from './resources/MessagingHostedNumberOrders'; +import {MessagingHostedNumbers} from './resources/MessagingHostedNumbers'; +import {MessagingPhoneNumbers} from './resources/MessagingPhoneNumbers'; import {MessagingProfileMetrics} from './resources/MessagingProfileMetrics'; import {MessagingProfiles} from './resources/MessagingProfiles'; +import {MessagingSenderIds} from './resources/MessagingSenderIds'; +import {MessagingShortCodes} from './resources/MessagingShortCodes'; +import {MessagingTollfreeVerification} from './resources/MessagingTollfreeVerification'; +import {MessagingUrlDomains} from './resources/MessagingUrlDomains'; +import {MobileNetworkOperators} from './resources/MobileNetworkOperators'; +import {MobileOperatorNetworks} from './resources/MobileOperatorNetworks'; +import {Networks} from './resources/Networks'; +import {NumberBackgroundJobs} from './resources/NumberBackgroundJobs'; +import {NumberLookup} from './resources/NumberLookup'; +import {NumberOrderDocuments} from './resources/NumberOrderDocuments'; +import {NumberOrders} from './resources/NumberOrders'; +import {NumberPortouts} from './resources/NumberPortouts'; +import {NumberReservations} from './resources/NumberReservations'; +import {NumbersFeatures} from './resources/NumbersFeatures'; +import {Object as ObjectResource} from './resources/Object'; +import {OtaUpdates} from './resources/OtaUpdates'; +import {Outbound} from './resources/Outbound'; +import {OutboundVoiceProfiles} from './resources/OutboundVoiceProfiles'; +import {Payment} from './resources/Payment'; +import {PhoneNumberAssignmentByProfile} from './resources/PhoneNumberAssignmentByProfile'; +import {PhoneNumberBlockOrders} from './resources/PhoneNumberBlockOrders'; +import {PhoneNumberBlocksBackgroundJobs} from './resources/PhoneNumberBlocksBackgroundJobs'; +import {PhoneNumberCampaigns} from './resources/PhoneNumberCampaigns'; +import {PhoneNumberOrderDocuments} from './resources/PhoneNumberOrderDocuments'; +import {PhoneNumberRegulatoryRequirements} from './resources/PhoneNumberRegulatoryRequirements'; +import {PhoneNumbers} from './resources/PhoneNumbers'; +import {PhoneNumberSearch} from './resources/PhoneNumberSearch'; +import {PhoneNumbersInboundChannels} from './resources/PhoneNumbersInboundChannels'; +import {PhoneNumbersMessaging} from './resources/PhoneNumbersMessaging'; +import {PhoneNumbersVoice} from './resources/PhoneNumbersVoice'; +import {PortabilityChecks} from './resources/PortabilityChecks'; +import {PortingOrders} from './resources/PortingOrders'; +import {PortingPhoneNumbers} from './resources/PortingPhoneNumbers'; +import {PortoutRequests} from './resources/PortoutRequests'; +import {PresignedObjectUrls} from './resources/PresignedObjectUrls'; +import {PrivateWirelessGateways} from './resources/PrivateWirelessGateways'; +import {PublicInternetGateways} from './resources/PublicInternetGateways'; +import {PublicKey} from './resources/PublicKey'; +import {PushCredentials} from './resources/PushCredentials'; +import {Queues} from './resources/Queues'; +import {RecordingsCommands} from './resources/RecordingsCommands'; +import {Regions} from './resources/Regions'; +import {RegisterCall} from './resources/RegisterCall'; +import {RegulatoryRequirements} from './resources/RegulatoryRequirements'; +import {Reporting} from './resources/Reporting'; +import {Reports} from './resources/Reports'; +import {ReportsMdrs} from './resources/ReportsMdrs'; +import {Requirements} from './resources/Requirements'; +import {RequirementTypes} from './resources/RequirementTypes'; +import {RoomCompositions} from './resources/RoomCompositions'; +import {RoomParticipants} from './resources/RoomParticipants'; +import {RoomRecordings} from './resources/RoomRecordings'; +import {Rooms} from './resources/Rooms'; +import {RoomsClientToken} from './resources/RoomsClientToken'; +import {RoomsClientTokens} from './resources/RoomsClientTokens'; +import {RoomSessions} from './resources/RoomSessions'; +import {SharedCampaigns} from './resources/SharedCampaigns'; +import {ShortCodes} from './resources/ShortCodes'; +import {SimCardActions} from './resources/SimCardActions'; +import {SimCardGroupActions} from './resources/SimCardGroupActions'; +import {SimCardGroups} from './resources/SimCardGroups'; +import {SimCardOrders} from './resources/SimCardOrders'; +import {SimCards} from './resources/SimCards'; +import {SslCertificates} from './resources/SslCertificates'; +import {TelephonyCredentials} from './resources/TelephonyCredentials'; +import {TeXMLApplication} from './resources/TeXMLApplication'; +import {UpdateClientState} from './resources/UpdateClientState'; +import {Verifications} from './resources/Verifications'; +import {VerifiedCallsDisplayProfile} from './resources/VerifiedCallsDisplayProfile'; +import {VerifiedCallsDisplayProfiles} from './resources/VerifiedCallsDisplayProfiles'; +import {VerifiedNumbers} from './resources/VerifiedNumbers'; +import {Verify} from './resources/Verify'; +import {VerifyProfiles} from './resources/VerifyProfiles'; +import {VirtualCrossConnects} from './resources/VirtualCrossConnects'; +import {WdrDetailReports} from './resources/WdrDetailReports'; +import {Webhooks as WebhooksResource} from './resources/Webhooks'; +import {WireguardInterfaces} from './resources/WireguardInterfaces'; +import {WirelessDetailRecordReports} from './resources/WirelessDetailRecordReports'; // import TelnyxResource from './TelnyxResource'; @@ -43,11 +192,160 @@ export function createTelnyx() { const APP_INFO_PROPERTIES = ['name', 'version', 'url', 'partner_id']; - // TODO: convert other resources to ts + // #region Resources Definition const resources = { + AccessIpAddress, + AccessIpRanges, + AccessTokens, + Actions, + ActionsSimCards, + ActivateDeactivateBulkCredentials, + Addresses, + AdvancedOptinoptout, + AI, + AuthenticationProviders, + AvailablePhoneNumbers, Balance, + Billing, + BillingGroups, + Brands, + Bucket, + BucketUsage, + BulkCreation, + BulkCredentials, + BulkPhoneNumberCampaigns, + BulkPhoneNumberOperations, + BulkSoleProprietorCreation, + BulkTelephonyCredentials, + BusinessIdentity, + CallControlApplications, + CallEvents, + CallInformation, + CallRecordings, + Calls, + Campaign, + CampaignBuilder, + CdrUsageReports, + Channelzones, + ClientStateUpdate, + Conferences, + Connections, + CredentialConnections, + Credentials, + CsvDownloads, + CustomerServiceRecord, + Debugging, + DetailRecords, + DialogflowIntegration, + DocumentLinks, + Documents, + DynamicEmergency, + DynamicEmergencyAddresses, + DynamicEmergencyEndpoints, + Events, + ExternalConnections, + FaxApplications, + Faxes, + FqdnConnections, + Fqdns, + GlobalIps, + InboundChannels, + InventoryCoverage, + InventoryLevel, + IpAddresses, + IpConnections, + IpRanges, + Ips, + ManagedAccounts, + MdrDetailReports, + MdrUsageReports, + MediaStorageApi, + Messages, + MessagesAlphanumericSenderId, + MessagingHostedNumber, + MessagingHostedNumberOrders, + MessagingHostedNumbers, + MessagingPhoneNumbers, MessagingProfileMetrics, MessagingProfiles, + MessagingSenderIds, + MessagingShortCodes, + MessagingTollfreeVerification, + MessagingUrlDomains, + MobileNetworkOperators, + MobileOperatorNetworks, + Networks, + NumberBackgroundJobs, + NumberLookup, + NumberOrderDocuments, + NumberOrders, + NumberPortouts, + NumberReservations, + NumbersFeatures, + Object: ObjectResource, + OtaUpdates, + Outbound, + OutboundVoiceProfiles, + Payment, + PhoneNumberAssignmentByProfile, + PhoneNumberBlockOrders, + PhoneNumberBlocksBackgroundJobs, + PhoneNumberCampaigns, + PhoneNumberOrderDocuments, + PhoneNumberRegulatoryRequirements, + PhoneNumbers, + PhoneNumberSearch, + PhoneNumbersInboundChannels, + PhoneNumbersMessaging, + PhoneNumbersVoice, + PortabilityChecks, + PortingOrders, + PortingPhoneNumbers, + PortoutRequests, + PresignedObjectUrls, + PrivateWirelessGateways, + PublicInternetGateways, + PublicKey, + PushCredentials, + Queues, + RecordingsCommands, + Regions, + RegisterCall, + RegulatoryRequirements, + Reporting, + Reports, + ReportsMdrs, + Requirements, + RequirementTypes, + RoomCompositions, + RoomParticipants, + RoomRecordings, + Rooms, + RoomsClientToken, + RoomsClientTokens, + RoomSessions, + SharedCampaigns, + ShortCodes, + SimCardActions, + SimCardGroupActions, + SimCardGroups, + SimCardOrders, + SimCards, + SslCertificates, + TelephonyCredentials, + TeXMLApplication, + UpdateClientState, + Verifications, + VerifiedCallsDisplayProfile, + VerifiedCallsDisplayProfiles, + VerifiedNumbers, + Verify, + VerifyProfiles, + VirtualCrossConnects, + WdrDetailReports, + Webhooks: WebhooksResource, + WireguardInterfaces, + WirelessDetailRecordReports, }; // From d0b2bbf7636aebdc08655f7d0f25c872f7fde117 Mon Sep 17 00:00:00 2001 From: Lucas Rosa Date: Wed, 25 Sep 2024 21:17:16 -0300 Subject: [PATCH 14/59] add missing Resources tests --- CHANGELOG.md | 10 + package-lock.json | 24 -- package.json | 1 - src/resources/Addresses.ts | 3 +- src/resources/BulkCreation.ts | 55 ---- src/resources/Conferences.ts | 1 - src/resources/Outbound.ts | 58 ---- src/resources/OutboundVoiceProfiles.ts | 57 +++- src/resources/Queues.ts | 4 +- src/resources/RegisterCall.ts | 6 - src/resources/RoomsClientTokens.ts | 4 +- src/resources/SimCards.ts | 16 - ...XMLApplication.ts => TexmlApplications.ts} | 2 +- src/resources/VerifiedCallsDisplayProfile.ts | 22 -- src/resources/VerifiedCallsDisplayProfiles.ts | 11 - src/telnyx.ts | 18 +- src/test/resources/AccessIpAddress.test.ts | 104 +++++++ src/test/resources/AccessIpRanges.test.ts | 125 ++++++++ src/test/resources/ActionsSimCards.test.ts | 76 +++++ .../ActivateDeactivateBulkCredentials.test.ts | 40 +++ src/test/resources/Addresses.test.ts | 162 ++++++++++ .../resources/AuthenticationProviders.test.ts | 106 +++++++ .../resources/AvailablePhoneNumbers.test.ts | 21 ++ src/test/resources/Balance.test.ts | 4 +- src/test/resources/BillingGroups.test.ts | 145 +++++++++ .../BulkTelephonyCredentials.test.ts | 101 +++++++ .../resources/CallControlApplications.test.ts | 179 +++++++++++ src/test/resources/Calls.test.ts | 285 ++++++++++++++++++ src/test/resources/Campaign.test.ts | 269 +++++++++++++++++ src/test/resources/CampaignBuilder.test.ts | 141 +++++++++ src/test/resources/ClientStateUpdate.test.ts | 36 +++ src/test/resources/Conferences.test.ts | 221 ++++++++++++++ src/test/resources/Connections.test.ts | 46 +++ .../resources/CredentialConnections.test.ts | 134 ++++++++ src/test/resources/DetailRecords.test.ts | 23 ++ src/test/resources/DocumentLinks.test.ts | 17 ++ src/test/resources/Documents.test.ts | 173 +++++++++++ src/test/resources/DynamicEmergency.test.ts | 162 ++++++++++ src/test/resources/Events.test.ts | 33 ++ src/test/resources/FaxApplications.test.ts | 126 ++++++++ src/test/resources/Faxes.test.ts | 122 ++++++++ src/test/resources/FqdnConnections.test.ts | 137 +++++++++ src/test/resources/Fqdns.test.ts | 164 ++++++++++ src/test/resources/InventoryCoverage.test.ts | 47 +++ src/test/resources/IpConnections.test.ts | 136 +++++++++ src/test/resources/Ips.test.ts | 148 +++++++++ src/test/resources/ManagedAccounts.test.ts | 218 ++++++++++++++ src/test/resources/Messages.test.ts | 129 ++++++++ src/test/resources/MessagesSenderIds.test.ts | 51 ++++ .../MessagingHostedNumberOrders.test.ts | 107 +++++++ .../resources/MessagingHostedNumbers.test.ts | 17 ++ .../resources/MessagingPhoneNumbers.test.ts | 73 +++++ .../resources/MessagingProfileMetrics.test.ts | 16 +- src/test/resources/MessagingProfiles.test.ts | 57 ++-- src/test/resources/MessagingSenderIds.test.ts | 125 ++++++++ .../resources/MessagingShortCodes.test.ts | 59 ++++ .../resources/MobileOperatorNetworks.test.ts | 25 ++ .../resources/NumberBackgroundJobs.test.ts | 86 ++++++ src/test/resources/NumberLookup.test.ts | 21 ++ .../resources/NumberOrderDocuments.test.ts | 107 +++++++ src/test/resources/NumberOrders.test.ts | 117 +++++++ src/test/resources/NumberPortouts.test.ts | 201 ++++++++++++ src/test/resources/NumberReservations.test.ts | 120 ++++++++ src/test/resources/OtaUpdates.test.ts | 62 ++++ .../resources/OutboundVoiceProfiles.test.ts | 178 +++++++++++ .../PhoneNumberAssignmentByProfile.test.ts | 87 ++++++ .../PhoneNumberInboundChannels.test.ts | 48 +++ src/test/resources/PhoneNumbers.test.ts | 179 +++++++++++ .../resources/PhoneNumbersMessaging.test.ts | 27 ++ ...PhoneNumbersRegulatoryRequirements.test.ts | 58 ++++ src/test/resources/PhoneNumbersVoice.test.ts | 27 ++ src/test/resources/PortabilityChecks.test.ts | 35 +++ src/test/resources/PortingOrders.test.ts | 223 ++++++++++++++ .../resources/PortingPhoneNumbers.test.ts | 27 ++ src/test/resources/PortoutRequests.test.ts | 176 +++++++++++ src/test/resources/PublicKey.test.ts | 18 ++ src/test/resources/Queues.test.ts | 62 ++++ .../resources/RegulatoryRequirements.test.ts | 56 ++++ src/test/resources/ReportsMdrs.test.ts | 49 +++ src/test/resources/RoomCompositions.test.ts | 178 +++++++++++ src/test/resources/RoomParticipants.test.ts | 99 ++++++ src/test/resources/RoomSessions.test.ts | 225 ++++++++++++++ src/test/resources/Rooms.test.ts | 153 ++++++++++ src/test/resources/RoomsClientToken.test.ts | 56 ++++ src/test/resources/ShortCodes.test.ts | 92 ++++++ src/test/resources/SimCardActions.test.ts | 73 +++++ src/test/resources/SimCardGroups.test.ts | 179 +++++++++++ src/test/resources/SimCardOrders.test.ts | 97 ++++++ src/test/resources/SimCards.test.ts | 270 +++++++++++++++++ .../resources/TelephonyCredentials.test.ts | 168 +++++++++++ src/test/resources/TexmlApplications.test.ts | 227 ++++++++++++++ src/test/resources/UpdateClientState.test.ts | 30 ++ src/test/resources/Webhooks.test.ts | 45 +++ .../WirelessDetailRecordReports.test.ts | 100 ++++++ src/test/utils/index.ts | 21 ++ 95 files changed, 8363 insertions(+), 266 deletions(-) delete mode 100644 src/resources/BulkCreation.ts delete mode 100644 src/resources/Outbound.ts delete mode 100644 src/resources/RegisterCall.ts rename src/resources/{TeXMLApplication.ts => TexmlApplications.ts} (72%) delete mode 100644 src/resources/VerifiedCallsDisplayProfile.ts delete mode 100644 src/resources/VerifiedCallsDisplayProfiles.ts create mode 100644 src/test/resources/AccessIpAddress.test.ts create mode 100644 src/test/resources/AccessIpRanges.test.ts create mode 100644 src/test/resources/ActionsSimCards.test.ts create mode 100644 src/test/resources/ActivateDeactivateBulkCredentials.test.ts create mode 100644 src/test/resources/Addresses.test.ts create mode 100644 src/test/resources/AuthenticationProviders.test.ts create mode 100644 src/test/resources/AvailablePhoneNumbers.test.ts create mode 100644 src/test/resources/BillingGroups.test.ts create mode 100644 src/test/resources/BulkTelephonyCredentials.test.ts create mode 100644 src/test/resources/CallControlApplications.test.ts create mode 100644 src/test/resources/Calls.test.ts create mode 100644 src/test/resources/Campaign.test.ts create mode 100644 src/test/resources/CampaignBuilder.test.ts create mode 100644 src/test/resources/ClientStateUpdate.test.ts create mode 100644 src/test/resources/Conferences.test.ts create mode 100644 src/test/resources/Connections.test.ts create mode 100644 src/test/resources/CredentialConnections.test.ts create mode 100644 src/test/resources/DetailRecords.test.ts create mode 100644 src/test/resources/DocumentLinks.test.ts create mode 100644 src/test/resources/Documents.test.ts create mode 100644 src/test/resources/DynamicEmergency.test.ts create mode 100644 src/test/resources/Events.test.ts create mode 100644 src/test/resources/FaxApplications.test.ts create mode 100644 src/test/resources/Faxes.test.ts create mode 100644 src/test/resources/FqdnConnections.test.ts create mode 100644 src/test/resources/Fqdns.test.ts create mode 100644 src/test/resources/InventoryCoverage.test.ts create mode 100644 src/test/resources/IpConnections.test.ts create mode 100644 src/test/resources/Ips.test.ts create mode 100644 src/test/resources/ManagedAccounts.test.ts create mode 100644 src/test/resources/Messages.test.ts create mode 100644 src/test/resources/MessagesSenderIds.test.ts create mode 100644 src/test/resources/MessagingHostedNumberOrders.test.ts create mode 100644 src/test/resources/MessagingHostedNumbers.test.ts create mode 100644 src/test/resources/MessagingPhoneNumbers.test.ts create mode 100644 src/test/resources/MessagingSenderIds.test.ts create mode 100644 src/test/resources/MessagingShortCodes.test.ts create mode 100644 src/test/resources/MobileOperatorNetworks.test.ts create mode 100644 src/test/resources/NumberBackgroundJobs.test.ts create mode 100644 src/test/resources/NumberLookup.test.ts create mode 100644 src/test/resources/NumberOrderDocuments.test.ts create mode 100644 src/test/resources/NumberOrders.test.ts create mode 100644 src/test/resources/NumberPortouts.test.ts create mode 100644 src/test/resources/NumberReservations.test.ts create mode 100644 src/test/resources/OtaUpdates.test.ts create mode 100644 src/test/resources/OutboundVoiceProfiles.test.ts create mode 100644 src/test/resources/PhoneNumberAssignmentByProfile.test.ts create mode 100644 src/test/resources/PhoneNumberInboundChannels.test.ts create mode 100644 src/test/resources/PhoneNumbers.test.ts create mode 100644 src/test/resources/PhoneNumbersMessaging.test.ts create mode 100644 src/test/resources/PhoneNumbersRegulatoryRequirements.test.ts create mode 100644 src/test/resources/PhoneNumbersVoice.test.ts create mode 100644 src/test/resources/PortabilityChecks.test.ts create mode 100644 src/test/resources/PortingOrders.test.ts create mode 100644 src/test/resources/PortingPhoneNumbers.test.ts create mode 100644 src/test/resources/PortoutRequests.test.ts create mode 100644 src/test/resources/PublicKey.test.ts create mode 100644 src/test/resources/Queues.test.ts create mode 100644 src/test/resources/RegulatoryRequirements.test.ts create mode 100644 src/test/resources/ReportsMdrs.test.ts create mode 100644 src/test/resources/RoomCompositions.test.ts create mode 100644 src/test/resources/RoomParticipants.test.ts create mode 100644 src/test/resources/RoomSessions.test.ts create mode 100644 src/test/resources/Rooms.test.ts create mode 100644 src/test/resources/RoomsClientToken.test.ts create mode 100644 src/test/resources/ShortCodes.test.ts create mode 100644 src/test/resources/SimCardActions.test.ts create mode 100644 src/test/resources/SimCardGroups.test.ts create mode 100644 src/test/resources/SimCardOrders.test.ts create mode 100644 src/test/resources/SimCards.test.ts create mode 100644 src/test/resources/TelephonyCredentials.test.ts create mode 100644 src/test/resources/TexmlApplications.test.ts create mode 100644 src/test/resources/UpdateClientState.test.ts create mode 100644 src/test/resources/Webhooks.test.ts create mode 100644 src/test/resources/WirelessDetailRecordReports.test.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 83f03b0..1271d58 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,12 +13,22 @@ - Use ES Modules syntax - Update package `main` entrypoint to be compiled version of [src telnyx.ts](./src/telnyx.ts) - Added `Jest` and create tests in Typescript +- Update tests expect matchers according to limitations with `prism mock` +- Add `nock` cleanup setup - Make `setApiKey` TelnyxObject prototype method private - Moved to `moduleResolution` Bundler to support better imports and tests with `Jest` - Enabled `esModuleInterop` for Jest - Update files included when publishing - Remove custom resource get `generateAccessTokenFromCredential` from `TelephonyCredentials` - Update `AutoRechargePreferences` resource to match API spec +- Remove `RegisterCall` according to API spec +- Remove `ProgrammableFaxCommants` specs +- Remove `BulkCreation` according to API sepc +- Update `TexmlApplications` resource to match API spec +- Remove `Conferences` `dial_participant` action according to API sepc +- Remove `SimCards` `deletePublicIp` and `setPublicIp` according to API sepc +- Update `Queues` method names to camelCase +- Remove `VerifiedCallsDisplayProfile` resource according to API spec ## v1 diff --git a/package-lock.json b/package-lock.json index be2a9f1..39987d9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -27,7 +27,6 @@ "nyc": "^15.1.0", "prettier": "^3.0.0", "qs": "^6.11.2", - "telnyx": "^1.26.2", "ts-jest": "^29.2.5", "ts-node": "^10.9.2", "tweetnacl": "^1.0.3", @@ -5336,12 +5335,6 @@ "integrity": "sha512-uHaJFihxmJcEX3kT4I23ABqKKalJ/zDrDg0lsFtc1h+3uw49SIJ5beyhx5ExVRti3AvKoOJngIj7xz3oylPdWQ==", "dev": true }, - "node_modules/lodash.isplainobject": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", - "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==", - "dev": true - }, "node_modules/lodash.memoize": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", @@ -7124,23 +7117,6 @@ "url": "https://opencollective.com/unts" } }, - "node_modules/telnyx": { - "version": "1.27.0", - "resolved": "https://registry.npmjs.org/telnyx/-/telnyx-1.27.0.tgz", - "integrity": "sha512-cVbP3jEW4TbmNL5U0UbZc3OkLg+6dHRnMYByYfJnrGw5ZRn0XKb17Hx3fLMWmGgRFow7eqVP4hlCogbIB6T3+w==", - "dev": true, - "dependencies": { - "lodash.isplainobject": "^4.0.6", - "qs": "^6.11.2", - "safe-buffer": "^5.2.1", - "telnyx": "^1.26.2", - "tweetnacl": "^1.0.3", - "uuid": "^9.0.1" - }, - "engines": { - "node": "^6 || >=8" - } - }, "node_modules/test-exclude": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", diff --git a/package.json b/package.json index 3c63b36..5fbcc33 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,6 @@ "nyc": "^15.1.0", "prettier": "^3.0.0", "qs": "^6.11.2", - "telnyx": "^1.26.2", "ts-jest": "^29.2.5", "ts-node": "^10.9.2", "tweetnacl": "^1.0.3", diff --git a/src/resources/Addresses.ts b/src/resources/Addresses.ts index f54a35d..7859c20 100644 --- a/src/resources/Addresses.ts +++ b/src/resources/Addresses.ts @@ -20,7 +20,8 @@ function transformResponseData( } export const Addresses = TelnyxResource.extend({ - path: 'account/addresses', + path: 'addresses', + includeBasic: ['del'], list: telnyxMethod({ method: 'GET', diff --git a/src/resources/BulkCreation.ts b/src/resources/BulkCreation.ts deleted file mode 100644 index d183e44..0000000 --- a/src/resources/BulkCreation.ts +++ /dev/null @@ -1,55 +0,0 @@ -import TelnyxResource from '../TelnyxResource'; -import * as utils from '../utils'; -const telnyxMethod = TelnyxResource.method; - -import {ResponsePayload, TelnyxObject} from '../Types'; - -function transformResponseData( - response: ResponsePayload, - telnyx: TelnyxObject, -) { - return utils.addResourceToResponseData(response, telnyx, 'bulkCreation', { - del: telnyxMethod({ - method: 'DELETE', - path: '/bulkCreation', - urlParams: ['bulkCreation'], - paramsValues: [response.data.id as string], - paramsNames: ['id'], - }), - - update: telnyxMethod({ - method: 'PATCH', - path: '/bulkCreation', - urlParams: ['bulkCreation'], - paramsValues: [response.data.id as string], - paramsNames: ['id'], - }), - }); -} - -export const BulkCreation = TelnyxResource.extend({ - path: 'bulkCreation', - list: telnyxMethod({ - method: 'GET', - transformResponseData: transformResponseData, - }), - create: telnyxMethod({ - method: 'POST', - transformResponseData: transformResponseData, - }), - - retrieveTaskStatus: telnyxMethod({ - method: 'GET', - path: '/{taskId}', - urlParams: ['taskId'], - - transformResponseData: transformResponseData, - }), - retrieveDetailedTaskStatus: telnyxMethod({ - method: 'GET', - path: '/{taskId}/detailedStatus', - urlParams: ['taskId'], - - transformResponseData: transformResponseData, - }), -}); diff --git a/src/resources/Conferences.ts b/src/resources/Conferences.ts index 1a9b2e7..e0b7ea2 100644 --- a/src/resources/Conferences.ts +++ b/src/resources/Conferences.ts @@ -15,7 +15,6 @@ const CONFERENCES = [ 'record_stop', 'update', 'leave', - 'dial_participant', 'resume', ]; diff --git a/src/resources/Outbound.ts b/src/resources/Outbound.ts deleted file mode 100644 index 7956f3e..0000000 --- a/src/resources/Outbound.ts +++ /dev/null @@ -1,58 +0,0 @@ -import TelnyxResource from '../TelnyxResource'; -import * as utils from '../utils'; -const telnyxMethod = TelnyxResource.method; - -import {ResponsePayload, TelnyxObject} from '../Types'; - -function transformResponseData( - response: ResponsePayload, - telnyx: TelnyxObject, -) { - return utils.addResourceToResponseData( - response, - telnyx, - 'outboundVoiceProfiles', - { - del: telnyxMethod({ - method: 'DELETE', - path: '/{outboundId}', - urlParams: ['outboundId'], - paramsValues: [response.data.id as string], - paramsNames: ['id'], - }), - - update: telnyxMethod({ - method: 'PATCH', - path: '/{outboundId}', - urlParams: ['outboundId'], - paramsValues: [response.data.id as string], - paramsNames: ['id'], - }), - }, - ); -} - -export const Outbound = TelnyxResource.extend({ - path: 'outbound_voice_profiles', - - list: telnyxMethod({ - method: 'GET', - methodType: 'list', - - transformResponseData: transformResponseData, - }), - - create: telnyxMethod({ - method: 'POST', - - transformResponseData: transformResponseData, - }), - - retrieve: telnyxMethod({ - method: 'GET', - path: '/{id}', - urlParams: ['id'], - - transformResponseData: transformResponseData, - }), -}); diff --git a/src/resources/OutboundVoiceProfiles.ts b/src/resources/OutboundVoiceProfiles.ts index 62a8aaa..c7ac29e 100644 --- a/src/resources/OutboundVoiceProfiles.ts +++ b/src/resources/OutboundVoiceProfiles.ts @@ -1,16 +1,63 @@ import TelnyxResource from '../TelnyxResource'; +import * as utils from '../utils'; const telnyxMethod = TelnyxResource.method; +import {ResponsePayload, TelnyxObject} from '../Types'; + +function transformResponseData( + response: ResponsePayload, + telnyx: TelnyxObject, +) { + return utils.addResourceToResponseData( + response, + telnyx, + 'outboundVoiceProfiles', + { + del: telnyxMethod({ + method: 'DELETE', + path: '/{outboundId}', + urlParams: ['outboundId'], + paramsValues: [response.data.id as string], + paramsNames: ['id'], + }), + + update: telnyxMethod({ + method: 'PATCH', + path: '/{outboundId}', + urlParams: ['outboundId'], + paramsValues: [response.data.id as string], + paramsNames: ['id'], + }), + }, + ); +} + export const OutboundVoiceProfiles = TelnyxResource.extend({ path: 'outbound_voice_profiles', - includeBasic: ['list', 'retrieve', 'delete'], - ListOutboundVoiceProfiles: telnyxMethod({ + list: telnyxMethod({ + method: 'GET', + methodType: 'list', + + transformResponseData: transformResponseData, + }), + + create: telnyxMethod({ + method: 'POST', + + transformResponseData: transformResponseData, + }), + + retrieve: telnyxMethod({ method: 'GET', - path: '/outbound_voice_profiles', + path: '/{id}', + urlParams: ['id'], + + transformResponseData: transformResponseData, }), - DeleteOutboundVoiceProfile: telnyxMethod({ + + del: telnyxMethod({ method: 'DELETE', - path: '/outbound_voice_profiles/{id}', + path: '/{id}', }), }); diff --git a/src/resources/Queues.ts b/src/resources/Queues.ts index 102415c..9e575b0 100644 --- a/src/resources/Queues.ts +++ b/src/resources/Queues.ts @@ -50,7 +50,7 @@ export const Queues = TelnyxResource.extend({ transformResponseData: transformResponseData, }), - list_calls: telnyxMethod({ + listCalls: telnyxMethod({ method: 'GET', path: '/{queue_name}/calls', urlParams: ['queue_name'], @@ -58,7 +58,7 @@ export const Queues = TelnyxResource.extend({ transformResponseData: transformResponseData, }), - retrieve_call: telnyxMethod({ + retrieveCall: telnyxMethod({ method: 'GET', path: '/{queue_name}/calls/{call_control_id}', urlParams: ['queue_name', 'call_control_id'], diff --git a/src/resources/RegisterCall.ts b/src/resources/RegisterCall.ts deleted file mode 100644 index 3662ed3..0000000 --- a/src/resources/RegisterCall.ts +++ /dev/null @@ -1,6 +0,0 @@ -import TelnyxResource from '../TelnyxResource'; - -export const RegisterCall = TelnyxResource.extend({ - path: '/calls/register', - includeBasic: ['create'], -}); diff --git a/src/resources/RoomsClientTokens.ts b/src/resources/RoomsClientTokens.ts index c3d3a25..470ade9 100644 --- a/src/resources/RoomsClientTokens.ts +++ b/src/resources/RoomsClientTokens.ts @@ -5,12 +5,12 @@ export const RoomsClientTokens = TelnyxResource.extend({ path: 'rooms_client_tokens', includeBasic: ['create'], - RefreshRoomClientToken: telnyxMethod({ + refreshRoomClientToken: telnyxMethod({ method: 'POST', path: '/rooms/{room/id}/actions/refresh/client_token', urlParams: ['room_id'], }), - CreateRoomClientToken: telnyxMethod({ + createRoomClientToken: telnyxMethod({ method: 'POST', path: '/rooms/{room/id}/actions/generate/join/client_token', urlParams: ['room_id'], diff --git a/src/resources/SimCards.ts b/src/resources/SimCards.ts index ea61d57..3c8d18d 100644 --- a/src/resources/SimCards.ts +++ b/src/resources/SimCards.ts @@ -96,22 +96,6 @@ function transformResponseData( paramsValues: [response.data.id as string], paramsNames: ['id'], }), - - setPublicIP: telnyxMethod({ - method: 'POST', - path: '/{sim_card_id}/public_ip', - urlParams: ['sim_card_id'], - paramsValues: [response.data.id as string], - paramsNames: ['id'], - }), - - deletePublicIP: telnyxMethod({ - method: 'DELETE', - path: '/{sim_card_id}/public_ip', - urlParams: ['sim_card_id'], - paramsValues: [response.data.id as string], - paramsNames: ['id'], - }), }); } diff --git a/src/resources/TeXMLApplication.ts b/src/resources/TexmlApplications.ts similarity index 72% rename from src/resources/TeXMLApplication.ts rename to src/resources/TexmlApplications.ts index 5b972de..47f1d96 100644 --- a/src/resources/TeXMLApplication.ts +++ b/src/resources/TexmlApplications.ts @@ -1,6 +1,6 @@ import TelnyxResource from '../TelnyxResource'; -export const TeXMLApplication = TelnyxResource.extend({ +export const TexmlApplications = TelnyxResource.extend({ path: 'texml_applications', includeBasic: ['list', 'create', 'retrieve', 'del', 'update'], }); diff --git a/src/resources/VerifiedCallsDisplayProfile.ts b/src/resources/VerifiedCallsDisplayProfile.ts deleted file mode 100644 index b805600..0000000 --- a/src/resources/VerifiedCallsDisplayProfile.ts +++ /dev/null @@ -1,22 +0,0 @@ -import TelnyxResource from '../TelnyxResource'; -const telnyxMethod = TelnyxResource.method; - -export const VerifiedCallsDisplayProfile = TelnyxResource.extend({ - path: 'verified_calls_display_profile', - includeBasic: ['delete', 'list', 'retrieve', 'create'], - - DeleteProfile: telnyxMethod({ - method: 'DELETE', - path: '/verified_calls_display_profiles/{id}', - urlParams: ['id'], - }), - ListProfiles: telnyxMethod({ - method: 'GET', - path: '/verified_calls_display_profiles', - }), - CreateProfileVerificationRequest: telnyxMethod({ - method: 'POST', - path: '/verified_calls_display_profiles/{id}/verification_request', - urlParams: ['id'], - }), -}); diff --git a/src/resources/VerifiedCallsDisplayProfiles.ts b/src/resources/VerifiedCallsDisplayProfiles.ts deleted file mode 100644 index fa022b3..0000000 --- a/src/resources/VerifiedCallsDisplayProfiles.ts +++ /dev/null @@ -1,11 +0,0 @@ -import TelnyxResource from '../TelnyxResource'; - -export const VerifiedCallsDisplayProfiles = TelnyxResource.extend({ - path: 'verified_calls_display_profiles', - - create: TelnyxResource.method({ - method: 'POST', - path: '/{id}/verification_request', - urlParams: ['id'], - }), -}); diff --git a/src/telnyx.ts b/src/telnyx.ts index 4330cf4..b69825e 100644 --- a/src/telnyx.ts +++ b/src/telnyx.ts @@ -23,7 +23,6 @@ import {BillingGroups} from './resources/BillingGroups'; import {Brands} from './resources/Brands'; import {Bucket} from './resources/Bucket'; import {BucketUsage} from './resources/BucketUsage'; -import {BulkCreation} from './resources/BulkCreation'; import {BulkCredentials} from './resources/BulkCredentials'; import {BulkPhoneNumberCampaigns} from './resources/BulkPhoneNumberCampaigns'; import {BulkPhoneNumberOperations} from './resources/BulkPhoneNumberOperations'; @@ -96,7 +95,6 @@ import {NumberReservations} from './resources/NumberReservations'; import {NumbersFeatures} from './resources/NumbersFeatures'; import {Object as ObjectResource} from './resources/Object'; import {OtaUpdates} from './resources/OtaUpdates'; -import {Outbound} from './resources/Outbound'; import {OutboundVoiceProfiles} from './resources/OutboundVoiceProfiles'; import {Payment} from './resources/Payment'; import {PhoneNumberAssignmentByProfile} from './resources/PhoneNumberAssignmentByProfile'; @@ -122,7 +120,6 @@ import {PushCredentials} from './resources/PushCredentials'; import {Queues} from './resources/Queues'; import {RecordingsCommands} from './resources/RecordingsCommands'; import {Regions} from './resources/Regions'; -import {RegisterCall} from './resources/RegisterCall'; import {RegulatoryRequirements} from './resources/RegulatoryRequirements'; import {Reporting} from './resources/Reporting'; import {Reports} from './resources/Reports'; @@ -145,11 +142,9 @@ import {SimCardOrders} from './resources/SimCardOrders'; import {SimCards} from './resources/SimCards'; import {SslCertificates} from './resources/SslCertificates'; import {TelephonyCredentials} from './resources/TelephonyCredentials'; -import {TeXMLApplication} from './resources/TeXMLApplication'; +import {TexmlApplications} from './resources/TexmlApplications'; import {UpdateClientState} from './resources/UpdateClientState'; import {Verifications} from './resources/Verifications'; -import {VerifiedCallsDisplayProfile} from './resources/VerifiedCallsDisplayProfile'; -import {VerifiedCallsDisplayProfiles} from './resources/VerifiedCallsDisplayProfiles'; import {VerifiedNumbers} from './resources/VerifiedNumbers'; import {Verify} from './resources/Verify'; import {VerifyProfiles} from './resources/VerifyProfiles'; @@ -211,7 +206,6 @@ export function createTelnyx() { Brands, Bucket, BucketUsage, - BulkCreation, BulkCredentials, BulkPhoneNumberCampaigns, BulkPhoneNumberOperations, @@ -282,9 +276,8 @@ export function createTelnyx() { NumberPortouts, NumberReservations, NumbersFeatures, - Object: ObjectResource, + ObjectApi: ObjectResource, OtaUpdates, - Outbound, OutboundVoiceProfiles, Payment, PhoneNumberAssignmentByProfile, @@ -310,7 +303,6 @@ export function createTelnyx() { Queues, RecordingsCommands, Regions, - RegisterCall, RegulatoryRequirements, Reporting, Reports, @@ -333,17 +325,15 @@ export function createTelnyx() { SimCards, SslCertificates, TelephonyCredentials, - TeXMLApplication, + TexmlApplications, UpdateClientState, Verifications, - VerifiedCallsDisplayProfile, - VerifiedCallsDisplayProfiles, VerifiedNumbers, Verify, VerifyProfiles, VirtualCrossConnects, WdrDetailReports, - Webhooks: WebhooksResource, + WebhooksApi: WebhooksResource, WireguardInterfaces, WirelessDetailRecordReports, }; diff --git a/src/test/resources/AccessIpAddress.test.ts b/src/test/resources/AccessIpAddress.test.ts new file mode 100644 index 0000000..d15d3f0 --- /dev/null +++ b/src/test/resources/AccessIpAddress.test.ts @@ -0,0 +1,104 @@ +import {type ResponsePayload, utils as testUtils} from '../utils'; +const telnyx = testUtils.getTelnyxMock(); + +const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); + +describe('Access IP Addresses Resource', function () { + describe('retrieve', function () { + function responseFn(response: ResponsePayload) { + expect(response).toHaveProperty('created_at'); + expect(response).toHaveProperty('description'); + expect(response).toHaveProperty('id'); + expect(response).toHaveProperty('ip_address'); + expect(response).toHaveProperty('source'); + expect(response).toHaveProperty('status'); + expect(response).toHaveProperty('updated_at'); + expect(response).toHaveProperty('user_id'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.accessIpAddress.retrieve('123').then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.accessIpAddress + .retrieve('123', TEST_AUTH_KEY) + .then(responseFn); + }); + }); + + describe('list', function () { + function responseFn(response: ResponsePayload) { + expect(response).toHaveProperty('data'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.accessIpAddress.list().then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.accessIpAddress.list(TEST_AUTH_KEY).then(responseFn); + }); + }); + + describe('create', function () { + function responseFn(response: ResponsePayload) { + expect(response).toHaveProperty('created_at'); + expect(response).toHaveProperty('description'); + expect(response).toHaveProperty('id'); + expect(response).toHaveProperty('ip_address'); + expect(response).toHaveProperty('source'); + expect(response).toHaveProperty('status'); + expect(response).toHaveProperty('updated_at'); + expect(response).toHaveProperty('user_id'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.accessIpAddress + .create({ + ip_address: 'ip_address', + }) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.accessIpAddress + .create( + { + description: 'test description', + ip_address: '127.0.0.0', + }, + TEST_AUTH_KEY, + ) + .then(responseFn); + }); + }); + describe('del', function () { + function responseFn(response: ResponsePayload) { + expect(response).toHaveProperty('created_at'); + expect(response).toHaveProperty('description'); + expect(response).toHaveProperty('id'); + expect(response).toHaveProperty('ip_address'); + expect(response).toHaveProperty('source'); + expect(response).toHaveProperty('status'); + expect(response).toHaveProperty('updated_at'); + expect(response).toHaveProperty('user_id'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.accessIpAddress.del('1').then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.accessIpAddress.del('1', TEST_AUTH_KEY).then(responseFn); + }); + }); +}); diff --git a/src/test/resources/AccessIpRanges.test.ts b/src/test/resources/AccessIpRanges.test.ts new file mode 100644 index 0000000..23b4b8a --- /dev/null +++ b/src/test/resources/AccessIpRanges.test.ts @@ -0,0 +1,125 @@ +import { + type ResponsePayloadList, + type ResponsePayload, + utils as testUtils, +} from '../utils'; +const telnyx = testUtils.getTelnyxMock(); + +const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); + +describe('Access IP Ranges Resource', function () { + describe('list', function () { + function responseFn(response: ResponsePayloadList) { + expect(response).toHaveProperty('data'); + for (let index = 0; index < response.data.length; index++) { + const element = response.data[index]; + expect(element).toHaveProperty('cidr_block'); + expect(element).toHaveProperty('created_at'); + expect(element).toHaveProperty('description'); + expect(element).toHaveProperty('id'); + expect(element).toHaveProperty('status'); + expect(element).toHaveProperty('updated_at'); + expect(element).toHaveProperty('user_id'); + } + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.accessIpRanges + .list({ + filter: { + cidr_block: 'string', + status: 'pending', + created_at: { + gt: '2019-08-24T14:15:22Z', + lt: '2019-08-24T14:15:22Z', + }, + }, + page: { + number: '1', + size: '20', + }, + }) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.accessIpRanges + .list( + { + filter: { + cidr_block: 'string', + status: 'pending', + created_at: { + gt: '2019-08-24T14:15:22Z', + lt: '2019-08-24T14:15:22Z', + }, + }, + page: { + number: '1', + size: '20', + }, + }, + TEST_AUTH_KEY, + ) + .then(responseFn); + }); + }); + + describe('create', function () { + function responseFn(response: ResponsePayload) { + expect(response).toHaveProperty('cidr_block'); + expect(response).toHaveProperty('created_at'); + expect(response).toHaveProperty('description'); + expect(response).toHaveProperty('id'); + expect(response).toHaveProperty('status'); + expect(response).toHaveProperty('updated_at'); + expect(response).toHaveProperty('user_id'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.accessIpRanges + .create({ + cidr_block: 'string', + }) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.accessIpRanges + .create( + { + cidr_block: 'string', + description: 'string', + }, + TEST_AUTH_KEY, + ) + .then(responseFn); + }); + }); + + describe('del', function () { + function responseFn(response: ResponsePayload) { + expect(response).toHaveProperty('created_at'); + expect(response).toHaveProperty('cidr_block'); + expect(response).toHaveProperty('description'); + expect(response).toHaveProperty('id'); + expect(response).toHaveProperty('status'); + expect(response).toHaveProperty('updated_at'); + expect(response).toHaveProperty('user_id'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.accessIpRanges.del('1').then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.accessIpRanges.del('1', TEST_AUTH_KEY).then(responseFn); + }); + }); +}); diff --git a/src/test/resources/ActionsSimCards.test.ts b/src/test/resources/ActionsSimCards.test.ts new file mode 100644 index 0000000..5a2f88f --- /dev/null +++ b/src/test/resources/ActionsSimCards.test.ts @@ -0,0 +1,76 @@ +import {type ResponsePayloadList, utils as testUtils} from '../utils'; +const telnyx = testUtils.getTelnyxMock(); + +const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); + +describe.skip('SimCards Actions Resource', function () { + const registerData = { + registration_codes: ['2578318790'], + sim_card_group_id: '6a09cdc3-8948-47f0-aa62-74ac943d6c58', + }; + + const bulkData = { + mobile_operator_networks_preferences: [ + { + mobile_operator_network_id: '6a09cdc3-8948-47f0-aa62-74ac943d6c58', + priority: 0, + }, + ], + sim_card_ids: [ + '6a09cdc3-8948-47f0-aa62-74ac943d6c58', + '6b14e151-8493-4fa1-8664-1cc4e6d14158', + ], + }; + + function responseFnRegister(response: ResponsePayloadList) { + expect(response.data[0]).toMatchObject({ + record_type: 'sim_card', + }); + expect(response.data[0]).toHaveProperty('id'); + expect(response.data[0]).toHaveProperty('status'); + expect(response.data[0]).toHaveProperty('iccid'); + expect(response.data[0]).toHaveProperty('sim_card_group_id'); + } + + function responseFnBulk(response: ResponsePayloadList) { + expect(response.data[0]).toMatchObject({ + record_type: 'sim_card_network_preferences', + }); + expect(response.data[0]).toHaveProperty( + 'mobile_operator_networks_preferences', + ); + expect(response.data[0]).toHaveProperty('sim_card_id'); + } + + describe('register', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.actions.simCards + .register(registerData) + .then(responseFnRegister); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.actions.simCards + .register(registerData, TEST_AUTH_KEY) + .then(responseFnRegister); + }); + }); + + describe('bulkNetworkPreferences', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.actions.simCards + .bulkNetworkPreferences(bulkData) + .then(responseFnBulk); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.actions.simCards + .bulkNetworkPreferences(bulkData, TEST_AUTH_KEY) + .then(responseFnBulk); + }); + }); +}); diff --git a/src/test/resources/ActivateDeactivateBulkCredentials.test.ts b/src/test/resources/ActivateDeactivateBulkCredentials.test.ts new file mode 100644 index 0000000..92d6fa0 --- /dev/null +++ b/src/test/resources/ActivateDeactivateBulkCredentials.test.ts @@ -0,0 +1,40 @@ +import {type ResponsePayload, utils as testUtils} from '../utils'; +const telnyx = testUtils.getTelnyxMock(); + +const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); + +// prism mock can figure this dynamic path param match +// [HTTP SERVER] post /actions/activate/telephony_credentials ✖ error Request terminated with error: https://stoplight.io/prism/errors#NO_PATH_MATCHED_ERROR: Route not resolved, no path matched +describe.skip('ActivateDeactivateBulkCredentials', function () { + describe('create', function () { + function responseFn(response: ResponsePayload) { + expect(response).toHaveProperty('data'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.activateDeactivateBulkCredentials + .create('activate', { + filter: { + tag: 'string', + }, + }) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.activateDeactivateBulkCredentials + .create( + 'activate', + { + filter: { + tag: 'string', + }, + }, + TEST_AUTH_KEY, + ) + .then(responseFn); + }); + }); +}); diff --git a/src/test/resources/Addresses.test.ts b/src/test/resources/Addresses.test.ts new file mode 100644 index 0000000..63112b2 --- /dev/null +++ b/src/test/resources/Addresses.test.ts @@ -0,0 +1,162 @@ +import {TelnyxObject} from '../../Types'; +import { + type ResponsePayloadList, + type ResponsePayload, + utils as testUtils, +} from '../utils'; +const telnyx = testUtils.getTelnyxMock(); + +const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); +const TEST_UUID = '123e4567-e89b-12d3-a456-426614174000'; + +const addressData = { + address_book: true, + administrative_area: 'IL', + borough: 'Guadalajara', + neighborhood: 'Ciudad de los deportes', + business_name: 'Kon', + country_code: 'us', + extended_address: 'Suite 123', + first_name: 'Alfred', + last_name: 'Foster', + locality: 'Chicago', + postal_code: '2904', + street_address: '311 W Superior Street', +}; + +describe('Address', function () { + describe('list', function () { + function responseFn(response: ResponsePayloadList) { + expect(response.data[0]).toMatchObject({ + first_name: expect.anything(), + last_name: expect.anything(), + phone_number: expect.anything(), + business_name: expect.anything(), + street_address: expect.anything(), + extended_address: expect.anything(), + locality: expect.anything(), + administrative_area: expect.anything(), + postal_code: expect.anything(), + country_code: expect.anything(), + address_book: expect.anything(), + }); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.addresses.list().then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.addresses + .list( + { + page: 1, + }, + TEST_AUTH_KEY, + ) + .then(responseFn); + }); + }); + + describe('create', function () { + function responseFn(response: ResponsePayload) { + expect(response.data).toHaveProperty('id'); + expect(response.data).toHaveProperty('first_name'); + expect(response.data).toHaveProperty('last_name'); + expect(response.data).toHaveProperty('business_name'); + expect(response.data).toHaveProperty('street_address'); + expect(response.data).toHaveProperty('extended_address'); + expect(response.data).toHaveProperty('locality'); + expect(response.data).toHaveProperty('administrative_area'); + expect(response.data).toHaveProperty('postal_code'); + expect(response.data).toHaveProperty('country_code'); + expect(response.data).toHaveProperty('address_book'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.addresses.create(addressData).then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.addresses + .create(addressData, TEST_AUTH_KEY) + .then(responseFn); + }); + }); + + describe('retrieve', function () { + function responseFn(response: ResponsePayload) { + expect(response.data).toHaveProperty('id'); + expect(response.data).toHaveProperty('first_name'); + expect(response.data).toHaveProperty('last_name'); + expect(response.data).toHaveProperty('business_name'); + expect(response.data).toHaveProperty('street_address'); + expect(response.data).toHaveProperty('extended_address'); + expect(response.data).toHaveProperty('locality'); + expect(response.data).toHaveProperty('administrative_area'); + expect(response.data).toHaveProperty('postal_code'); + expect(response.data).toHaveProperty('country_code'); + expect(response.data).toHaveProperty('address_book'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.addresses.retrieve(TEST_UUID).then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.addresses + .retrieve(TEST_UUID, TEST_AUTH_KEY) + .then(responseFn); + }); + }); + + describe('Nested', function () { + let telnyxInstance: TelnyxObject; + + beforeEach(() => { + // make specs independent + telnyxInstance = testUtils.getTelnyxMock(); + }); + + function responseFn(response: ResponsePayload) { + if (response.data) { + expect(response.data).toHaveProperty('id'); + expect(response.data).toHaveProperty('street_address'); + expect(response.data).toHaveProperty('postal_code'); + expect(response.data).toHaveProperty('first_name'); + expect(response.data).toHaveProperty('last_name'); + expect(response.data).toHaveProperty('locality'); + expect(response.data).toMatchObject({record_type: 'address'}); + } + } + + describe('del', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyxInstance.addresses.create(addressData).then(function ( + response: ResponsePayload, + ) { + const mp = response.data; + // @ts-expect-error TODO: import .d.ts files under src/test folder + return mp.del().then(responseFn); + }); + }); + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyxInstance.addresses.retrieve('123').then(function ( + response: ResponsePayload, + ) { + const mp = response.data; + // @ts-expect-error TODO: import .d.ts files under src/test folder + return mp.del(TEST_AUTH_KEY).then(responseFn); + }); + }); + }); + }); +}); diff --git a/src/test/resources/AuthenticationProviders.test.ts b/src/test/resources/AuthenticationProviders.test.ts new file mode 100644 index 0000000..919e2fd --- /dev/null +++ b/src/test/resources/AuthenticationProviders.test.ts @@ -0,0 +1,106 @@ +import {type ResponsePayloadList, utils as testUtils} from '../utils'; +const telnyx = testUtils.getTelnyxMock(); + +const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); + +describe('AuthenticationProviders Resource', function () { + function responseFn(response: ResponsePayloadList) { + expect(response.data).toHaveProperty('id'); + expect(response.data).toHaveProperty('active'); + expect(response.data).toHaveProperty('name'); + expect(response.data).toHaveProperty('short_name'); + expect(response.data).toHaveProperty('settings'); + expect(response.data).toMatchObject({ + record_type: 'authentication_provider', + }); + } + + describe('list', function () { + function listResponseFn(response: ResponsePayloadList) { + expect(response.data[0]).toHaveProperty('id'); + expect(response.data[0]).toHaveProperty('active'); + expect(response.data[0]).toHaveProperty('name'); + expect(response.data[0]).toHaveProperty('short_name'); + expect(response.data[0]).toHaveProperty('settings'); + expect(response.data[0]).toMatchObject({ + record_type: 'authentication_provider', + }); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.authenticationProviders.list().then(listResponseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.authenticationProviders + .list(TEST_AUTH_KEY) + .then(listResponseFn); + }); + }); + + describe('create', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.authenticationProviders + .create({ + name: 'Okta', + short_name: 'myorg', + settings: { + assertion_consumer_service_url: + 'https://api.telnyx.com/sso/saml/auth/myorg', + idp_cert_fingerprint: + '13:38:C7:BB:C9:FF:4A:70:38:3A:E3:D9:5C:CD:DB:2E:50:1E:80:A7', + idp_cert_fingerprint_algorithm: 'sha256', + idp_entity_id: 'https://myorg.myidp.com/saml/metadata', + idp_sso_target_url: + 'https://myorg.myidp.com/trust/saml2/http-post/sso', + name_identifier_format: 'urn:oasis:names:tc:SAML:1.1:nameid-format', + service_provider_entity_id: + 'https://api.telnyx.com/sso/saml/metadata/myorg', + }, + }) + .then(responseFn); + }); + }); + + describe('retrieve', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.authenticationProviders.retrieve('123').then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.authenticationProviders + .retrieve('123', TEST_AUTH_KEY) + .then(responseFn); + }); + }); + + describe('update', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.authenticationProviders + .update('123', { + short_name: 'shorty', + }) + .then(responseFn); + }); + }); + + describe('del', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.authenticationProviders.del('123').then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.authenticationProviders + .del('123', TEST_AUTH_KEY) + .then(responseFn); + }); + }); +}); diff --git a/src/test/resources/AvailablePhoneNumbers.test.ts b/src/test/resources/AvailablePhoneNumbers.test.ts new file mode 100644 index 0000000..5c97c60 --- /dev/null +++ b/src/test/resources/AvailablePhoneNumbers.test.ts @@ -0,0 +1,21 @@ +import {type ResponsePayloadList, utils as testUtils} from '../utils'; + +const telnyx = testUtils.getTelnyxMock(); + +describe('AvailablePhoneNumbers Resource', function () { + describe('list', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.availablePhoneNumbers.list().then(function ( + response: ResponsePayloadList, + ) { + expect(response.data[0]).toHaveProperty('phone_number'); + expect(response.data[0]).toHaveProperty('cost_information'); + expect(response.data[0]).toHaveProperty('region_information'); + expect(response.data[0]).toMatchObject({ + record_type: 'available_phone_number', + }); + }); + }); + }); +}); diff --git a/src/test/resources/Balance.test.ts b/src/test/resources/Balance.test.ts index a3d530a..d1acde8 100644 --- a/src/test/resources/Balance.test.ts +++ b/src/test/resources/Balance.test.ts @@ -1,6 +1,6 @@ /* eslint-disable @typescript-eslint/ban-ts-comment */ -import {utils as testUtils} from '../utils'; +import {type ResponsePayload, utils as testUtils} from '../utils'; const telnyx = testUtils.getTelnyxMock(); @@ -9,7 +9,7 @@ describe('Balance Resource', function () { test('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder return telnyx.balance.retrieve().then(function ( - response: Record, + response: ResponsePayload, ) { expect(response.data).toHaveProperty('record_type', 'balance'); expect(response.data).toHaveProperty('balance'); diff --git a/src/test/resources/BillingGroups.test.ts b/src/test/resources/BillingGroups.test.ts new file mode 100644 index 0000000..3bf3297 --- /dev/null +++ b/src/test/resources/BillingGroups.test.ts @@ -0,0 +1,145 @@ +import { + type ResponsePayloadList, + type ResponsePayload, + utils as testUtils, +} from '../utils'; +const telnyx = testUtils.getTelnyxMock(); + +const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); +const TEST_UUID = '123e4567-e89b-12d3-a456-426614174000'; + +describe('Billing Groups', function () { + describe('list', function () { + function responseFn(response: ResponsePayloadList) { + expect(response).toHaveProperty('data'); + expect(response.data[0]).toHaveProperty('created_at'); + expect(response.data[0]).toHaveProperty('deleted_at'); + expect(response.data[0]).toHaveProperty('id'); + expect(response.data[0]).toHaveProperty('name'); + expect(response.data[0]).toHaveProperty('organization_id'); + expect(response.data[0]).toHaveProperty('record_type'); + expect(response.data[0]).toHaveProperty('updated_at'); + expect(response).toHaveProperty('meta'); + expect(response.meta).toHaveProperty('page_number'); + expect(response.meta).toHaveProperty('page_size'); + expect(response.meta).toHaveProperty('total_pages'); + expect(response.meta).toHaveProperty('total_results'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.billingGroups + .list({ + page: { + number: 1, + size: 20, + }, + }) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.billingGroups + .list( + { + page: { + number: 1, + size: 20, + }, + }, + TEST_AUTH_KEY, + ) + .then(responseFn); + }); + }); + + describe('create', function () { + function responseFn(response: ResponsePayload) { + expect(response).toHaveProperty('data'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.billingGroups + .create({ + name: 'name', + }) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.billingGroups + .create( + { + name: 'name', + }, + TEST_AUTH_KEY, + ) + .then(responseFn); + }); + }); + + describe('retrieve', function () { + function responseFn(response: ResponsePayload) { + expect(response).toHaveProperty('data'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.billingGroups.retrieve(TEST_UUID).then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.billingGroups + .retrieve(TEST_UUID, TEST_AUTH_KEY) + .then(responseFn); + }); + }); + describe('del', function () { + function responseFn(response: ResponsePayload) { + expect(response).toHaveProperty('data'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.billingGroups.del(TEST_UUID).then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.billingGroups + .del(TEST_UUID, TEST_AUTH_KEY) + .then(responseFn); + }); + }); + describe('update', function () { + function responseFn(response: ResponsePayload) { + expect(response).toHaveProperty('data'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.billingGroups + .update(TEST_UUID, { + name: 'string', + }) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.billingGroups + .update( + TEST_UUID, + { + name: 'string', + }, + TEST_AUTH_KEY, + ) + .then(responseFn); + }); + }); +}); diff --git a/src/test/resources/BulkTelephonyCredentials.test.ts b/src/test/resources/BulkTelephonyCredentials.test.ts new file mode 100644 index 0000000..e8ef7a6 --- /dev/null +++ b/src/test/resources/BulkTelephonyCredentials.test.ts @@ -0,0 +1,101 @@ +import {type ResponsePayload, utils as testUtils} from '../utils'; +const telnyx = testUtils.getTelnyxMock(); + +const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); + +// not found in API Spec +describe.skip('Bulk Telephony Credentials', function () { + describe('create', function () { + function responseFn(response: ResponsePayload) { + expect(response).toHaveProperty('data'); + expect(response.data).toHaveProperty('credentials'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.bulkTelephonyCredentials + .create({ + connection_id: '804252963366242252', + name: 'Default Name', + tag: 'My Credentials', + }) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.bulkTelephonyCredentials + .create( + { + connection_id: '804252963366242252', + name: 'Default Name', + tag: 'My Credentials', + }, + TEST_AUTH_KEY, + ) + .then(responseFn); + }); + }); + describe('delete', function () { + function responseFn(response: ResponsePayload) { + expect(response).toHaveProperty('data'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.bulkTelephonyCredentials + .deleteCredentials({ + filter: { + tag: 'data', + }, + }) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.bulkTelephonyCredentials + .deleteCredentials( + { + filter: { + tag: 'data', + }, + }, + TEST_AUTH_KEY, + ) + .then(responseFn); + }); + }); + describe('update', function () { + function responseFn(response: ResponsePayload) { + expect(response).toHaveProperty('data'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.bulkTelephonyCredentials + .updateCredentials({ + filter: { + tag: 'data', + }, + }) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.bulkTelephonyCredentials + .updateCredentials( + { + connection_id: '804252963366242252', + tag: 'My Credentials', + filter: { + tag: 'data', + }, + }, + TEST_AUTH_KEY, + ) + .then(responseFn); + }); + }); +}); diff --git a/src/test/resources/CallControlApplications.test.ts b/src/test/resources/CallControlApplications.test.ts new file mode 100644 index 0000000..a145b36 --- /dev/null +++ b/src/test/resources/CallControlApplications.test.ts @@ -0,0 +1,179 @@ +import { + type ResponsePayloadList, + type ResponsePayload, + utils as testUtils, +} from '../utils'; +const telnyx = testUtils.getTelnyxMock(); + +const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); + +describe('Call Control List list', function () { + describe('retrieve', function () { + function responseFn(response: ResponsePayload) { + expect(response.data).toHaveProperty('id'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.callControlApplications.retrieve('123').then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.callControlApplications + .retrieve('123', TEST_AUTH_KEY) + .then(responseFn); + }); + }); + + describe('create', function () { + function responseFn(response: ResponsePayload) { + expect(response.data).toHaveProperty('id'); + expect(response.data).toMatchObject({ + record_type: 'call_control_application', + }); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.callControlApplications + .create({ + application_name: 'test', + webhook_event_url: 'https://fakeurl.org/123123', + }) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.callControlApplications + .create( + { + application_name: 'test', + webhook_event_url: 'https://fakeurl.org/123123', + }, + TEST_AUTH_KEY, + ) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth in options]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.callControlApplications + .create( + { + application_name: 'test', + webhook_event_url: 'https://fakeurl.org/123123', + }, + {api_key: TEST_AUTH_KEY}, + ) + .then(responseFn); + }); + }); + + describe('list', function () { + function responseFn(response: ResponsePayloadList) { + expect(response.data[0]).toHaveProperty('id'); + expect(response.data[0]).toMatchObject({ + record_type: 'call_control_application', + }); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.callControlApplications.list().then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.callControlApplications + .list(TEST_AUTH_KEY) + .then(responseFn); + }); + }); + + describe('del', function () { + function responseFn(response: ResponsePayload) { + if (response.data) { + expect(response.data).toHaveProperty('id'); + expect(response.data).toMatchObject({ + record_type: 'call_control_application', + }); + } + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.callControlApplications + .create({ + application_name: 'test', + webhook_event_url: 'https://fakeurl.org/123123', + }) + .then(function (response: ResponsePayload) { + const callControlApplications = response.data; + // @ts-expect-error TODO: import .d.ts files under src/test folder + return callControlApplications.del().then(responseFn); + }); + }); + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.callControlApplications.retrieve('123').then(function ( + response: ResponsePayload, + ) { + const callControlApplications = response.data; + // @ts-expect-error TODO: import .d.ts files under src/test folder + return callControlApplications.del(TEST_AUTH_KEY).then(responseFn); + }); + }); + }); + + describe('update', function () { + function responseFn(response: ResponsePayload) { + if (response.data) { + expect(response.data).toHaveProperty('id'); + expect(response.data).toHaveProperty('application_name'); + } + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.callControlApplications + .create({ + application_name: 'test', + webhook_event_url: 'https://fakeurl.org/123123', + }) + .then(function (response: ResponsePayload) { + const ip = response.data; + return ( + ip + // @ts-expect-error TODO: import .d.ts files under src/test folder + .update({ + application_name: 'test updated', + webhook_event_url: 'https://fakeurl.org/123123', + }) + .then(responseFn) + ); + }); + }); + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.callControlApplications.retrieve('123').then(function ( + response: ResponsePayload, + ) { + const ip = response.data; + return ( + ip + // @ts-expect-error TODO: import .d.ts files under src/test folder + .update( + { + application_name: 'test updated', + webhook_event_url: 'https://fakeurl.org/123123', + }, + TEST_AUTH_KEY, + ) + .then(responseFn) + ); + }); + }); + }); +}); diff --git a/src/test/resources/Calls.test.ts b/src/test/resources/Calls.test.ts new file mode 100644 index 0000000..1bd334b --- /dev/null +++ b/src/test/resources/Calls.test.ts @@ -0,0 +1,285 @@ +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-nocheck +import { + type ResponsePayloadList, + type ResponsePayload, + utils as testUtils, +} from '../utils'; +import * as utils from '../../utils'; +import {TelnyxObject} from '../../Types'; + +const telnyx = testUtils.getTelnyxMock(); + +const TEST_AUTH_KEY = + 'KEY187557EC22404DB39975C43ACE661A58_9QdDI7XD5bvyahtaWx1YQo'; + +const COMMANDS = [ + 'answer', + 'reject', + 'hangup', + 'bridge', + 'speak', + 'fork_start', + 'fork_stop', + 'gather_using_audio', + 'gather_using_speak', + 'gather_stop', + 'playback_start', + 'playback_stop', + 'record_start', + 'record_stop', + 'record_pause', + 'record_resume', + 'refer', + 'send_dtmf', + 'transfer', + 'transcription_start', + 'transcription_stop', + 'enqueue', + 'leave_queue', +]; + +describe('Calls Resource', function () { + describe('Call Information', function () { + describe('retrieve', function () { + function responseFn(response: ResponsePayload) { + expect(response.data).toMatchObject({ + call_control_id: expect.anything(), + record_type: 'call', + }); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.calls + .retrieve('891510ac-f3e4-11e8-af5b-de00688a4901') + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.calls + .retrieve('891510ac-f3e4-11e8-af5b-de00688a4901', TEST_AUTH_KEY) + .then(responseFn); + }); + }); + }); + + describe('Call Events', function () { + describe('list', function () { + function responseFn(response: ResponsePayloadList) { + expect(response.data[0]).toHaveProperty('call_session_id'); + expect(response.data[0]).toHaveProperty('call_leg_id'); + expect(response.data[0]).toHaveProperty('name'); + expect(response.data[0]).toHaveProperty('type'); + expect(response.data[0]).toMatchObject({record_type: 'call_event'}); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.callEvents.list().then(responseFn); + }); + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.callEvents.list(TEST_AUTH_KEY).then(responseFn); + }); + }); + }); + + describe('Call Commands', function () { + const callCreateData = { + connection_id: 'uuid', + to: '+18005550199', + from: '+18005550100', + command_id: '891510ac-f3e4-11e8-af5b-de00688a4901', + }; + const callCommandsData = { + bridge: { + call_control_id: '', + }, + reject: { + cause: 'USER_BUSY', + }, + speak: { + payload: 'Hello', + voice: 'female', + language: 'en-US', + }, + gather_using_audio: { + audio_url: 'http://example.com/message.wav', + }, + gather_using_speak: { + payload: 'Hello', + voice: 'male', + language: 'en-US', + }, + playback_start: { + audio_url: 'http://example.com/message.wav', + }, + record_start: { + format: 'mp3', + channels: 'single', + }, + dtmf: { + digits: '1www2WABCDw9', + }, + send_dtmf: { + digits: '1www2WABCDw9', + }, + transfer: { + to: '+13129457420', + }, + refer: { + sip_address: 'sip:username@sip.non-telnyx-address.com', + }, + enqueue: { + queue_name: 'tier_1_support', + }, + }; + + function responseFn(response: ResponsePayload) { + expect(response.data).toMatchObject({result: 'ok'}); + } + + describe('create', function () { + function responseFn(response: ResponsePayload) { + expect(response.data).toHaveProperty('call_session_id'); + expect(response.data).toHaveProperty('call_leg_id'); + expect(response.data).toHaveProperty('call_control_id'); + expect(response.data).toMatchObject({ + record_type: 'call', + is_alive: false, + }); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.calls.create(callCreateData).then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.calls + .create(callCreateData, TEST_AUTH_KEY) + .then(responseFn); + }); + }); + + COMMANDS.forEach(function (command) { + describe(command, function () { + const camelCaseCommand = utils.snakeToCamelCase(command); + let telnyxInstance: TelnyxObject; + + beforeEach(() => { + // make specs independent + telnyxInstance = testUtils.getTelnyxMock(); + }); + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyxInstance.calls + .create(callCreateData) + .then(async function (response: ResponsePayload) { + const call = response.data; + // // @ts-expect-error TODO: import .d.ts files under src/test folder + await call[utils.snakeToCamelCase(command)]( + callCommandsData[command] || {'': ''}, // need to pass string due to telnyx mock parse + ).then(responseFn); + + // // @ts-expect-error TODO: import .d.ts files under src/test folder + return call[command](callCommandsData[command] || {'': ''}).then( + // need to pass string due to telnyx mock parse + responseFn, + ); + }); + }); + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyxInstance.calls + .create(callCreateData) + .then(async function (response: ResponsePayload) { + const call = response.data; + // // @ts-expect-error TODO: import .d.ts files under src/test folder + await call[utils.snakeToCamelCase(command)]( + callCommandsData[command] || {'': ''}, // need to pass string due to telnyx mock parse + TEST_AUTH_KEY, + ).then(responseFn); + + // // @ts-expect-error TODO: import .d.ts files under src/test folder + return call[command]( + callCommandsData[command] || {'': ''}, // need to pass string due to telnyx mock parse + TEST_AUTH_KEY, + ).then(responseFn); + }); + }); + + test('Sends the correct method request [with empty resource instance]', async function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + const call = new telnyxInstance.Call({ + call_control_id: '3fa85f55-5717-4562-b3fc-2c963f63vga6', + }); + + // @ts-expect-error TODO: import .d.ts files under src/test folder + await call[utils.snakeToCamelCase(command)]( + callCommandsData[command] || {'': ''}, // need to pass string due to telnyx mock parse + ).then(responseFn); + + // @ts-expect-error TODO: import .d.ts files under src/test folder + return call[utils.snakeToCamelCase(command)]( + callCommandsData[command] || {'': ''}, // need to pass string due to telnyx mock parse + TEST_AUTH_KEY, + ).then(responseFn); + }); + + test('Sends the correct method request [with empty resource instance and specified auth]', async function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + const call = new telnyxInstance.Call({ + call_control_id: '3fa85f55-5717-4562-b3fc-2c963f63vga6', + }); + + // @ts-expect-error TODO: import .d.ts files under src/test folder + await call[command]( + callCommandsData[command] || {'': ''}, // need to pass string due to telnyx mock parse + TEST_AUTH_KEY, + ).then(responseFn); + // @ts-expect-error TODO: import .d.ts files under src/test folder + return call[command](callCommandsData[command] || {'': ''}).then( + responseFn, + ); + }); + + if (camelCaseCommand !== command) { + describe(camelCaseCommand, function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyxInstance.calls.create(callCreateData).then(function ( + response: ResponsePayload, + ) { + const call = response.data; + + // // @ts-expect-error TODO: import .d.ts files under src/test folder + return call[camelCaseCommand]( + callCommandsData[command] || {'': ''}, // need to pass string due to telnyx mock parse + ).then(responseFn); + }); + }); + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyxInstance.calls.create(callCreateData).then(function ( + response: ResponsePayload, + ) { + const call = response.data; + + // // @ts-expect-error TODO: import .d.ts files under src/test folder + return call[camelCaseCommand]( + callCommandsData[command] || {'': ''}, // need to pass string due to telnyx mock parse + TEST_AUTH_KEY, + ).then(responseFn); + }); + }); + }); + } + }); + }); + }); +}); diff --git a/src/test/resources/Campaign.test.ts b/src/test/resources/Campaign.test.ts new file mode 100644 index 0000000..12e54ac --- /dev/null +++ b/src/test/resources/Campaign.test.ts @@ -0,0 +1,269 @@ +import {type ResponsePayload, utils as testUtils} from '../utils'; +const telnyx = testUtils.getTelnyxMock(); + +const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); + +type ResponsePayloadCampaign = ResponsePayload & { + sharedByMe: object; + sharedWithMe: object; + detail: object[]; + lastResponse: { + statusCode: number; + }; +}; +describe('Campaign', function () { + describe('list', function () { + function responseFn(response: ResponsePayload) { + expect(response).toHaveProperty('page'); + expect(response).toHaveProperty('records'); + expect(response).toHaveProperty('totalRecords'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.campaign.list({brandId: 'string'}).then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.campaign + .list({brandId: 'string'}, TEST_AUTH_KEY) + .then(responseFn); + }); + }); + describe('acceptShareCampaign', function () { + function responseFn(response: ResponsePayloadCampaign) { + expect(response).toHaveProperty('detail'); + for (const detail of response.detail) { + expect(detail).toHaveProperty('loc'); + expect(detail).toHaveProperty('msg'); + expect(detail).toHaveProperty('type'); + } + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.campaign + .acceptShareCampaign({campaignId: '1'}) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.campaign + .acceptShareCampaign({brandId: 'string'}, TEST_AUTH_KEY) + .then(responseFn); + }); + }); + describe('getCampaignCost', function () { + function responseFn(response: ResponsePayload) { + expect(response).toHaveProperty('campaignUsecase'); + expect(response).toHaveProperty('description'); + expect(response).toHaveProperty('monthlyCost'); + expect(response).toHaveProperty('upFrontCost'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.campaign.getCampaignCost({usecase: '1'}).then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.campaign + .getCampaignCost({usecase: 'string'}, TEST_AUTH_KEY) + .then(responseFn); + }); + }); + describe('Get My Campaign', function () { + function responseFn(response: ResponsePayload) { + expect(response).toHaveProperty('affiliateMarketing'); + expect(response).toHaveProperty('ageGated'); + expect(response).toHaveProperty('autoRenewal'); + expect(response).toHaveProperty('billedDate'); + expect(response).toHaveProperty('brandId'); + expect(response).toHaveProperty('campaignId'); + expect(response).toHaveProperty('createDate'); + expect(response).toHaveProperty('description'); + expect(response).toHaveProperty('directLending'); + expect(response).toHaveProperty('embeddedLink'); + expect(response).toHaveProperty('embeddedPhone'); + expect(response).toHaveProperty('helpMessage'); + expect(response).toHaveProperty('messageFlow'); + expect(response).toHaveProperty('numberPool'); + expect(response).toHaveProperty('resellerId'); + expect(response).toHaveProperty('sample1'); + expect(response).toHaveProperty('sample2'); + expect(response).toHaveProperty('sample3'); + expect(response).toHaveProperty('sample4'); + expect(response).toHaveProperty('sample5'); + expect(response).toHaveProperty('status'); + expect(response).toHaveProperty('subUsecases'); + expect(response).toHaveProperty('subscriberHelp'); + expect(response).toHaveProperty('subscriberOptin'); + expect(response).toHaveProperty('subscriberOptout'); + expect(response).toHaveProperty('usecase'); + expect(response).toHaveProperty('vertical'); + } + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.campaign + .retrieveCampaignId({ + campaignId: 'campaignId', + }) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.campaign + .retrieveCampaignId( + { + campaignId: 'campaignId', + }, + TEST_AUTH_KEY, + ) + .then(responseFn); + }); + }); + describe('Get Campaign MNO Metadata', function () { + function responseFn(response: ResponsePayloadCampaign) { + expect(response.lastResponse.statusCode).toBe(200); + } + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.campaign + .retrieveMnoMetadata({ + campaignId: 'campaignId', + }) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.campaign + .retrieveMnoMetadata( + { + campaignId: 'campaignId', + }, + TEST_AUTH_KEY, + ) + .then(responseFn); + }); + }); + describe('Get Campaign Operation Status', function () { + function responseFn(response: ResponsePayloadCampaign) { + expect(response.lastResponse.statusCode).toBe(200); + } + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.campaign + .retrieveOperationStatus({ + campaignId: 'campaignId', + }) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.campaign + .retrieveOperationStatus( + { + campaignId: 'campaignId', + }, + TEST_AUTH_KEY, + ) + .then(responseFn); + }); + }); + describe('retrieveOsrCampaignAttributes', function () { + function responseFn(response: ResponsePayloadCampaign) { + expect(response.lastResponse.statusCode).toBe(200); + } + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.campaign + .retrieveOsrCampaignAttributes({ + campaignId: 'campaignId', + }) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.campaign + .retrieveOsrCampaignAttributes( + { + campaignId: 'campaignId', + }, + TEST_AUTH_KEY, + ) + .then(responseFn); + }); + }); + describe('deactivateCampaignId', function () { + function responseFn(response: ResponsePayload) { + expect(response).toHaveProperty('message'); + expect(response).toHaveProperty('record_type'); + expect(response).toHaveProperty('time'); + } + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.campaign + .deactivateCampaignId({ + campaignId: 'campaignId', + }) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.campaign + .deactivateCampaignId( + { + campaignId: 'campaignId', + }, + TEST_AUTH_KEY, + ) + .then(responseFn); + }); + }); + describe('retrieveSharingStatus', function () { + function responseFn(response: ResponsePayloadCampaign) { + expect(response).toHaveProperty('sharedByMe'); + const sharedByMe = response.sharedByMe; + expect(sharedByMe).toHaveProperty('downstreamCnpId'); + expect(sharedByMe).toHaveProperty('sharedDate'); + expect(sharedByMe).toHaveProperty('sharingStatus'); + expect(sharedByMe).toHaveProperty('statusDate'); + expect(sharedByMe).toHaveProperty('upstreamCnpId'); + expect(response).toHaveProperty('sharedWithMe'); + const sharedWithMe = response.sharedWithMe; + expect(sharedWithMe).toHaveProperty('downstreamCnpId'); + expect(sharedWithMe).toHaveProperty('sharedDate'); + expect(sharedWithMe).toHaveProperty('sharingStatus'); + expect(sharedWithMe).toHaveProperty('statusDate'); + expect(sharedWithMe).toHaveProperty('upstreamCnpId'); + } + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.campaign + .retrieveSharingStatus({ + campaignId: 'campaignId', + }) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.campaign + .retrieveSharingStatus( + { + campaignId: 'campaignId', + }, + TEST_AUTH_KEY, + ) + .then(responseFn); + }); + }); +}); diff --git a/src/test/resources/CampaignBuilder.test.ts b/src/test/resources/CampaignBuilder.test.ts new file mode 100644 index 0000000..8718fde --- /dev/null +++ b/src/test/resources/CampaignBuilder.test.ts @@ -0,0 +1,141 @@ +import {type ResponsePayload, utils as testUtils} from '../utils'; +const telnyx = testUtils.getTelnyxMock(); + +const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); + +// skip because this runs under a different api base url and no mock setup exists for this +describe.skip('Campaign Builder', function () { + describe('create', function () { + function responseFn(response: ResponsePayload) { + if (Object.keys(response).length > 0) { + expect(response).toHaveProperty('affiliateMarketing'); + expect(response).toHaveProperty('ageGated'); + expect(response).toHaveProperty('autoRenewal'); + expect(response).toHaveProperty('billedDate'); + expect(response).toHaveProperty('brandId'); + expect(response).toHaveProperty('campaignId'); + expect(response).toHaveProperty('createDate'); + expect(response).toHaveProperty('description'); + expect(response).toHaveProperty('directLending'); + expect(response).toHaveProperty('embeddedLink'); + expect(response).toHaveProperty('embeddedPhone'); + expect(response).toHaveProperty('helpMessage'); + expect(response).toHaveProperty('messageFlow'); + expect(response).toHaveProperty('numberPool'); + expect(response).toHaveProperty('resellerId'); + expect(response).toHaveProperty('sample1'); + expect(response).toHaveProperty('sample2'); + expect(response).toHaveProperty('sample3'); + expect(response).toHaveProperty('sample4'); + expect(response).toHaveProperty('sample5'); + expect(response).toHaveProperty('status'); + expect(response).toHaveProperty('subUsecases'); + expect(response).toHaveProperty('subscriberHelp'); + expect(response).toHaveProperty('subscriberOptin'); + expect(response).toHaveProperty('subscriberOptout'); + expect(response).toHaveProperty('usecase'); + expect(response).toHaveProperty('vertical'); + } else { + expect(response.lastResponse?.statusCode).toBe(200); + } + } + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.campaignBuilder + .create({ + affiliateMarketing: true, + ageGated: true, + autoRenewal: true, + brandId: 'string', + description: 'string', + directLending: true, + embeddedLink: true, + embeddedPhone: true, + helpKeywords: 'string', + helpMessage: 'string', + messageFlow: 'string', + mnoIds: [0], + numberPool: true, + optinKeywords: 'string', + optinMessage: 'string', + optoutKeywords: 'string', + optoutMessage: 'string', + referenceId: 'string', + resellerId: 'string', + sample1: 'string', + sample2: 'string', + sample3: 'string', + sample4: 'string', + sample5: 'string', + subUsecases: ['string'], + subscriberHelp: true, + subscriberOptin: true, + subscriberOptout: true, + tag: ['string'], + termsAndConditions: true, + usecase: 'MIXED', + }) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.campaignBuilder + .create( + { + affiliateMarketing: true, + ageGated: true, + autoRenewal: true, + brandId: 'string', + description: 'string', + directLending: true, + embeddedLink: true, + embeddedPhone: true, + helpKeywords: 'string', + helpMessage: 'string', + messageFlow: 'string', + mnoIds: [0], + numberPool: true, + optinKeywords: 'string', + optinMessage: 'string', + optoutKeywords: 'string', + optoutMessage: 'string', + referenceId: 'string', + resellerId: 'string', + sample1: 'string', + sample2: 'string', + sample3: 'string', + sample4: 'string', + sample5: 'string', + subUsecases: ['string'], + subscriberHelp: true, + subscriberOptin: true, + subscriberOptout: true, + tag: ['string'], + termsAndConditions: true, + usecase: 'MIXED', + }, + TEST_AUTH_KEY, + ) + .then(responseFn); + }); + }); + describe('retrieveQualifyByUsecase', function () { + function responseFn(response: ResponsePayload) { + expect(response.lastResponse?.statusCode).toBe(200); + } + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.campaignBuilder + .retrieveQualifyByUsecase('brandId', 'usecase') + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.campaignBuilder + .retrieveQualifyByUsecase('brandId', 'usecase', TEST_AUTH_KEY) + .then(responseFn); + }); + }); +}); diff --git a/src/test/resources/ClientStateUpdate.test.ts b/src/test/resources/ClientStateUpdate.test.ts new file mode 100644 index 0000000..2729504 --- /dev/null +++ b/src/test/resources/ClientStateUpdate.test.ts @@ -0,0 +1,36 @@ +import {type ResponsePayload, utils as testUtils} from '../utils'; +const telnyx = testUtils.getTelnyxMock(); + +const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); + +// resource not found in the spec +describe.skip('Client State Update', function () { + describe('update', function () { + function responseFn(response: ResponsePayload) { + expect(response).toHaveProperty('data'); + expect(response.data).toHaveProperty('result'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.clientStateUpdate + .update('35146afd-df93-4963-b1e9-1a085e2ae874', { + client_state: 'aGF2ZSBhIG5pY2UgZGF5ID1d', + }) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.clientStateUpdate + .update( + '35146afd-df93-4963-b1e9-1a085e2ae874', + { + client_state: 'aGF2ZSBhIG5pY2UgZGF5ID1d', + }, + TEST_AUTH_KEY, + ) + .then(responseFn); + }); + }); +}); diff --git a/src/test/resources/Conferences.test.ts b/src/test/resources/Conferences.test.ts new file mode 100644 index 0000000..76de361 --- /dev/null +++ b/src/test/resources/Conferences.test.ts @@ -0,0 +1,221 @@ +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-nocheck +import { + type ResponsePayloadList, + type ResponsePayload, + utils as testUtils, +} from '../utils'; +import {TelnyxObject} from '../../Types'; +const telnyx = testUtils.getTelnyxMock(); + +const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); + +const CONFERENCES = [ + 'join', + 'mute', + 'unmute', + 'hold', + 'unhold', + 'speak', + 'play', + 'stop', + 'record_start', + 'record_stop', + 'update', + 'leave', +]; + +const CONFERENCE_ID = '41b9acd4-f4da-4ff5-a85c-e07e90b53f46'; + +describe('Calls Resource', function () { + describe('Call Conferences', function () { + const conferenceCreateData = { + name: 'Business', + call_control_id: '891510ac-f3e4-11e8-af5b-de00688a4901', + }; + const callConferencesData = { + join: { + call_control_id: '891510ac-f3e4-11e8-af5b-de00688a4901', + }, + unhold: { + call_control_ids: ['891510ac-f3e4-11e8-af5b-de00688a4901'], + }, + speak: { + language: 'en-US', + payload: 'Say this to participants', + voice: 'female', + }, + play: { + media_name: 'my_media_uploaded_to_media_storage_api', + }, + record_start: { + channels: 'single', + format: 'wav', + }, + update: { + call_control_id: '891510ac-f3e4-11e8-af5b-de00688a4901', + supervisor_role: 'whisper', + }, + leave: { + call_control_id: '891510ac-f3e4-11e8-af5b-de00688a4901', + }, + dial_participant: { + call_control_id: '891510ac-f3e4-11e8-af5b-de00688a4901', + from: '+15555555555', + to: '+16666666666', + }, + }; + + function responseFn(response: ResponsePayload) { + expect(response.data).toMatchObject({result: 'ok'}); + } + + describe('list', function () { + function responseFn(response: ResponsePayloadList) { + expect(response.data[0]).toHaveProperty('id'); + expect(response.data[0]).toHaveProperty('name'); + expect(response.data[0]).toMatchObject({record_type: 'conference'}); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.conferences.list().then(responseFn); + }); + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.conferences.list(TEST_AUTH_KEY).then(responseFn); + }); + }); + + describe('retrieve', function () { + function responseFn(response: ResponsePayload) { + expect(response.data).toHaveProperty('id'); + expect(response.data).toHaveProperty('name'); + expect(response.data).toMatchObject({record_type: 'conference'}); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.conferences.retrieve(CONFERENCE_ID).then(responseFn); + }); + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.conferences + .retrieve(CONFERENCE_ID, TEST_AUTH_KEY) + .then(responseFn); + }); + }); + + describe('create', function () { + function responseFn(response: ResponsePayload) { + expect(response.data).toHaveProperty('id'); + expect(response.data).toHaveProperty('name'); + expect(response.data).toMatchObject({ + record_type: 'conference', + }); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.conferences.create(conferenceCreateData).then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.conferences + .create(conferenceCreateData, TEST_AUTH_KEY) + .then(responseFn); + }); + }); + + describe('participants', function () { + function responseFn(response: ResponsePayloadList) { + expect(response.data[0]).toMatchObject({ + record_type: 'participant', + }); + expect(response.data[0]).toHaveProperty('conference'); + expect(response.data[0]).toHaveProperty('call_control_id'); + expect(response.data[0]).toHaveProperty('end_conference_on_exit'); + expect(response.data[0]).toHaveProperty('muted'); + expect(response.data[0]).toHaveProperty('on_hold'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.conferences + .participants(CONFERENCE_ID, {filter: {muted: true}}) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.conferences + .participants(CONFERENCE_ID, TEST_AUTH_KEY) + .then(responseFn); + }); + }); + + CONFERENCES.forEach(function (action) { + describe(action, function () { + let telnyxInstance: TelnyxObject; + + beforeEach(() => { + // make specs independent + telnyxInstance = testUtils.getTelnyxMock(); + }); + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyxInstance.conferences + .create(conferenceCreateData) + .then(function (response: ResponsePayload) { + const conference = response.data; + // // @ts-expect-error TODO: import .d.ts files under src/test folder + return conference[action]( + callConferencesData[action] || {'': ''}, // need to pass string due to telnyx mock parse + ).then(responseFn); + }); + }); + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyxInstance.conferences + .create(conferenceCreateData) + .then(function (response: ResponsePayload) { + const conference = response.data; + return conference[action]( + // // @ts-expect-error TODO: import .d.ts files under src/test folder + callConferencesData[action] || {'': ''}, // need to pass string due to telnyx mock parse + TEST_AUTH_KEY, + ).then(responseFn); + }); + }); + + test('Sends the correct request [with empty resource instance]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + const conference = new telnyxInstance.Conference({ + id: '891510ac-f3e4-11e8-af5b-de00688a4901', + }); + + return conference[action]( + callConferencesData[action] || {'': ''}, + ).then( + // need to pass string due to telnyx mock parse + responseFn, + ); + }); + test('Sends the correct request [with empty resource instance and specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + const conference = new telnyxInstance.Conference({ + id: '891510ac-f3e4-11e8-af5b-de00688a4901', + }); + + return conference[action]( + // // @ts-expect-error TODO: import .d.ts files under src/test folder + callConferencesData[action] || {'': ''}, // need to pass string due to telnyx mock parse + TEST_AUTH_KEY, + ).then(responseFn); + }); + }); + }); + }); +}); diff --git a/src/test/resources/Connections.test.ts b/src/test/resources/Connections.test.ts new file mode 100644 index 0000000..cacd54a --- /dev/null +++ b/src/test/resources/Connections.test.ts @@ -0,0 +1,46 @@ +import { + type ResponsePayloadList, + type ResponsePayload, + utils as testUtils, +} from '../utils'; +const telnyx = testUtils.getTelnyxMock(); + +const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); + +describe('Connections Resource', function () { + function responseFn(response: ResponsePayload) { + expect(response.data).toHaveProperty('id'); + expect(response.data).toHaveProperty('connection_name'); + expect(response.data).toMatchObject({record_type: 'ip_connection'}); + } + + describe('retrieve', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.connections.retrieve('123').then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.connections.retrieve('123', TEST_AUTH_KEY).then(responseFn); + }); + }); + + describe('list', function () { + function listResponseFn(response: ResponsePayloadList) { + expect(response.data[0]).toHaveProperty('id'); + expect(response.data[0]).toHaveProperty('connection_name'); + expect(response.data[0]).toMatchObject({record_type: 'ip_connection'}); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.connections.list().then(listResponseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.connections.list(TEST_AUTH_KEY).then(listResponseFn); + }); + }); +}); diff --git a/src/test/resources/CredentialConnections.test.ts b/src/test/resources/CredentialConnections.test.ts new file mode 100644 index 0000000..08ff417 --- /dev/null +++ b/src/test/resources/CredentialConnections.test.ts @@ -0,0 +1,134 @@ +import {type ResponsePayload, utils as testUtils} from '../utils'; +const telnyx = testUtils.getTelnyxMock(); + +const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); + +describe('Access IP Addresses Resource', function () { + describe('retrieve', function () { + function responseFn(response: ResponsePayload) { + expect(response).toHaveProperty('data'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.credentialConnections.retrieve('123').then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.credentialConnections + .retrieve('123', TEST_AUTH_KEY) + .then(responseFn); + }); + }); + + describe('list', function () { + function responseFn(response: ResponsePayload) { + expect(response).toHaveProperty('data'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.credentialConnections + .list({ + page: { + number: 1, + size: 20, + }, + filter: { + outbound: { + outbound_voice_profile_id: '1293384261075731499', + }, + }, + sort: 'connection_name', + }) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.credentialConnections + .list( + { + page: { + number: 1, + size: 20, + }, + filter: { + outbound: { + outbound_voice_profile_id: '1293384261075731499', + }, + }, + sort: 'connection_name', + }, + TEST_AUTH_KEY, + ) + .then(responseFn); + }); + }); + + describe('create', function () { + function responseFn(response: ResponsePayload) { + expect(response).toHaveProperty('data'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.credentialConnections + .create({ + connection_name: 'my name', + password: 'my123secure456password789', + user_name: 'myusername123', + }) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.credentialConnections + .create( + { + connection_name: 'my name', + password: 'my123secure456password789', + user_name: 'myusername123', + }, + TEST_AUTH_KEY, + ) + .then(responseFn); + }); + }); + describe('del', function () { + function responseFn(response: ResponsePayload) { + expect(response).toHaveProperty('data'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.credentialConnections.del('1').then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.credentialConnections + .del('1', TEST_AUTH_KEY) + .then(responseFn); + }); + }); + describe('update', function () { + function responseFn(response: ResponsePayload) { + expect(response).toHaveProperty('data'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.credentialConnections.del('1').then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.credentialConnections + .del('1', TEST_AUTH_KEY) + .then(responseFn); + }); + }); +}); diff --git a/src/test/resources/DetailRecords.test.ts b/src/test/resources/DetailRecords.test.ts new file mode 100644 index 0000000..caccbf7 --- /dev/null +++ b/src/test/resources/DetailRecords.test.ts @@ -0,0 +1,23 @@ +import {type ResponsePayloadList, utils as testUtils} from '../utils'; + +const telnyx = testUtils.getTelnyxMock(); + +describe('DetailRecords Resource', function () { + function responseFn(response: ResponsePayloadList) { + expect(response.data).toHaveProperty('data'); + for (let index = 0; index < response.data.length; index++) { + const row = response.data[index]; + expect(row).toHaveProperty('record_type'); + expect(row).toHaveProperty('uuid'); + } + } + + describe.skip('query', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.detailRecords + .query({filter: {record_type: 'messaging'}}) + .then(responseFn); + }); + }); +}); diff --git a/src/test/resources/DocumentLinks.test.ts b/src/test/resources/DocumentLinks.test.ts new file mode 100644 index 0000000..8ea1f52 --- /dev/null +++ b/src/test/resources/DocumentLinks.test.ts @@ -0,0 +1,17 @@ +import {type ResponsePayloadList, utils as testUtils} from '../utils'; + +const telnyx = testUtils.getTelnyxMock(); + +describe('Documents Links', function () { + describe('list', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.documentLinks.list().then(function ( + response: ResponsePayloadList, + ) { + expect(response).toHaveProperty('data'); + expect(response).toHaveProperty('meta'); + }); + }); + }); +}); diff --git a/src/test/resources/Documents.test.ts b/src/test/resources/Documents.test.ts new file mode 100644 index 0000000..e9aa698 --- /dev/null +++ b/src/test/resources/Documents.test.ts @@ -0,0 +1,173 @@ +import { + type ResponsePayloadList, + type ResponsePayload, + utils as testUtils, +} from '../utils'; +const telnyx = testUtils.getTelnyxMock(); + +const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); +const TEST_UUID = '123e4567-e89b-12d3-a456-426614174000'; + +describe('Documents', function () { + describe('list', function () { + function responseFn(response: ResponsePayloadList) { + expect(response).toHaveProperty('data'); + expect(response).toHaveProperty('meta'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.documents + .list({ + filter: { + filename: { + contains: 'invoice', + }, + customer_reference: { + eq: 'MY REF 001', + in: ['MY REF 001'], + }, + created_at: { + gt: '2021-04-09T22:25:27.521Z', + lt: '2021-04-09T22:25:27.521Z', + }, + }, + sort: ['filename'], + page: { + number: '1', + size: '20', + }, + }) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.documents + .list( + { + filter: { + filename: { + contains: 'invoice', + }, + customer_reference: { + eq: 'MY REF 001', + in: ['MY REF 001'], + }, + created_at: { + gt: '2021-04-09T22:25:27.521Z', + lt: '2021-04-09T22:25:27.521Z', + }, + }, + sort: ['filename'], + page: { + number: '1', + size: '20', + }, + }, + TEST_AUTH_KEY, + ) + .then(responseFn); + }); + }); + + describe('Document Id', function () { + function responseFn(response: ResponsePayload) { + expect(response).toHaveProperty('data'); + } + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.documents.retrieveDocumentId(TEST_UUID).then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.documents + .retrieveDocumentId(TEST_UUID, TEST_AUTH_KEY) + .then(responseFn); + }); + }); + describe('Download Document', function () { + function responseFn(response: ResponsePayload) { + expect(response).toHaveProperty('data'); + } + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.documents + .retrieveDownloadDocument(TEST_UUID) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.documents + .retrieveDownloadDocument(TEST_UUID, TEST_AUTH_KEY) + .then(responseFn); + }); + }); + describe('update', function () { + function responseFn(response: ResponsePayload) { + expect(response).toHaveProperty('data'); + } + + test('Sends the correct request', function () { + const requestBody = { + customer_reference: 'your_customer_reference', + filename: 'your_filename', + }; + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.documents.update(TEST_UUID, requestBody).then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + const requestBody = { + customer_reference: 'your_customer_reference', + filename: 'your_filename', + }; + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.documents + .update(TEST_UUID, requestBody, TEST_AUTH_KEY) + .then(responseFn); + }); + }); + + describe('upload', function () { + function responseFn(response: ResponsePayload) { + expect(response).toHaveProperty('data'); + } + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.documents + .upload({ + url: 'https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf', + }) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.documents + .upload( + { + url: 'https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf', + }, + TEST_AUTH_KEY, + ) + .then(responseFn); + }); + }); + describe('del', function () { + function responseFn(response: ResponsePayload) { + expect(response).toHaveProperty('data'); + } + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.documents.del(TEST_UUID).then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.documents.del(TEST_UUID, TEST_AUTH_KEY).then(responseFn); + }); + }); +}); diff --git a/src/test/resources/DynamicEmergency.test.ts b/src/test/resources/DynamicEmergency.test.ts new file mode 100644 index 0000000..32fac5e --- /dev/null +++ b/src/test/resources/DynamicEmergency.test.ts @@ -0,0 +1,162 @@ +import { + type ResponsePayloadList, + type ResponsePayload, + utils as testUtils, +} from '../utils'; +const telnyx = testUtils.getTelnyxMock(); + +const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); +const TEST_UUID = '123e4567-e89b-12d3-a456-426614174000'; + +describe('DynamicEmergency', function () { + describe('Addresses', function () { + function responseFn(response: ResponsePayload) { + expect(response.data).toHaveProperty('id'); + expect(response.data).toHaveProperty('country_code'); + expect(response.data).toHaveProperty('locality'); + expect(response.data).toMatchObject({ + record_type: 'dynamic_emergency_address', + }); + } + + describe('list', function () { + function listResponseFn(response: ResponsePayloadList) { + expect(response.data[0]).toHaveProperty('id'); + expect(response.data[0]).toHaveProperty('country_code'); + expect(response.data[0]).toHaveProperty('locality'); + expect(response.data[0]).toMatchObject({ + record_type: 'dynamic_emergency_address', + }); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.dynamicEmergency.addresses.list().then(listResponseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.dynamicEmergency.addresses + .list(TEST_AUTH_KEY) + .then(listResponseFn); + }); + }); + + describe('retrieve', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.dynamicEmergency.addresses + .retrieve(TEST_UUID) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.dynamicEmergency.addresses + .retrieve(TEST_UUID, TEST_AUTH_KEY) + .then(responseFn); + }); + }); + + describe.skip('create', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.dynamicEmergency.addresses + .create({ + administrative_area: 'IL', + house_number: '311', + locality: 'Chicago', + postal_code: '60654', + street_name: 'Superior', + country_code: 'US', + }) + .then(responseFn); + }); + }); + + describe('del', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.dynamicEmergency.addresses + .del(TEST_UUID) + .then(responseFn); + }); + }); + }); + + describe('Endpoints', function () { + function responseFn(response: ResponsePayload) { + expect(response.data).toHaveProperty('id'); + expect(response.data).toHaveProperty('callback_number'); + expect(response.data).toHaveProperty('caller_name'); + expect(response.data).toHaveProperty('dynamic_emergency_address_id'); + expect(response.data).toMatchObject({ + record_type: 'dynamic_emergency_endpoint', + }); + } + + describe('list', function () { + function listResponseFn(response: ResponsePayloadList) { + expect(response.data[0]).toHaveProperty('id'); + expect(response.data[0]).toHaveProperty('callback_number'); + expect(response.data[0]).toHaveProperty('caller_name'); + expect(response.data[0]).toHaveProperty('dynamic_emergency_address_id'); + expect(response.data[0]).toMatchObject({ + record_type: 'dynamic_emergency_endpoint', + }); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.dynamicEmergency.endpoints.list().then(listResponseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.dynamicEmergency.endpoints + .list(TEST_AUTH_KEY) + .then(listResponseFn); + }); + }); + + describe('retrieve', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.dynamicEmergency.endpoints + .retrieve(TEST_UUID) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.dynamicEmergency.endpoints + .retrieve(TEST_UUID, TEST_AUTH_KEY) + .then(responseFn); + }); + }); + + describe.skip('create', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.dynamicEmergency.endpoints + .create({ + callback_number: '+13125550000', + caller_name: 'Jane Doe Desk Phone', + dynamic_emergency_address_id: + '0ccc7b54-4df3-4bca-a65a-3da1ecc777f0', + country_code: 'US', + }) + .then(responseFn); + }); + }); + + describe('del', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.dynamicEmergency.endpoints + .del(TEST_UUID) + .then(responseFn); + }); + }); + }); +}); diff --git a/src/test/resources/Events.test.ts b/src/test/resources/Events.test.ts new file mode 100644 index 0000000..f183b27 --- /dev/null +++ b/src/test/resources/Events.test.ts @@ -0,0 +1,33 @@ +import {utils as testUtils} from '../utils'; + +const telnyx = testUtils.getSpyableTelnyx(); + +describe('Events Resource', function () { + describe('retrieve', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + telnyx.events.retrieve('eventIdBaz'); + expect(telnyx.LAST_REQUEST).toStrictEqual({ + auth: null, + method: 'GET', + url: '/v2/events/eventIdBaz', + headers: {}, + data: {}, + }); + }); + }); + + describe('list', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + telnyx.events.list({page: {size: 25}}); + expect(telnyx.LAST_REQUEST).toStrictEqual({ + auth: null, + method: 'GET', + url: '/v2/events', + headers: {}, + data: {page: {size: 25}}, + }); + }); + }); +}); diff --git a/src/test/resources/FaxApplications.test.ts b/src/test/resources/FaxApplications.test.ts new file mode 100644 index 0000000..fc0f91b --- /dev/null +++ b/src/test/resources/FaxApplications.test.ts @@ -0,0 +1,126 @@ +import { + type ResponsePayloadList, + type ResponsePayload, + utils as testUtils, +} from '../utils'; +const telnyx = testUtils.getTelnyxMock(); + +const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); +const TEST_UUID = '123e4567-e89b-12d3-a456-426614174000'; + +describe('Fax Applications list', function () { + function responseFn(response: ResponsePayload) { + expect(response.data).toHaveProperty('id'); + expect(response.data).toMatchObject({record_type: 'fax_application'}); + } + + const createFaxData = { + application_name: 'test', + webhook_event_url: 'https://fakeurl.com/123123', + }; + + describe('retrieve', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.faxApplications.retrieve(TEST_UUID).then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.faxApplications + .retrieve(TEST_UUID, TEST_AUTH_KEY) + .then(responseFn); + }); + }); + + describe('create', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.faxApplications.create(createFaxData).then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.faxApplications + .create(createFaxData, TEST_AUTH_KEY) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth in options]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.faxApplications + .create(createFaxData, {api_key: TEST_AUTH_KEY}) + .then(responseFn); + }); + }); + + describe('list', function () { + function listResponseFn(response: ResponsePayloadList) { + expect(response.data[0]).toHaveProperty('id'); + expect(response.data[0]).toMatchObject({record_type: 'fax_application'}); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.faxApplications.list().then(listResponseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.faxApplications.list(TEST_AUTH_KEY).then(listResponseFn); + }); + }); + + describe('del', function () { + function responseFn(response: ResponsePayload) { + if (response.data) { + expect(response.data).toHaveProperty('id'); + expect(response.data).toMatchObject({record_type: 'fax_application'}); + } + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.faxApplications.create(createFaxData).then(function ( + response: ResponsePayload, + ) { + const faxApplications = response.data; + // @ts-expect-error TODO: import .d.ts files under src/test folder + return faxApplications.del().then(responseFn); + }); + }); + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.faxApplications.retrieve('123').then(function ( + response: ResponsePayload, + ) { + const faxApplications = response.data; + // @ts-expect-error TODO: import .d.ts files under src/test folder + return faxApplications.del(TEST_AUTH_KEY).then(responseFn); + }); + }); + }); + + describe('update', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.faxApplications.create(createFaxData).then(function ( + response: ResponsePayload, + ) { + const ip = response.data; + // @ts-expect-error TODO: import .d.ts files under src/test folder + return ip.update(createFaxData).then(responseFn); + }); + }); + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.faxApplications.retrieve(TEST_UUID).then(function ( + response: ResponsePayload, + ) { + const ip = response.data; + // @ts-expect-error TODO: import .d.ts files under src/test folder + return ip.update(createFaxData, TEST_AUTH_KEY).then(responseFn); + }); + }); + }); +}); diff --git a/src/test/resources/Faxes.test.ts b/src/test/resources/Faxes.test.ts new file mode 100644 index 0000000..a409c87 --- /dev/null +++ b/src/test/resources/Faxes.test.ts @@ -0,0 +1,122 @@ +import { + type ResponsePayloadList, + type ResponsePayload, + utils as testUtils, +} from '../utils'; +const telnyx = testUtils.getTelnyxMock(); + +const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); +const TEST_UUID = '123e4567-e89b-12d3-a456-426614174000'; + +const faxCreateData = { + connection_id: 'c-1', + media_url: 'http://www.example.com/fax.pdf', + quality: 'high', + to: '+456', + from: '+123', +}; + +describe('Faxes Resource', function () { + function responseFn(response: ResponsePayload) { + expect(response.data).toHaveProperty('connection_id'); + expect(response.data).toHaveProperty('media_url'); + expect(response.data).toHaveProperty('to'); + } + + describe('retrieve', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.faxes.retrieve(TEST_UUID).then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.faxes.retrieve(TEST_UUID, TEST_AUTH_KEY).then(responseFn); + }); + }); + + describe('create', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.faxes.create(faxCreateData).then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.faxes.create(faxCreateData, TEST_AUTH_KEY).then(responseFn); + }); + + test('Sends the correct request [with specified auth in options]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.faxes + .create(faxCreateData, {api_key: TEST_AUTH_KEY}) + .then(responseFn); + }); + }); + + describe('send', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.faxes.send(faxCreateData).then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.faxes.send(faxCreateData, TEST_AUTH_KEY).then(responseFn); + }); + + test('Sends the correct request [with specified auth in options]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.faxes + .send(faxCreateData, {api_key: TEST_AUTH_KEY}) + .then(responseFn); + }); + }); + + describe('list', function () { + function listResponseFn(response: ResponsePayloadList) { + expect(response.data[0]).toHaveProperty('connection_id'); + expect(response.data[0]).toHaveProperty('media_url'); + expect(response.data[0]).toHaveProperty('to'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.faxes.list().then(listResponseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.faxes.list(TEST_AUTH_KEY).then(listResponseFn); + }); + }); + + describe('Nested', function () { + function responseFn(response: ResponsePayload) { + expect(response.lastResponse?.statusCode).toBe(204); + } + + describe('del', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.faxes.create(faxCreateData).then(function ( + response: ResponsePayload, + ) { + const fax = response.data; + // @ts-expect-error TODO: import .d.ts files under src/test folder + return fax.del().then(responseFn); + }); + }); + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.faxes.retrieve(TEST_UUID).then(function ( + response: ResponsePayload, + ) { + const fax = response.data; + // @ts-expect-error TODO: import .d.ts files under src/test folder + return fax.del(TEST_AUTH_KEY).then(responseFn); + }); + }); + }); + }); +}); diff --git a/src/test/resources/FqdnConnections.test.ts b/src/test/resources/FqdnConnections.test.ts new file mode 100644 index 0000000..0d35ba1 --- /dev/null +++ b/src/test/resources/FqdnConnections.test.ts @@ -0,0 +1,137 @@ +import { + type ResponsePayloadList, + type ResponsePayload, + utils as testUtils, +} from '../utils'; +const telnyx = testUtils.getTelnyxMock(); + +const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); + +describe('FqdnConnections Resource', function () { + function responseFn(response: ResponsePayload) { + expect(response.data).toHaveProperty('id'); + expect(response.data).toHaveProperty('connection_name'); + expect(response.data).toHaveProperty('record_type'); + expect(response.data).toMatchObject({record_type: 'fqdn_connection'}); + } + + describe('retrieve', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.fqdnConnections.retrieve('123').then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.fqdnConnections + .retrieve('123', TEST_AUTH_KEY) + .then(responseFn); + }); + }); + + describe('create', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.fqdnConnections + .create({connection_name: 'Central BSD-1'}) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.fqdnConnections + .create({connection_name: 'Central BSD-1'}, TEST_AUTH_KEY) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth in options]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.fqdnConnections + .create({connection_name: 'Central BSD-1'}, {api_key: TEST_AUTH_KEY}) + .then(responseFn); + }); + }); + + describe('list', function () { + function listResponseFn(response: ResponsePayloadList) { + expect(response.data[0]).toHaveProperty('id'); + expect(response.data[0]).toHaveProperty('connection_name'); + expect(response.data[0]).toHaveProperty('record_type'); + expect(response.data[0]).toMatchObject({record_type: 'fqdn_connection'}); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.fqdnConnections.list().then(listResponseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.fqdnConnections.list(TEST_AUTH_KEY).then(listResponseFn); + }); + }); + + describe('Nested', function () { + function responseFn(response: ResponsePayload) { + if (response.data) { + expect(response.data).toHaveProperty('id'); + expect(response.data).toHaveProperty('connection_name'); + expect(response.data).toMatchObject({record_type: 'fqdn_connection'}); + } + } + + describe('del', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.fqdnConnections + .create({connection_name: 'Central BSD-1'}) + .then(function (response: ResponsePayload) { + const mp = response.data; + // @ts-expect-error TODO: import .d.ts files under src/test folder + return mp.del().then(responseFn); + }); + }); + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.fqdnConnections.retrieve('123').then(function ( + response: ResponsePayload, + ) { + const mp = response.data; + // @ts-expect-error TODO: import .d.ts files under src/test folder + return mp.del(TEST_AUTH_KEY).then(responseFn); + }); + }); + }); + + describe('update', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.fqdnConnections + .create({connection_name: 'Central BSD-1'}) + .then(function (response: ResponsePayload) { + const mp = response.data; + return ( + mp + // @ts-expect-error TODO: import .d.ts files under src/test folder + .update({connection_name: 'Western BSD-2'}) + .then(responseFn) + ); + }); + }); + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.fqdnConnections.retrieve('123').then(function ( + response: ResponsePayload, + ) { + const mp = response.data; + return ( + mp + // @ts-expect-error TODO: import .d.ts files under src/test folder + .update({connection_name: 'Western BSD-2'}, TEST_AUTH_KEY) + .then(responseFn) + ); + }); + }); + }); + }); +}); diff --git a/src/test/resources/Fqdns.test.ts b/src/test/resources/Fqdns.test.ts new file mode 100644 index 0000000..5e592ee --- /dev/null +++ b/src/test/resources/Fqdns.test.ts @@ -0,0 +1,164 @@ +import { + type ResponsePayloadList, + type ResponsePayload, + utils as testUtils, +} from '../utils'; +const telnyx = testUtils.getTelnyxMock(); + +const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); + +describe('Fqdns Resource', function () { + function responseFn(response: ResponsePayload) { + expect(response.data).toHaveProperty('id'); + expect(response.data).toHaveProperty('connection_id'); + expect(response.data).toHaveProperty('fqdn'); + expect(response.data).toHaveProperty('record_type'); + expect(response.data).toMatchObject({record_type: 'fqdn'}); + } + + describe('retrieve', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.fqdns.retrieve('123').then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.fqdns.retrieve('123', TEST_AUTH_KEY).then(responseFn); + }); + }); + + describe('create', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.fqdns + .create({ + connection_id: 'Central BSD-1', + fqdn: 'example.com', + dns_record_type: 'a', + }) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.fqdns + .create( + { + connection_id: 'Central BSD-1', + fqdn: 'example.com', + dns_record_type: 'a', + }, + TEST_AUTH_KEY, + ) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth in options]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.fqdns + .create( + { + connection_id: 'Central BSD-1', + fqdn: 'example.com', + dns_record_type: 'a', + }, + {api_key: TEST_AUTH_KEY}, + ) + .then(responseFn); + }); + }); + + describe('list', function () { + function listResponseFn(response: ResponsePayloadList) { + expect(response.data[0]).toHaveProperty('id'); + expect(response.data[0]).toHaveProperty('connection_id'); + expect(response.data[0]).toHaveProperty('fqdn'); + expect(response.data[0]).toHaveProperty('record_type'); + expect(response.data[0]).toMatchObject({record_type: 'fqdn'}); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.fqdns.list().then(listResponseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.fqdns.list(TEST_AUTH_KEY).then(listResponseFn); + }); + }); + + describe('Nested', function () { + function responseFn(response: ResponsePayload) { + if (response.data) { + expect(response.data).toHaveProperty('id'); + expect(response.data).toHaveProperty('connection_id'); + expect(response.data).toHaveProperty('fqdn'); + expect(response.data).toMatchObject({record_type: 'fqdn'}); + } + } + + describe('del', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.fqdns + .create({ + connection_id: 'Central BSD-1', + fqdn: 'example.com', + dns_record_type: 'a', + }) + .then(function (response: ResponsePayload) { + const fqdn = response.data; + // @ts-expect-error TODO: import .d.ts files under src/test folder + return fqdn.del().then(responseFn); + }); + }); + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.fqdns.retrieve('123').then(function ( + response: ResponsePayload, + ) { + const fqdn = response.data; + // @ts-expect-error TODO: import .d.ts files under src/test folder + return fqdn.del(TEST_AUTH_KEY).then(responseFn); + }); + }); + }); + + describe('update', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.fqdns + .create({ + connection_id: 'Central BSD-1', + fqdn: 'example.com', + dns_record_type: 'a', + }) + .then(function (response: ResponsePayload) { + const fqdn = response.data; + return ( + fqdn + // @ts-expect-error TODO: import .d.ts files under src/test folder + .update({connection_id: 'Western BSD-2'}) + .then(responseFn) + ); + }); + }); + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.fqdns.retrieve('123').then(function ( + response: ResponsePayload, + ) { + const fqdn = response.data; + return ( + fqdn + // @ts-expect-error TODO: import .d.ts files under src/test folder + .update({connection_id: 'Western BSD-2'}, TEST_AUTH_KEY) + .then(responseFn) + ); + }); + }); + }); + }); +}); diff --git a/src/test/resources/InventoryCoverage.test.ts b/src/test/resources/InventoryCoverage.test.ts new file mode 100644 index 0000000..56a3435 --- /dev/null +++ b/src/test/resources/InventoryCoverage.test.ts @@ -0,0 +1,47 @@ +import {type ResponsePayloadList, utils as testUtils} from '../utils'; +const telnyx = testUtils.getTelnyxMock(); + +const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); + +describe('InventoryCoverage Resource', function () { + // not included in the spec + describe.skip('request', function () { + function responseFn(response: ResponsePayloadList) { + expect(response.data[0]).toHaveProperty('number_type'); + expect(response.data[0]).toHaveProperty('group'); + expect(response.data[0]).toHaveProperty('group_type'); + expect(response.data[0]).toHaveProperty('coverage_type'); + expect(response.data[0]).toHaveProperty('phone_number_type'); + expect(response.data[0]).toHaveProperty('number_range'); + expect(response.data[0]).toMatchObject({ + record_type: 'inventory_coverage_group', + }); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.inventoryCoverage + .request({ + filter: {npa: '318', nxx: '202', country_code: 'US', groupBy: 'nxx'}, + }) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.inventoryCoverage + .request( + { + filter: { + npa: '318', + nxx: '202', + country_code: 'US', + groupBy: 'nxx', + }, + }, + TEST_AUTH_KEY, + ) + .then(responseFn); + }); + }); +}); diff --git a/src/test/resources/IpConnections.test.ts b/src/test/resources/IpConnections.test.ts new file mode 100644 index 0000000..ee7ba39 --- /dev/null +++ b/src/test/resources/IpConnections.test.ts @@ -0,0 +1,136 @@ +import { + type ResponsePayloadList, + type ResponsePayload, + utils as testUtils, +} from '../utils'; +const telnyx = testUtils.getTelnyxMock(); + +const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); +const TEST_UUID = '123e4567-e89b-12d3-a456-426614174000'; + +describe('IpConnections Resource', function () { + function responseFn(response: ResponsePayload) { + expect(response.data).toHaveProperty('id'); + expect(response.data).toHaveProperty('connection_name'); + expect(response.data).toMatchObject({record_type: 'ip_connection'}); + } + + describe('retrieve', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.ipConnections.retrieve(TEST_UUID).then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.ipConnections + .retrieve(TEST_UUID, TEST_AUTH_KEY) + .then(responseFn); + }); + }); + + describe('create', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.ipConnections + .create({connection_name: 'Central BSD-1'}) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.ipConnections + .create({connection_name: 'Central BSD-1'}, TEST_AUTH_KEY) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth in options]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.ipConnections + .create({connection_name: 'Central BSD-1'}, {api_key: TEST_AUTH_KEY}) + .then(responseFn); + }); + }); + + describe('list', function () { + function listResponseFn(response: ResponsePayloadList) { + expect(response.data[0]).toHaveProperty('id'); + expect(response.data[0]).toHaveProperty('connection_name'); + expect(response.data[0]).toMatchObject({record_type: 'ip_connection'}); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.ipConnections.list().then(listResponseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.ipConnections.list(TEST_AUTH_KEY).then(listResponseFn); + }); + }); + + describe('Nested', function () { + function responseFn(response: ResponsePayload) { + if (response.data) { + expect(response.data).toHaveProperty('id'); + expect(response.data).toHaveProperty('connection_name'); + expect(response.data).toMatchObject({record_type: 'ip_connection'}); + } + } + + describe('del', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.ipConnections + .create({connection_name: 'Central BSD-1'}) + .then(function (response: ResponsePayload) { + const ipConnection = response.data; + // @ts-expect-error TODO: import .d.ts files under src/test folder + return ipConnection.del().then(responseFn); + }); + }); + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.ipConnections.retrieve(TEST_UUID).then(function ( + response: ResponsePayload, + ) { + const ipConnection = response.data; + // @ts-expect-error TODO: import .d.ts files under src/test folder + return ipConnection.del(TEST_AUTH_KEY).then(responseFn); + }); + }); + }); + + describe('update', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.ipConnections + .create({connection_name: 'Central BSD-1'}) + .then(function (response: ResponsePayload) { + const ipConnection = response.data; + return ( + ipConnection + // @ts-expect-error TODO: import .d.ts files under src/test folder + .update({connection_name: 'Western BSD-2'}) + .then(responseFn) + ); + }); + }); + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.ipConnections.retrieve(TEST_UUID).then(function ( + response: ResponsePayload, + ) { + const ipConnection = response.data; + return ( + ipConnection + // @ts-expect-error TODO: import .d.ts files under src/test folder + .update({connection_name: 'Western BSD-2'}, TEST_AUTH_KEY) + .then(responseFn) + ); + }); + }); + }); + }); +}); diff --git a/src/test/resources/Ips.test.ts b/src/test/resources/Ips.test.ts new file mode 100644 index 0000000..46f23f4 --- /dev/null +++ b/src/test/resources/Ips.test.ts @@ -0,0 +1,148 @@ +import { + type ResponsePayloadList, + type ResponsePayload, + utils as testUtils, +} from '../utils'; +const telnyx = testUtils.getTelnyxMock(); + +const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); +const TEST_UUID = '123e4567-e89b-12d3-a456-426614174000'; + +describe('Ips Resource', function () { + function responseFn(response: ResponsePayload) { + expect(response.data).toHaveProperty('id'); + expect(response.data).toHaveProperty('connection_id'); + expect(response.data).toHaveProperty('ip_address'); + expect(response.data).toHaveProperty('record_type'); + expect(response.data).toMatchObject({record_type: 'ip'}); + } + + describe('retrieve', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.ips.retrieve(TEST_UUID).then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.ips.retrieve(TEST_UUID, TEST_AUTH_KEY).then(responseFn); + }); + }); + + describe('create', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.ips + .create({connection_id: 'Central BSD-1', ip_address: '192.168.0.0'}) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.ips + .create( + {connection_id: 'Central BSD-1', ip_address: '192.168.0.0'}, + TEST_AUTH_KEY, + ) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth in options]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.ips + .create( + {connection_id: 'Central BSD-1', ip_address: '192.168.0.0'}, + {api_key: TEST_AUTH_KEY}, + ) + .then(responseFn); + }); + }); + + describe('list', function () { + function listResponseFn(response: ResponsePayloadList) { + expect(response.data[0]).toHaveProperty('id'); + expect(response.data[0]).toHaveProperty('connection_id'); + expect(response.data[0]).toHaveProperty('ip_address'); + expect(response.data[0]).toHaveProperty('record_type'); + expect(response.data[0]).toMatchObject({record_type: 'ip'}); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.ips.list().then(listResponseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.ips.list(TEST_AUTH_KEY).then(listResponseFn); + }); + }); + + describe('Nested', function () { + function responseFn(response: ResponsePayload) { + if (response.data) { + expect(response.data).toHaveProperty('id'); + expect(response.data).toHaveProperty('ip_address'); + expect(response.data).toHaveProperty('connection_id'); + expect(response.data).toMatchObject({record_type: 'ip'}); + } + } + + describe.skip('del', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.ips + .create({connection_id: 'Central BSD-1', ip_address: '192.168.0.0'}) + .then(function (response: ResponsePayload) { + const ip = response.data; + // @ts-expect-error TODO: import .d.ts files under src/test folder + return ip.del().then(responseFn); + }); + }); + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.ips.retrieve('123').then(function ( + response: ResponsePayload, + ) { + const ip = response.data; + // @ts-expect-error TODO: import .d.ts files under src/test folder + return ip.del(TEST_AUTH_KEY).then(responseFn); + }); + }); + }); + + describe('update', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.ips + .create({connection_id: 'Central BSD-1', ip_address: '192.168.0.0'}) + .then(function (response: ResponsePayload) { + const ip = response.data; + return ( + ip + // @ts-expect-error TODO: import .d.ts files under src/test folder + .update({ + connection_id: 'Western BSD-2', + ip_address: '192.168.0.0', + }) + .then(responseFn) + ); + }); + }); + it.skip('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.ips.retrieve('123').then(function ( + response: ResponsePayload, + ) { + const ip = response.data; + return ( + ip + // @ts-expect-error TODO: import .d.ts files under src/test folder + .update({connection_id: 'Western BSD-2'}, TEST_AUTH_KEY) + .then(responseFn) + ); + }); + }); + }); + }); +}); diff --git a/src/test/resources/ManagedAccounts.test.ts b/src/test/resources/ManagedAccounts.test.ts new file mode 100644 index 0000000..35c67f4 --- /dev/null +++ b/src/test/resources/ManagedAccounts.test.ts @@ -0,0 +1,218 @@ +import { + type ResponsePayloadList, + type ResponsePayload, + utils as testUtils, +} from '../utils'; +const telnyx = testUtils.getTelnyxMock(); + +const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); + +describe('Managed Accounts', function () { + describe('list', function () { + function responseFn(response: ResponsePayloadList['data']) { + expect(response).toHaveProperty('data'); + for (let index = 0; index < response.length; index++) { + const row = response[index]; + expect(row).toHaveProperty('api_key'); + expect(row).toHaveProperty('api_token'); + expect(row).toHaveProperty('api_user'); + expect(row).toHaveProperty('created_at'); + expect(row).toHaveProperty('email'); + expect(row).toHaveProperty('id'); + expect(row).toHaveProperty('manager_account_id'); + expect(row).toHaveProperty('record_type'); + expect(row).toHaveProperty('updated_at'); + } + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.managedAccounts + .list({ + page: { + number: '1', + size: '20', + }, + filter: { + email: { + contains: 'null', + eq: 'null', + }, + }, + sort: 'email', + include_cancelled_accounts: 'true', + }) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.managedAccounts + .list( + { + page: { + number: '1', + size: '20', + }, + filter: { + email: { + contains: 'null', + eq: 'null', + }, + }, + sort: 'email', + include_cancelled_accounts: 'true', + }, + TEST_AUTH_KEY, + ) + .then(responseFn); + }); + }); + + describe('create', function () { + function responseFn(response: ResponsePayload) { + expect(response).toHaveProperty('data'); + expect(response.data).toHaveProperty('api_key'); + expect(response.data).toHaveProperty('api_token'); + expect(response.data).toHaveProperty('api_user'); + expect(response.data).toHaveProperty('created_at'); + expect(response.data).toHaveProperty('email'); + expect(response.data).toHaveProperty('id'); + expect(response.data).toHaveProperty('manager_account_id'); + expect(response.data).toHaveProperty('record_type'); + expect(response.data).toHaveProperty('updated_at'); + } + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.managedAccounts + .create({business_name: "Larry's Cat Food Inc"}) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.managedAccounts + .create({business_name: "Larry's Cat Food Inc"}, TEST_AUTH_KEY) + .then(responseFn); + }); + }); + describe('retrieveManagedAccount', function () { + function responseFn(response: ResponsePayload) { + expect(response).toHaveProperty('data'); + expect(response.data).toHaveProperty('api_key'); + expect(response.data).toHaveProperty('api_token'); + expect(response.data).toHaveProperty('api_user'); + expect(response.data).toHaveProperty('created_at'); + expect(response.data).toHaveProperty('email'); + expect(response.data).toHaveProperty('id'); + expect(response.data).toHaveProperty('manager_account_id'); + expect(response.data).toHaveProperty('record_type'); + expect(response.data).toHaveProperty('updated_at'); + } + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.managedAccounts + .retrieveManagedAccount('f65ceda4-6522-4ad6-aede-98de83385123') + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.managedAccounts + .retrieveManagedAccount( + 'f65ceda4-6522-4ad6-aede-98de83385123', + TEST_AUTH_KEY, + ) + .then(responseFn); + }); + }); + describe('updateManagedAccount', function () { + function responseFn(response: ResponsePayload) { + expect(response).toHaveProperty('data'); + expect(response.data).toHaveProperty('api_key'); + expect(response.data).toHaveProperty('api_token'); + expect(response.data).toHaveProperty('api_user'); + expect(response.data).toHaveProperty('created_at'); + expect(response.data).toHaveProperty('email'); + expect(response.data).toHaveProperty('id'); + expect(response.data).toHaveProperty('manager_account_id'); + expect(response.data).toHaveProperty('record_type'); + expect(response.data).toHaveProperty('updated_at'); + } + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.managedAccounts + .updateManagedAccount('f65ceda4-6522-4ad6-aede-98de83385123', { + business_name: "Larry's Dog Food Inc", + }) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.managedAccounts + .updateManagedAccount( + 'f65ceda4-6522-4ad6-aede-98de83385123', + { + business_name: "Larry's Dog Food Inc", + }, + TEST_AUTH_KEY, + ) + .then(responseFn); + }); + }); + describe('disableAccount', function () { + function responseFn(response: ResponsePayload) { + expect(response).toHaveProperty('data'); + expect(response.data).toHaveProperty('api_key'); + expect(response.data).toHaveProperty('api_token'); + expect(response.data).toHaveProperty('api_user'); + expect(response.data).toHaveProperty('created_at'); + expect(response.data).toHaveProperty('email'); + expect(response.data).toHaveProperty('id'); + expect(response.data).toHaveProperty('manager_account_id'); + expect(response.data).toHaveProperty('record_type'); + expect(response.data).toHaveProperty('updated_at'); + } + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.managedAccounts + .disableAccount('f65ceda4-6522-4ad6-aede-98de83385123') + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.managedAccounts + .disableAccount('f65ceda4-6522-4ad6-aede-98de83385123', TEST_AUTH_KEY) + .then(responseFn); + }); + }); + describe('enableAccount', function () { + function responseFn(response: ResponsePayload) { + expect(response).toHaveProperty('data'); + expect(response.data).toHaveProperty('api_key'); + expect(response.data).toHaveProperty('api_token'); + expect(response.data).toHaveProperty('api_user'); + expect(response.data).toHaveProperty('created_at'); + expect(response.data).toHaveProperty('email'); + expect(response.data).toHaveProperty('id'); + expect(response.data).toHaveProperty('manager_account_id'); + expect(response.data).toHaveProperty('record_type'); + expect(response.data).toHaveProperty('updated_at'); + } + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.managedAccounts + .enableAccount('f65ceda4-6522-4ad6-aede-98de83385123') + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.managedAccounts + .enableAccount('f65ceda4-6522-4ad6-aede-98de83385123', TEST_AUTH_KEY) + .then(responseFn); + }); + }); +}); diff --git a/src/test/resources/Messages.test.ts b/src/test/resources/Messages.test.ts new file mode 100644 index 0000000..64f13e6 --- /dev/null +++ b/src/test/resources/Messages.test.ts @@ -0,0 +1,129 @@ +import {type ResponsePayload, utils as testUtils} from '../utils'; +const telnyx = testUtils.getTelnyxMock(); + +const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); +const TEST_UUID = '123e4567-e89b-12d3-a456-426614174000'; + +type ResponsePayloadMessages = ResponsePayload & { + data: { + from: string; + to: string[]; + }; +}; + +describe('Messages Resource', function () { + describe('retrieve', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.messages.retrieve(TEST_UUID).then(function ( + response: ResponsePayload, + ) { + [ + 'id', + 'record_type', + 'direction', + 'messaging_profile_id', + 'from', + 'text', + 'to', + 'type', + ].forEach((property) => { + expect(response.data).toHaveProperty(property); + }); + }); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.messages.retrieve(TEST_UUID, TEST_AUTH_KEY).then(function ( + response: ResponsePayload, + ) { + [ + 'id', + 'record_type', + 'direction', + 'messaging_profile_id', + 'from', + 'text', + 'to', + 'type', + ].forEach((property) => { + expect(response.data).toHaveProperty(property); + }); + }); + }); + }); + describe('create', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.messages + .create({ + text: 'Hello, World!', + from: '+18665552368', + to: '+18665552367', + }) + .then(function (response: ResponsePayloadMessages) { + expect(response.data).toHaveProperty('from'); + expect(response.data).toHaveProperty('text'); + expect(response.data.from).toHaveProperty('carrier'); + expect(response.data.from).toHaveProperty('line_type'); + expect(response.data.from).toHaveProperty('phone_number'); + ['carrier', 'line_type', 'phone_number', 'status'].forEach( + (property) => { + expect(response.data.to[0]).toHaveProperty(property); + }, + ); + }); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.messages + .create( + { + text: 'Hello, World!', + from: '+18665552368', + to: '+18665552367', + }, + TEST_AUTH_KEY, + ) + .then(function (response: ResponsePayloadMessages) { + expect(response.data).toHaveProperty('from'); + expect(response.data).toHaveProperty('text'); + expect(response.data.from).toHaveProperty('carrier'); + expect(response.data.from).toHaveProperty('line_type'); + expect(response.data.from).toHaveProperty('phone_number'); + ['carrier', 'line_type', 'phone_number', 'status'].forEach( + (property) => { + expect(response.data.to[0]).toHaveProperty(property); + }, + ); + }); + }); + + test('Sends the correct request [with specified auth in options]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.messages + .create( + { + text: 'Hello, World!', + from: '+18665552368', + to: '+18665552367', + }, + {api_key: TEST_AUTH_KEY}, + ) + .then(function (response: ResponsePayloadMessages) { + expect(response.data).toHaveProperty('from'); + expect(response.data).toHaveProperty('text'); + expect(response.data.from).toHaveProperty('carrier'); + expect(response.data.from).toHaveProperty('line_type'); + expect(response.data.from).toHaveProperty('phone_number'); + ['carrier', 'line_type', 'phone_number', 'status'].forEach( + (property) => { + expect(response.data.to[0]).toHaveProperty(property); + }, + ); + }); + }); + }); +}); diff --git a/src/test/resources/MessagesSenderIds.test.ts b/src/test/resources/MessagesSenderIds.test.ts new file mode 100644 index 0000000..667e150 --- /dev/null +++ b/src/test/resources/MessagesSenderIds.test.ts @@ -0,0 +1,51 @@ +import {type ResponsePayload, utils as testUtils} from '../utils'; +const telnyx = testUtils.getTelnyxMock(); + +const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); + +type ResponsePayloadMessages = ResponsePayload & { + data: { + from: string; + to: string[]; + }; +}; + +describe.skip('Messages Alphanumeric Sender Ids Resource', function () { + const createData = { + text: 'Hello, World!', + from: '+18665552368', + to: [{address: '+18665552367'}], + messaging_profile_id: '073dd98e-0c85-496b-970f-dd3b7ae21c2se', + }; + + function responseFn(response: ResponsePayloadMessages) { + expect(response.data).toMatchObject({ + text: 'Hello, World!', + from: '+18665552368', + }); + expect(response.data.to[0]).toMatchObject({address: '+18665552367'}); + } + + describe('create', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.messages.alphanumericSenderId + .create(createData) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.messages.alphanumericSenderId + .create(createData, TEST_AUTH_KEY) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth in options]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.messages.alphanumericSenderId + .create(createData, {api_key: TEST_AUTH_KEY}) + .then(responseFn); + }); + }); +}); diff --git a/src/test/resources/MessagingHostedNumberOrders.test.ts b/src/test/resources/MessagingHostedNumberOrders.test.ts new file mode 100644 index 0000000..d2f33f8 --- /dev/null +++ b/src/test/resources/MessagingHostedNumberOrders.test.ts @@ -0,0 +1,107 @@ +import { + type ResponsePayloadList, + type ResponsePayload, + utils as testUtils, +} from '../utils'; +const telnyx = testUtils.getTelnyxMock(); + +const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); +const TEST_UUID = '123e4567-e89b-12d3-a456-426614174000'; + +describe('Messaging Hosted Order Numbers', function () { + function responseFn(response: ResponsePayload) { + expect(response.data).toMatchObject({ + record_type: 'messaging_hosted_number_order', + }); + expect(response.data).toHaveProperty('status'); + expect(response.data).toHaveProperty('id'); + } + + describe('list', function () { + function listResponseFn(response: ResponsePayloadList) { + expect(response.data[0]).toHaveProperty('id'); + expect(response.data[0]).toMatchObject({ + record_type: 'messaging_hosted_number_order', + }); + } + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.messagingHostedNumberOrders.list().then(listResponseFn); + }); + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.messagingHostedNumberOrders + .list(TEST_AUTH_KEY) + .then(listResponseFn); + }); + }); + + describe('retrieve', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.messagingHostedNumberOrders + .retrieve(TEST_UUID) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.messagingHostedNumberOrders + .retrieve(TEST_UUID, TEST_AUTH_KEY) + .then(responseFn); + }); + }); + + describe('create', function () { + function responseFnNoBody(response: ResponsePayload) { + expect(response.data).toHaveProperty('id'); + expect(response.data).toMatchObject({ + record_type: 'messaging_hosted_number_order', + }); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.messagingHostedNumberOrders + .create({messaging_profile_id: '442191469269222625'}) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.messagingHostedNumberOrders + .create({messaging_profile_id: '442191469269222625'}, TEST_AUTH_KEY) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth and no body]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.messagingHostedNumberOrders + .create({'': ''}, TEST_AUTH_KEY) // need to pass string due to telnyx mock parse + .then(responseFnNoBody); + }); + }); + + describe('del', function () { + function responseFn(response: ResponsePayload) { + if (response.data) { + expect(response.data).toHaveProperty('id'); + expect(response.data).toMatchObject({ + record_type: 'messaging_hosted_numbers', + }); + } + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.messagingHostedNumberOrders.del('123').then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.messagingHostedNumberOrders + .del('123', TEST_AUTH_KEY) + .then(responseFn); + }); + }); +}); diff --git a/src/test/resources/MessagingHostedNumbers.test.ts b/src/test/resources/MessagingHostedNumbers.test.ts new file mode 100644 index 0000000..34fd761 --- /dev/null +++ b/src/test/resources/MessagingHostedNumbers.test.ts @@ -0,0 +1,17 @@ +import {type ResponsePayload, utils as testUtils} from '../utils'; +const telnyx = testUtils.getTelnyxMock(); + +describe('retrieve', function () { + function responseFn(response: ResponsePayload) { + if (response.data) { + expect(response.data).toHaveProperty('id'); + expect(response.data).toMatchObject({ + record_type: 'messaging_hosted_numbers', + }); + } + } + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.messagingHostedNumbers.retrieve('123').then(responseFn); + }); +}); diff --git a/src/test/resources/MessagingPhoneNumbers.test.ts b/src/test/resources/MessagingPhoneNumbers.test.ts new file mode 100644 index 0000000..a271eb6 --- /dev/null +++ b/src/test/resources/MessagingPhoneNumbers.test.ts @@ -0,0 +1,73 @@ +import { + type ResponsePayloadList, + type ResponsePayload, + utils as testUtils, +} from '../utils'; +const telnyx = testUtils.getTelnyxMock(); + +const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); + +describe.skip('MessagingPhoneNumbers Resource', function () { + describe('retrieve', function () { + function responseFn(response: ResponsePayload) { + expect(response.data).toMatchObject({ + id: '123', + record_type: 'messaging_phone_number', + }); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.messagingPhoneNumbers.retrieve('123').then(function ( + response: ResponsePayload, + ) { + expect(response.data).toMatchObject(responseFn); + }); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.messagingPhoneNumbers + .retrieve('123', TEST_AUTH_KEY) + .then(function (response: ResponsePayload) { + expect(response.data).toMatchObject(responseFn); + }); + }); + }); + + describe('list', function () { + function responseFn(response: ResponsePayloadList) { + expect(response.data[0]).toHaveProperty('id'); + expect(response.data[0]).toHaveProperty('phone_number'); + expect(response.data[0]).toMatchObject({ + record_type: 'messaging_phone_number', + }); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.messagingPhoneNumbers.list().then(responseFn); + }); + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.messagingPhoneNumbers.list(TEST_AUTH_KEY).then(responseFn); + }); + }); + + describe('update', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.messagingPhoneNumbers + .update('123', { + messaging_product: 'P2P', + }) + .then(function (response: ResponsePayload) { + expect(response.data).toMatchObject({ + id: '123', + messaging_product: 'P2P', + record_type: 'messaging_phone_number', + }); + }); + }); + }); +}); diff --git a/src/test/resources/MessagingProfileMetrics.test.ts b/src/test/resources/MessagingProfileMetrics.test.ts index e23e851..55748b6 100644 --- a/src/test/resources/MessagingProfileMetrics.test.ts +++ b/src/test/resources/MessagingProfileMetrics.test.ts @@ -1,18 +1,8 @@ -import {utils as testUtils} from '../utils'; +import {type ResponsePayloadList, utils as testUtils} from '../utils'; const telnyx = testUtils.getTelnyxMock(); const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); -type ResponsePayloadList = { - data: { - record_type: string; - messaging_profile_id: string; - inbound: object; - outbound: object; - phone_numbers: number; - }[]; -}; - describe('MessagingProfileMetrics Resource', function () { describe('list', function () { function responseFn(response: ResponsePayloadList) { @@ -25,11 +15,11 @@ describe('MessagingProfileMetrics Resource', function () { }); } - it('Sends the correct request', function () { + test('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder return telnyx.messagingProfileMetrics.list().then(responseFn); }); - it('Sends the correct request [with specified auth]', function () { + test('Sends the correct request [with specified auth]', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder return telnyx.messagingProfileMetrics .list(TEST_AUTH_KEY) diff --git a/src/test/resources/MessagingProfiles.test.ts b/src/test/resources/MessagingProfiles.test.ts index aa4a757..68b27f1 100644 --- a/src/test/resources/MessagingProfiles.test.ts +++ b/src/test/resources/MessagingProfiles.test.ts @@ -2,7 +2,11 @@ // @ts-nocheck - needed due to dynamic method testing: mp[action] -import {utils as testUtils} from '../utils'; +import { + type ResponsePayloadList, + type ResponsePayload, + utils as testUtils, +} from '../utils'; import * as utils from '../../utils'; const telnyx = testUtils.getTelnyxMock(); @@ -13,17 +17,6 @@ const TEST_UUID = '123e4567-e89b-12d3-a456-426614174000'; const METHODS = ['phone_numbers', 'short_codes', 'del']; -type ResponsePayloadList = { - data: {id: string; name: string}[]; -}; - -type ResponsePayload = { - data: { - id: string; - name: string; - }; -}; - type ResponsePayloadMetrics = { data: { id: string; @@ -46,7 +39,7 @@ describe('MessagingProfiles Resource', function () { } describe('retrieve', function () { - it('Sends the correct request', function () { + test('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder return telnyx.messagingProfiles .retrieve(TEST_UUID) @@ -54,7 +47,7 @@ describe('MessagingProfiles Resource', function () { .catch(errorFn); }); - it('Sends the correct request [with specified auth]', function () { + test('Sends the correct request [with specified auth]', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder return telnyx.messagingProfiles .retrieve(TEST_UUID, TEST_AUTH_KEY) @@ -64,7 +57,7 @@ describe('MessagingProfiles Resource', function () { }); describe('create', function () { - it('Sends the correct request', function () { + test('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder return telnyx.messagingProfiles .create({name: 'Summer Campaign', whitelisted_destinations: ['US']}) @@ -72,7 +65,7 @@ describe('MessagingProfiles Resource', function () { .catch(errorFn); }); - it('Sends the correct request [with specified auth]', function () { + test('Sends the correct request [with specified auth]', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder return telnyx.messagingProfiles .create( @@ -83,7 +76,7 @@ describe('MessagingProfiles Resource', function () { .catch(errorFn); }); - it('Sends the correct request [with specified auth in options]', function () { + test('Sends the correct request [with specified auth in options]', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder return telnyx.messagingProfiles .create( @@ -96,7 +89,7 @@ describe('MessagingProfiles Resource', function () { }); describe('update', function () { - it('Sends the correct request', function () { + test('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder return telnyx.messagingProfiles .update(TEST_UUID, {name: 'Foo "baz"'}) @@ -114,12 +107,12 @@ describe('MessagingProfiles Resource', function () { }); } - it('Sends the correct request', function () { + test('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder return telnyx.messagingProfiles.list().then(responseFn).catch(errorFn); }); - it('Sends the correct request [with specified auth]', function () { + test('Sends the correct request [with specified auth]', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder return telnyx.messagingProfiles .list(TEST_AUTH_KEY) @@ -139,7 +132,7 @@ describe('MessagingProfiles Resource', function () { } describe('listPhoneNumbers', function () { - it('Sends the correct request', function () { + test('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder return telnyx.messagingProfiles .listPhoneNumbers(TEST_UUID) @@ -147,7 +140,7 @@ describe('MessagingProfiles Resource', function () { .catch(errorFn); }); - it('Sends the correct request [with specified auth]', function () { + test('Sends the correct request [with specified auth]', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder return telnyx.messagingProfiles .listPhoneNumbers(TEST_UUID, TEST_AUTH_KEY) @@ -166,7 +159,7 @@ describe('MessagingProfiles Resource', function () { } describe('listShortCodes', function () { - it('Sends the correct request', function () { + test('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder return telnyx.messagingProfiles .listShortCodes(TEST_UUID) @@ -174,7 +167,7 @@ describe('MessagingProfiles Resource', function () { .catch(errorFn); }); - it('Sends the correct request [with specified auth]', function () { + test('Sends the correct request [with specified auth]', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder return telnyx.messagingProfiles .listShortCodes(TEST_UUID, TEST_AUTH_KEY) @@ -199,7 +192,7 @@ describe('MessagingProfiles Resource', function () { describe(action, function () { const camelCaseAction = utils.snakeToCamelCase(action); - it('Sends the correct request', function () { + test('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder return telnyx.messagingProfiles .create({name: 'Summer Campaign', whitelisted_destinations: ['US']}) @@ -209,7 +202,7 @@ describe('MessagingProfiles Resource', function () { return mp[action]().then(responseFn).catch(errorFn); }); }); - it('Sends the correct request [with specified auth]', function () { + test('Sends the correct request [with specified auth]', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder return telnyx.messagingProfiles .create({name: 'Summer Campaign', whitelisted_destinations: ['US']}) @@ -222,7 +215,7 @@ describe('MessagingProfiles Resource', function () { }); describe(camelCaseAction, function () { - it('Sends the correct request', function () { + test('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder return telnyx.messagingProfiles .create({ @@ -236,7 +229,7 @@ describe('MessagingProfiles Resource', function () { return mp[camelCaseAction]().then(responseFn).catch(errorFn); }); }); - it('Sends the correct request [with specified auth]', function () { + test('Sends the correct request [with specified auth]', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder return telnyx.messagingProfiles .create({ @@ -271,14 +264,14 @@ describe('MessagingProfiles Resource', function () { } describe('retrieveMetrics', function () { - it('Sends the correct request', function () { + test('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder return telnyx.messagingProfiles .retrieveMetrics(TEST_UUID) .then(metricsNestedResponseFn); }); - it('Sends the correct request [with specified auth]', function () { + test('Sends the correct request [with specified auth]', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder return telnyx.messagingProfiles .retrieveMetrics(TEST_UUID, TEST_AUTH_KEY) @@ -287,7 +280,7 @@ describe('MessagingProfiles Resource', function () { }); describe('nested metrics', function () { - it('Sends the correct request', function () { + test('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder return telnyx.messagingProfiles .create({name: 'Summer Campaign', whitelisted_destinations: ['US']}) @@ -297,7 +290,7 @@ describe('MessagingProfiles Resource', function () { return mp.metrics().then(metricsNestedResponseFn); }); }); - it('Sends the correct request [with specified auth]', function () { + test('Sends the correct request [with specified auth]', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder return telnyx.messagingProfiles.retrieve(TEST_UUID).then(function ( response: ResponsePayload, diff --git a/src/test/resources/MessagingSenderIds.test.ts b/src/test/resources/MessagingSenderIds.test.ts new file mode 100644 index 0000000..5505a7b --- /dev/null +++ b/src/test/resources/MessagingSenderIds.test.ts @@ -0,0 +1,125 @@ +import { + type ResponsePayloadList, + type ResponsePayload, + utils as testUtils, +} from '../utils'; +const telnyx = testUtils.getTelnyxMock(); + +const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); + +describe.skip('Messaging AlphanumericSenderIds Resource', function () { + describe('retrieve', function () { + function responseFn(response: ResponsePayload) { + expect(response.data).toMatchObject({ + id: '123', + messaging_profile_id: '123', + record_type: 'alphanumeric_sender_id', + }); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.messagingSenderIds.retrieve('123').then(function ( + response: ResponsePayload, + ) { + expect(response.data).toMatchObject(responseFn); + }); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.messagingSenderIds + .retrieve('123', TEST_AUTH_KEY) + .then(function (response: ResponsePayload) { + expect(response.data).toMatchObject(responseFn); + }); + }); + }); + + describe('create', function () { + function responseFn(response: ResponsePayload) { + expect(response.data).toMatchObject({ + alphanumeric_sender_id: 'Summer Campaign', + record_type: 'alphanumeric_sender_id', + }); + } + + function responseFnNoBody(response: ResponsePayload) { + expect(response.data).toHaveProperty('id'); + expect(response.data).toHaveProperty('alphanumeric_sender_id'); + expect(response.data).toHaveProperty('record_type'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.messagingSenderIds + .create({alphanumeric_sender_id: 'Summer Campaign'}) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.messagingSenderIds + .create({alphanumeric_sender_id: 'Summer Campaign'}, TEST_AUTH_KEY) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth and no body]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.messagingSenderIds + .create({}, TEST_AUTH_KEY) + .then(responseFnNoBody); + }); + + test('Sends the correct request [with specified auth in options]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.messagingSenderIds + .create( + {alphanumeric_sender_id: 'Summer Campaign'}, + {api_key: TEST_AUTH_KEY}, + ) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth in options and no body]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.messagingSenderIds + .create({}, {api_key: TEST_AUTH_KEY}) + .then(responseFnNoBody); + }); + }); + + describe('del', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.messagingSenderIds.del('123').then(function ( + response: ResponsePayload, + ) { + expect(response.data).toMatchObject({ + id: '123', + record_type: 'alphanumeric_sender_id', + }); + }); + }); + }); + + describe('list', function () { + function responseFn(response: ResponsePayloadList) { + expect(response.data[0]).toHaveProperty('id'); + expect(response.data[0]).toHaveProperty('alphanumeric_sender_id'); + expect(response.data[0]).toMatchObject({ + record_type: 'alphanumeric_sender_id', + }); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.messagingSenderIds.list().then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.messagingSenderIds.list(TEST_AUTH_KEY).then(responseFn); + }); + }); +}); diff --git a/src/test/resources/MessagingShortCodes.test.ts b/src/test/resources/MessagingShortCodes.test.ts new file mode 100644 index 0000000..37942a3 --- /dev/null +++ b/src/test/resources/MessagingShortCodes.test.ts @@ -0,0 +1,59 @@ +import { + type ResponsePayloadList, + type ResponsePayload, + utils as testUtils, +} from '../utils'; +const telnyx = testUtils.getTelnyxMock(); + +const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); +const TEST_UUID = '123e4567-e89b-12d3-a456-426614174000'; + +describe('MessagingShortCodes Resource', function () { + function responseFn(response: ResponsePayload) { + expect(response.data).toMatchObject({ + record_type: 'short_code', + }); + expect(response.data).toHaveProperty('messaging_profile_id'); + } + + describe('retrieve', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.messagingShortCodes.retrieve(TEST_UUID).then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.messagingShortCodes + .retrieve(TEST_UUID, TEST_AUTH_KEY) + .then(responseFn); + }); + }); + + describe('update', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.messagingShortCodes + .update(TEST_UUID, {messaging_profile_id: '12345'}) + .then(responseFn); + }); + }); + + describe('list', function () { + function responseFn(response: ResponsePayloadList) { + expect(response.data[0]).toHaveProperty('id'); + expect(response.data[0]).toHaveProperty('short_code'); + expect(response.data[0]).toMatchObject({record_type: 'short_code'}); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.messagingShortCodes.list().then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.messagingShortCodes.list(TEST_AUTH_KEY).then(responseFn); + }); + }); +}); diff --git a/src/test/resources/MobileOperatorNetworks.test.ts b/src/test/resources/MobileOperatorNetworks.test.ts new file mode 100644 index 0000000..de1be00 --- /dev/null +++ b/src/test/resources/MobileOperatorNetworks.test.ts @@ -0,0 +1,25 @@ +import {type ResponsePayloadList, utils as testUtils} from '../utils'; + +const telnyx = testUtils.getTelnyxMock(); + +// 500 Error - Request terminated with error: https://stoplight.io/prism/errors#NO_COMPLEX_OBJECT_TEXT: Cannot serialise complex objects as text -- spec has nested $refs +describe.skip('MobileOperatorNetworks Resource', function () { + describe('list', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.mobileOperatorNetworks.list().then(function ( + response: ResponsePayloadList, + ) { + expect(response.data[0]).toMatchObject({ + record_type: 'mobile_operator_network', + }); + + ['id', 'tadig', 'name', 'mnc', 'mcc', 'country_code'].forEach( + (property) => { + expect(response.data[0]).toHaveProperty(property); + }, + ); + }); + }); + }); +}); diff --git a/src/test/resources/NumberBackgroundJobs.test.ts b/src/test/resources/NumberBackgroundJobs.test.ts new file mode 100644 index 0000000..7abe7cf --- /dev/null +++ b/src/test/resources/NumberBackgroundJobs.test.ts @@ -0,0 +1,86 @@ +import { + type ResponsePayloadList, + type ResponsePayload, + utils as testUtils, +} from '../utils'; +const telnyx = testUtils.getTelnyxMock(); + +const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); + +describe('NumberBackgroundJobs resource', function () { + function responseFn(response: ResponsePayload) { + expect(response.data).toHaveProperty('id'); + expect(response.data).toHaveProperty('failed_operations'); + expect(response.data).toHaveProperty('successful_operations'); + expect(response.data).toHaveProperty('pending_operations'); + expect(response.data).toMatchObject({record_type: 'phone_numbers_job'}); + } + + describe('retrieve', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.numberBackgroundJobs.retrieve('123').then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.numberBackgroundJobs + .retrieve('123', TEST_AUTH_KEY) + .then(responseFn); + }); + }); + + describe('list', function () { + function responseFn(response: ResponsePayloadList) { + expect(response.data[0]).toHaveProperty('id'); + expect(response.data[0]).toHaveProperty('failed_operations'); + expect(response.data[0]).toHaveProperty('successful_operations'); + expect(response.data[0]).toHaveProperty('pending_operations'); + expect(response.data[0]).toMatchObject({ + record_type: 'phone_numbers_job', + }); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.numberBackgroundJobs.list().then(responseFn); + }); + }); + + describe('updateEmergencySettings', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.numberBackgroundJobs + .updateEmergencySettings({ + emergency_address_id: '123', + emergency_enabled: true, + phone_numbers: ['+15555555555'], + }) + .then(responseFn); + }); + }); + + describe('updateNumbers', function () { + test('sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.numberBackgroundJobs + .updateNumbers({ + phone_numbers: ['+15555555555'], + billing_group_id: '123', + }) + .then(responseFn); + }); + }); + + describe('deleteNumbers', function () { + test('sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.numberBackgroundJobs + .deleteNumbers({ + phone_numbers: ['+15555555555'], + billing_group_id: '123', + }) + .then(responseFn); + }); + }); +}); diff --git a/src/test/resources/NumberLookup.test.ts b/src/test/resources/NumberLookup.test.ts new file mode 100644 index 0000000..3bff947 --- /dev/null +++ b/src/test/resources/NumberLookup.test.ts @@ -0,0 +1,21 @@ +import {type ResponsePayload, utils as testUtils} from '../utils'; + +const telnyx = testUtils.getTelnyxMock(); + +describe('NumberLookup Resource', function () { + describe('retrieve', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.numberLookup.retrieve('+18665552368').then(function ( + response: ResponsePayload, + ) { + expect(response.data).toMatchObject({record_type: 'number_lookup'}); + expect(response.data).toHaveProperty('country_code'); + expect(response.data).toHaveProperty('fraud'); + expect(response.data).toHaveProperty('phone_number'); + expect(response.data).toHaveProperty('national_format'); + expect(response.data).toHaveProperty('portability'); + }); + }); + }); +}); diff --git a/src/test/resources/NumberOrderDocuments.test.ts b/src/test/resources/NumberOrderDocuments.test.ts new file mode 100644 index 0000000..97ced9c --- /dev/null +++ b/src/test/resources/NumberOrderDocuments.test.ts @@ -0,0 +1,107 @@ +import { + type ResponsePayloadList, + type ResponsePayload, + utils as testUtils, +} from '../utils'; +const telnyx = testUtils.getTelnyxMock(); + +const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); + +describe('NumberOrderDocuments Resource', function () { + describe('retrieve', function () { + function responseFn(response: ResponsePayload) { + expect(response.data).toMatchObject({ + record_type: 'number_order_document', + }); + expect(response.data).toHaveProperty('file_id'); + expect(response.data).toHaveProperty('requirements_id'); + expect(response.data).toHaveProperty('requirement_type'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.numberOrderDocuments + .retrieve('387d1e31-a218-4375-8151-103f2d5e2d2c') + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.numberOrderDocuments + .retrieve('387d1e31-a218-4375-8151-103f2d5e2d2c', TEST_AUTH_KEY) + .then(responseFn); + }); + }); + + describe('list', function () { + function responseFn(response: ResponsePayloadList) { + expect(response.data[0]).toHaveProperty('id'); + expect(response.data[0]).toHaveProperty('file_id'); + expect(response.data[0]).toHaveProperty('requirements_id'); + expect(response.data[0]).toHaveProperty('requirement_type'); + expect(response.data[0]).toMatchObject({ + record_type: 'number_order_document', + }); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.numberOrderDocuments.list().then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.numberOrderDocuments.list(TEST_AUTH_KEY).then(responseFn); + }); + }); + + describe('update', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.numberOrderDocuments + .update('387d1e31-a218-4375-8151-103f2d5e2d2c', { + file_id: '1e3c5822-0362-4702-8e46-5a129f0d3976', + }) + .then(function (response: ResponsePayload) { + expect(response.data).toMatchObject({ + record_type: 'number_order_document', + }); + expect(response.data).toHaveProperty('file_id'); + expect(response.data).toHaveProperty('requirements_id'); + expect(response.data).toHaveProperty('requirement_type'); + }); + }); + }); + + describe('upload', function () { + function responseFn(response: ResponsePayload) { + expect(response.data).toMatchObject({ + record_type: 'number_order_document', + }); + expect(response.data).toHaveProperty('file_id'); + expect(response.data).toHaveProperty('requirements_id'); + expect(response.data).toHaveProperty('requirement_type'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.numberOrderDocuments + .upload({ + requirements_id: '36aaf27d-986b-493c-bd1b-de16af2e4292', + }) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.numberOrderDocuments + .upload( + { + requirements_id: '36aaf27d-986b-493c-bd1b-de16af2e4292', + }, + TEST_AUTH_KEY, + ) + .then(responseFn); + }); + }); +}); diff --git a/src/test/resources/NumberOrders.test.ts b/src/test/resources/NumberOrders.test.ts new file mode 100644 index 0000000..2c2b7d6 --- /dev/null +++ b/src/test/resources/NumberOrders.test.ts @@ -0,0 +1,117 @@ +import { + type ResponsePayloadList, + type ResponsePayload, + utils as testUtils, +} from '../utils'; +const telnyx = testUtils.getTelnyxMock(); + +const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); + +describe('NumberOrders Resource', function () { + describe('retrieve', function () { + function responseFn(response: ResponsePayload) { + expect(response.data).toMatchObject({ + id: '12ade33a-21c0-473b-b055-b3c836e1c292', + record_type: 'number_order', + }); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.numberOrders + .retrieve('12ade33a-21c0-473b-b055-b3c836e1c292') + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.numberOrders + .retrieve('12ade33a-21c0-473b-b055-b3c836e1c292', TEST_AUTH_KEY) + .then(responseFn); + }); + }); + + describe('list', function () { + function responseFn(response: ResponsePayloadList) { + expect(response.data[0]).toHaveProperty('id'); + expect(response.data[0]).toHaveProperty('status'); + expect(response.data[0]).toHaveProperty('customer_reference'); + expect(response.data[0]).toHaveProperty('requirements_met'); + expect(response.data[0]).toHaveProperty('phone_numbers_count'); + expect(response.data[0]).toMatchObject({record_type: 'number_order'}); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.numberOrders.list().then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.numberOrders.list(TEST_AUTH_KEY).then(responseFn); + }); + }); + + describe('update', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.numberOrders + .update('12ade33a-21c0-473b-b055-b3c836e1c292', { + customer_reference: 'MY REF 002', + }) + .then(function (response: ResponsePayload) { + expect(response.data).toMatchObject({ + id: '12ade33a-21c0-473b-b055-b3c836e1c292', + record_type: 'number_order', + customer_reference: 'MY REF 001', + }); + }); + }); + }); + + describe('create', function () { + function responseFn(response: ResponsePayload) { + expect(response.data).toMatchObject({ + record_type: 'number_order', + }); + expect(response.data).toHaveProperty('requirements_met'); + expect(response.data).toHaveProperty('phone_numbers_count'); + } + + function responseFnNoBody(response: ResponsePayload) { + expect(response.data).toHaveProperty('id'); + expect(response.data).toHaveProperty('requirements_met'); + expect(response.data).toHaveProperty('phone_numbers_count'); + expect(response.data).toMatchObject({record_type: 'number_order'}); + } + + test('Sends the correct request', function () { + const requestBody = { + customer_reference: 'MY REF 001', + file_id: '1e3c5822-0362-4702-8e46-5a129f0d3976', + requirements_id: '36aaf27d-986b-493c-bd1b-de16af2e4292', + }; + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.numberOrders.create(requestBody).then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + const requestBody = { + customer_reference: 'MY REF 001', + file_id: '1e3c5822-0362-4702-8e46-5a129f0d3976', + requirements_id: '36aaf27d-986b-493c-bd1b-de16af2e4292', + }; + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.numberOrders + .create(requestBody, TEST_AUTH_KEY) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth and no body]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.numberOrders + .create({'': ''}, TEST_AUTH_KEY) + .then(responseFnNoBody); + }); + }); +}); diff --git a/src/test/resources/NumberPortouts.test.ts b/src/test/resources/NumberPortouts.test.ts new file mode 100644 index 0000000..67f7f5a --- /dev/null +++ b/src/test/resources/NumberPortouts.test.ts @@ -0,0 +1,201 @@ +import { + type ResponsePayloadList, + type ResponsePayload, + utils as testUtils, +} from '../utils'; +const telnyx = testUtils.getTelnyxMock(); + +const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); +const TEST_UUID = '123e4567-e89b-12d3-a456-426614174000'; + +describe('numberPortouts', function () { + describe('list', function () { + function responseFn(response: ResponsePayloadList) { + expect(response).toHaveProperty('data'); + expect(response).toHaveProperty('meta'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.numberPortouts + .list({ + filter: { + carrier_name: 'string', + spid: 'string', + status: 'string', + }, + page: { + number: 1, + size: 250, + }, + }) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.numberPortouts + .list( + { + filter: { + carrier_name: 'string', + spid: 'string', + status: 'string', + }, + page: { + number: 1, + size: 250, + }, + }, + TEST_AUTH_KEY, + ) + .then(responseFn); + }); + }); + + describe('Document Id', function () { + function responseFn(response: ResponsePayload) { + expect(response).toHaveProperty('data'); + } + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.numberPortouts.retrieve(TEST_UUID).then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.numberPortouts + .retrieve(TEST_UUID, TEST_AUTH_KEY) + .then(responseFn); + }); + }); + describe('Download Document', function () { + function responseFn(response: ResponsePayloadList) { + expect(response).toHaveProperty('data'); + expect(response.data[0]).toHaveProperty('body'); + expect(response.data[0]).toHaveProperty('created_at'); + expect(response.data[0]).toHaveProperty('id'); + expect(response.data[0]).toHaveProperty('user_id'); + } + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.numberPortouts.retrieveComments(TEST_UUID).then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.numberPortouts + .retrieveComments(TEST_UUID, TEST_AUTH_KEY) + .then(responseFn); + }); + }); + describe('create', function () { + function responseFn(response: ResponsePayloadList) { + expect(response).toHaveProperty('data'); + expect(response.data[0]).toHaveProperty('body'); + expect(response.data[0]).toHaveProperty('created_at'); + expect(response.data[0]).toHaveProperty('id'); + expect(response.data[0]).toHaveProperty('user_id'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.numberPortouts + .create(TEST_UUID, {body: 'string'}) // Ensure TEST_UUID is a string + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.numberPortouts + .create(TEST_UUID, {body: 'string'}, TEST_AUTH_KEY) // Ensure TEST_UUID is a string + .then(responseFn); + }); + }); + + describe('listSupportingDocuments', function () { + function responseFn(response: ResponsePayloadList) { + expect(response).toHaveProperty('data'); + expect(response.data[0]).toHaveProperty('created_at'); + expect(response.data[0]).toHaveProperty('document_id'); + expect(response.data[0]).toHaveProperty('id'); + expect(response.data[0]).toHaveProperty('portout_id'); + expect(response.data[0]).toHaveProperty('record_type'); + expect(response.data[0]).toHaveProperty('type'); + expect(response.data[0]).toHaveProperty('updated_at'); + } + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.numberPortouts + .listSupportingDocuments(TEST_UUID) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.numberPortouts + .listSupportingDocuments(TEST_UUID, TEST_AUTH_KEY) + .then(responseFn); + }); + }); + describe('createListOfSupportingDocuments', function () { + function responseFn(response: ResponsePayload) { + expect(response).toHaveProperty('data'); + } + test('Sends the correct request', function () { + const requestBody = { + documents: [ + { + document_id: '0ccc7b54-4df3-4bca-a65a-3da1ecc777f0', + type: 'loa', + }, + ], + }; + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.numberPortouts + .createListOfSupportingDocuments(TEST_UUID, requestBody) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + const requestBody = { + documents: [ + { + document_id: '0ccc7b54-4df3-4bca-a65a-3da1ecc777f0', + type: 'loa', + }, + ], + }; + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.numberPortouts + .createListOfSupportingDocuments(TEST_UUID, requestBody, TEST_AUTH_KEY) + .then(responseFn); + }); + }); + describe('updateStatus', function () { + function responseFn(response: ResponsePayload) { + expect(response).toHaveProperty('data'); + } + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.numberPortouts + .updateStatus(TEST_UUID, { + status: 'status', + }) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.numberPortouts + .updateStatus( + TEST_UUID, + { + status: 'status', + }, + TEST_AUTH_KEY, + ) + .then(responseFn); + }); + }); +}); diff --git a/src/test/resources/NumberReservations.test.ts b/src/test/resources/NumberReservations.test.ts new file mode 100644 index 0000000..3fe474d --- /dev/null +++ b/src/test/resources/NumberReservations.test.ts @@ -0,0 +1,120 @@ +import { + type ResponsePayloadList, + type ResponsePayload, + utils as testUtils, +} from '../utils'; +const telnyx = testUtils.getTelnyxMock(); + +const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); +const TEST_UUID = '123e4567-e89b-12d3-a456-426614174000'; + +type ResponsePayloadNumberReservations = ResponsePayload & { + data: { + phone_numbers: string[]; + }; +}; + +describe('NumberReservations Resource', function () { + function responseFn(response: ResponsePayload) { + expect(response.data).toHaveProperty('id'); + expect(response.data).toHaveProperty('status'); + expect(response.data).toHaveProperty('phone_numbers'); + expect(response.data).toMatchObject({record_type: 'number_reservation'}); + } + + const numberReservationCreateData = { + phone_numbers: [{phone_number: '+19705555098'}], + }; + + describe('retrieve', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.numberReservations.retrieve(TEST_UUID).then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.numberReservations + .retrieve(TEST_UUID, TEST_AUTH_KEY) + .then(responseFn); + }); + }); + + describe('list', function () { + function listResponseFn(response: ResponsePayloadList) { + expect(response.data[0]).toHaveProperty('id'); + expect(response.data[0]).toHaveProperty('status'); + expect(response.data[0]).toHaveProperty('phone_numbers'); + expect(response.data[0]).toMatchObject({ + record_type: 'number_reservation', + }); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.numberReservations.list().then(listResponseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.numberReservations.list(TEST_AUTH_KEY).then(listResponseFn); + }); + }); + + describe('create', function () { + function responseFn(response: ResponsePayloadNumberReservations) { + expect(response.data).toHaveProperty('id'); + expect(response.data).toHaveProperty('status'); + expect(response.data).toHaveProperty('phone_numbers'); + + expect(response.data.record_type).toBe('number_reservation'); + expect(response.data.phone_numbers[0]).toMatchObject({ + phone_number: '+19705555098', + }); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.numberReservations + .create(numberReservationCreateData) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.numberReservations + .create(numberReservationCreateData, TEST_AUTH_KEY) + .then(responseFn); + }); + }); + + describe.skip('extend', function () { + function responseFn(response: ResponsePayload) { + expect(response.data).toHaveProperty('id'); + expect(response.data).toHaveProperty('status'); + expect(response.data).toHaveProperty('phone_numbers'); + expect(response.data).toMatchObject({record_type: 'number_reservation'}); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.numberReservations + .create(numberReservationCreateData) + .then(function (response: ResponsePayload) { + const numberReservation = response.data; + // @ts-expect-error TODO: import .d.ts files under src/test folder + return numberReservation.extend({}).then(responseFn); + }); + }); + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.numberReservations + .create(numberReservationCreateData) + .then(function (response: ResponsePayload) { + const numberReservation = response.data; + // @ts-expect-error TODO: import .d.ts files under src/test folder + return numberReservation.extend({}, TEST_AUTH_KEY).then(responseFn); + }); + }); + }); +}); diff --git a/src/test/resources/OtaUpdates.test.ts b/src/test/resources/OtaUpdates.test.ts new file mode 100644 index 0000000..d4f1182 --- /dev/null +++ b/src/test/resources/OtaUpdates.test.ts @@ -0,0 +1,62 @@ +import { + type ResponsePayloadList, + type ResponsePayload, + utils as testUtils, +} from '../utils'; +const telnyx = testUtils.getTelnyxMock(); + +const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); +const TEST_UUID = '123e4567-e89b-12d3-a456-426614174000'; + +describe('OtaUpdates Resource', function () { + function responseFn(response: ResponsePayload) { + expect(response.data).toMatchObject({ + id: expect.anything(), + sim_card_id: expect.anything(), + status: expect.anything(), + settings: expect.anything(), + }); + expect(response.data).toMatchObject({ + record_type: 'ota_update', + type: 'sim_card_network_preferences', + }); + } + + describe('retrieve', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.otaUpdates.retrieve(TEST_UUID).then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.otaUpdates + .retrieve(TEST_UUID, TEST_AUTH_KEY) + .then(responseFn); + }); + }); + + describe('list', function () { + function responseFn(response: ResponsePayloadList) { + expect(response.data[0]).toMatchObject({ + id: expect.anything(), + sim_card_id: expect.anything(), + status: expect.anything(), + }); + expect(response.data[0]).toMatchObject({ + record_type: 'ota_update', + type: 'sim_card_network_preferences', + }); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.otaUpdates.list().then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.otaUpdates.list(TEST_AUTH_KEY).then(responseFn); + }); + }); +}); diff --git a/src/test/resources/OutboundVoiceProfiles.test.ts b/src/test/resources/OutboundVoiceProfiles.test.ts new file mode 100644 index 0000000..779f7e6 --- /dev/null +++ b/src/test/resources/OutboundVoiceProfiles.test.ts @@ -0,0 +1,178 @@ +import { + type ResponsePayloadList, + type ResponsePayload, + utils as testUtils, +} from '../utils'; +const telnyx = testUtils.getTelnyxMock(); + +const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); +const TEST_UUID = '123e4567-e89b-12d3-a456-426614174000'; + +describe('OutboundVoiceProfiles', function () { + function responseFn(response: ResponsePayload) { + expect(response.data).toHaveProperty('id'); + expect(response.data).toHaveProperty('billing_group_id'); + expect(response.data).toMatchObject({ + record_type: 'outbound_voice_profile', + }); + } + + describe('retrieve', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.outboundVoiceProfiles.retrieve(TEST_UUID).then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.outboundVoiceProfiles + .retrieve(TEST_UUID, TEST_AUTH_KEY) + .then(responseFn); + }); + }); + + describe('create', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.outboundVoiceProfiles + .create({ + billing_group_id: '6a09cdc3-8948-47f0-aa62-74ac943d6c58', + concurrent_call_limit: 10, + name: 'name', + }) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.outboundVoiceProfiles + .create( + { + billing_group_id: '6a09cdc3-8948-47f0-aa62-74ac943d6c58', + concurrent_call_limit: 10, + name: 'name', + }, + TEST_AUTH_KEY, + ) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth in options]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.outboundVoiceProfiles + .create( + { + billing_group_id: '6a09cdc3-8948-47f0-aa62-74ac943d6c58', + concurrent_call_limit: 10, + name: 'name', + }, + {api_key: TEST_AUTH_KEY}, + ) + .then(responseFn); + }); + }); + + describe('list', function () { + function listResponseFn(response: ResponsePayloadList) { + expect(response.data[0]).toHaveProperty('id'); + expect(response.data[0]).toHaveProperty('billing_group_id'); + expect(response.data[0]).toMatchObject({ + record_type: 'outbound_voice_profile', + }); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.outboundVoiceProfiles.list().then(listResponseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.outboundVoiceProfiles + .list(TEST_AUTH_KEY) + .then(listResponseFn); + }); + }); + + describe('del', function () { + function responseFn(response: ResponsePayload) { + if (response.data) { + expect(response.data).toHaveProperty('id'); + expect(response.data).toMatchObject({ + record_type: 'outbound_voice_profile', + }); + } + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.outboundVoiceProfiles + .create({ + billing_group_id: '6a09cdc3-8948-47f0-aa62-74ac943d6c58', + name: 'name', + }) + .then(function (response: ResponsePayload) { + const outboundVoiceProfiles = response.data; + // @ts-expect-error TODO: import .d.ts files under src/test folder + return outboundVoiceProfiles.del().then(responseFn); + }); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.outboundVoiceProfiles.retrieve(TEST_UUID).then(function ( + response: ResponsePayload, + ) { + const outboundVoiceProfiles = response.data; + // @ts-expect-error TODO: import .d.ts files under src/test folder + return outboundVoiceProfiles.del(TEST_AUTH_KEY).then(responseFn); + }); + }); + }); + + describe('update', function () { + function responseFn(response: ResponsePayload) { + if (response.data) { + expect(response.data).toHaveProperty('id'); + expect(response.data).toMatchObject({concurrent_call_limit: 12}); + } + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.outboundVoiceProfiles + .create({ + billing_group_id: '6a09cdc3-8948-47f0-aa62-74ac943d6c58', + concurrent_call_limit: 10, + name: 'name', + }) + .then(function (response: ResponsePayload) { + const ip = response.data; + return ( + ip + // @ts-expect-error TODO: import .d.ts files under src/test folder + .update({ + billing_group_id: '6a09cdc3-8948-47f0-aa62-74ac943d6c59', + concurrent_call_limit: 12, + }) + .then(responseFn) + ); + }); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.outboundVoiceProfiles.retrieve(TEST_UUID).then(function ( + response: ResponsePayload, + ) { + const ip = response.data; + return ( + ip + // @ts-expect-error TODO: import .d.ts files under src/test folder + .update({concurrent_call_limit: 12}, TEST_AUTH_KEY) + .then(responseFn) + ); + }); + }); + }); +}); diff --git a/src/test/resources/PhoneNumberAssignmentByProfile.test.ts b/src/test/resources/PhoneNumberAssignmentByProfile.test.ts new file mode 100644 index 0000000..ea305e5 --- /dev/null +++ b/src/test/resources/PhoneNumberAssignmentByProfile.test.ts @@ -0,0 +1,87 @@ +import { + type ResponsePayload, + type ResponsePayloadListRecords, + utils as testUtils, +} from '../utils'; +const telnyx = testUtils.getTelnyxMock(); + +const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); +describe('Get Assignment Task Status', function () { + describe('retrieveTaskStatus', function () { + function responseFn(response: ResponsePayload) { + expect(response).toHaveProperty('status'); + expect(response).toHaveProperty('taskId'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.phoneNumberAssignmentByProfile + .retrieveTaskStatus({ + taskId: 'string', + }) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.phoneNumberAssignmentByProfile + .retrieveTaskStatus( + { + taskId: 'string', + }, + TEST_AUTH_KEY, + ) + .then(responseFn); + }); + }); + describe('retrievePhoneNumberStatus', function () { + function responseFn(response: ResponsePayloadListRecords) { + expect(response).toHaveProperty('records'); + expect(response.records).toBeInstanceOf(Array); + expect(response.records[0]).toHaveProperty('phoneNumber'); + expect(response.records[0]).toHaveProperty('status'); + expect(response.records[0]).toHaveProperty('taskId'); + } + + test('should assign phone number by profile', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.phoneNumberAssignmentByProfile + .retrievePhoneNumberStatus({taskId: 'taskId'}) + .then(responseFn); + }); + + test('should assign phone number by profile [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.phoneNumberAssignmentByProfile + .retrievePhoneNumberStatus({taskId: 'taskId'}, TEST_AUTH_KEY) + .then(responseFn); + }); + }); + describe('create', function () { + function responseFn(response: ResponsePayload) { + expect(response).toHaveProperty('messagingProfileId'); + expect(response).toHaveProperty('taskId'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.phoneNumberAssignmentByProfile + .create({ + messagingProfileId: '4001767e-ce0f-4cae-9d5f-0d5e636e7809', + }) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.phoneNumberAssignmentByProfile + .create( + { + messagingProfileId: '4001767e-ce0f-4cae-9d5f-0d5e636e7809', + }, + TEST_AUTH_KEY, + ) + .then(responseFn); + }); + }); +}); diff --git a/src/test/resources/PhoneNumberInboundChannels.test.ts b/src/test/resources/PhoneNumberInboundChannels.test.ts new file mode 100644 index 0000000..766b4a1 --- /dev/null +++ b/src/test/resources/PhoneNumberInboundChannels.test.ts @@ -0,0 +1,48 @@ +import {type ResponsePayload, utils as testUtils} from '../utils'; +const telnyx = testUtils.getTelnyxMock(); + +const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); + +describe('Phone Numbers Inbound Channels', function () { + describe('retrieve', function () { + function responseFn(response: ResponsePayload) { + expect(response.data).toMatchObject({ + record_type: 'inbound_channels', + }); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.phoneNumbersInboundChannels.retrieve().then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.phoneNumbersInboundChannels + .retrieve(TEST_AUTH_KEY) + .then(responseFn); + }); + }); + + describe('update', function () { + function responseFn(response: ResponsePayload) { + if (response.data) { + expect(response.data).toMatchObject({channels: 7}); + expect(response.data).toMatchObject({record_type: 'inbound_channels'}); + } + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.phoneNumbersInboundChannels + .update({channels: 8}) + .then(responseFn); + }); + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.phoneNumbersInboundChannels + .update({channels: 8}, TEST_AUTH_KEY) + .then(responseFn); + }); + }); +}); diff --git a/src/test/resources/PhoneNumbers.test.ts b/src/test/resources/PhoneNumbers.test.ts new file mode 100644 index 0000000..8804483 --- /dev/null +++ b/src/test/resources/PhoneNumbers.test.ts @@ -0,0 +1,179 @@ +import { + type ResponsePayloadList, + type ResponsePayload, + utils as testUtils, +} from '../utils'; +const telnyx = testUtils.getTelnyxMock(); + +const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); +const TEST_UUID = '123e4567-e89b-12d3-a456-426614174000'; + +type ResponsePayloadPhoneNumbers = ResponsePayload & { + data: { + emergency: object; + }; +}; + +describe('PhoneNumbers Resource', function () { + function responseFn(response: ResponsePayload) { + expect(response.data).toHaveProperty('id'); + expect(response.data).toHaveProperty('phone_number'); + expect(response.data).toMatchObject({record_type: 'phone_number'}); + } + + describe('update', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.phoneNumbers + .update(TEST_UUID, {status: 'active'}) + .then(responseFn); + }); + }); + + describe('del', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.phoneNumbers.del(TEST_UUID).then(responseFn); + }); + }); + + describe('list', function () { + function listResponseFn(response: ResponsePayloadList) { + expect(response.data[0]).toHaveProperty('id'); + expect(response.data[0]).toHaveProperty('phone_number'); + expect(response.data[0]).toMatchObject({record_type: 'phone_number'}); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.phoneNumbers.list().then(listResponseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.phoneNumbers.list(TEST_AUTH_KEY).then(listResponseFn); + }); + }); + + describe('retrieve', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.phoneNumbers.retrieve(TEST_UUID).then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.phoneNumbers + .retrieve(TEST_UUID, TEST_AUTH_KEY) + .then(responseFn); + }); + }); + + describe('setEmergencySettings', function () { + function responseFn(response: ResponsePayloadPhoneNumbers) { + expect(response.data).toHaveProperty('id'); + expect(response.data).toMatchObject({record_type: 'voice_settings'}); + expect(response.data).toHaveProperty('emergency'); + expect(response.data.emergency).toMatchObject({ + emergency_enabled: true, + emergency_address_id: '1315261609962112019', + }); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.phoneNumbers + .setEmergencySettings(TEST_UUID, { + emergency_enabled: true, + emergency_address_id: '1315261609962112019', + }) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.phoneNumbers + .setEmergencySettings( + TEST_UUID, + { + emergency_enabled: true, + emergency_address_id: '1315261609962112019', + }, + TEST_AUTH_KEY, + ) + .then(responseFn); + }); + }); + + describe('Voice methods', function () { + function responseFn(response: ResponsePayload) { + expect(response.data).toHaveProperty('id'); + expect(response.data).toHaveProperty('translated_number'); + expect(response.data).toHaveProperty('connection_id'); + expect(response.data).toMatchObject({record_type: 'voice_settings'}); + } + + describe('retrieveVoiceSettings', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.phoneNumbers + .retrieveVoiceSettings(TEST_UUID) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.phoneNumbers + .retrieveVoiceSettings(TEST_UUID, TEST_AUTH_KEY) + .then(responseFn); + }); + }); + + describe('updateVoiceSettings', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.phoneNumbers + .updateVoiceSettings(TEST_UUID, { + tech_prefix_enabled: true, + }) + .then(responseFn); + }); + }); + }); + + describe('Messaging methods', function () { + function responseFn(response: ResponsePayload) { + expect(response.data).toHaveProperty('id'); + expect(response.data).toHaveProperty('phone_number'); + expect(response.data).toHaveProperty('messaging_profile_id'); + expect(response.data).toMatchObject({record_type: 'messaging_settings'}); + } + + describe('retrieveMessagingSettings', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.phoneNumbers + .retrieveMessagingSettings(TEST_UUID) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.phoneNumbers + .retrieveMessagingSettings(TEST_UUID, TEST_AUTH_KEY) + .then(responseFn); + }); + }); + + describe('updateMessagingSettings', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.phoneNumbers + .updateMessagingSettings(TEST_UUID, { + messaging_product: 'P2P', + }) + .then(responseFn); + }); + }); + }); +}); diff --git a/src/test/resources/PhoneNumbersMessaging.test.ts b/src/test/resources/PhoneNumbersMessaging.test.ts new file mode 100644 index 0000000..35872a9 --- /dev/null +++ b/src/test/resources/PhoneNumbersMessaging.test.ts @@ -0,0 +1,27 @@ +import {type ResponsePayloadList, utils as testUtils} from '../utils'; +const telnyx = testUtils.getTelnyxMock(); + +const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); + +describe('Phone Numbers Messaging Resource', function () { + function responseFn(response: ResponsePayloadList) { + expect(response.data[0]).toMatchObject({ + record_type: 'messaging_settings', + }); + expect(response.data[0]).toHaveProperty('id'); + expect(response.data[0]).toHaveProperty('phone_number'); + expect(response.data[0]).toHaveProperty('messaging_profile_id'); + } + + describe('list', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.phoneNumbers.messaging.list().then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.phoneNumbers.messaging.list(TEST_AUTH_KEY).then(responseFn); + }); + }); +}); diff --git a/src/test/resources/PhoneNumbersRegulatoryRequirements.test.ts b/src/test/resources/PhoneNumbersRegulatoryRequirements.test.ts new file mode 100644 index 0000000..25f4c54 --- /dev/null +++ b/src/test/resources/PhoneNumbersRegulatoryRequirements.test.ts @@ -0,0 +1,58 @@ +import {type ResponsePayloadList, utils as testUtils} from '../utils'; +const telnyx = testUtils.getTelnyxMock(); + +const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); + +type ResponsePayloadPhoneNumberRegulatoryRequirements = ResponsePayloadList & { + data: { + regulatory_requirements: object[]; + }[]; +}; + +// Skip tests as path out of sync with mock for now +// describe.skip('PhoneNumberRegulatoryRequirements Resource', function () { +describe('PhoneNumberRegulatoryRequirements Resource', function () { + describe('list', function () { + function responseFn( + response: ResponsePayloadPhoneNumberRegulatoryRequirements, + ) { + expect(response.data[0]).toHaveProperty('phone_number'); + expect(response.data[0]).toHaveProperty('regulatory_requirements'); + expect(response.data[0]).toMatchObject({ + record_type: 'phone_number_regulatory_requirements', + }); + expect(response.data[0]?.regulatory_requirements[0]).toHaveProperty( + 'label', + ); + expect(response.data[0]?.regulatory_requirements[0]).toHaveProperty( + 'field_type', + ); + expect(response.data[0]?.regulatory_requirements[0]).toHaveProperty( + 'acceptance_criteria', + ); + expect(response.data[0]?.regulatory_requirements[0]).toMatchObject({ + record_type: 'regulatory_requirement', + }); + } + + test('Sends the correct request', function () { + return ( + // @ts-expect-error TODO: import .d.ts files under src/test folder + telnyx.phoneNumberRegulatoryRequirements + // this is due to https://github.com/stoplightio/prism/issues/2443 + .list({'filter%5bphone_number%5d': '5120000000'}) + .then(responseFn) + ); + }); + + test('Sends the correct request [with specified auth]', function () { + return ( + // @ts-expect-error TODO: import .d.ts files under src/test folder + telnyx.phoneNumberRegulatoryRequirements + // this is due to https://github.com/stoplightio/prism/issues/2443 + .list({'filter%5bphone_number%5d': '5120000000'}, TEST_AUTH_KEY) + .then(responseFn) + ); + }); + }); +}); diff --git a/src/test/resources/PhoneNumbersVoice.test.ts b/src/test/resources/PhoneNumbersVoice.test.ts new file mode 100644 index 0000000..4dd2b53 --- /dev/null +++ b/src/test/resources/PhoneNumbersVoice.test.ts @@ -0,0 +1,27 @@ +import {type ResponsePayloadList, utils as testUtils} from '../utils'; +const telnyx = testUtils.getTelnyxMock(); + +const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); + +describe('Phone Numbers Voice Resource', function () { + function responseFn(response: ResponsePayloadList) { + expect(response.data[0]).toMatchObject({ + record_type: 'voice_settings', + }); + expect(response.data[0]).toHaveProperty('id'); + expect(response.data[0]).toHaveProperty('translated_number'); + expect(response.data[0]).toHaveProperty('connection_id'); + } + + describe('list', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.phoneNumbers.voice.list().then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.phoneNumbers.voice.list(TEST_AUTH_KEY).then(responseFn); + }); + }); +}); diff --git a/src/test/resources/PortabilityChecks.test.ts b/src/test/resources/PortabilityChecks.test.ts new file mode 100644 index 0000000..1adca23 --- /dev/null +++ b/src/test/resources/PortabilityChecks.test.ts @@ -0,0 +1,35 @@ +import {type ResponsePayloadList, utils as testUtils} from '../utils'; +const telnyx = testUtils.getTelnyxMock(); + +const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); + +describe('PortabilityChecks Resource', function () { + function responseFn(response: ResponsePayloadList) { + expect(response.data[0]).toHaveProperty('phone_number'); + expect(response.data[0]).toHaveProperty('fast_portable'); + expect(response.data[0]).toHaveProperty('portable'); + expect(response.data[0]).toMatchObject({ + record_type: 'portability_check_result', + }); + } + + const portabilityChecksParams = { + phone_numbers: ['+15555555555', '+16666666667'], + }; + + describe('run', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.portabilityChecks + .run(portabilityChecksParams) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.portabilityChecks + .run(portabilityChecksParams, TEST_AUTH_KEY) + .then(responseFn); + }); + }); +}); diff --git a/src/test/resources/PortingOrders.test.ts b/src/test/resources/PortingOrders.test.ts new file mode 100644 index 0000000..4956c38 --- /dev/null +++ b/src/test/resources/PortingOrders.test.ts @@ -0,0 +1,223 @@ +import { + type ResponsePayload, + type ResponsePayloadList, + utils as testUtils, +} from '../utils'; +const telnyx = testUtils.getTelnyxMock(); + +const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); +const TEST_UUID = '123e4567-e89b-12d3-a456-426614174000'; + +describe('PortingOrders Resource', function () { + function responseFn(response: ResponsePayload) { + expect(response.data).toHaveProperty('activation_settings'); + expect(response.data).toHaveProperty('end_user'); + expect(response.data).toHaveProperty('phone_number_configuration'); + expect(response.data).toMatchObject({record_type: 'porting_order'}); + } + + function listResponseFn(response: ResponsePayloadList) { + expect(response.data[0]).toHaveProperty('activation_settings'); + expect(response.data[0]).toHaveProperty('end_user'); + expect(response.data[0]).toHaveProperty('phone_number_configuration'); + expect(response.data[0]).toMatchObject({record_type: 'porting_order'}); + } + + const newPortingOrderParams = { + phone_numbers: ['+15555555555', '+16666666667'], + }; + + describe('list', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.portingOrders.list().then(listResponseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.portingOrders.list().then(listResponseFn); + }); + }); + + describe('create', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.portingOrders + .create(newPortingOrderParams) + .then(listResponseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.portingOrders + .create(newPortingOrderParams, TEST_AUTH_KEY) + .then(listResponseFn); + }); + }); + + describe('retrieve', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.portingOrders.retrieve(TEST_UUID).then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.portingOrders + .retrieve(TEST_UUID, TEST_AUTH_KEY) + .then(responseFn); + }); + }); + + describe('listExceptionTypes', function () { + function responseFn(response: ResponsePayloadList) { + expect(response.data[0]).toHaveProperty('code'); + expect(response.data[0]).toHaveProperty('description'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.portingOrders.listExceptionTypes().then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.portingOrders + .listExceptionTypes(TEST_AUTH_KEY) + .then(responseFn); + }); + }); + + describe('listActivationJobs', function () { + function responseFn(response: ResponsePayloadList) { + expect(response.data[0]).toHaveProperty('id'); + expect(response.data[0]).toHaveProperty('status'); + expect(response.data[0]).toMatchObject({ + record_type: 'porting_activation_job', + }); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.portingOrders + .listActivationJobs(TEST_UUID) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.portingOrders + .listActivationJobs(TEST_UUID, TEST_AUTH_KEY) + .then(responseFn); + }); + }); + + describe.skip('cancelOrder', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.portingOrders.cancelOrder(TEST_UUID).then(responseFn); + }); + }); + + describe('listAllowedFocWindows', function () { + function responseFn(response: ResponsePayloadList) { + expect(response.data[0]).toHaveProperty('started_at'); + expect(response.data[0]).toHaveProperty('ended_at'); + expect(response.data[0]).toMatchObject({record_type: 'porting_order'}); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.portingOrders + .listAllowedFocWindows(TEST_UUID) + .then(responseFn); + }); + }); + + describe('retrieveLoaTemplate', function () { + function responseFn(response: ResponsePayloadList) { + expect(response.data).not.toBeNull(); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.portingOrders + .retrieveLoaTemplate(TEST_UUID) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.portingOrders + .retrieveLoaTemplate(TEST_UUID, TEST_AUTH_KEY) + .then(responseFn); + }); + }); + + // describe.skip('confirmOrder', function () { + describe('confirmOrder', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.portingOrders.confirmOrder(TEST_UUID).then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.portingOrders + .confirmOrder(TEST_UUID, TEST_AUTH_KEY) + .then(responseFn); + }); + }); + + describe('update', function () { + const INVOICE_ID = '35146afd-df93-4963-b1e9-1a085e2ae875'; + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.portingOrders.create(newPortingOrderParams).then(function ( + response: ResponsePayload, + ) { + const po = response.data; + // @ts-expect-error TODO: import .d.ts files under src/test folder + return po.update({documents: {invoice: INVOICE_ID}}).then(responseFn); + }); + }); + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.portingOrders.retrieve(TEST_UUID).then(function ( + response: ResponsePayload, + ) { + const po = response.data; + return ( + po + // @ts-expect-error TODO: import .d.ts files under src/test folder + .update({documents: {invoice: INVOICE_ID}}, TEST_AUTH_KEY) + .then(responseFn) + ); + }); + }); + }); + + describe.skip('del', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.portingOrders.create(newPortingOrderParams).then(function ( + response: ResponsePayload, + ) { + const po = response.data; + // @ts-expect-error TODO: import .d.ts files under src/test folder + return po.del().then(responseFn); + }); + }); + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.portingOrders.retrieve('id').then(function ( + response: ResponsePayload, + ) { + const po = response.data; + // @ts-expect-error TODO: import .d.ts files under src/test folder + return po.del(TEST_AUTH_KEY).then(responseFn); + }); + }); + }); +}); diff --git a/src/test/resources/PortingPhoneNumbers.test.ts b/src/test/resources/PortingPhoneNumbers.test.ts new file mode 100644 index 0000000..2cdffec --- /dev/null +++ b/src/test/resources/PortingPhoneNumbers.test.ts @@ -0,0 +1,27 @@ +import {type ResponsePayloadList, utils as testUtils} from '../utils'; +const telnyx = testUtils.getTelnyxMock(); + +const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); + +describe('PortingPhoneNumbers Resource', function () { + function responseFn(response: ResponsePayloadList) { + expect(response.data[0]).toHaveProperty('activation_status'); + expect(response.data[0]).toHaveProperty('portability_status'); + expect(response.data[0]).toHaveProperty('porting_order_id'); + expect(response.data[0]).toMatchObject({ + record_type: 'porting_phone_number', + }); + } + + describe('list', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.portingPhoneNumbers.list().then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.portingPhoneNumbers.list(TEST_AUTH_KEY).then(responseFn); + }); + }); +}); diff --git a/src/test/resources/PortoutRequests.test.ts b/src/test/resources/PortoutRequests.test.ts new file mode 100644 index 0000000..19268ae --- /dev/null +++ b/src/test/resources/PortoutRequests.test.ts @@ -0,0 +1,176 @@ +import { + type ResponsePayloadList, + type ResponsePayload, + utils as testUtils, +} from '../utils'; +const telnyx = testUtils.getTelnyxMock(); + +const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); +const TEST_UUID = '123e4567-e89b-12d3-a456-426614174000'; + +describe('portout', function () { + describe('updateStatus', function () { + function responseFn(response: ResponsePayload) { + expect(response).toHaveProperty('data'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.portoutRequests + .updateStatus(TEST_UUID, 'string', {body: 'string'}) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.portoutRequests + .updateStatus(TEST_UUID, 'string', {body: 'string'}, TEST_AUTH_KEY) + .then(responseFn); + }); + }); + + describe('listComments', function () { + function responseFn(response: ResponsePayloadList) { + expect(response).toHaveProperty('data'); + for (let index = 0; index < response.data.length; index++) { + const element = response.data[index]; + expect(element).toHaveProperty('body'); + expect(element).toHaveProperty('created_at'); + expect(element).toHaveProperty('id'); + expect(element).toHaveProperty('user_id'); + } + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.portoutRequests.listComments(TEST_UUID).then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.portoutRequests + .listComments(TEST_UUID, TEST_AUTH_KEY) + .then(responseFn); + }); + }); + + describe('createComment', function () { + function responseFn(response: ResponsePayloadList) { + expect(response).toHaveProperty('data'); + for (let index = 0; index < response.data.length; index++) { + const element = response.data[index]; + expect(element).toHaveProperty('body'); + expect(element).toHaveProperty('created_at'); + expect(element).toHaveProperty('id'); + expect(element).toHaveProperty('user_id'); + } + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.portoutRequests.createComment(TEST_UUID).then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.portoutRequests + .createComment(TEST_UUID, TEST_AUTH_KEY) + .then(responseFn); + }); + }); + describe('retrieveRequest', function () { + function responseFn(response: ResponsePayload) { + expect(response).toHaveProperty('data'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.portoutRequests.retrieveRequest(TEST_UUID).then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.portoutRequests + .retrieveRequest(TEST_UUID, TEST_AUTH_KEY) + .then(responseFn); + }); + }); + describe('retrieveComment', function () { + function responseFn(response: ResponsePayloadList) { + expect(response).toHaveProperty('data'); + for (let index = 0; index < response.data.length; index++) { + const element = response.data[index]; + expect(element).toHaveProperty('body'); + expect(element).toHaveProperty('created_at'); + expect(element).toHaveProperty('id'); + expect(element).toHaveProperty('user_id'); + } + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.portoutRequests.retrieveComment(TEST_UUID).then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.portoutRequests + .retrieveComment(TEST_UUID, TEST_AUTH_KEY) + .then(responseFn); + }); + }); + describe('listDocuments', function () { + function responseFn(response: ResponsePayloadList) { + expect(response).toHaveProperty('data'); + for (let index = 0; index < response.data.length; index++) { + const element = response.data[index]; + expect(element).toHaveProperty('created_at'); + expect(element).toHaveProperty('document_id'); + expect(element).toHaveProperty('id'); + expect(element).toHaveProperty('portout_id'); + expect(element).toHaveProperty('record_type'); + expect(element).toHaveProperty('type'); + expect(element).toHaveProperty('updated_at'); + } + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.portoutRequests.listDocuments(TEST_UUID).then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.portoutRequests + .listDocuments(TEST_UUID, TEST_AUTH_KEY) + .then(responseFn); + }); + }); + describe('createDocuments', function () { + function responseFn(response: ResponsePayloadList) { + expect(response).toHaveProperty('data'); + for (let index = 0; index < response.data.length; index++) { + const element = response.data[index]; + expect(element).toHaveProperty('created_at'); + expect(element).toHaveProperty('document_id'); + expect(element).toHaveProperty('id'); + expect(element).toHaveProperty('portout_id'); + expect(element).toHaveProperty('record_type'); + expect(element).toHaveProperty('type'); + expect(element).toHaveProperty('updated_at'); + } + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.portoutRequests.createDocuments(TEST_UUID).then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.portoutRequests + .createDocuments(TEST_UUID, TEST_AUTH_KEY) + .then(responseFn); + }); + }); +}); diff --git a/src/test/resources/PublicKey.test.ts b/src/test/resources/PublicKey.test.ts new file mode 100644 index 0000000..8026c42 --- /dev/null +++ b/src/test/resources/PublicKey.test.ts @@ -0,0 +1,18 @@ +import {type ResponsePayload, utils as testUtils} from '../utils'; + +const telnyx = testUtils.getTelnyxMock(); + +describe.skip('PublicKey Resource', function () { + describe('retrieve', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.publicKey.retrieve().then(function ( + response: ResponsePayload, + ) { + expect(response.data).toMatchObject({record_type: 'public_key'}); + expect(response.data).toHaveProperty('public'); + expect(response.data).toHaveProperty('organization_id'); + }); + }); + }); +}); diff --git a/src/test/resources/Queues.test.ts b/src/test/resources/Queues.test.ts new file mode 100644 index 0000000..65af412 --- /dev/null +++ b/src/test/resources/Queues.test.ts @@ -0,0 +1,62 @@ +import { + type ResponsePayloadList, + type ResponsePayload, + utils as testUtils, +} from '../utils'; +const telnyx = testUtils.getTelnyxMock(); + +const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); + +describe('Queues Resource', function () { + describe('retrieve', function () { + function responseFn(response: ResponsePayload) { + expect(response.data).toMatchObject({name: 'support'}); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.queues.retrieve('support').then(responseFn); + }); + + // TelnyxResource can't handle named param in get like here + test.skip('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.queues.retrieve('support', TEST_AUTH_KEY).then(responseFn); + }); + }); + + describe('listCalls', function () { + function responseFn(response: ResponsePayloadList) { + expect(response.data[0]).toHaveProperty('call_control_id'); + expect(response.data[0]).toHaveProperty('queue_position'); + expect(response.data[0]).toMatchObject({record_type: 'queue_call'}); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.queues.listCalls('support').then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.queues + .retrieveCall('support', '891510ac-f3e4-11e8-af5b-de00688a4901') + .then(responseFn); + }); + }); + + describe('retrieveCall', function () { + function responseFn(response: ResponsePayload) { + expect(response.data).toHaveProperty('call_control_id'); + expect(response.data).toHaveProperty('queue_position'); + expect(response.data).toMatchObject({record_type: 'queue_call'}); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.queues + .retrieveCall('queue_id', 'call_control_id') + .then(responseFn); + }); + }); +}); diff --git a/src/test/resources/RegulatoryRequirements.test.ts b/src/test/resources/RegulatoryRequirements.test.ts new file mode 100644 index 0000000..e422408 --- /dev/null +++ b/src/test/resources/RegulatoryRequirements.test.ts @@ -0,0 +1,56 @@ +import { + type ResponsePayloadList, + type ResponsePayload, + utils as testUtils, +} from '../utils'; +const telnyx = testUtils.getTelnyxMock(); + +const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); + +describe.skip('RegulatoryRequirements Resource', function () { + describe('retrieve', function () { + function responseFn(response: ResponsePayload) { + expect(response.data).toHaveProperty('requirement_type'); + expect(response.data).toHaveProperty('label'); + expect(response.data).toHaveProperty('description'); + expect(response.data).toHaveProperty('field_type'); + expect(response.data).toMatchObject({ + record_type: 'regulatory_requirement', + }); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.regulatoryRequirements.retrieve('123').then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.regulatoryRequirements + .retrieve('123', TEST_AUTH_KEY) + .then(responseFn); + }); + }); + + describe('list', function () { + function responseFn(response: ResponsePayloadList) { + expect(response.data[0]).toHaveProperty('requirement_type'); + expect(response.data[0]).toHaveProperty('label'); + expect(response.data[0]).toHaveProperty('description'); + expect(response.data[0]).toHaveProperty('field_type'); + expect(response.data[0]).toMatchObject({ + record_type: 'regulatory_requirement', + }); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.regulatoryRequirements.list().then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.regulatoryRequirements.list(TEST_AUTH_KEY).then(responseFn); + }); + }); +}); diff --git a/src/test/resources/ReportsMdrs.test.ts b/src/test/resources/ReportsMdrs.test.ts new file mode 100644 index 0000000..1f81c64 --- /dev/null +++ b/src/test/resources/ReportsMdrs.test.ts @@ -0,0 +1,49 @@ +import {type ResponsePayloadList, utils as testUtils} from '../utils'; +const telnyx = testUtils.getTelnyxMock(); + +const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); + +describe('reportsMdrs', function () { + describe('list', function () { + function responseFn(response: ResponsePayloadList) { + expect(response).toHaveProperty('data'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.reportsMdrs + .list({ + start_date: 'string', + end_date: 'string', + id: 'e093fbe0-5bde-11eb-ae93-0242ac130002', + direction: 'INBOUND', + profile: 'My profile', + cld: '+15551237654', + cli: '+15551237654', + status: 'DELIVERED', + message_type: 'SMS', + }) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.reportsMdrs + .list( + { + start_date: 'string', + end_date: 'string', + id: 'e093fbe0-5bde-11eb-ae93-0242ac130002', + direction: 'INBOUND', + profile: 'My profile', + cld: '+15551237654', + cli: '+15551237654', + status: 'DELIVERED', + message_type: 'SMS', + }, + TEST_AUTH_KEY, + ) + .then(responseFn); + }); + }); +}); diff --git a/src/test/resources/RoomCompositions.test.ts b/src/test/resources/RoomCompositions.test.ts new file mode 100644 index 0000000..1fee70c --- /dev/null +++ b/src/test/resources/RoomCompositions.test.ts @@ -0,0 +1,178 @@ +import { + type ResponsePayloadList, + type ResponsePayload, + utils as testUtils, +} from '../utils'; +const telnyx = testUtils.getTelnyxMock(); + +const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); +const TEST_UUID = '123e4567-e89b-12d3-a456-426614174000'; + +describe('Access IP Ranges Resource', function () { + describe('list', function () { + function responseFn(response: ResponsePayloadList) { + expect(response).toHaveProperty('data'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.roomCompositions + .list({ + filter: { + date_created_at: { + eq: '2021-04-25', + gte: '2021-04-25', + lte: '2021-04-25', + }, + session_id: '92e7d459-bcc5-4386-9f5f-6dd14a82588d', + status: 'completed', + }, + page: { + size: '20', + number: '1', + }, + }) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.roomCompositions + .list( + { + filter: { + date_created_at: { + eq: '2021-04-25', + gte: '2021-04-25', + lte: '2021-04-25', + }, + session_id: '92e7d459-bcc5-4386-9f5f-6dd14a82588d', + status: 'completed', + }, + page: { + size: '20', + number: '1', + }, + }, + TEST_AUTH_KEY, + ) + .then(responseFn); + }); + }); + + describe('create', function () { + function responseFn(response: ResponsePayload) { + expect(response).toHaveProperty('data'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.roomCompositions + .create({ + format: 'mp4', + resolution: '800x600', + session_id: '0ccc7b54-4df3-4bca-a65a-3da1ecc777b0', + video_layout: { + property1: { + height: 360, + max_columns: 3, + max_rows: 3, + video_sources: ['7b61621f-62e0-4aad-ab11-9fd19e272e73'], + width: 480, + x_pos: 100, + y_pos: 100, + z_pos: 1, + }, + property2: { + height: 360, + max_columns: 3, + max_rows: 3, + video_sources: ['7b61621f-62e0-4aad-ab11-9fd19e272e73'], + width: 480, + x_pos: 100, + y_pos: 100, + z_pos: 1, + }, + }, + webhook_event_failover_url: 'https://failover.example.com', + webhook_event_url: 'https://example.com', + webhook_timeout_secs: 25, + }) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.roomCompositions + .create( + { + format: 'mp4', + resolution: '800x600', + session_id: '0ccc7b54-4df3-4bca-a65a-3da1ecc777b0', + video_layout: { + property1: { + height: 360, + max_columns: 3, + max_rows: 3, + video_sources: ['7b61621f-62e0-4aad-ab11-9fd19e272e73'], + width: 480, + x_pos: 100, + y_pos: 100, + z_pos: 1, + }, + property2: { + height: 360, + max_columns: 3, + max_rows: 3, + video_sources: ['7b61621f-62e0-4aad-ab11-9fd19e272e73'], + width: 480, + x_pos: 100, + y_pos: 100, + z_pos: 1, + }, + }, + webhook_event_failover_url: 'https://failover.example.com', + webhook_event_url: 'https://example.com', + webhook_timeout_secs: 25, + }, + TEST_AUTH_KEY, + ) + .then(responseFn); + }); + }); + + describe('del', function () { + function responseFn(response: ResponsePayload) { + expect(response.lastResponse?.statusCode).toBe(204); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.roomCompositions.del(TEST_UUID).then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.roomCompositions + .del(TEST_UUID, TEST_AUTH_KEY) + .then(responseFn); + }); + }); + describe('retrieve', function () { + function responseFn(response: ResponsePayload) { + expect(response).toHaveProperty('data'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.roomCompositions.retrieve(TEST_UUID).then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.roomCompositions + .retrieve(TEST_UUID, TEST_AUTH_KEY) + .then(responseFn); + }); + }); +}); diff --git a/src/test/resources/RoomParticipants.test.ts b/src/test/resources/RoomParticipants.test.ts new file mode 100644 index 0000000..ea813cb --- /dev/null +++ b/src/test/resources/RoomParticipants.test.ts @@ -0,0 +1,99 @@ +import { + type ResponsePayloadList, + type ResponsePayload, + utils as testUtils, +} from '../utils'; +const telnyx = testUtils.getTelnyxMock(); + +const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); +const TEST_UUID = '123e4567-e89b-12d3-a456-426614174000'; + +describe('roomParticipants', function () { + describe('list', function () { + function responseFn(response: ResponsePayloadList) { + expect(response).toHaveProperty('data'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.roomParticipants + .list({ + filter: { + date_joined_at: { + eq: '2021-04-25', + gte: '2021-04-25', + lte: '2021-04-25', + }, + date_updated_at: { + eq: '2021-04-25', + gte: '2021-04-25', + lte: '2021-04-25', + }, + date_left_at: { + eq: '2021-04-25', + gte: '2021-04-25', + lte: '2021-04-25', + }, + context: 'Alice', + session_id: '0ccc7b54-4df3-4bca-a65a-3da1ecc777f0', + }, + page: { + size: '20', + number: '1', + }, + }) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.roomParticipants + .list( + { + filter: { + date_joined_at: { + eq: '2021-04-25', + gte: '2021-04-25', + lte: '2021-04-25', + }, + date_updated_at: { + eq: '2021-04-25', + gte: '2021-04-25', + lte: '2021-04-25', + }, + date_left_at: { + eq: '2021-04-25', + gte: '2021-04-25', + lte: '2021-04-25', + }, + context: 'Alice', + session_id: '0ccc7b54-4df3-4bca-a65a-3da1ecc777f0', + }, + page: { + size: '20', + number: '1', + }, + }, + TEST_AUTH_KEY, + ) + .then(responseFn); + }); + }); + describe('retrieve', function () { + function responseFn(response: ResponsePayload) { + expect(response).toHaveProperty('data'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.roomParticipants.retrieve(TEST_UUID).then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.roomParticipants + .retrieve(TEST_UUID, TEST_AUTH_KEY) + .then(responseFn); + }); + }); +}); diff --git a/src/test/resources/RoomSessions.test.ts b/src/test/resources/RoomSessions.test.ts new file mode 100644 index 0000000..405fe0a --- /dev/null +++ b/src/test/resources/RoomSessions.test.ts @@ -0,0 +1,225 @@ +import { + type ResponsePayloadList, + type ResponsePayload, + utils as testUtils, +} from '../utils'; +const telnyx = testUtils.getTelnyxMock(); + +const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); +const TEST_UUID = '123e4567-e89b-12d3-a456-426614174000'; + +describe('Room Sessions Resource', function () { + describe('list', function () { + function responseFn(response: ResponsePayloadList) { + expect(response).toHaveProperty('data'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.roomSessions + .list({ + filter: { + date_created_at: { + eq: '2021-04-25', + gte: '2021-04-25', + lte: '2021-04-25', + }, + date_updated_at: { + eq: '2021-04-25', + gte: '2021-04-25', + lte: '2021-04-25', + }, + date_ended_at: { + eq: '2021-04-25', + gte: '2021-04-25', + lte: '2021-04-25', + }, + room_id: '0ccc7b54-4df3-4bca-a65a-3da1ecc777f0', + active: 'true', + }, + include_participants: 'true', + page: { + size: '20', + number: '1', + }, + }) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.roomSessions + .list( + { + filter: { + date_created_at: { + eq: '2021-04-25', + gte: '2021-04-25', + lte: '2021-04-25', + }, + date_updated_at: { + eq: '2021-04-25', + gte: '2021-04-25', + lte: '2021-04-25', + }, + date_ended_at: { + eq: '2021-04-25', + gte: '2021-04-25', + lte: '2021-04-25', + }, + room_id: '0ccc7b54-4df3-4bca-a65a-3da1ecc777f0', + active: 'true', + }, + include_participants: 'true', + page: { + size: '20', + number: '1', + }, + }, + TEST_AUTH_KEY, + ) + .then(responseFn); + }); + }); + + describe('retrieveRoomSessionId', function () { + function responseFn(response: ResponsePayload) { + expect(response).toHaveProperty('data'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.roomSessions + .retrieveRoomSessionId(TEST_UUID) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.roomSessions + .retrieveRoomSessionId(TEST_UUID, TEST_AUTH_KEY) + .then(responseFn); + }); + }); + + describe('muteSession', function () { + function responseFn(response: ResponsePayload) { + expect(response).toHaveProperty('data'); + expect(response.data).toHaveProperty('result'); + } + + test('Sends the correct request', function () { + const requestBody = { + exclude: ['7b61621f-62e0-4aad-ab11-9fd19e272e73'], + participants: 'all', + }; + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.roomSessions + .muteSession(TEST_UUID, requestBody) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + const requestBody = { + exclude: ['7b61621f-62e0-4aad-ab11-9fd19e272e73'], + participants: 'all', + }; + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.roomSessions + .muteSession(TEST_UUID, requestBody, TEST_AUTH_KEY) + .then(responseFn); + }); + }); + describe('unmuteSession', function () { + function responseFn(response: ResponsePayload) { + expect(response).toHaveProperty('data'); + expect(response.data).toHaveProperty('result'); + } + + test('Sends the correct request', function () { + const requestBody = { + exclude: ['7b61621f-62e0-4aad-ab11-9fd19e272e73'], + participants: 'all', + }; + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.roomSessions + .unmuteSession(TEST_UUID, requestBody) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + const requestBody = { + exclude: ['7b61621f-62e0-4aad-ab11-9fd19e272e73'], + participants: 'all', + }; + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.roomSessions + .unmuteSession(TEST_UUID, requestBody, TEST_AUTH_KEY) + .then(responseFn); + }); + }); + describe('kickParticipant', function () { + function responseFn(response: ResponsePayload) { + expect(response).toHaveProperty('data'); + expect(response.data).toHaveProperty('result'); + } + + test('Sends the correct request', function () { + const requestBody = { + exclude: ['7b61621f-62e0-4aad-ab11-9fd19e272e73'], + participants: 'all', + }; + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.roomSessions + .kickParticipant(TEST_UUID, requestBody) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + const requestBody = { + exclude: ['7b61621f-62e0-4aad-ab11-9fd19e272e73'], + participants: 'all', + }; + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.roomSessions + .kickParticipant(TEST_UUID, requestBody, TEST_AUTH_KEY) + .then(responseFn); + }); + }); + describe('retrieveParticipants', function () { + function responseFn(response: ResponsePayload) { + expect(response).toHaveProperty('data'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.roomSessions + .retrieveParticipants(TEST_UUID) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.roomSessions + .retrieveParticipants(TEST_UUID, TEST_AUTH_KEY) + .then(responseFn); + }); + }); + describe('endSession', function () { + function responseFn(response: ResponsePayload) { + expect(response).toHaveProperty('data'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.roomSessions.endSession(TEST_UUID).then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.roomSessions + .endSession(TEST_UUID, TEST_AUTH_KEY) + .then(responseFn); + }); + }); +}); diff --git a/src/test/resources/Rooms.test.ts b/src/test/resources/Rooms.test.ts new file mode 100644 index 0000000..f5945ec --- /dev/null +++ b/src/test/resources/Rooms.test.ts @@ -0,0 +1,153 @@ +import { + type ResponsePayloadList, + type ResponsePayload, + utils as testUtils, +} from '../utils'; +const telnyx = testUtils.getTelnyxMock(); + +const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); +const TEST_UUID = '123e4567-e89b-12d3-a456-426614174000'; + +describe('numberPortoutsSupportingDocuments', function () { + describe('list', function () { + function responseFn(response: ResponsePayloadList) { + expect(response).toHaveProperty('data'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.rooms + .list({ + filter: { + date_created_at: { + eq: '2021-04-25', + gte: '2021-04-25', + lte: '2021-04-25', + }, + date_updated_at: { + eq: '2021-04-25', + gte: '2021-04-25', + lte: '2021-04-25', + }, + unique_name: 'my_video_room', + }, + include_sessions: 'true', + page: { + size: '20', + number: '1', + }, + }) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.rooms + .list( + { + filter: { + date_created_at: { + eq: '2021-04-25', + gte: '2021-04-25', + lte: '2021-04-25', + }, + date_updated_at: { + eq: '2021-04-25', + gte: '2021-04-25', + lte: '2021-04-25', + }, + unique_name: 'my_video_room', + }, + include_sessions: 'true', + page: { + size: '20', + number: '1', + }, + }, + TEST_AUTH_KEY, + ) + .then(responseFn); + }); + }); + describe('create', function () { + function responseFn(response: ResponsePayload) { + expect(response).toHaveProperty('data'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.rooms + .create({ + enable_recording: true, + max_participants: 10, + unique_name: 'My room', + webhook_event_failover_url: 'https://failover.example.com', + webhook_event_url: 'https://example.com', + webhook_timeout_secs: 25, + }) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.rooms + .create( + { + enable_recording: true, + max_participants: 10, + unique_name: 'My room', + webhook_event_failover_url: 'https://failover.example.com', + webhook_event_url: 'https://example.com', + webhook_timeout_secs: 25, + }, + TEST_AUTH_KEY, + ) + .then(responseFn); + }); + }); + describe('del', function () { + function responseFn(response: ResponsePayload) { + expect(response.lastResponse?.statusCode).toBe(204); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.rooms.del(TEST_UUID).then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.rooms.del(TEST_UUID, TEST_AUTH_KEY).then(responseFn); + }); + }); + describe('retrieve', function () { + function responseFn(response: ResponsePayload) { + expect(response).toHaveProperty('data'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.rooms.retrieve(TEST_UUID).then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.rooms.retrieve(TEST_UUID, TEST_AUTH_KEY).then(responseFn); + }); + }); + describe('update', function () { + function responseFn(response: ResponsePayload) { + expect(response).toHaveProperty('data'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.rooms.update(TEST_UUID).then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.rooms.update(TEST_UUID, TEST_AUTH_KEY).then(responseFn); + }); + }); +}); diff --git a/src/test/resources/RoomsClientToken.test.ts b/src/test/resources/RoomsClientToken.test.ts new file mode 100644 index 0000000..d8089c7 --- /dev/null +++ b/src/test/resources/RoomsClientToken.test.ts @@ -0,0 +1,56 @@ +import {type ResponsePayload, utils as testUtils} from '../utils'; +const telnyx = testUtils.getTelnyxMock(); + +const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); +const TEST_UUID = '123e4567-e89b-12d3-a456-426614174000'; + +describe('roomsClientToken', function () { + describe('retrieveGenerateJoinClientToken', function () { + function responseFn(response: ResponsePayload) { + expect(response).toHaveProperty('data'); + } + + test('Sends the correct request', function () { + const requestBody = {refresh_token_ttl_secs: 3600, token_ttl_secs: 600}; + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.roomsClientToken + .retrieveGenerateJoinClientToken(TEST_UUID, requestBody) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + const requestBody = {refresh_token_ttl_secs: 3600, token_ttl_secs: 600}; + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.roomsClientToken + .retrieveGenerateJoinClientToken(TEST_UUID, requestBody, TEST_AUTH_KEY) + .then(responseFn); + }); + }); + describe('retrieveRefreshClientToken', function () { + function responseFn(response: ResponsePayload) { + expect(response).toHaveProperty('data'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.roomsClientToken + .retrieveRefreshClientToken(TEST_UUID, { + refresh_token: 'eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9', + }) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.roomsClientToken + .retrieveRefreshClientToken( + TEST_UUID, + { + refresh_token: 'eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9', + }, + TEST_AUTH_KEY, + ) + .then(responseFn); + }); + }); +}); diff --git a/src/test/resources/ShortCodes.test.ts b/src/test/resources/ShortCodes.test.ts new file mode 100644 index 0000000..76c4598 --- /dev/null +++ b/src/test/resources/ShortCodes.test.ts @@ -0,0 +1,92 @@ +import { + type ResponsePayloadList, + type ResponsePayload, + utils as testUtils, +} from '../utils'; +const telnyx = testUtils.getTelnyxMock(); + +const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); +const TEST_UUID = '123e4567-e89b-12d3-a456-426614174000'; + +describe('ShortCodes Resource', function () { + describe('retrieve', function () { + function responseFn(response: ResponsePayload) { + expect(response.data).toHaveProperty('id'); + expect(response.data).toHaveProperty('short_code'); + expect(response.data).toHaveProperty('country_code'); + expect(response.data).toHaveProperty('messaging_profile_id'); + expect(response.data).toMatchObject({record_type: 'short_code'}); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.shortCodes.retrieve(TEST_UUID).then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.shortCodes + .retrieve(TEST_UUID, TEST_AUTH_KEY) + .then(responseFn); + }); + }); + + describe('list', function () { + function responseFn(response: ResponsePayloadList) { + expect(response.data[0]).toHaveProperty('id'); + expect(response.data[0]).toHaveProperty('short_code'); + expect(response.data[0]).toHaveProperty('country_code'); + expect(response.data[0]).toHaveProperty('messaging_profile_id'); + expect(response.data[0]).toMatchObject({record_type: 'short_code'}); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.shortCodes.list().then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.shortCodes.list(TEST_AUTH_KEY).then(responseFn); + }); + }); + + describe('Nested', function () { + function responseFn(response: ResponsePayload) { + if (response.data) { + expect(response.data).toHaveProperty('id'); + expect(response.data).toHaveProperty('short_code'); + expect(response.data).toHaveProperty('country_code'); + expect(response.data).toHaveProperty('messaging_profile_id'); + expect(response.data).toMatchObject({record_type: 'short_code'}); + } + } + + describe('update', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.shortCodes.retrieve(TEST_UUID).then(function ( + response: ResponsePayload, + ) { + const mp = response.data; + // @ts-expect-error TODO: import .d.ts files under src/test folder + return mp.update({messaging_profile_id: 'uuid'}).then(responseFn); + }); + }); + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.shortCodes.retrieve(TEST_UUID).then(function ( + response: ResponsePayload, + ) { + const mp = response.data; + return ( + mp + // @ts-expect-error TODO: import .d.ts files under src/test folder + .update({messaging_profile_id: 'uuid'}, TEST_AUTH_KEY) + .then(responseFn) + ); + }); + }); + }); + }); +}); diff --git a/src/test/resources/SimCardActions.test.ts b/src/test/resources/SimCardActions.test.ts new file mode 100644 index 0000000..ae9042d --- /dev/null +++ b/src/test/resources/SimCardActions.test.ts @@ -0,0 +1,73 @@ +import { + type ResponsePayloadList, + type ResponsePayload, + utils as testUtils, +} from '../utils'; +const telnyx = testUtils.getTelnyxMock(); + +const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); +const TEST_UUID = '123e4567-e89b-12d3-a456-426614174000'; + +describe('numberPortoutsSupportingDocuments', function () { + describe('list', function () { + function responseFn(response: ResponsePayloadList) { + expect(response).toHaveProperty('data'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.simCardActions + .list({ + page: { + number: '1', + size: '20', + }, + filter: { + sim_card_id: '47a1c2b0-cc7b-4ab1-bb98-b33fb0fc61b9', + status: 'in-progress', + bulk_sim_card_action_id: '47a1c2b0-cc7b-4ab1-bb98-b33fb0fc61b9', + action_type: 'disable', + }, + }) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.simCardActions + .list( + { + page: { + number: '1', + size: '20', + }, + filter: { + sim_card_id: '47a1c2b0-cc7b-4ab1-bb98-b33fb0fc61b9', + status: 'in-progress', + bulk_sim_card_action_id: '47a1c2b0-cc7b-4ab1-bb98-b33fb0fc61b9', + action_type: 'disable', + }, + }, + TEST_AUTH_KEY, + ) + .then(responseFn); + }); + }); + describe('retrieve', function () { + function responseFn(response: ResponsePayload) { + expect(response).toHaveProperty('data'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.simCardActions.retrieve(TEST_UUID).then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.simCardActions + .retrieve(TEST_UUID, TEST_AUTH_KEY) + .then(responseFn); + }); + }); +}); diff --git a/src/test/resources/SimCardGroups.test.ts b/src/test/resources/SimCardGroups.test.ts new file mode 100644 index 0000000..0d6c3ce --- /dev/null +++ b/src/test/resources/SimCardGroups.test.ts @@ -0,0 +1,179 @@ +import { + type ResponsePayload, + ResponsePayloadList, + utils as testUtils, +} from '../utils'; +const telnyx = testUtils.getTelnyxMock(); + +const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); +const TEST_UUID = '123e4567-e89b-12d3-a456-426614174000'; + +type ResponsePayloadSimCardGroupsList = ResponsePayloadList & { + data: { + consumed_data: unknown; + }[]; +}; + +type ResponsePayloadSimCardGroups = ResponsePayload & { + data: { + consumed_data: unknown; + }; +}; + +// describe.skip('SimCardGroups Resource', function () { +describe('SimCardGroups Resource', function () { + describe('retrieve', function () { + function responseFn(response: ResponsePayloadSimCardGroups) { + expect(response.data).toMatchObject({ + id: expect.anything(), + name: expect.anything(), + data_limit: expect.anything(), + consumed_data: expect.anything(), + }); + expect(response.data).toMatchObject({record_type: 'sim_card_group'}); + expect(response.data.consumed_data).toHaveProperty('amount'); + expect(response.data.consumed_data).toHaveProperty('unit'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.simCardGroups.retrieve(TEST_UUID).then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.simCardGroups + .retrieve(TEST_UUID, TEST_AUTH_KEY) + .then(responseFn); + }); + }); + + describe('create', function () { + function responseFn(response: ResponsePayloadSimCardGroups) { + expect(response.data).toMatchObject({ + id: expect.anything(), + name: expect.anything(), + data_limit: expect.anything(), + consumed_data: expect.anything(), + }); + expect(response.data).toMatchObject({record_type: 'sim_card_group'}); + expect(response.data.consumed_data).toHaveProperty('amount'); + expect(response.data.consumed_data).toHaveProperty('unit'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.simCardGroups + .create({name: 'My Custom Group'}) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.simCardGroups + .create({name: 'My Custom Group'}, TEST_AUTH_KEY) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth in options]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.simCardGroups + .create({name: 'My Custom Group'}, {api_key: TEST_AUTH_KEY}) + .then(responseFn); + }); + }); + + describe('list', function () { + function responseFn(response: ResponsePayloadSimCardGroupsList) { + expect(response.data[0]).toMatchObject({ + id: expect.anything(), + name: expect.anything(), + data_limit: expect.anything(), + consumed_data: expect.anything(), + }); + expect(response.data[0]).toMatchObject({record_type: 'sim_card_group'}); + expect(response.data[0]?.consumed_data).toHaveProperty('amount'); + expect(response.data[0]?.consumed_data).toHaveProperty('unit'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.simCardGroups.list().then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.simCardGroups.list(TEST_AUTH_KEY).then(responseFn); + }); + }); + + describe('Nested', function () { + function responseFn(response: ResponsePayloadSimCardGroups) { + if (response.data) { + expect(response.data).toMatchObject({ + id: expect.anything(), + name: expect.anything(), + data_limit: expect.anything(), + consumed_data: expect.anything(), + }); + expect(response.data).toMatchObject({record_type: 'sim_card_group'}); + expect(response.data.consumed_data).toHaveProperty('amount'); + expect(response.data.consumed_data).toHaveProperty('unit'); + } + } + + describe('del', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.simCardGroups + .create({name: 'My Custom Group'}) + .then(function (response: ResponsePayloadSimCardGroups) { + const simCardGroup = response.data; + // @ts-expect-error TODO: import .d.ts files under src/test folder + return simCardGroup.del().then(responseFn); + }); + }); + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.simCardGroups.retrieve(TEST_UUID).then(function ( + response: ResponsePayloadSimCardGroups, + ) { + const simCardGroup = response.data; + // @ts-expect-error TODO: import .d.ts files under src/test folder + return simCardGroup.del(TEST_AUTH_KEY).then(responseFn); + }); + }); + }); + + describe('update', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.simCardGroups + .create({name: 'My Custom Group'}) + .then(function (response: ResponsePayloadSimCardGroups) { + const simCardGroup = response.data; + return ( + simCardGroup + // @ts-expect-error TODO: import .d.ts files under src/test folder + .update({name: 'My Custom Updated Group'}) + .then(responseFn) + ); + }); + }); + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.simCardGroups.retrieve(TEST_UUID).then(function ( + response: ResponsePayloadSimCardGroups, + ) { + const simCardGroup = response.data; + return ( + simCardGroup + // @ts-expect-error TODO: import .d.ts files under src/test folder + .update({name: 'My Custom Updated Group'}, TEST_AUTH_KEY) + .then(responseFn) + ); + }); + }); + }); + }); +}); diff --git a/src/test/resources/SimCardOrders.test.ts b/src/test/resources/SimCardOrders.test.ts new file mode 100644 index 0000000..8dd3fc9 --- /dev/null +++ b/src/test/resources/SimCardOrders.test.ts @@ -0,0 +1,97 @@ +import { + type ResponsePayloadList, + type ResponsePayload, + utils as testUtils, +} from '../utils'; +const telnyx = testUtils.getTelnyxMock(); + +const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); +const TEST_UUID = '123e4567-e89b-12d3-a456-426614174000'; + +describe('numberPortoutsSupportingDocuments', function () { + describe('list', function () { + function responseFn(response: ResponsePayloadList) { + expect(response).toHaveProperty('data'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.simCardOrders + .list({ + filter: { + created_at: '2018-02-02T22:25:27.521Z', + updated_at: '2018-02-02T22:25:27.521Z', + quantity: '21', + cost: { + amount: '2.53', + currency: 'USD', + }, + address: { + id: '1293384261075731499', + street_address: '311 W Superior St', + extended_address: 'Suite 504', + locality: 'Chicago', + administrative_area: 'IL', + country_code: 'US', + postal_code: '60654', + }, + }, + page: { + number: '1', + size: '20', + }, + }) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.simCardOrders + .list( + { + filter: { + created_at: '2018-02-02T22:25:27.521Z', + updated_at: '2018-02-02T22:25:27.521Z', + quantity: '21', + cost: { + amount: '2.53', + currency: 'USD', + }, + address: { + id: '1293384261075731499', + street_address: '311 W Superior St', + extended_address: 'Suite 504', + locality: 'Chicago', + administrative_area: 'IL', + country_code: 'US', + postal_code: '60654', + }, + }, + page: { + number: '1', + size: '20', + }, + }, + TEST_AUTH_KEY, + ) + .then(responseFn); + }); + }); + describe('retrieve', function () { + function responseFn(response: ResponsePayload) { + expect(response).toHaveProperty('data'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.simCardOrders.retrieve(TEST_UUID).then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.simCardOrders + .retrieve(TEST_UUID, TEST_AUTH_KEY) + .then(responseFn); + }); + }); +}); diff --git a/src/test/resources/SimCards.test.ts b/src/test/resources/SimCards.test.ts new file mode 100644 index 0000000..68b779f --- /dev/null +++ b/src/test/resources/SimCards.test.ts @@ -0,0 +1,270 @@ +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-nocheck +import { + type ResponsePayloadList, + type ResponsePayload, + utils as testUtils, +} from '../utils'; +import * as utils from '../../utils'; + +const telnyx = testUtils.getTelnyxMock(); + +const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); +const TEST_UUID = '123e4567-e89b-12d3-a456-426614174000'; + +describe('SimCards Resource', function () { + const simCardUpdateData = { + tags: ['personal'], + }; + + describe('retrieve', function () { + function responseFn(response: ResponsePayload) { + expect(response.data).toHaveProperty('id'); + expect(response.data).toMatchObject({ + record_type: 'sim_card', + }); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.simCards.retrieve(TEST_UUID).then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.simCards + .retrieve(TEST_UUID, TEST_AUTH_KEY) + .then(responseFn); + }); + }); + + describe('list', function () { + function responseFn(response: ResponsePayloadList) { + expect(response.data[0]).toHaveProperty('id'); + expect(response.data[0]).toHaveProperty('iccid'); + expect(response.data[0]).toMatchObject({record_type: 'sim_card'}); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.simCards.list().then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.simCards.list(TEST_AUTH_KEY).then(responseFn); + }); + }); + + describe('update', function () { + function responseFn(response: ResponsePayload) { + expect(response.data).toHaveProperty('id'); + expect(response.data).toHaveProperty('iccid'); + expect(response.data.record_type).toBe('sim_card'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.simCards + .update(TEST_UUID, simCardUpdateData) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.simCards + .update(TEST_UUID, simCardUpdateData, TEST_AUTH_KEY) + .then(responseFn); + }); + }); + + describe('save', function () { + function responseFn(response: ResponsePayload) { + expect(response.data.record_type).toBe('sim_card'); + expect(response.data).toHaveProperty('id'); + expect(response.data).toHaveProperty('status'); + expect(response.data).toHaveProperty('iccid'); + expect(response.data).toHaveProperty('sim_card_group_id'); + expect(response.data.record_type).toBe('sim_card'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.simCards.retrieve(TEST_UUID).then(function ( + response: ResponsePayload, + ) { + const simCard = response.data; + // @ts-expect-error TODO: import .d.ts files under src/test folder + return simCard.save(simCardUpdateData).then(responseFn); + }); + }); + }); + + describe('delete', function () { + function responseFn(response: ResponsePayload) { + expect(response.data.record_type).toBe('sim_card'); + expect(response.data).toHaveProperty('id'); + expect(response.data).toHaveProperty('status'); + expect(response.data).toHaveProperty('iccid'); + expect(response.data).toHaveProperty('sim_card_group_id'); + expect(response.data.record_type).toBe('sim_card'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.simCards.retrieve(TEST_UUID).then(function ( + response: ResponsePayload, + ) { + const simCard = response.data; + // @ts-expect-error TODO: import .d.ts files under src/test folder + return simCard.del().then(responseFn); + }); + }); + }); + + // describe.skip('Nested', function () { + describe('Nested', function () { + ['activate', 'deactivate', 'enable', 'disable', 'set_standby'].forEach( + function (command) { + function responseFn(response: ResponsePayload) { + expect(response.data.record_type).toBe('sim_card_action'); + } + + describe(command, function () { + const camelCaseCommand = utils.snakeToCamelCase(command); + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.simCards.retrieve(TEST_UUID).then(function ( + response: ResponsePayload, + ) { + const simCard = response.data; + + // @ts-expect-error TODO: import .d.ts files under src/test folder + return simCard[camelCaseCommand]({}).then(responseFn); + }); + }); + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.simCards.retrieve(TEST_UUID).then(function ( + response: ResponsePayload, + ) { + const simCard = response.data; + + // @ts-expect-error TODO: import .d.ts files under src/test folder + return simCard[camelCaseCommand]({}, TEST_AUTH_KEY).then( + responseFn, + ); + }); + }); + }); + }, + ); + }); + + describe('retrieveNetworkPreferences', function () { + function responseFn(response: ResponsePayload) { + expect(response.data.record_type).toBe('sim_card_network_preferences'); + expect(response.data).toMatchObject({ + sim_card_id: expect.anything(), + }); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.simCards.retrieve(TEST_UUID).then(function ( + response: ResponsePayload, + ) { + const simCard = response.data; + // @ts-expect-error TODO: import .d.ts files under src/test folder + return simCard.retrieveNetworkPreferences().then(responseFn); + }); + }); + + test('Sends the correct request passing params', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.simCards.retrieve(TEST_UUID).then(function ( + response: ResponsePayload, + ) { + const simCard = response.data; + return ( + simCard + // @ts-expect-error TODO: import .d.ts files under src/test folder + .retrieveNetworkPreferences({include_ota_updates: true}) + .then(responseFn) + ); + }); + }); + }); + + describe('setNetworkPreferences', function () { + function responseFn(response: ResponsePayload) { + expect(response.data.record_type).toBe('sim_card_network_preferences'); + expect(response.data).toMatchObject({ + sim_card_id: expect.anything(), + }); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.simCards.retrieve(TEST_UUID).then(function ( + response: ResponsePayload, + ) { + const simCard = response.data; + return ( + simCard + // @ts-expect-error TODO: import .d.ts files under src/test folder + .setNetworkPreferences({ + mobile_operator_networks_preferences: [ + { + mobile_operator_network_id: TEST_UUID, + priority: 0, + }, + ], + }) + .then(responseFn) + ); + }); + }); + }); + + describe('deleteNetworkPreferences', function () { + function responseFn(response: ResponsePayload) { + expect(response.data.record_type).toBe('sim_card_network_preferences'); + expect(response.data).toMatchObject({ + sim_card_id: expect.anything(), + }); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.simCards.retrieve(TEST_UUID).then(function ( + response: ResponsePayload, + ) { + const simCard = response.data; + // @ts-expect-error TODO: import .d.ts files under src/test folder + return simCard.deleteNetworkPreferences().then(responseFn); + }); + }); + }); + + // describe.skip('PublicIP', function () { + describe('PublicIP', function () { + function responseFn(response: ResponsePayload) { + expect(response.data.record_type).toBe('sim_card_public_ip'); + expect(response.data).toHaveProperty('sim_card_id'); + } + + describe('retrieve', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.simCards.retrieve(TEST_UUID).then(function ( + response: ResponsePayload, + ) { + const simCard = response.data; + // @ts-expect-error TODO: import .d.ts files under src/test folder + return simCard.retrievePublicIP().then(responseFn); + }); + }); + }); + }); +}); diff --git a/src/test/resources/TelephonyCredentials.test.ts b/src/test/resources/TelephonyCredentials.test.ts new file mode 100644 index 0000000..fcc9543 --- /dev/null +++ b/src/test/resources/TelephonyCredentials.test.ts @@ -0,0 +1,168 @@ +import { + type ResponsePayload, + type ResponsePayloadList, + utils as testUtils, +} from '../utils'; +const telnyx = testUtils.getTelnyxMock(); + +const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); + +const credentialCreateData = { + connection_id: '1474011037387720344', +}; + +const retrieveCredentialId = '456c215ade3-0d39-418e-94be-c5f780760199'; + +describe('TelephonyCredentials Resource', function () { + function responseFn(response: ResponsePayload) { + expect(response.data).toHaveProperty('created_at'); + expect(response.data).toHaveProperty('expired'); + expect(response.data).toHaveProperty('expires_at'); + expect(response.data).toHaveProperty('id'); + expect(response.data).toHaveProperty('name'); + expect(response.data).toHaveProperty('record_type'); + expect(response.data).toHaveProperty('resource_id'); + expect(response.data).toHaveProperty('sip_password'); + expect(response.data).toHaveProperty('sip_username'); + } + + describe('create', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.telephonyCredentials + .create(credentialCreateData) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.telephonyCredentials + .create(credentialCreateData, TEST_AUTH_KEY) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth in options]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.telephonyCredentials + .create(credentialCreateData, {api_key: TEST_AUTH_KEY}) + .then(responseFn); + }); + }); + + describe('retrieve', function () { + function responseFn(response: ResponsePayload) { + expect(response.data).not.toBeNull(); + } + + describe('retrieve', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.telephonyCredentials + .retrieve('9fb9e45f-958a-4d9f-81ff-735ffbcaa133') + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.telephonyCredentials + .retrieve('9fb9e45f-958a-4d9f-81ff-735ffbcaa133', TEST_AUTH_KEY) + .then(responseFn); + }); + }); + }); + + describe('retrieveCredential', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.telephonyCredentials + .retrieveCredential(retrieveCredentialId) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.telephonyCredentials + .retrieveCredential(retrieveCredentialId, TEST_AUTH_KEY) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth in options]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.telephonyCredentials + .retrieveCredential(retrieveCredentialId, {api_key: TEST_AUTH_KEY}) + .then(responseFn); + }); + }); + + describe('update', function () { + const updateCredentialData = {name: 'knox'}; + + function responseFn(response: ResponsePayload) { + expect(response.data).toHaveProperty('name'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.telephonyCredentials + .update(retrieveCredentialId, updateCredentialData) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.telephonyCredentials + .update(retrieveCredentialId, updateCredentialData, TEST_AUTH_KEY) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth in options]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.telephonyCredentials + .update(retrieveCredentialId, updateCredentialData, { + api_key: TEST_AUTH_KEY, + }) + .then(responseFn); + }); + }); + + describe('list', function () { + function responseFn(response: ResponsePayloadList) { + expect(response.data[0]).toHaveProperty('id'); + expect(response.data[0]).toHaveProperty('sip_password'); + expect(response.data[0]).toHaveProperty('sip_username'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.telephonyCredentials.list().then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.telephonyCredentials.list(TEST_AUTH_KEY).then(responseFn); + }); + }); + + describe('del', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.telephonyCredentials + .create(credentialCreateData) + .then(function (response: ResponsePayload) { + const tc = response.data; + // @ts-expect-error TODO: import .d.ts files under src/test folder + return tc.del().then(responseFn); + }); + }); + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.telephonyCredentials + .retrieveCredential('123') + .then(function (response: ResponsePayload) { + const tc = response.data; + // @ts-expect-error TODO: import .d.ts files under src/test folder + return tc.del(TEST_AUTH_KEY).then(responseFn); + }); + }); + }); +}); diff --git a/src/test/resources/TexmlApplications.test.ts b/src/test/resources/TexmlApplications.test.ts new file mode 100644 index 0000000..db1c5bf --- /dev/null +++ b/src/test/resources/TexmlApplications.test.ts @@ -0,0 +1,227 @@ +import { + type ResponsePayloadList, + type ResponsePayload, + utils as testUtils, +} from '../utils'; +const telnyx = testUtils.getTelnyxMock(); + +const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); +const TEST_UUID = '123e4567-e89b-12d3-a456-426614174000'; + +describe('TeXML Apps', function () { + describe('list', function () { + function responseFn(response: ResponsePayloadList) { + expect(response).toHaveProperty('data'); + expect(response.data[0]).toHaveProperty('active'); + expect(response.data[0]).toHaveProperty('anchorsite_override'); + expect(response.data[0]).toHaveProperty('created_at'); + expect(response.data[0]).toHaveProperty('dtmf_type'); + expect(response.data[0]).toHaveProperty('first_command_timeout'); + expect(response.data[0]).toHaveProperty('first_command_timeout_secs'); + expect(response.data[0]).toHaveProperty('voice_url'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.texmlApplications + .list({ + page: { + number: 1, + size: 200, + }, + filter: { + friendly_name: { + contains: 'string', + }, + outbound_voice_profile_id: 'string', + }, + }) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.texmlApplications + .list( + { + page: { + number: 1, + size: 200, + }, + filter: { + friendly_name: { + contains: 'string', + }, + outbound_voice_profile_id: 'string', + }, + sort: 'created_at', + }, + TEST_AUTH_KEY, + ) + .then(responseFn); + }); + }); + + describe('create', function () { + function responseFn(response: ResponsePayload) { + expect(response).toHaveProperty('data'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.texmlApplications + .create({ + active: false, + anchorsite_override: 'Amsterdam, Netherlands', + dtmf_type: 'Inband', + first_command_timeout: true, + first_command_timeout_secs: 10, + friendly_name: 'call-router', + inbound: { + channel_limit: 10, + sip_subdomain: 'example', + sip_subdomain_receive_settings: 'only_my_connections', + }, + outbound: { + channel_limit: 10, + outbound_voice_profile_id: '1293384261075731499', + }, + status_callback: 'https://example.com', + status_callback_method: 'get', + voice_fallback_url: 'https://fallback.example.com', + voice_method: 'get', + voice_url: 'https://example.com', + }) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.texmlApplications + .create( + { + active: false, + anchorsite_override: 'Amsterdam, Netherlands', + dtmf_type: 'Inband', + first_command_timeout: true, + first_command_timeout_secs: 10, + friendly_name: 'call-router', + inbound: { + channel_limit: 10, + sip_subdomain: 'example', + sip_subdomain_receive_settings: 'only_my_connections', + }, + outbound: { + channel_limit: 10, + outbound_voice_profile_id: '1293384261075731499', + }, + status_callback: 'https://example.com', + status_callback_method: 'get', + voice_fallback_url: 'https://fallback.example.com', + voice_method: 'get', + voice_url: 'https://example.com', + }, + TEST_AUTH_KEY, + ) + .then(responseFn); + }); + }); + + describe('del', function () { + function responseFn(response: ResponsePayload) { + expect(response).toHaveProperty('data'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.texmlApplications.del(TEST_UUID).then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.texmlApplications + .del(TEST_UUID, TEST_AUTH_KEY) + .then(responseFn); + }); + }); + describe('retrieve', function () { + function responseFn(response: ResponsePayload) { + expect(response).toHaveProperty('data'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.texmlApplications.retrieve(TEST_UUID).then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.texmlApplications + .retrieve(TEST_UUID, TEST_AUTH_KEY) + .then(responseFn); + }); + }); + describe('update', function () { + function responseFn(response: ResponsePayload) { + expect(response).toHaveProperty('data'); + } + + test('Sends the correct request', function () { + const requestBody = { + active: false, + anchorsite_override: 'Amsterdam, Netherlands', + dtmf_type: 'Inband', + first_command_timeout: true, + first_command_timeout_secs: 10, + friendly_name: 'call-router', + inbound: { + channel_limit: 10, + sip_subdomain: 'example', + sip_subdomain_receive_settings: 'only_my_connections', + }, + outbound: { + channel_limit: 10, + outbound_voice_profile_id: '1293384261075731499', + }, + status_callback: 'https://example.com', + status_callback_method: 'get', + voice_fallback_url: 'https://fallback.example.com', + voice_method: 'get', + voice_url: 'https://example.com', + }; + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.texmlApplications + .update(TEST_UUID, requestBody) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + const requestBody = { + active: false, + anchorsite_override: 'Amsterdam, Netherlands', + dtmf_type: 'Inband', + first_command_timeout: true, + first_command_timeout_secs: 10, + friendly_name: 'call-router', + inbound: { + channel_limit: 10, + sip_subdomain: 'example', + sip_subdomain_receive_settings: 'only_my_connections', + }, + outbound: { + channel_limit: 10, + outbound_voice_profile_id: '1293384261075731499', + }, + status_callback: 'https://example.com', + status_callback_method: 'get', + voice_fallback_url: 'https://fallback.example.com', + voice_method: 'get', + voice_url: 'https://example.com', + }; + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.texmlApplications + .update(TEST_UUID, requestBody, TEST_AUTH_KEY) + .then(responseFn); + }); + }); +}); diff --git a/src/test/resources/UpdateClientState.test.ts b/src/test/resources/UpdateClientState.test.ts new file mode 100644 index 0000000..791a6fc --- /dev/null +++ b/src/test/resources/UpdateClientState.test.ts @@ -0,0 +1,30 @@ +import {type ResponsePayload, utils as testUtils} from '../utils'; +const telnyx = testUtils.getTelnyxMock(); + +const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); + +describe('Update Client State', function () { + describe('update', function () { + function responseFn(response: ResponsePayload) { + expect(response).toHaveProperty('data'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.updateClientState + .update('call_control_id', {client_state: 'aGF2ZSBhIG5pY2UgZGF5ID1d'}) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.updateClientState + .update( + 'call_control_id', + {client_state: 'aGF2ZSBhIG5pY2UgZGF5ID1d'}, + TEST_AUTH_KEY, + ) + .then(responseFn); + }); + }); +}); diff --git a/src/test/resources/Webhooks.test.ts b/src/test/resources/Webhooks.test.ts new file mode 100644 index 0000000..d656754 --- /dev/null +++ b/src/test/resources/Webhooks.test.ts @@ -0,0 +1,45 @@ +import { + type ResponsePayloadList, + type ResponsePayload, + utils as testUtils, +} from '../utils'; +const telnyx = testUtils.getTelnyxMock(); + +const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); +const TEST_UUID = '123e4567-e89b-12d3-a456-426614174000'; + +describe('Webhook Deliveries', function () { + describe('retrieve', function () { + function responseFn(response: ResponsePayload) { + expect(response).toHaveProperty('data'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.webhooksApi.retrieve(TEST_UUID).then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.webhooksApi + .retrieve(TEST_UUID, TEST_AUTH_KEY) + .then(responseFn); + }); + }); + + describe('list', function () { + function responseFn(response: ResponsePayloadList) { + expect(response).toHaveProperty('data'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.webhooksApi.list().then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.webhooksApi.list(TEST_AUTH_KEY).then(responseFn); + }); + }); +}); diff --git a/src/test/resources/WirelessDetailRecordReports.test.ts b/src/test/resources/WirelessDetailRecordReports.test.ts new file mode 100644 index 0000000..b38c82a --- /dev/null +++ b/src/test/resources/WirelessDetailRecordReports.test.ts @@ -0,0 +1,100 @@ +import { + type ResponsePayloadList, + type ResponsePayload, + utils as testUtils, +} from '../utils'; +const telnyx = testUtils.getTelnyxMock(); + +const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); + +describe('WirelessDetailRecordReports Resource', function () { + function responseFn(response: ResponsePayload) { + expect(response.data).toHaveProperty('status'); + expect(response.data).toHaveProperty('start_time'); + expect(response.data).toHaveProperty('end_time'); + expect(response.data).toHaveProperty('report_url'); + expect(response.data).toMatchObject({record_type: 'detail_records_report'}); + } + + describe('retrieve', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.wirelessDetailRecordReports + .retrieve('12ade33a-21c0-473b-b055-b3c836e1c292') + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.wirelessDetailRecordReports + .retrieve('12ade33a-21c0-473b-b055-b3c836e1c292', TEST_AUTH_KEY) + .then(responseFn); + }); + }); + + describe('list', function () { + function responseFn(response: ResponsePayloadList) { + expect(response.data[0]).toHaveProperty('id'); + expect(response.data[0]).toHaveProperty('status'); + expect(response.data[0]).toHaveProperty('start_time'); + expect(response.data[0]).toHaveProperty('end_time'); + expect(response.data[0]).toHaveProperty('report_url'); + expect(response.data[0]).toMatchObject({ + record_type: 'detail_records_report', + }); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.wirelessDetailRecordReports.list().then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.wirelessDetailRecordReports + .list(TEST_AUTH_KEY) + .then(responseFn); + }); + }); + + describe('create', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.wirelessDetailRecordReports + .create({ + start_time: '2018-02-01T22:25:27.521Z', + end_time: '2018-02-02T22:25:27.521Z', + }) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.wirelessDetailRecordReports + .create( + { + start_time: '2018-02-01T22:25:27.521Z', + end_time: '2018-02-02T22:25:27.521Z', + }, + TEST_AUTH_KEY, + ) + .then(responseFn); + }); + }); + + describe('del', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.wirelessDetailRecordReports + .del('12ade33a-21c0-473b-b055-b3c836e1c292') + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.wirelessDetailRecordReports + .del('12ade33a-21c0-473b-b055-b3c836e1c292', TEST_AUTH_KEY) + .then(responseFn); + }); + }); +}); diff --git a/src/test/utils/index.ts b/src/test/utils/index.ts index 586efe2..543db81 100644 --- a/src/test/utils/index.ts +++ b/src/test/utils/index.ts @@ -8,6 +8,27 @@ import { TelnyxResourceObject, } from '../../Types'; +export type ResponsePayloadListRecords = { + records: {id: string; name: string}[]; + meta: object; +}; + +export type ResponsePayloadList = { + data: {id: string; name: string; record_type: string}[]; + meta: object; +}; + +export type ResponsePayload = { + data: { + id: string; + name: string; + record_type: string; + }; + lastResponse?: { + statusCode: number; + }; +}; + type LastRequest = { method: string; url?: string; From 6d22e34cda6f842e7de8e30aa3939fe2bfb2c7bc Mon Sep 17 00:00:00 2001 From: Lucas Rosa Date: Thu, 26 Sep 2024 23:05:56 -0300 Subject: [PATCH 15/59] update Calls and Messaging types according to API specs --- package-lock.json | 1831 ++++++++++++++++++++++++-- package.json | 9 +- plop-templates/ResourceTypes.ts.hbs | 88 ++ plop.js | 43 + src/resources/MessagingProfiles.ts | 20 +- types/CallsResource.d.ts | 292 ++++ types/MessagingProfilesResource.d.ts | 39 +- 7 files changed, 2202 insertions(+), 120 deletions(-) create mode 100644 plop-templates/ResourceTypes.ts.hbs create mode 100644 plop.js create mode 100644 types/CallsResource.d.ts diff --git a/package-lock.json b/package-lock.json index 39987d9..34d1dc9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,14 +8,12 @@ "name": "telnyx", "version": "2.0.0-alpha.0", "license": "MIT", - "dependencies": { - "@types/node": "^20.0.0" - }, "devDependencies": { "@eslint/js": "^9.10.0", "@stoplight/prism-cli": "^5.10.0", "@types/eslint__js": "^8.42.3", "@types/jest": "^29.5.13", + "@types/node": "^22.7.3", "@types/qs": "^6.9.15", "debug": "^4.3.4", "eslint": "^8.57.0", @@ -25,6 +23,7 @@ "jest": "^29.7.0", "nock": "^13.5.4", "nyc": "^15.1.0", + "plop": "^4.0.1", "prettier": "^3.0.0", "qs": "^6.11.2", "ts-jest": "^29.2.5", @@ -763,6 +762,16 @@ "deprecated": "Use @eslint/object-schema instead", "dev": true }, + "node_modules/@inquirer/figures": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@inquirer/figures/-/figures-1.0.6.tgz", + "integrity": "sha512-yfZzps3Cso2UbM7WlxKwZQh2Hs6plrbjs1QnzQDZhK2DgyCo6D8AaHps9olkNcUFlcYERMqU3uJSp1gmy3s/qQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, "node_modules/@istanbuljs/load-nyc-config": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", @@ -1764,6 +1773,13 @@ "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", "dev": true }, + "node_modules/@types/fined": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@types/fined/-/fined-1.1.5.tgz", + "integrity": "sha512-2N93vadEGDFhASTIRbizbl4bNqpMOId5zZfj6hHqYZfEzEfO9onnU4Im8xvzo8uudySDveDHBOOSlTWf38ErfQ==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/graceful-fs": { "version": "4.1.9", "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz", @@ -1773,6 +1789,17 @@ "@types/node": "*" } }, + "node_modules/@types/inquirer": { + "version": "9.0.7", + "resolved": "https://registry.npmjs.org/@types/inquirer/-/inquirer-9.0.7.tgz", + "integrity": "sha512-Q0zyBupO6NxGRZut/JdmqYKOnN95Eg5V8Csg3PGKkP+FnvsUZx1jAyK7fztIszxxMuoBA6E3KXWvdZVXIpx60g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/through": "*", + "rxjs": "^7.2.0" + } + }, "node_modules/@types/istanbul-lib-coverage": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", @@ -1814,10 +1841,23 @@ "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", "dev": true }, + "node_modules/@types/liftoff": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@types/liftoff/-/liftoff-4.0.3.tgz", + "integrity": "sha512-UgbL2kR5pLrWICvr8+fuSg0u43LY250q7ZMkC+XKC3E+rs/YBDEnQIzsnhU5dYsLlwMi3R75UvCL87pObP1sxw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/fined": "*", + "@types/node": "*" + } + }, "node_modules/@types/node": { - "version": "20.16.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.16.2.tgz", - "integrity": "sha512-91s/n4qUPV/wg8eE9KHYW1kouTfDk2FPGjXbBMfRWP/2vg1rCXNQL1OCabwGs0XSdukuK+MwCDXE30QpSeMUhQ==", + "version": "22.7.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.7.3.tgz", + "integrity": "sha512-qXKfhXXqGTyBskvWEzJZPUxSslAiLaB6JGP1ic/XTH9ctGgzdgYguuLP1C601aRTSDNlLb0jbKqXjZ48GNraSA==", + "dev": true, + "license": "MIT", "dependencies": { "undici-types": "~6.19.2" } @@ -1841,6 +1881,16 @@ "dev": true, "license": "MIT" }, + "node_modules/@types/through": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/@types/through/-/through-0.0.33.tgz", + "integrity": "sha512-HsJ+z3QuETzP3cswwtzt2vEIiHBk/dCcHGhbmG5X3ecnwFD/lPrMpliGXxSCg03L9AhrdwA4Oz/qfspkDW+xGQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/type-is": { "version": "1.6.6", "resolved": "https://registry.npmjs.org/@types/type-is/-/type-is-1.6.6.tgz", @@ -2327,6 +2377,26 @@ "sprintf-js": "~1.0.2" } }, + "node_modules/array-each": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz", + "integrity": "sha512-zHjL5SZa68hkKHBFBK6DJCTtr9sfTCPCaph/L7tMSLcTFgy+zX7E+6q5UArbtOtMBCtxdICpfTCspRse+ywyXA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array-slice": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz", + "integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/async": { "version": "3.2.6", "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz", @@ -2461,6 +2531,27 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, "node_modules/binary-extensions": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", @@ -2474,6 +2565,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, "node_modules/bluebird": { "version": "3.7.2", "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", @@ -2557,6 +2660,31 @@ "node-int64": "^0.4.0" } }, + "node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, "node_modules/buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", @@ -2613,6 +2741,17 @@ "node": ">=6" } }, + "node_modules/camel-case": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-4.1.2.tgz", + "integrity": "sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw==", + "dev": true, + "license": "MIT", + "dependencies": { + "pascal-case": "^3.1.2", + "tslib": "^2.0.3" + } + }, "node_modules/camelcase": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", @@ -2642,6 +2781,18 @@ } ] }, + "node_modules/capital-case": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/capital-case/-/capital-case-1.0.4.tgz", + "integrity": "sha512-ds37W8CytHgwnhGGTi88pcPyR15qoNkOpYwmMMfnWqqWgESapLqvDx6huFjQ5vqWSn2Z06173XNA7LtMOeUh1A==", + "dev": true, + "license": "MIT", + "dependencies": { + "no-case": "^3.0.4", + "tslib": "^2.0.3", + "upper-case-first": "^2.0.2" + } + }, "node_modules/caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", @@ -2665,6 +2816,27 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, + "node_modules/change-case": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/change-case/-/change-case-4.1.2.tgz", + "integrity": "sha512-bSxY2ws9OtviILG1EiY5K7NNxkqg/JnRnFxLtKQ96JaviiIxi7djMrSd0ECT9AC+lttClmYwKw53BWpOMblo7A==", + "dev": true, + "license": "MIT", + "dependencies": { + "camel-case": "^4.1.2", + "capital-case": "^1.0.4", + "constant-case": "^3.0.4", + "dot-case": "^3.0.4", + "header-case": "^2.0.4", + "no-case": "^3.0.4", + "param-case": "^3.0.4", + "pascal-case": "^3.1.2", + "path-case": "^3.0.4", + "sentence-case": "^3.0.4", + "snake-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, "node_modules/char-regex": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", @@ -2674,6 +2846,13 @@ "node": ">=10" } }, + "node_modules/chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true, + "license": "MIT" + }, "node_modules/charset": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/charset/-/charset-1.0.1.tgz", @@ -2752,6 +2931,45 @@ "node": ">=6" } }, + "node_modules/cli-cursor": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-5.0.0.tgz", + "integrity": "sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw==", + "dev": true, + "license": "MIT", + "dependencies": { + "restore-cursor": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-spinners": { + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz", + "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-width": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-4.1.0.tgz", + "integrity": "sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">= 12" + } + }, "node_modules/cliui": { "version": "7.0.4", "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", @@ -2764,6 +2982,16 @@ "wrap-ansi": "^7.0.0" } }, + "node_modules/clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8" + } + }, "node_modules/co": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", @@ -2833,6 +3061,18 @@ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "dev": true }, + "node_modules/constant-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/constant-case/-/constant-case-3.0.4.tgz", + "integrity": "sha512-I2hSBi7Vvs7BEuJDr5dDHfzb/Ruj3FyvFyh7KLilAjNQw3Be+xgqUBA2W6scVEcL0hL1dwPRtIqEPVUCKkSsyQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "no-case": "^3.0.4", + "tslib": "^2.0.3", + "upper-case": "^2.0.2" + } + }, "node_modules/content-type": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", @@ -2971,6 +3211,19 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/defaults": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", + "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "clone": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/define-data-property": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", @@ -2988,95 +3241,253 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/detect-newline": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", - "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", + "node_modules/del": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/del/-/del-7.1.0.tgz", + "integrity": "sha512-v2KyNk7efxhlyHpjEvfyxaAihKKK0nWCuf6ZtqZcFFpQRG0bJ12Qsr0RpvsICMjAAZ8DOVCxrlqpxISlMHC4Kg==", "dev": true, + "license": "MIT", + "dependencies": { + "globby": "^13.1.2", + "graceful-fs": "^4.2.10", + "is-glob": "^4.0.3", + "is-path-cwd": "^3.0.0", + "is-path-inside": "^4.0.0", + "p-map": "^5.5.0", + "rimraf": "^3.0.2", + "slash": "^4.0.0" + }, "engines": { - "node": ">=8" + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/diff-sequences": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", - "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", + "node_modules/del/node_modules/aggregate-error": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-4.0.1.tgz", + "integrity": "sha512-0poP0T7el6Vq3rstR8Mn4V/IQrpBLO6POkUSrN7RhyY+GF/InCFShQzsQ39T25gkHhLgSLByyAz+Kjb+c2L98w==", "dev": true, + "license": "MIT", + "dependencies": { + "clean-stack": "^4.0.0", + "indent-string": "^5.0.0" + }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "node_modules/del/node_modules/clean-stack": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-4.2.0.tgz", + "integrity": "sha512-LYv6XPxoyODi36Dp976riBtSY27VmFo+MKqEU9QCCWyTrdEPDog+RWA7xQWHi6Vbp61j5c4cdzzX1NidnwtUWg==", "dev": true, + "license": "MIT", "dependencies": { - "esutils": "^2.0.2" + "escape-string-regexp": "5.0.0" }, "engines": { - "node": ">=6.0.0" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/ejs": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz", - "integrity": "sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==", + "node_modules/del/node_modules/escape-string-regexp": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz", + "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==", "dev": true, - "license": "Apache-2.0", - "dependencies": { - "jake": "^10.8.5" - }, - "bin": { - "ejs": "bin/cli.js" - }, + "license": "MIT", "engines": { - "node": ">=0.10.0" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/electron-to-chromium": { - "version": "1.5.13", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.13.tgz", - "integrity": "sha512-lbBcvtIJ4J6sS4tb5TLp1b4LyfCdMkwStzXPyAgVgTRAsep4bvrAGaBOP7ZJtQMNJpSQ9SqG4brWOroNaQtm7Q==", - "dev": true - }, - "node_modules/emittery": { - "version": "0.13.1", - "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", - "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", + "node_modules/del/node_modules/indent-string": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-5.0.0.tgz", + "integrity": "sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg==", "dev": true, + "license": "MIT", "engines": { "node": ">=12" }, "funding": { - "url": "https://github.com/sindresorhus/emittery?sponsor=1" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "node_modules/error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "node_modules/del/node_modules/is-path-inside": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-4.0.0.tgz", + "integrity": "sha512-lJJV/5dYS+RcL8uQdBDW9c9uWFLLBNRyFhnAKXw5tVqLlKZ4RMGZKv+YQ/IA3OhD+RpbJa1LLFM1FQPGyIXvOA==", "dev": true, - "dependencies": { - "is-arrayish": "^0.2.1" + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/es-define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", - "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "node_modules/del/node_modules/p-map": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-5.5.0.tgz", + "integrity": "sha512-VFqfGDHlx87K66yZrNdI4YGtD70IRyd+zSvgks6mzHPRNkoKy+9EKP4SFC77/vTTQYmRmti7dvqC+m5jBrBAcg==", "dev": true, + "license": "MIT", "dependencies": { - "get-intrinsic": "^1.2.4" + "aggregate-error": "^4.0.0" }, "engines": { - "node": ">= 0.4" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/del/node_modules/slash": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz", + "integrity": "sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/detect-file": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", + "integrity": "sha512-DtCOLG98P007x7wiiOmfI0fi3eIKyWiLTGJ2MDnVi/E04lWGbf+JzrRHMm0rgIIZJGtHpKpbVgLWHrv8xXpc3Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/detect-newline": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", + "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/diff-sequences": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", + "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", + "dev": true, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/dot-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/dot-case/-/dot-case-3.0.4.tgz", + "integrity": "sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==", + "dev": true, + "license": "MIT", + "dependencies": { + "no-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, + "node_modules/ejs": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz", + "integrity": "sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "jake": "^10.8.5" + }, + "bin": { + "ejs": "bin/cli.js" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/electron-to-chromium": { + "version": "1.5.13", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.13.tgz", + "integrity": "sha512-lbBcvtIJ4J6sS4tb5TLp1b4LyfCdMkwStzXPyAgVgTRAsep4bvrAGaBOP7ZJtQMNJpSQ9SqG4brWOroNaQtm7Q==", + "dev": true + }, + "node_modules/emittery": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", + "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sindresorhus/emittery?sponsor=1" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" } }, "node_modules/es-errors": { @@ -3384,6 +3795,19 @@ "node": ">= 0.8.0" } }, + "node_modules/expand-tilde": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", + "integrity": "sha512-A5EmesHW6rfnZ9ysHQjPdJRni0SRar0tjtG5MNtm9n5TUvsYU8oozprtRD4AqHxcZWWlVuAmQo2nWKfN9oyjTw==", + "dev": true, + "license": "MIT", + "dependencies": { + "homedir-polyfill": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/expect": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/expect/-/expect-29.7.0.tgz", @@ -3400,6 +3824,41 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, + "node_modules/extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true, + "license": "MIT" + }, + "node_modules/external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "dev": true, + "license": "MIT", + "dependencies": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/external-editor/node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -3647,6 +4106,49 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/findup-sync": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-5.0.0.tgz", + "integrity": "sha512-MzwXju70AuyflbgeOhzvQWAvvQdo1XL0A9bVvlXsYcFEBM87WR4OakL4OfZq+QRmr+duJubio+UtNQCPsVESzQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "detect-file": "^1.0.0", + "is-glob": "^4.0.3", + "micromatch": "^4.0.4", + "resolve-dir": "^1.0.1" + }, + "engines": { + "node": ">= 10.13.0" + } + }, + "node_modules/fined": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fined/-/fined-2.0.0.tgz", + "integrity": "sha512-OFRzsL6ZMHz5s0JrsEr+TpdGNCtrVtnuG3x1yzGNiQHT0yaDnXAj8V/lWcpJVrnoDpcwXcASxAZYbuXda2Y82A==", + "dev": true, + "license": "MIT", + "dependencies": { + "expand-tilde": "^2.0.2", + "is-plain-object": "^5.0.0", + "object.defaults": "^1.1.0", + "object.pick": "^1.3.0", + "parse-filepath": "^1.0.2" + }, + "engines": { + "node": ">= 10.13.0" + } + }, + "node_modules/flagged-respawn": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-2.0.0.tgz", + "integrity": "sha512-Gq/a6YCi8zexmGHMuJwahTGzXlAZAOsbCVKduWXC6TlLCjjFRlExMJc4GC2NYPYZ0r/brw9P7CpRgQmlPVeOoA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10.13.0" + } + }, "node_modules/flat-cache": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", @@ -3681,6 +4183,29 @@ "dev": true, "license": "MIT" }, + "node_modules/for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/for-own": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", + "integrity": "sha512-0OABksIGrxKK8K4kynWkQ7y1zounQxP+CWnyclVwj81KW3vlLlGUx57DKGcP/LH216GzqnstnPocF16Nxs0Ycg==", + "dev": true, + "license": "MIT", + "dependencies": { + "for-in": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/foreach": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.6.tgz", @@ -3782,6 +4307,19 @@ "node": "6.* || 8.* || >= 10.*" } }, + "node_modules/get-east-asian-width": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.2.0.tgz", + "integrity": "sha512-2nk+7SIVb14QrgXFHcm84tD4bKQz0RxPuMT8Ag5KPOq7J5fEmAg0UbXdTOSHqNuHSU28k55qnceesxXRZGzKWA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/get-intrinsic": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", @@ -3834,6 +4372,51 @@ "node": ">=10.13.0" } }, + "node_modules/global-modules": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", + "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", + "dev": true, + "license": "MIT", + "dependencies": { + "global-prefix": "^1.0.1", + "is-windows": "^1.0.1", + "resolve-dir": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/global-prefix": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", + "integrity": "sha512-5lsx1NUDHtSjfg0eHlmYvZKv8/nVqX4ckFbM+FrGcQ+04KWcWFo9P5MxPZYSzUvyzmdTbI7Eix8Q4IbELDqzKg==", + "dev": true, + "license": "MIT", + "dependencies": { + "expand-tilde": "^2.0.2", + "homedir-polyfill": "^1.0.1", + "ini": "^1.3.4", + "is-windows": "^1.0.1", + "which": "^1.2.14" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/global-prefix/node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, "node_modules/globals": { "version": "13.24.0", "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", @@ -3849,6 +4432,39 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/globby": { + "version": "13.2.2", + "resolved": "https://registry.npmjs.org/globby/-/globby-13.2.2.tgz", + "integrity": "sha512-Y1zNGV+pzQdh7H39l9zgB4PJqjRNqydvdYCDG4HFXM4XuvSaQQlEc91IU1yALL8gUTDomgBAfz3XJdmUS+oo0w==", + "dev": true, + "license": "MIT", + "dependencies": { + "dir-glob": "^3.0.1", + "fast-glob": "^3.3.0", + "ignore": "^5.2.4", + "merge2": "^1.4.1", + "slash": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/globby/node_modules/slash": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz", + "integrity": "sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/gopd": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", @@ -3873,6 +4489,28 @@ "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", "dev": true }, + "node_modules/handlebars": { + "version": "4.7.8", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz", + "integrity": "sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "minimist": "^1.2.5", + "neo-async": "^2.6.2", + "source-map": "^0.6.1", + "wordwrap": "^1.0.0" + }, + "bin": { + "handlebars": "bin/handlebars" + }, + "engines": { + "node": ">=0.4.7" + }, + "optionalDependencies": { + "uglify-js": "^3.1.4" + } + }, "node_modules/handler-agent": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/handler-agent/-/handler-agent-0.2.0.tgz", @@ -3962,6 +4600,30 @@ "node": ">= 0.4" } }, + "node_modules/header-case": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/header-case/-/header-case-2.0.4.tgz", + "integrity": "sha512-H/vuk5TEEVZwrR0lp2zed9OCo1uAILMlx0JEMgC26rzyJJ3N1v6XkwHHXJQdR2doSjcGPM6OKPYoJgf0plJ11Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "capital-case": "^1.0.4", + "tslib": "^2.0.3" + } + }, + "node_modules/homedir-polyfill": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", + "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", + "dev": true, + "license": "MIT", + "dependencies": { + "parse-passwd": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/html-escaper": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", @@ -4026,6 +4688,27 @@ "node": ">=0.10.0" } }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "BSD-3-Clause" + }, "node_modules/ignore": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", @@ -4105,6 +4788,153 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, + "node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "dev": true, + "license": "ISC" + }, + "node_modules/inquirer": { + "version": "9.3.5", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-9.3.5.tgz", + "integrity": "sha512-SVRCRovA7KaT6nqWB2mCNpTvU4cuZ0hOXo5KPyiyOcNNUIZwq/JKtvXuDJNaxfuJKabBYRu1ecHze0YEwDYoRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@inquirer/figures": "^1.0.3", + "ansi-escapes": "^4.3.2", + "cli-width": "^4.1.0", + "external-editor": "^3.1.0", + "mute-stream": "1.0.0", + "ora": "^5.4.1", + "run-async": "^3.0.0", + "rxjs": "^7.8.1", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^6.2.0", + "yoctocolors-cjs": "^2.1.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/inquirer/node_modules/cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "dev": true, + "license": "MIT", + "dependencies": { + "restore-cursor": "^3.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/inquirer/node_modules/is-interactive": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", + "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/inquirer/node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/inquirer/node_modules/log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/inquirer/node_modules/ora": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", + "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "bl": "^4.1.0", + "chalk": "^4.1.0", + "cli-cursor": "^3.1.0", + "cli-spinners": "^2.5.0", + "is-interactive": "^1.0.0", + "is-unicode-supported": "^0.1.0", + "log-symbols": "^4.1.0", + "strip-ansi": "^6.0.0", + "wcwidth": "^1.0.1" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/inquirer/node_modules/restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/inquirer/node_modules/wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/interpret": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-3.1.1.tgz", + "integrity": "sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10.13.0" + } + }, "node_modules/io-ts": { "version": "2.2.21", "resolved": "https://registry.npmjs.org/io-ts/-/io-ts-2.2.21.tgz", @@ -4115,6 +4945,20 @@ "fp-ts": "^2.5.0" } }, + "node_modules/is-absolute": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz", + "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-relative": "^1.0.0", + "is-windows": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", @@ -4188,22 +5032,71 @@ "node": ">=0.10.0" } }, + "node_modules/is-interactive": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-2.0.0.tgz", + "integrity": "sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true, "engines": { - "node": ">=0.12.0" + "node": ">=0.12.0" + } + }, + "node_modules/is-path-cwd": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-3.0.0.tgz", + "integrity": "sha512-kyiNFFLU0Ampr6SDZitD/DwUo4Zs1nSdnygUBqsu3LooL00Qvb5j+UnvApUn/TTj1J3OuE6BTdQ5rudKmU2ZaA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-plain-object": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", + "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" } }, - "node_modules/is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "node_modules/is-relative": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz", + "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==", "dev": true, + "license": "MIT", + "dependencies": { + "is-unc-path": "^1.0.0" + }, "engines": { - "node": ">=8" + "node": ">=0.10.0" } }, "node_modules/is-stream": { @@ -4224,6 +5117,32 @@ "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", "dev": true }, + "node_modules/is-unc-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz", + "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "unc-path-regex": "^0.1.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-unicode-supported": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-2.1.0.tgz", + "integrity": "sha512-mE00Gnza5EEB3Ds0HfMyllZzbBrmLOX3vfWoj9A9PEnTfratQ/BcaJOuMhnkhjXvb2+FkY3VuHqtAGpTPmglFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/is-windows": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", @@ -4233,12 +5152,35 @@ "node": ">=0.10.0" } }, + "node_modules/isbinaryfile": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-5.0.2.tgz", + "integrity": "sha512-GvcjojwonMjWbTkfMpnVHVqXW/wKMYDfEpY94/8zy8HFMOqb/VL6oeONq9v87q4ttVlaTLnGXnJD4B5B1OTGIg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 18.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/gjtorikian/" + } + }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", "dev": true }, + "node_modules/isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/isomorphic-fetch": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-3.0.0.tgz", @@ -5213,6 +6155,16 @@ "json-buffer": "3.0.1" } }, + "node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/kleur": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", @@ -5244,6 +6196,26 @@ "node": ">= 0.8.0" } }, + "node_modules/liftoff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/liftoff/-/liftoff-4.0.0.tgz", + "integrity": "sha512-rMGwYF8q7g2XhG2ulBmmJgWv25qBsqRbDn5gH0+wnuyeFt7QBJlHJmtg5qEdn4pN6WVAUMgXnIxytMFRX9c1aA==", + "dev": true, + "license": "MIT", + "dependencies": { + "extend": "^3.0.2", + "findup-sync": "^5.0.0", + "fined": "^2.0.0", + "flagged-respawn": "^2.0.0", + "is-plain-object": "^5.0.0", + "object.map": "^1.0.1", + "rechoir": "^0.8.0", + "resolve": "^1.20.0" + }, + "engines": { + "node": ">=10.13.0" + } + }, "node_modules/lines-and-columns": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", @@ -5335,6 +6307,13 @@ "integrity": "sha512-uHaJFihxmJcEX3kT4I23ABqKKalJ/zDrDg0lsFtc1h+3uw49SIJ5beyhx5ExVRti3AvKoOJngIj7xz3oylPdWQ==", "dev": true }, + "node_modules/lodash.get": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", + "integrity": "sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==", + "dev": true, + "license": "MIT" + }, "node_modules/lodash.memoize": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", @@ -5348,6 +6327,59 @@ "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true }, + "node_modules/log-symbols": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-6.0.0.tgz", + "integrity": "sha512-i24m8rpwhmPIS4zscNzK6MSEhk0DUWa/8iYQWxhffV8jkI4Phvs3F+quL5xvS0gdQR0FyTCMMH33Y78dDTzzIw==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^5.3.0", + "is-unicode-supported": "^1.3.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-symbols/node_modules/chalk": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/log-symbols/node_modules/is-unicode-supported": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz", + "integrity": "sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lower-case": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz", + "integrity": "sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==", + "dev": true, + "license": "MIT", + "dependencies": { + "tslib": "^2.0.3" + } + }, "node_modules/lru-cache": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", @@ -5379,6 +6411,19 @@ "dev": true, "license": "ISC" }, + "node_modules/make-iterator": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz", + "integrity": "sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==", + "dev": true, + "license": "MIT", + "dependencies": { + "kind-of": "^6.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/makeerror": { "version": "1.0.12", "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", @@ -5388,6 +6433,16 @@ "tmpl": "1.0.5" } }, + "node_modules/map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha512-8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", @@ -5481,6 +6536,19 @@ "node": ">=6" } }, + "node_modules/mimic-function": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/mimic-function/-/mimic-function-5.0.1.tgz", + "integrity": "sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -5519,6 +6587,16 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, + "node_modules/mute-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-1.0.0.tgz", + "integrity": "sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA==", + "dev": true, + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -5535,6 +6613,24 @@ "node": ">= 0.6" } }, + "node_modules/neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true, + "license": "MIT" + }, + "node_modules/no-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz", + "integrity": "sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==", + "dev": true, + "license": "MIT", + "dependencies": { + "lower-case": "^2.0.2", + "tslib": "^2.0.3" + } + }, "node_modules/nock": { "version": "13.5.5", "resolved": "https://registry.npmjs.org/nock/-/nock-13.5.5.tgz", @@ -5583,6 +6679,47 @@ "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", "dev": true }, + "node_modules/node-plop": { + "version": "0.32.0", + "resolved": "https://registry.npmjs.org/node-plop/-/node-plop-0.32.0.tgz", + "integrity": "sha512-lKFSRSRuDHhwDKMUobdsvaWCbbDRbV3jMUSMiajQSQux1aNUevAZVxUHc2JERI//W8ABPRbi3ebYuSuIzkNIpQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/inquirer": "^9.0.3", + "change-case": "^4.1.2", + "del": "^7.1.0", + "globby": "^13.2.2", + "handlebars": "^4.7.8", + "inquirer": "^9.2.10", + "isbinaryfile": "^5.0.0", + "lodash.get": "^4.4.2", + "lower-case": "^2.0.2", + "mkdirp": "^3.0.1", + "resolve": "^1.22.4", + "title-case": "^3.0.3", + "upper-case": "^2.0.2" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + } + }, + "node_modules/node-plop/node_modules/mkdirp": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-3.0.1.tgz", + "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==", + "dev": true, + "license": "MIT", + "bin": { + "mkdirp": "dist/cjs/src/bin.js" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/node-preload": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/node-preload/-/node-preload-0.2.1.tgz", @@ -5823,6 +6960,49 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/object.defaults": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/object.defaults/-/object.defaults-1.1.0.tgz", + "integrity": "sha512-c/K0mw/F11k4dEUBMW8naXUuBuhxRCfG7W+yFy8EcijU/rSmazOUd1XAEEe6bC0OuXY4HUKjTJv7xbxIMqdxrA==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-each": "^1.0.1", + "array-slice": "^1.0.0", + "for-own": "^1.0.0", + "isobject": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object.map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object.map/-/object.map-1.0.1.tgz", + "integrity": "sha512-3+mAJu2PLfnSVGHwIWubpOFLscJANBKuB/6A4CxBstc4aqwQY0FWcsppuy4jU5GSB95yES5JHSI+33AWuS4k6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "for-own": "^1.0.0", + "make-iterator": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -5857,31 +7037,132 @@ "format-util": "^1.0.3" } }, - "node_modules/openapi3-ts": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/openapi3-ts/-/openapi3-ts-2.0.2.tgz", - "integrity": "sha512-TxhYBMoqx9frXyOgnRHufjQfPXomTIHYKhSKJ6jHfj13kS8OEIhvmE8CTuQyKtjjWttAjX5DPxM1vmalEpo8Qw==", + "node_modules/openapi3-ts": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/openapi3-ts/-/openapi3-ts-2.0.2.tgz", + "integrity": "sha512-TxhYBMoqx9frXyOgnRHufjQfPXomTIHYKhSKJ6jHfj13kS8OEIhvmE8CTuQyKtjjWttAjX5DPxM1vmalEpo8Qw==", + "dev": true, + "license": "MIT", + "dependencies": { + "yaml": "^1.10.2" + } + }, + "node_modules/optionator": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", + "dev": true, + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/ora": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/ora/-/ora-8.1.0.tgz", + "integrity": "sha512-GQEkNkH/GHOhPFXcqZs3IDahXEQcQxsSjEkK4KvEEST4t7eNzoMjxTzef+EZ+JluDEV+Raoi3WQ2CflnRdSVnQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^5.3.0", + "cli-cursor": "^5.0.0", + "cli-spinners": "^2.9.2", + "is-interactive": "^2.0.0", + "is-unicode-supported": "^2.0.0", + "log-symbols": "^6.0.0", + "stdin-discarder": "^0.2.2", + "string-width": "^7.2.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora/node_modules/ansi-regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/ora/node_modules/chalk": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/ora/node_modules/emoji-regex": { + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.4.0.tgz", + "integrity": "sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==", + "dev": true, + "license": "MIT" + }, + "node_modules/ora/node_modules/string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", "dev": true, "license": "MIT", "dependencies": { - "yaml": "^1.10.2" + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, - "node_modules/optionator": { - "version": "0.9.4", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", - "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", + "node_modules/os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", "dev": true, - "dependencies": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.5" - }, + "license": "MIT", "engines": { - "node": ">= 0.8.0" + "node": ">=0.10.0" } }, "node_modules/p-limit": { @@ -5950,6 +7231,17 @@ "node": ">=8" } }, + "node_modules/param-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/param-case/-/param-case-3.0.4.tgz", + "integrity": "sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A==", + "dev": true, + "license": "MIT", + "dependencies": { + "dot-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, "node_modules/parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -5962,6 +7254,21 @@ "node": ">=6" } }, + "node_modules/parse-filepath": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.2.tgz", + "integrity": "sha512-FwdRXKCohSVeXqwtYonZTXtbGJKrn+HNyWDYVcp5yuJlesTwNH4rsmRZ+GrKAPJ5bLpRxESMeS+Rl0VCHRvB2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-absolute": "^1.0.0", + "map-cache": "^0.2.0", + "path-root": "^0.1.1" + }, + "engines": { + "node": ">=0.8" + } + }, "node_modules/parse-json": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", @@ -5987,6 +7294,16 @@ "dev": true, "license": "MIT" }, + "node_modules/parse-passwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", + "integrity": "sha512-1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/parse-prefer-header": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/parse-prefer-header/-/parse-prefer-header-1.0.0.tgz", @@ -5997,6 +7314,28 @@ "lodash.camelcase": "^4.3.0" } }, + "node_modules/pascal-case": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/pascal-case/-/pascal-case-3.1.2.tgz", + "integrity": "sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g==", + "dev": true, + "license": "MIT", + "dependencies": { + "no-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, + "node_modules/path-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/path-case/-/path-case-3.0.4.tgz", + "integrity": "sha512-qO4qCFjXqVTrcbPt/hQfhTQ+VhFsqNKOPtytgNKkKxSoEp3XPUQ8ObFuePylOIok5gjn69ry8XiULxCwot3Wfg==", + "dev": true, + "license": "MIT", + "dependencies": { + "dot-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -6030,6 +7369,39 @@ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, + "node_modules/path-root": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz", + "integrity": "sha512-QLcPegTHF11axjfojBIoDygmS2E3Lf+8+jI6wOVmNVenrKSo3mFdSGiIgdSHenczw3wPtlVMQaFVwGmM7BJdtg==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-root-regex": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-root-regex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/path-root-regex/-/path-root-regex-0.1.2.tgz", + "integrity": "sha512-4GlJ6rZDhQZFE0DPVKh0e9jmZ5egZfxTkp7bcRDuPlJXbAwhxcl2dINPUAsjLdejqaLsCeg8axcLjIbvBjN4pQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/picocolors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", @@ -6244,6 +7616,52 @@ "node": ">=8" } }, + "node_modules/plop": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/plop/-/plop-4.0.1.tgz", + "integrity": "sha512-5n8QU93kvL/ObOzBcPAB1siVFtAH1TZM6TntJ3JK5kXT0jIgnQV+j+uaOWWFJlg1cNkzLYm8klgASF65K36q9w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/liftoff": "^4.0.3", + "chalk": "^5.3.0", + "interpret": "^3.1.1", + "liftoff": "^4.0.0", + "minimist": "^1.2.8", + "node-plop": "^0.32.0", + "ora": "^8.0.0", + "v8flags": "^4.0.1" + }, + "bin": { + "plop": "bin/plop.js" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/plop/node_modules/chalk": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/plop/node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/postman-collection": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/postman-collection/-/postman-collection-4.5.0.tgz", @@ -6524,6 +7942,19 @@ "node": ">=8.10.0" } }, + "node_modules/rechoir": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.8.0.tgz", + "integrity": "sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "resolve": "^1.20.0" + }, + "engines": { + "node": ">= 10.13.0" + } + }, "node_modules/release-zalgo": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/release-zalgo/-/release-zalgo-1.0.0.tgz", @@ -6599,6 +8030,20 @@ "node": ">=8" } }, + "node_modules/resolve-dir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", + "integrity": "sha512-R7uiTjECzvOsWSfdM0QKFNBVFcK27aHOUwdvK53BcW8zqnGdYp0Fbj82cy54+2A4P2tFM22J5kRfe1R+lM/1yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "expand-tilde": "^2.0.0", + "global-modules": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/resolve-from": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", @@ -6617,6 +8062,52 @@ "node": ">=10" } }, + "node_modules/restore-cursor": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-5.1.0.tgz", + "integrity": "sha512-oMA2dcrw6u0YfxJQXm342bFKX/E4sG9rbTzO9ptUcR/e8A33cHuvStiYOwH7fszkZlZ1z/ta9AAoPk2F4qIOHA==", + "dev": true, + "license": "MIT", + "dependencies": { + "onetime": "^7.0.0", + "signal-exit": "^4.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/restore-cursor/node_modules/onetime": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-7.0.0.tgz", + "integrity": "sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "mimic-function": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/restore-cursor/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/reusify": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", @@ -6664,6 +8155,16 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/run-async": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-3.0.0.tgz", + "integrity": "sha512-540WwVDOMxA6dN6We19EcT9sc3hkXPw5mzRNGM3FkdN/vtE9NFvj5lFAPNwUDmJjXidm3v7TC1cTE7t17Ulm1Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -6687,6 +8188,16 @@ "queue-microtask": "^1.2.2" } }, + "node_modules/rxjs": { + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", + "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + } + }, "node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -6731,6 +8242,18 @@ "semver": "bin/semver.js" } }, + "node_modules/sentence-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/sentence-case/-/sentence-case-3.0.4.tgz", + "integrity": "sha512-8LS0JInaQMCRoQ7YUytAo/xUu5W2XnQxV2HI/6uM6U7CITS1RqPElr30V6uIqyMKM9lJGRVFy5/4CuzcixNYSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "no-case": "^3.0.4", + "tslib": "^2.0.3", + "upper-case-first": "^2.0.2" + } + }, "node_modules/set-blocking": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", @@ -6907,6 +8430,17 @@ "node": ">=8" } }, + "node_modules/snake-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/snake-case/-/snake-case-3.0.4.tgz", + "integrity": "sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg==", + "dev": true, + "license": "MIT", + "dependencies": { + "dot-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, "node_modules/sonic-boom": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-1.4.1.tgz", @@ -6991,6 +8525,19 @@ "node": ">=8" } }, + "node_modules/stdin-discarder": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/stdin-discarder/-/stdin-discarder-0.2.2.tgz", + "integrity": "sha512-UhDfHmA92YAlNnCfhmq0VeNL5bDbiZGg7sZ2IvPsXubGkiNa9EC+tUTsjBRsYUAz87btI6/1wf4XoVvQ3uRnmQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/string_decoder": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", @@ -7158,6 +8705,29 @@ "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", "dev": true }, + "node_modules/title-case": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/title-case/-/title-case-3.0.3.tgz", + "integrity": "sha512-e1zGYRvbffpcHIrnuqT0Dh+gEJtDaxDSoG4JAIpq4oDFyooziLBIiYQv0GBT4FUAnUop5uZ1hiIAj7oAF6sOCA==", + "dev": true, + "license": "MIT", + "dependencies": { + "tslib": "^2.0.3" + } + }, + "node_modules/tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "license": "MIT", + "dependencies": { + "os-tmpdir": "~1.0.2" + }, + "engines": { + "node": ">=0.6.0" + } + }, "node_modules/tmpl": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", @@ -7427,10 +8997,35 @@ } } }, + "node_modules/uglify-js": { + "version": "3.19.3", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.19.3.tgz", + "integrity": "sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ==", + "dev": true, + "license": "BSD-2-Clause", + "optional": true, + "bin": { + "uglifyjs": "bin/uglifyjs" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/unc-path-regex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", + "integrity": "sha512-eXL4nmJT7oCpkZsHZUOJo8hcX3GbsiDOa0Qu9F646fi8dT3XuSVopVqAcEiVzSKKH7UoDti23wNX3qGFxcW5Qg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/undici-types": { "version": "6.19.8", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", - "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==" + "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", + "dev": true }, "node_modules/update-browserslist-db": { "version": "1.1.0", @@ -7462,6 +9057,26 @@ "browserslist": ">= 4.21.0" } }, + "node_modules/upper-case": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/upper-case/-/upper-case-2.0.2.tgz", + "integrity": "sha512-KgdgDGJt2TpuwBUIjgG6lzw2GWFRCW9Qkfkiv0DxqHHLYJHmtmdUIKcZd8rHgFSjopVTlw6ggzCm1b8MFQwikg==", + "dev": true, + "license": "MIT", + "dependencies": { + "tslib": "^2.0.3" + } + }, + "node_modules/upper-case-first": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/upper-case-first/-/upper-case-first-2.0.2.tgz", + "integrity": "sha512-514ppYHBaKwfJRK/pNC6c/OxfGa0obSnAl106u97Ed0I625Nin96KAjttZF6ZL3e1XLtphxnqrOi9iWgm+u+bg==", + "dev": true, + "license": "MIT", + "dependencies": { + "tslib": "^2.0.3" + } + }, "node_modules/uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", @@ -7542,6 +9157,16 @@ "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", "dev": true }, + "node_modules/v8flags": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-4.0.1.tgz", + "integrity": "sha512-fcRLaS4H/hrZk9hYwbdRM35D0U8IYMfEClhXxCivOojl+yTRAZH3Zy2sSy6qVCiGbV9YAtPssP6jaChqC9vPCg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10.13.0" + } + }, "node_modules/validate.io-array": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/validate.io-array/-/validate.io-array-1.0.6.tgz", @@ -7589,6 +9214,16 @@ "makeerror": "1.0.12" } }, + "node_modules/wcwidth": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", + "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", + "dev": true, + "license": "MIT", + "dependencies": { + "defaults": "^1.0.3" + } + }, "node_modules/webidl-conversions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", @@ -7654,6 +9289,13 @@ "node": ">=0.10.0" } }, + "node_modules/wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==", + "dev": true, + "license": "MIT" + }, "node_modules/wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", @@ -7764,6 +9406,19 @@ "funding": { "url": "https://github.com/sponsors/sindresorhus" } + }, + "node_modules/yoctocolors-cjs": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yoctocolors-cjs/-/yoctocolors-cjs-2.1.2.tgz", + "integrity": "sha512-cYVsTjKl8b+FrnidjibDWskAv7UKOfcwaVZdp/it9n1s9fU3IkgDbhdIRKCW4JDsAlECJY0ytoVPT3sK6kideA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } } } } diff --git a/package.json b/package.json index 5fbcc33..a0bc368 100644 --- a/package.json +++ b/package.json @@ -35,6 +35,7 @@ "@stoplight/prism-cli": "^5.10.0", "@types/eslint__js": "^8.42.3", "@types/jest": "^29.5.13", + "@types/node": "^22.7.3", "@types/qs": "^6.9.15", "debug": "^4.3.4", "eslint": "^8.57.0", @@ -44,6 +45,7 @@ "jest": "^29.7.0", "nock": "^13.5.4", "nyc": "^15.1.0", + "plop": "^4.0.1", "prettier": "^3.0.0", "qs": "^6.11.2", "ts-jest": "^29.2.5", @@ -53,8 +55,10 @@ "typescript-eslint": "^8.5.0", "uuid": "^9.0.1" }, - "dependencies": { - "@types/node": "^20.0.0" + "overrides": { + "node-plop": { + "inquirer": "9.3.5" + } }, "license": "MIT", "scripts": { @@ -63,6 +67,7 @@ "clean": "rm -rf ./.nyc_output ./node_modules/.cache ./coverage ./dist", "prepack": "npm install && npm run build", "test": "jest", + "generate": "plop", "lint": "rm -rf ./dist && eslint .", "fix": "npm run lint --fix" } diff --git a/plop-templates/ResourceTypes.ts.hbs b/plop-templates/ResourceTypes.ts.hbs new file mode 100644 index 0000000..85d8f7e --- /dev/null +++ b/plop-templates/ResourceTypes.ts.hbs @@ -0,0 +1,88 @@ +import {paths} from './TelnyxAPI.js'; + +declare module 'telnyx' { + namespace Telnyx { + {{#each methods}} + {{#if (ifEquals . "retrieve")}} + type {{pascalCase ../name}}{{pascalCase .}}Id = paths['{{../path}}/{{../path-param}}']['get']['parameters']['path']['id']; + {{/if}} + {{#if (ifEquals . "del")}} + type {{pascalCase ../name}}{{pascalCase .}}Id = paths['{{../path}}/{{../path-param}}']['delete']['parameters']['path']['id']; + {{/if}} + {{#if (ifEquals . "update")}} + type {{pascalCase ../name}}{{pascalCase .}}Id = paths['{{../path}}/{{../path-param}}']['patch']['parameters']['path']['id']; + {{/if}} + + {{#if (ifEquals . "list")}} + type {{pascalCase ../name}}{{pascalCase .}}Params = paths['{{../path}}']['get']['parameters']['query']; + {{/if}} + {{#if (ifEquals . "create")}} + type {{pascalCase ../name}}{{pascalCase .}}Params = paths['{{../path}}']['post']['requestBody']['content']['application/json']; + {{/if}} + + {{#if (ifEquals . "retrieve")}} + type {{pascalCase ../name}}{{pascalCase .}}Params = paths['{{../path}}/{{../path-param}}']['get']['parameters']['query']; + {{/if}} + {{#if (ifEquals . "update")}} + type {{pascalCase ../name}}{{pascalCase .}}Params = paths['{{../path}}/{{../path-param}}']['patch']['requestBody']['content']['application/json']; + {{/if}} + {{#if (ifEquals . "del")}} + type {{pascalCase ../name}}{{pascalCase .}}Params = paths['{{../path}}/{{../path-param}}']['delete']['parameters']['query']; + {{/if}} + + {{#if (ifEquals . "list")}} + type {{pascalCase ../name}}{{pascalCase .}}Response = paths['{{../path}}']['get']['responses']['200']['content']['application/json']['data']; + {{/if}} + {{#if (ifEquals . "create")}} + type {{pascalCase ../name}}{{pascalCase .}}Response = paths['{{../path}}']['post']['responses']['200']['content']['application/json']['data']; + {{/if}} + + {{#if (ifEquals . "retrieve")}} + type {{pascalCase ../name}}{{pascalCase .}}Response = paths['{{../path}}/{{../path-param}}']['get']['responses']['200']['content']['application/json']['data']; + {{/if}} + {{#if (ifEquals . "update")}} + type {{pascalCase ../name}}{{pascalCase .}}Response = paths['{{../path}}/{{../path-param}}']['patch']['responses']['200']['content']['application/json']['data']; + {{/if}} + {{#if (ifEquals . "del")}} + type {{pascalCase ../name}}{{pascalCase .}}Response = paths['{{../path}}/{{../path-param}}']['delete']['responses']['200']['content']['application/json']['data']; + {{/if}} + {{/each}} + + class {{pascalCase name}}Resource { + {{#each methods}} + {{#if (ifEquals . "list")}} + {{.}}( + params?: {{pascalCase ../name}}{{pascalCase .}}Params, + options?: RequestOptions, + ): Promise>; + {{/if}} + {{#if (ifEquals . "create")}} + {{.}}( + params: {{pascalCase ../name}}{{pascalCase .}}Params, + options?: RequestOptions, + ): Promise>; + {{/if}} + + {{#if (ifEquals . "retrieve")}} + {{.}}( + id: {{pascalCase ../name}}{{pascalCase .}}Id, + options?: RequestOptions, + ): Promise>; + {{/if}} + {{#if (ifEquals . "update")}} + {{.}}( + id: {{pascalCase ../name}}{{pascalCase .}}Id, + params: {{pascalCase ../name}}{{pascalCase .}}Params, + options?: RequestOptions, + ): Promise>; + {{/if}} + {{#if (ifEquals . "del")}} + {{.}}( + id: {{pascalCase ../name}}{{pascalCase .}}Id, + options?: RequestOptions, + ): Promise>; + {{/if}} + {{/each}} + } + } +} diff --git a/plop.js b/plop.js new file mode 100644 index 0000000..8c420aa --- /dev/null +++ b/plop.js @@ -0,0 +1,43 @@ +export default function ( + /** @type {import('plop').NodePlopAPI} **/ + plop, +) { + // controller generator + plop.setGenerator('resource-types', { + description: 'Resources types', + prompts: [ + { + type: 'input', + name: 'name', + message: 'Name (PascalCase)', + }, + { + type: 'input', + name: 'path', + message: 'API Path (no prefix, with trailing slash, lowercase)', + }, + { + type: 'input', + name: 'path-param', + message: 'API Param name (INCLUDE BRACKETS, lowercase, id or name)', + }, + { + type: 'checkbox', + name: 'methods', + choices: ['list', 'retrieve', 'create', 'update', 'del'], + message: 'Resource Methods', + }, + ], + actions: [ + { + type: 'add', + path: 'types/{{pascalCase name}}Resource.d.ts', + templateFile: 'plop-templates/ResourceTypes.ts.hbs', + }, + ], + }); + + plop.setHelper('ifEquals', function (arg1, arg2) { + return arg1 == arg2; + }); +} diff --git a/src/resources/MessagingProfiles.ts b/src/resources/MessagingProfiles.ts index a94a2fa..56b9581 100644 --- a/src/resources/MessagingProfiles.ts +++ b/src/resources/MessagingProfiles.ts @@ -5,12 +5,7 @@ import * as utils from '../utils'; const telnyxMethod = TelnyxResource.method; -const ACTIONS = [ - 'phone_numbers', - 'alphanumeric_sender_ids', - 'short_codes', - 'metrics', -]; +const ACTIONS = ['phone_numbers', 'short_codes', 'metrics']; function getSpec(messagingProfileId?: string) { return function (methodName: string) { @@ -94,19 +89,6 @@ export const MessagingProfiles = TelnyxResource.extend({ urlParams: ['messagingProfileId'], }), - listSenderIds: telnyxMethod({ - method: 'GET', - path: '/{messagingProfileId}/alphanumeric_sender_ids', - urlParams: ['messagingProfileId'], - methodType: 'list', - }), - - senderIds: telnyxMethod({ - method: 'GET', - path: '/{messagingProfileId}/alphanumeric_sender_ids', - urlParams: ['messagingProfileId'], - }), - retrieveMetrics: telnyxMethod({ method: 'GET', path: '/{messagingProfileId}/metrics', diff --git a/types/CallsResource.d.ts b/types/CallsResource.d.ts new file mode 100644 index 0000000..7ca53fa --- /dev/null +++ b/types/CallsResource.d.ts @@ -0,0 +1,292 @@ +import {paths} from './TelnyxAPI.js'; + +declare module 'telnyx' { + namespace Telnyx { + type CallsRetrieveId = + paths['/calls/{call_control_id}']['get']['parameters']['path']['call_control_id']; + + type CallsRetrieveParams = + paths['/calls/{call_control_id}']['get']['parameters']['query']; + + type CallsRetrieveResponse = + paths['/calls/{call_control_id}']['get']['responses']['200']['content']['application/json']['data']; + + type CallsCreateParams = + paths['/calls']['post']['requestBody']['content']['application/json']; + + type CallsCreateResponse = + paths['/calls']['post']['responses']['200']['content']['application/json']['data']; + + type CallsAnswerParams = + paths['/calls/{call_control_id}/actions/answer']['post']['requestBody']['content']['application/json']; + type CallsRejectParams = + paths['/calls/{call_control_id}/actions/reject']['post']['requestBody']['content']['application/json']; + type CallsHangupParams = + paths['/calls/{call_control_id}/actions/hangup']['post']['requestBody']['content']['application/json']; + type CallsBridgeParams = + paths['/calls/{call_control_id}/actions/bridge']['post']['requestBody']['content']['application/json']; + type CallsSpeakParams = + paths['/calls/{call_control_id}/actions/speak']['post']['requestBody']['content']['application/json']; + type CallsForkStartParams = + paths['/calls/{call_control_id}/actions/fork_start']['post']['requestBody']['content']['application/json']; + type CallsForkStopParams = + paths['/calls/{call_control_id}/actions/fork_stop']['post']['requestBody']['content']['application/json']; + type CallsGatherParams = + paths['/calls/{call_control_id}/actions/gather']['post']['requestBody']['content']['application/json']; + type CallsGatherUsingAudioParams = + paths['/calls/{call_control_id}/actions/gather_using_audio']['post']['requestBody']['content']['application/json']; + type CallsGatherUsingSpeakParams = + paths['/calls/{call_control_id}/actions/gather_using_speak']['post']['requestBody']['content']['application/json']; + type CallsGatherStopParams = + paths['/calls/{call_control_id}/actions/gather_stop']['post']['requestBody']['content']['application/json']; + type CallsPlaybackStartParams = + paths['/calls/{call_control_id}/actions/playback_start']['post']['requestBody']['content']['application/json']; + type CallsPlaybackStopParams = + paths['/calls/{call_control_id}/actions/playback_stop']['post']['requestBody']['content']['application/json']; + type CallsRecordStartParams = + paths['/calls/{call_control_id}/actions/record_start']['post']['requestBody']['content']['application/json']; + type CallsRecordStopParams = + paths['/calls/{call_control_id}/actions/record_stop']['post']['requestBody']['content']['application/json']; + type CallsRecordPauseParams = + paths['/calls/{call_control_id}/actions/record_pause']['post']['requestBody']['content']['application/json']; + type CallsRecordResumeParams = + paths['/calls/{call_control_id}/actions/record_resume']['post']['requestBody']['content']['application/json']; + type CallsReferParams = + paths['/calls/{call_control_id}/actions/refer']['post']['requestBody']['content']['application/json']; + type CallsSendDtmfParams = + paths['/calls/{call_control_id}/actions/send_dtmf']['post']['requestBody']['content']['application/json']; + type CallsStreamingStartParams = + paths['/calls/{call_control_id}/actions/streaming_start']['post']['requestBody']['content']['application/json']; + type CallsStreamingStopParams = + paths['/calls/{call_control_id}/actions/streaming_stop']['post']['requestBody']['content']['application/json']; + type CallsSuppressionStartParams = + paths['/calls/{call_control_id}/actions/suppression_start']['post']['requestBody']['content']['application/json']; + type CallsSuppressionStopParams = + paths['/calls/{call_control_id}/actions/suppression_stop']['post']['requestBody']['content']['application/json']; + type CallsTransferParams = + paths['/calls/{call_control_id}/actions/transfer']['post']['requestBody']['content']['application/json']; + type CallsTranscriptionStartParams = + paths['/calls/{call_control_id}/actions/transcription_start']['post']['requestBody']['content']['application/json']; + type CallsTranscriptionStopParams = + paths['/calls/{call_control_id}/actions/transcription_stop']['post']['requestBody']['content']['application/json']; + type CallsEnqueueParams = + paths['/calls/{call_control_id}/actions/enqueue']['post']['requestBody']['content']['application/json']; + type CallsLeaveQueueParams = + paths['/calls/{call_control_id}/actions/leave_queue']['post']['requestBody']['content']['application/json']; + + type CallsAnswerResponse = + paths['/calls/{call_control_id}/actions/answer']['post']['responses']['200']['content']['application/json']['data']; + type CallsRejectResponse = + paths['/calls/{call_control_id}/actions/reject']['post']['responses']['200']['content']['application/json']['data']; + type CallsHangupResponse = + paths['/calls/{call_control_id}/actions/hangup']['post']['responses']['200']['content']['application/json']['data']; + type CallsBridgeResponse = + paths['/calls/{call_control_id}/actions/bridge']['post']['responses']['200']['content']['application/json']['data']; + type CallsSpeakResponse = + paths['/calls/{call_control_id}/actions/speak']['post']['responses']['200']['content']['application/json']['data']; + type CallsForkStartResponse = + paths['/calls/{call_control_id}/actions/fork_start']['post']['responses']['200']['content']['application/json']['data']; + type CallsForkStopResponse = + paths['/calls/{call_control_id}/actions/fork_stop']['post']['responses']['200']['content']['application/json']['data']; + type CallsGatherResponse = + paths['/calls/{call_control_id}/actions/gather']['post']['responses']['200']['content']['application/json']['data']; + type CallsGatherUsingAudioResponse = + paths['/calls/{call_control_id}/actions/gather_using_audio']['post']['responses']['200']['content']['application/json']['data']; + type CallsGatherUsingSpeakResponse = + paths['/calls/{call_control_id}/actions/gather_using_speak']['post']['responses']['200']['content']['application/json']['data']; + type CallsGatherStopResponse = + paths['/calls/{call_control_id}/actions/gather_stop']['post']['responses']['200']['content']['application/json']['data']; + type CallsPlaybackStartResponse = + paths['/calls/{call_control_id}/actions/playback_start']['post']['responses']['200']['content']['application/json']['data']; + type CallsPlaybackStopResponse = + paths['/calls/{call_control_id}/actions/playback_stop']['post']['responses']['200']['content']['application/json']['data']; + type CallsRecordStartResponse = + paths['/calls/{call_control_id}/actions/record_start']['post']['responses']['200']['content']['application/json']['data']; + type CallsRecordStopResponse = + paths['/calls/{call_control_id}/actions/record_stop']['post']['responses']['200']['content']['application/json']['data']; + type CallsRecordPauseResponse = + paths['/calls/{call_control_id}/actions/record_pause']['post']['responses']['200']['content']['application/json']['data']; + type CallsRecordResumeResponse = + paths['/calls/{call_control_id}/actions/record_resume']['post']['responses']['200']['content']['application/json']['data']; + type CallsReferResponse = + paths['/calls/{call_control_id}/actions/refer']['post']['responses']['200']['content']['application/json']['data']; + type CallsSendDtmfResponse = + paths['/calls/{call_control_id}/actions/send_dtmf']['post']['responses']['200']['content']['application/json']['data']; + type CallsStreamingStartResponse = + paths['/calls/{call_control_id}/actions/streaming_start']['post']['responses']['200']['content']['application/json']['data']; + type CallsStreamingStopResponse = + paths['/calls/{call_control_id}/actions/streaming_stop']['post']['responses']['200']['content']['application/json']['data']; + type CallsSuppressionStartResponse = + paths['/calls/{call_control_id}/actions/suppression_start']['post']['responses']['200']['content']['application/json']['data']; + type CallsSuppressionStopResponse = + paths['/calls/{call_control_id}/actions/suppression_stop']['post']['responses']['200']['content']['application/json']['data']; + type CallsTransferResponse = + paths['/calls/{call_control_id}/actions/transfer']['post']['responses']['200']['content']['application/json']['data']; + type CallsTranscriptionStartResponse = + paths['/calls/{call_control_id}/actions/transcription_start']['post']['responses']['200']['content']['application/json']['data']; + type CallsTranscriptionStopResponse = + paths['/calls/{call_control_id}/actions/transcription_stop']['post']['responses']['200']['content']['application/json']['data']; + type CallsEnqueueResponse = + paths['/calls/{call_control_id}/actions/enqueue']['post']['responses']['200']['content']['application/json']['data']; + type CallsLeaveQueueResponse = + paths['/calls/{call_control_id}/actions/leave_queue']['post']['responses']['200']['content']['application/json']['data']; + + type CallsNestedMethods = { + answer: CallsResource['answer']; + reject: CallsResource['reject']; + hangup: CallsResource['hangup']; + bridge: CallsResource['bridge']; + speak: CallsResource['speak']; + forkStart: CallsResource['forkStart']; + forkStop: CallsResource['forkStop']; + gather: CallsResource['gather']; + gatherUsingAudio: CallsResource['gatherUsingAudio']; + gatherUsingSpeak: CallsResource['gatherUsingSpeak']; + gatherStop: CallsResource['gatherStop']; + playbackStart: CallsResource['playbackStart']; + playbackStop: CallsResource['playbackStop']; + recordStart: CallsResource['recordStart']; + recordStop: CallsResource['recordStop']; + recordPause: CallsResource['recordPause']; + recordResume: CallsResource['recordResume']; + refer: CallsResource['refer']; + sendDtmf: CallsResource['sendDtmf']; + streamingStart: CallsResource['streamingStart']; + streamingStop: CallsResource['streamingStop']; + suppressionStart: CallsResource['suppressionStart']; + suppressionStop: CallsResource['suppressionStop']; + transfer: CallsResource['transfer']; + transcriptionStart: CallsResource['transcriptionStart']; + transcriptionStop: CallsResource['transcriptionStop']; + enqueue: CallsResource['enqueue']; + leaveQueue: CallsResource['leaveQueue']; + }; + + class CallsResource { + retrieve( + id: CallsRetrieveId, + options?: RequestOptions, + ): Promise>; + + Create( + params: CallsCreateParams, + options?: RequestOptions, + ): Promise< + Telnyx.Response + >; + + answer( + params: CallsAnswerParams, + options?: RequestOptions, + ): Promise>; + reject( + params: CallsRejectParams, + options?: RequestOptions, + ): Promise>; + hangup( + params: CallsHangupParams, + options?: RequestOptions, + ): Promise>; + bridge( + params: CallsBridgeParams, + options?: RequestOptions, + ): Promise>; + speak( + params: CallsSpeakParams, + options?: RequestOptions, + ): Promise>; + forkStart( + params: CallsForkStartParams, + options?: RequestOptions, + ): Promise>; + forkStop( + params: CallsForkStopParams, + options?: RequestOptions, + ): Promise>; + gather( + params: CallsGatherParams, + options?: RequestOptions, + ): Promise>; + gatherUsingAudio( + params: CallsGatherUsingAudioParams, + options?: RequestOptions, + ): Promise>; + gatherUsingSpeak( + params: CallsGatherUsingSpeakParams, + options?: RequestOptions, + ): Promise>; + gatherStop( + params: CallsGatherStopParams, + options?: RequestOptions, + ): Promise>; + playbackStart( + params: CallsPlaybackStartParams, + options?: RequestOptions, + ): Promise>; + playbackStop( + params: CallsPlaybackStopParams, + options?: RequestOptions, + ): Promise>; + recordStart( + params: CallsRecordStartParams, + options?: RequestOptions, + ): Promise>; + recordStop( + params: CallsRecordStopParams, + options?: RequestOptions, + ): Promise>; + recordPause( + params: CallsRecordPauseParams, + options?: RequestOptions, + ): Promise>; + recordResume( + params: CallsRecordResumeParams, + options?: RequestOptions, + ): Promise>; + refer( + params: CallsReferParams, + options?: RequestOptions, + ): Promise>; + sendDtmf( + params: CallsSendDtmfParams, + options?: RequestOptions, + ): Promise>; + streamingStart( + params: CallsStreamingStartParams, + options?: RequestOptions, + ): Promise>; + streamingStop( + params: CallsStreamingStopParams, + options?: RequestOptions, + ): Promise>; + suppressionStart( + params: CallsSuppressionStartParams, + options?: RequestOptions, + ): Promise>; + suppressionStop( + params: CallsSuppressionStopParams, + options?: RequestOptions, + ): Promise>; + transfer( + params: CallsTransferParams, + options?: RequestOptions, + ): Promise>; + transcriptionStart( + params: CallsTranscriptionStartParams, + options?: RequestOptions, + ): Promise>; + transcriptionStop( + params: CallsTranscriptionStopParams, + options?: RequestOptions, + ): Promise>; + enqueue( + params: CallsEnqueueParams, + options?: RequestOptions, + ): Promise>; + leaveQueue( + params: CallsLeaveQueueParams, + options?: RequestOptions, + ): Promise>; + } + } +} diff --git a/types/MessagingProfilesResource.d.ts b/types/MessagingProfilesResource.d.ts index e7bb411..0145398 100644 --- a/types/MessagingProfilesResource.d.ts +++ b/types/MessagingProfilesResource.d.ts @@ -8,10 +8,10 @@ declare module 'telnyx' { type MessagingProfilesRetrieveParams = paths['/messaging_profiles/{id}']['get']['parameters']['query']; - type MessagingProfilesDeleteId = + type MessagingProfilesDelId = paths['/messaging_profiles/{id}']['delete']['parameters']['path']['id']; - type MessagingProfilesDeleteParams = + type MessagingProfilesDelParams = paths['/messaging_profiles/{id}']['delete']['parameters']['query']; type MessagingProfilesUpdateId = @@ -23,7 +23,7 @@ declare module 'telnyx' { type MessagingProfilesRetrieveResponse = paths['/messaging_profiles/{id}']['get']['responses']['200']['content']['application/json']['data']; - type MessagingProfilesDeleteResponse = + type MessagingProfilesDelResponse = paths['/messaging_profiles/{id}']['delete']['responses']['200']['content']['application/json']['data']; type MessagingProfilesUpdateResponse = @@ -62,27 +62,44 @@ declare module 'telnyx' { type MessagingProfilesRetrieveMetricsResponse = paths['/messaging_profiles/{id}/metrics']['get']['responses']['200']['content']['application/json']['data']; + type MessagingProfilesNestedMethods = { + del: MessagingProfilesResource['del']; + phoneNumbers: MessagingProfilesResource['listPhoneNumbers']; + shortCodes: MessagingProfilesResource['listShortCodes']; + metrics: MessagingProfilesResource['retrieveMetrics']; + }; + class MessagingProfilesResource { create( - params?: MessagingProfilesCreateParams, + params: MessagingProfilesCreateParams, options?: RequestOptions, - ): Promise>; + ): Promise< + Telnyx.Response< + Telnyx.MessagingProfilesCreateResponse & + MessagingProfilesNestedMethods + > + >; del( - id?: MessagingProfilesDeleteId, + id: MessagingProfilesDelId, options?: RequestOptions, - ): Promise>; + ): Promise>; update( - id?: MessagingProfilesUpdateId, - params?: MessagingProfilesUpdateParams, + id: MessagingProfilesUpdateId, + params: MessagingProfilesUpdateParams, options?: RequestOptions, ): Promise>; retrieve( - id?: MessagingProfilesRetrieveId, + id: MessagingProfilesRetrieveId, options?: RequestOptions, - ): Promise>; + ): Promise< + Telnyx.Response< + Telnyx.MessagingProfilesRetrieveResponse & + MessagingProfilesNestedMethods + > + >; list( params?: MessagingProfilesListParams, From 160f17afceae1c2184c3605056e6d0c03e73a137 Mon Sep 17 00:00:00 2001 From: Lucas Rosa Date: Thu, 26 Sep 2024 23:28:56 -0300 Subject: [PATCH 16/59] fix typos --- types/CallsResource.d.ts | 9 ++++++++- types/index.d.ts | 9 +++++---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/types/CallsResource.d.ts b/types/CallsResource.d.ts index 7ca53fa..2115709 100644 --- a/types/CallsResource.d.ts +++ b/types/CallsResource.d.ts @@ -168,7 +168,14 @@ declare module 'telnyx' { options?: RequestOptions, ): Promise>; - Create( + create( + params: CallsCreateParams, + options?: RequestOptions, + ): Promise< + Telnyx.Response + >; + + dial( params: CallsCreateParams, options?: RequestOptions, ): Promise< diff --git a/types/index.d.ts b/types/index.d.ts index 12d1a55..f3c5da0 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -5,11 +5,11 @@ /// /// -// Imports: The beginning of the section generated from our OpenAPI spec +// Resources Imports /// /// /// -// Imports: The end of the section generated from our OpenAPI spec +// declare module 'telnyx' { // Added to in other modules, referenced above. @@ -24,10 +24,11 @@ declare module 'telnyx' { TelnyxResource: Telnyx.TelnyxResource; - // Fields: The beginning of the section generated from our OpenAPI spec + // Resources balance: Telnyx.BalanceResource; + calls: Telnyx.CallsResource; messagingProfiles: Telnyx.MessagingProfilesResource; - // Fields: The end of the section generated from our OpenAPI spec + // webhooks: Telnyx.Webhooks; /** * API Errors From 0cc2eefbe5fe0735d94323aa1831a4f6bc56daef Mon Sep 17 00:00:00 2001 From: Lucas Rosa Date: Fri, 27 Sep 2024 00:11:28 -0300 Subject: [PATCH 17/59] fix Calls missing types and methods --- src/resources/Calls.ts | 18 ++++++++++++++++++ src/test/resources/Calls.test.ts | 24 ++++++++++++++++++++++++ tsconfig.json | 1 + types/Errors.d.ts | 6 ++++++ types/index.d.ts | 1 + 5 files changed, 50 insertions(+) diff --git a/src/resources/Calls.ts b/src/resources/Calls.ts index 22773c5..1b9b656 100644 --- a/src/resources/Calls.ts +++ b/src/resources/Calls.ts @@ -50,6 +50,24 @@ export const Calls = TelnyxResource.extend({ path: 'calls', includeBasic: ['retrieve'], // status method + dial: telnyxMethod({ + // dial method + method: 'POST', + + transformResponseData: function (response, telnyx) { + return utils.addResourceToResponseData( + response, + telnyx, + 'calls', + utils.createNestedMethods( + telnyxMethod, + CALL_COMMANDS, + getSpec(response.data.call_control_id as string), + ), + ); + }, + }), + create: telnyxMethod({ // dial method method: 'POST', diff --git a/src/test/resources/Calls.test.ts b/src/test/resources/Calls.test.ts index 1bd334b..3649142 100644 --- a/src/test/resources/Calls.test.ts +++ b/src/test/resources/Calls.test.ts @@ -165,6 +165,30 @@ describe('Calls Resource', function () { }); }); + describe('dial', function () { + function responseFn(response: ResponsePayload) { + expect(response.data).toHaveProperty('call_session_id'); + expect(response.data).toHaveProperty('call_leg_id'); + expect(response.data).toHaveProperty('call_control_id'); + expect(response.data).toMatchObject({ + record_type: 'call', + is_alive: false, + }); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.calls.create(callCreateData).then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.calls + .dial(callCreateData, TEST_AUTH_KEY) + .then(responseFn); + }); + }); + COMMANDS.forEach(function (command) { describe(command, function () { const camelCaseCommand = utils.snakeToCamelCase(command); diff --git a/tsconfig.json b/tsconfig.json index f9177d5..29c8101 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -18,6 +18,7 @@ }, "exclude": [ "./dist", + "./examples", "./src/test", "./node_modules" ], diff --git a/types/Errors.d.ts b/types/Errors.d.ts index cd99cdb..0d4fe77 100644 --- a/types/Errors.d.ts +++ b/types/Errors.d.ts @@ -13,6 +13,12 @@ declare module 'telnyx' { code: string; detail: string; title: string; + meta?: { + url: string; + }; + source?: { + pointer: string; + }; }>; }; namespace errors { diff --git a/types/index.d.ts b/types/index.d.ts index f3c5da0..c56baff 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -7,6 +7,7 @@ // Resources Imports /// +/// /// /// // From cc510cac7af895c56cff472ca910c6eba755ed00 Mon Sep 17 00:00:00 2001 From: Lucas Rosa Date: Fri, 27 Sep 2024 00:14:38 -0300 Subject: [PATCH 18/59] update Call examples to Typescript --- .nvmrc | 1 + .tool-versions | 2 + examples/call-control/.eslintrc.js | 9 + examples/call-control/.nvmrc | 1 + examples/call-control/.tool-versions | 2 + examples/call-control/README.md | 3 + examples/call-control/index.ts | 102 + examples/call-control/package-lock.json | 8871 +++++++++++++++++++++++ examples/call-control/package.json | 24 + examples/call-control/tsconfig.json | 18 + 10 files changed, 9033 insertions(+) create mode 100644 .nvmrc create mode 100644 .tool-versions create mode 100644 examples/call-control/.eslintrc.js create mode 100644 examples/call-control/.nvmrc create mode 100644 examples/call-control/.tool-versions create mode 100644 examples/call-control/README.md create mode 100644 examples/call-control/index.ts create mode 100644 examples/call-control/package-lock.json create mode 100644 examples/call-control/package.json create mode 100644 examples/call-control/tsconfig.json diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..035651d --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +20.7.0 diff --git a/.tool-versions b/.tool-versions new file mode 100644 index 0000000..f53a99f --- /dev/null +++ b/.tool-versions @@ -0,0 +1,2 @@ +nodejs 20.7.0 +npm 10.1.0 diff --git a/examples/call-control/.eslintrc.js b/examples/call-control/.eslintrc.js new file mode 100644 index 0000000..64e22f8 --- /dev/null +++ b/examples/call-control/.eslintrc.js @@ -0,0 +1,9 @@ +module.exports = { + parserOptions: { + ecmaVersion: 6, + }, + rules: { + 'new-cap': 'off', + 'no-console': 'off', + }, +}; diff --git a/examples/call-control/.nvmrc b/examples/call-control/.nvmrc new file mode 100644 index 0000000..035651d --- /dev/null +++ b/examples/call-control/.nvmrc @@ -0,0 +1 @@ +20.7.0 diff --git a/examples/call-control/.tool-versions b/examples/call-control/.tool-versions new file mode 100644 index 0000000..f53a99f --- /dev/null +++ b/examples/call-control/.tool-versions @@ -0,0 +1,2 @@ +nodejs 20.7.0 +npm 10.1.0 diff --git a/examples/call-control/README.md b/examples/call-control/README.md new file mode 100644 index 0000000..4b26302 --- /dev/null +++ b/examples/call-control/README.md @@ -0,0 +1,3 @@ +# Node SDK Example - Call Control + +To test this run `npm install` and then run the main script in `package.json` with `ts-node` diff --git a/examples/call-control/index.ts b/examples/call-control/index.ts new file mode 100644 index 0000000..7a99f85 --- /dev/null +++ b/examples/call-control/index.ts @@ -0,0 +1,102 @@ +/** + * To run this file, just provide your Secret API Key, like so: + * TELNYX_API_KEY=KEYXXX node index.js + */ + +import Telnyx from 'telnyx'; + +const apiKey = String(process.env.TELNYX_API_KEY || ''); + +const telnyx = new Telnyx(apiKey); + +const params: Telnyx.CallsCreateParams = { + to: '+18005550100 or sip:username@sip.telnyx.com', + from: '+18005550101', + from_display_name: 'Company Name', + connection_id: '7267xxxxxxxxxxxxxx', + conference_config: { + conference_name: 'telnyx-conference', + start_conference_on_enter: true, + }, + audio_url: 'http://www.example.com/sounds/greeting.wav', + timeout_secs: 60, + time_limit_secs: 60, + webhook_url: 'https://www.example.com/server-b/', + webhook_url_method: 'POST', + answering_machine_detection: 'detect', + answering_machine_detection_config: { + total_analysis_time_millis: 5000, + after_greeting_silence_millis: 1000, + between_words_silence_millis: 1000, + greeting_duration_millis: 1000, + initial_silence_millis: 1000, + maximum_number_of_words: 1000, + maximum_word_length_millis: 2000, + silence_threshold: 512, + greeting_total_analysis_time_millis: 50000, + greeting_silence_duration_millis: 2000, + }, + custom_headers: [ + { + name: 'head_1', + value: 'val_1', + }, + { + name: 'head_2', + value: 'val_2', + }, + ], + client_state: 'aGF2ZSBhIG5pY2UgZGF5ID1d', + command_id: '891510ac-f3e4-11e8-af5b-de00688a4901', + link_to: 'ilditnZK_eVysupV21KzmzN_sM29ygfauQojpm4BgFtfX5hXAcjotg==', + media_encryption: 'SRTP', + sip_auth_username: 'username', + sip_auth_password: 'password', + sip_headers: [ + { + name: 'User-to-User', + value: '12345', + }, + ], + sip_transport_protocol: 'TLS', + stream_url: 'wss://www.example.com/websocket', + stream_track: 'both_tracks', + send_silence_when_idle: true, + enable_dialogflow: false, + dialogflow_config: { + analyze_sentiment: false, + partial_automated_agent_reply: false, + }, + record_channels: 'single', + record_format: 'wav', + record_max_length: 0, + record_timeout_secs: 0, + transcription: true, +}; + +(async function callControl() { + try { + const {data: call} = await telnyx.calls.dial(params); + + const {data: playback} = await call.playbackStart({ + audio_url: 'http://www.example.com/sounds/greeting.wav', + loop: 'infinity', + overlay: true, + stop: 'current', + target_legs: 'self', + client_state: 'aGF2ZSBhIG5pY2UgZGF5ID1d', + command_id: '891510ac-f3e4-11e8-af5b-de00688a4901', + cache_audio: true, + audio_type: 'mp3', + }); + + console.log(playback?.result); + } catch (e: unknown) { + console.error(e); + + const rawError: Telnyx.TelnyxRawError = (e as {raw: Telnyx.TelnyxRawError}) + .raw; + + console.dir(JSON.stringify(rawError.errors)); + } +})(); diff --git a/examples/call-control/package-lock.json b/examples/call-control/package-lock.json new file mode 100644 index 0000000..5f0b108 --- /dev/null +++ b/examples/call-control/package-lock.json @@ -0,0 +1,8871 @@ +{ + "name": "telnyx-call-control-example", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "telnyx-call-control-example", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "telnyx": "2.0.0-alpha.0" + }, + "devDependencies": { + "@types/node": "^22.7.3", + "tsx": "^4.19.1", + "typescript": "^5.6.2" + }, + "engines": { + "node": ">=22" + } + }, + "../../node_modules/@ampproject/remapping": { + "version": "2.3.0", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "../../node_modules/@babel/code-frame": { + "version": "7.24.7", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/highlight": "^7.24.7", + "picocolors": "^1.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "../../node_modules/@babel/compat-data": { + "version": "7.25.4", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "../../node_modules/@babel/core": { + "version": "7.25.2", + "dev": true, + "license": "MIT", + "dependencies": { + "@ampproject/remapping": "^2.2.0", + "@babel/code-frame": "^7.24.7", + "@babel/generator": "^7.25.0", + "@babel/helper-compilation-targets": "^7.25.2", + "@babel/helper-module-transforms": "^7.25.2", + "@babel/helpers": "^7.25.0", + "@babel/parser": "^7.25.0", + "@babel/template": "^7.25.0", + "@babel/traverse": "^7.25.2", + "@babel/types": "^7.25.2", + "convert-source-map": "^2.0.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.3", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "../../node_modules/@babel/core/node_modules/convert-source-map": { + "version": "2.0.0", + "dev": true, + "license": "MIT" + }, + "../../node_modules/@babel/generator": { + "version": "7.25.6", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.25.6", + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25", + "jsesc": "^2.5.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "../../node_modules/@babel/helper-compilation-targets": { + "version": "7.25.2", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/compat-data": "^7.25.2", + "@babel/helper-validator-option": "^7.24.8", + "browserslist": "^4.23.1", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "../../node_modules/@babel/helper-module-imports": { + "version": "7.24.7", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/traverse": "^7.24.7", + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "../../node_modules/@babel/helper-module-transforms": { + "version": "7.25.2", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-module-imports": "^7.24.7", + "@babel/helper-simple-access": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", + "@babel/traverse": "^7.25.2" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "../../node_modules/@babel/helper-plugin-utils": { + "version": "7.24.8", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "../../node_modules/@babel/helper-simple-access": { + "version": "7.24.7", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/traverse": "^7.24.7", + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "../../node_modules/@babel/helper-string-parser": { + "version": "7.24.8", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "../../node_modules/@babel/helper-validator-identifier": { + "version": "7.24.7", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "../../node_modules/@babel/helper-validator-option": { + "version": "7.24.8", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "../../node_modules/@babel/helpers": { + "version": "7.25.6", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/template": "^7.25.0", + "@babel/types": "^7.25.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "../../node_modules/@babel/highlight": { + "version": "7.24.7", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.24.7", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "../../node_modules/@babel/highlight/node_modules/ansi-styles": { + "version": "3.2.1", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "../../node_modules/@babel/highlight/node_modules/chalk": { + "version": "2.4.2", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "../../node_modules/@babel/highlight/node_modules/color-convert": { + "version": "1.9.3", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "1.1.3" + } + }, + "../../node_modules/@babel/highlight/node_modules/color-name": { + "version": "1.1.3", + "dev": true, + "license": "MIT" + }, + "../../node_modules/@babel/highlight/node_modules/escape-string-regexp": { + "version": "1.0.5", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "../../node_modules/@babel/highlight/node_modules/has-flag": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "../../node_modules/@babel/highlight/node_modules/supports-color": { + "version": "5.5.0", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "../../node_modules/@babel/parser": { + "version": "7.25.6", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.25.6" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "../../node_modules/@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "../../node_modules/@babel/plugin-syntax-bigint": { + "version": "7.8.3", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "../../node_modules/@babel/plugin-syntax-class-properties": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "../../node_modules/@babel/plugin-syntax-class-static-block": { + "version": "7.14.5", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "../../node_modules/@babel/plugin-syntax-import-attributes": { + "version": "7.25.6", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.8" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "../../node_modules/@babel/plugin-syntax-import-meta": { + "version": "7.10.4", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "../../node_modules/@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "../../node_modules/@babel/plugin-syntax-jsx": { + "version": "7.24.7", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "../../node_modules/@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "../../node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "../../node_modules/@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "../../node_modules/@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "../../node_modules/@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "../../node_modules/@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "../../node_modules/@babel/plugin-syntax-private-property-in-object": { + "version": "7.14.5", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "../../node_modules/@babel/plugin-syntax-top-level-await": { + "version": "7.14.5", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "../../node_modules/@babel/plugin-syntax-typescript": { + "version": "7.25.4", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.8" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "../../node_modules/@babel/template": { + "version": "7.25.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.24.7", + "@babel/parser": "^7.25.0", + "@babel/types": "^7.25.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "../../node_modules/@babel/traverse": { + "version": "7.25.6", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.24.7", + "@babel/generator": "^7.25.6", + "@babel/parser": "^7.25.6", + "@babel/template": "^7.25.0", + "@babel/types": "^7.25.6", + "debug": "^4.3.1", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "../../node_modules/@babel/traverse/node_modules/globals": { + "version": "11.12.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "../../node_modules/@babel/types": { + "version": "7.25.6", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.24.8", + "@babel/helper-validator-identifier": "^7.24.7", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "../../node_modules/@bcoe/v8-coverage": { + "version": "0.2.3", + "dev": true, + "license": "MIT" + }, + "../../node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/trace-mapping": "0.3.9" + }, + "engines": { + "node": ">=12" + } + }, + "../../node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, + "../../node_modules/@eslint-community/eslint-utils": { + "version": "4.4.0", + "dev": true, + "license": "MIT", + "dependencies": { + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "../../node_modules/@eslint-community/regexpp": { + "version": "4.11.0", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "../../node_modules/@eslint/eslintrc": { + "version": "2.1.4", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "../../node_modules/@eslint/eslintrc/node_modules/argparse": { + "version": "2.0.1", + "dev": true, + "license": "Python-2.0" + }, + "../../node_modules/@eslint/eslintrc/node_modules/js-yaml": { + "version": "4.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "../../node_modules/@eslint/js": { + "version": "9.10.0", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "../../node_modules/@faker-js/faker": { + "version": "6.3.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.0.0", + "npm": ">=6.0.0" + } + }, + "../../node_modules/@humanwhocodes/config-array": { + "version": "0.11.14", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@humanwhocodes/object-schema": "^2.0.2", + "debug": "^4.3.1", + "minimatch": "^3.0.5" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "../../node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "../../node_modules/@humanwhocodes/object-schema": { + "version": "2.0.3", + "dev": true, + "license": "BSD-3-Clause" + }, + "../../node_modules/@inquirer/figures": { + "version": "1.0.6", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "../../node_modules/@istanbuljs/load-nyc-config": { + "version": "1.1.0", + "dev": true, + "license": "ISC", + "dependencies": { + "camelcase": "^5.3.1", + "find-up": "^4.1.0", + "get-package-type": "^0.1.0", + "js-yaml": "^3.13.1", + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/@istanbuljs/load-nyc-config/node_modules/find-up": { + "version": "4.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/@istanbuljs/load-nyc-config/node_modules/locate-path": { + "version": "5.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/@istanbuljs/load-nyc-config/node_modules/p-limit": { + "version": "2.3.0", + "dev": true, + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/@istanbuljs/load-nyc-config/node_modules/p-locate": { + "version": "4.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/@istanbuljs/load-nyc-config/node_modules/resolve-from": { + "version": "5.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../../node_modules/@istanbuljs/schema": { + "version": "0.1.3", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../../node_modules/@jest/console": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/@jest/core": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/console": "^29.7.0", + "@jest/reporters": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-changed-files": "^29.7.0", + "jest-config": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-resolve-dependencies": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "jest-watcher": "^29.7.0", + "micromatch": "^4.0.4", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "../../node_modules/@jest/environment": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-mock": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/@jest/expect": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "expect": "^29.7.0", + "jest-snapshot": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/@jest/expect-utils": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "jest-get-type": "^29.6.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/@jest/fake-timers": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "@sinonjs/fake-timers": "^10.0.2", + "@types/node": "*", + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/@jest/globals": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/types": "^29.6.3", + "jest-mock": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/@jest/reporters": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@bcoe/v8-coverage": "^0.2.3", + "@jest/console": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", + "@types/node": "*", + "chalk": "^4.0.0", + "collect-v8-coverage": "^1.0.0", + "exit": "^0.1.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-instrument": "^6.0.0", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.1.3", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", + "slash": "^3.0.0", + "string-length": "^4.0.1", + "strip-ansi": "^6.0.0", + "v8-to-istanbul": "^9.0.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "../../node_modules/@jest/reporters/node_modules/glob": { + "version": "7.2.3", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "../../node_modules/@jest/reporters/node_modules/istanbul-lib-instrument": { + "version": "6.0.3", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@babel/core": "^7.23.9", + "@babel/parser": "^7.23.9", + "@istanbuljs/schema": "^0.1.3", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^7.5.4" + }, + "engines": { + "node": ">=10" + } + }, + "../../node_modules/@jest/reporters/node_modules/semver": { + "version": "7.6.3", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "../../node_modules/@jest/schemas": { + "version": "29.6.3", + "dev": true, + "license": "MIT", + "dependencies": { + "@sinclair/typebox": "^0.27.8" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/@jest/source-map": { + "version": "29.6.3", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.18", + "callsites": "^3.0.0", + "graceful-fs": "^4.2.9" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/@jest/test-result": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/console": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "collect-v8-coverage": "^1.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/@jest/test-sequencer": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/test-result": "^29.7.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/@jest/transform": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.11.6", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", + "babel-plugin-istanbul": "^6.1.1", + "chalk": "^4.0.0", + "convert-source-map": "^2.0.0", + "fast-json-stable-stringify": "^2.1.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", + "micromatch": "^4.0.4", + "pirates": "^4.0.4", + "slash": "^3.0.0", + "write-file-atomic": "^4.0.2" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/@jest/transform/node_modules/convert-source-map": { + "version": "2.0.0", + "dev": true, + "license": "MIT" + }, + "../../node_modules/@jest/transform/node_modules/write-file-atomic": { + "version": "4.0.2", + "dev": true, + "license": "ISC", + "dependencies": { + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.7" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "../../node_modules/@jest/types": { + "version": "29.6.3", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/schemas": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/@jridgewell/gen-mapping": { + "version": "0.3.5", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/set-array": "^1.2.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "../../node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "../../node_modules/@jridgewell/set-array": { + "version": "1.2.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "../../node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.0", + "dev": true, + "license": "MIT" + }, + "../../node_modules/@jridgewell/trace-mapping": { + "version": "0.3.25", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "../../node_modules/@jsdevtools/ono": { + "version": "7.1.3", + "dev": true, + "license": "MIT" + }, + "../../node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "../../node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "../../node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "../../node_modules/@pkgr/core": { + "version": "0.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.20.0 || ^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts" + } + }, + "../../node_modules/@sinclair/typebox": { + "version": "0.27.8", + "dev": true, + "license": "MIT" + }, + "../../node_modules/@sinonjs/commons": { + "version": "3.0.1", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "type-detect": "4.0.8" + } + }, + "../../node_modules/@sinonjs/commons/node_modules/type-detect": { + "version": "4.0.8", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "../../node_modules/@sinonjs/fake-timers": { + "version": "10.3.0", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@sinonjs/commons": "^3.0.0" + } + }, + "../../node_modules/@stoplight/http-spec": { + "version": "7.1.0", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@stoplight/json": "^3.18.1", + "@stoplight/json-schema-generator": "1.0.2", + "@stoplight/types": "14.1.0", + "@types/json-schema": "7.0.11", + "@types/swagger-schema-official": "~2.0.22", + "@types/type-is": "^1.6.3", + "fnv-plus": "^1.3.1", + "lodash": "^4.17.21", + "openapi3-ts": "^2.0.2", + "postman-collection": "^4.1.3", + "tslib": "^2.6.2", + "type-is": "^1.6.18" + }, + "engines": { + "node": ">=14.13" + } + }, + "../../node_modules/@stoplight/http-spec/node_modules/@stoplight/types": { + "version": "14.1.0", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.4", + "utility-types": "^3.10.0" + }, + "engines": { + "node": "^12.20 || >=14.13" + } + }, + "../../node_modules/@stoplight/http-spec/node_modules/@types/json-schema": { + "version": "7.0.11", + "dev": true, + "license": "MIT" + }, + "../../node_modules/@stoplight/json": { + "version": "3.21.7", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@stoplight/ordered-object-literal": "^1.0.3", + "@stoplight/path": "^1.3.2", + "@stoplight/types": "^13.6.0", + "jsonc-parser": "~2.2.1", + "lodash": "^4.17.21", + "safe-stable-stringify": "^1.1" + }, + "engines": { + "node": ">=8.3.0" + } + }, + "../../node_modules/@stoplight/json-schema-generator": { + "version": "1.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "cross-fetch": "^3.1.5", + "json-promise": "1.1.x", + "minimist": "1.2.6", + "mkdirp": "0.5.x", + "pretty-data": "0.40.x" + }, + "bin": { + "json-schema-generator": "bin/cli.js" + } + }, + "../../node_modules/@stoplight/json-schema-merge-allof": { + "version": "0.7.8", + "dev": true, + "license": "MIT", + "dependencies": { + "compute-lcm": "^1.1.0", + "json-schema-compare": "^0.2.2", + "lodash": "^4.17.4" + } + }, + "../../node_modules/@stoplight/json-schema-ref-parser": { + "version": "9.2.7", + "dev": true, + "license": "MIT", + "dependencies": { + "@jsdevtools/ono": "^7.1.3", + "@stoplight/path": "^1.3.2", + "@stoplight/yaml": "^4.0.2", + "call-me-maybe": "^1.0.1", + "fastestsmallesttextencoderdecoder": "^1.0.22", + "isomorphic-fetch": "^3.0.0", + "node-abort-controller": "^3.0.1" + } + }, + "../../node_modules/@stoplight/json-schema-sampler": { + "version": "0.3.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/json-schema": "^7.0.7", + "json-pointer": "^0.6.1" + } + }, + "../../node_modules/@stoplight/json/node_modules/@stoplight/types": { + "version": "13.20.0", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.4", + "utility-types": "^3.10.0" + }, + "engines": { + "node": "^12.20 || >=14.13" + } + }, + "../../node_modules/@stoplight/ordered-object-literal": { + "version": "1.0.5", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "../../node_modules/@stoplight/path": { + "version": "1.3.2", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "../../node_modules/@stoplight/prism-cli": { + "version": "5.10.0", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@stoplight/json": "3.21.7", + "@stoplight/json-schema-ref-parser": "9.2.7", + "@stoplight/prism-core": "^5.8.0", + "@stoplight/prism-http": "5.10.0", + "@stoplight/prism-http-server": "^5.10.0", + "@stoplight/types": "^14.1.0", + "chalk": "^4.1.2", + "chokidar": "^3.5.2", + "fp-ts": "^2.11.5", + "json-schema-faker": "0.5.6", + "lodash": "^4.17.21", + "node-fetch": "^2.6.5", + "pino": "^6.13.3", + "signale": "^1.4.0", + "split2": "^3.2.2", + "tslib": "^2.3.1", + "uri-template-lite": "^22.9.0", + "urijs": "^1.19.11", + "yargs": "^16.2.0" + }, + "bin": { + "prism": "dist/index.js" + }, + "engines": { + "node": ">=18.20.1" + } + }, + "../../node_modules/@stoplight/prism-core": { + "version": "5.8.0", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "fp-ts": "^2.11.5", + "lodash": "^4.17.21", + "pino": "^6.13.3", + "tslib": "^2.3.1" + }, + "engines": { + "node": ">=18.20.1" + } + }, + "../../node_modules/@stoplight/prism-http": { + "version": "5.10.0", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@faker-js/faker": "^6.0.0", + "@stoplight/http-spec": "^7.0.3", + "@stoplight/json": "3.21.7", + "@stoplight/json-schema-merge-allof": "0.7.8", + "@stoplight/json-schema-ref-parser": "9.2.7", + "@stoplight/json-schema-sampler": "0.3.0", + "@stoplight/prism-core": "^5.8.0", + "@stoplight/types": "^14.1.0", + "@stoplight/yaml": "^4.2.3", + "abstract-logging": "^2.0.1", + "accepts": "^1.3.7", + "ajv": "^8.4.0", + "ajv-formats": "^2.1.1", + "caseless": "^0.12.0", + "chalk": "^4.1.2", + "content-type": "^1.0.4", + "fp-ts": "^2.11.5", + "http-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.0", + "json-schema-faker": "0.5.6", + "lodash": "^4.17.21", + "node-fetch": "^2.6.5", + "parse-multipart-data": "^1.5.0", + "pino": "^6.13.3", + "tslib": "^2.3.1", + "type-is": "^1.6.18", + "uri-template-lite": "^22.9.0", + "whatwg-mimetype": "^3.0.0" + }, + "engines": { + "node": ">=18.20.1" + } + }, + "../../node_modules/@stoplight/prism-http-server": { + "version": "5.10.0", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@stoplight/prism-core": "^5.8.0", + "@stoplight/prism-http": "^5.10.0", + "@stoplight/types": "^14.1.0", + "fast-xml-parser": "^4.2.0", + "fp-ts": "^2.11.5", + "io-ts": "^2.2.16", + "lodash": "^4.17.21", + "micri": "^4.3.0", + "node-fetch": "^2.6.5", + "parse-prefer-header": "1.0.0", + "tslib": "^2.3.1", + "type-is": "^1.6.18" + }, + "engines": { + "node": ">=18.20.1" + } + }, + "../../node_modules/@stoplight/prism-http/node_modules/ajv": { + "version": "8.17.1", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "../../node_modules/@stoplight/prism-http/node_modules/json-schema-traverse": { + "version": "1.0.0", + "dev": true, + "license": "MIT" + }, + "../../node_modules/@stoplight/types": { + "version": "14.1.1", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.4", + "utility-types": "^3.10.0" + }, + "engines": { + "node": "^12.20 || >=14.13" + } + }, + "../../node_modules/@stoplight/yaml": { + "version": "4.3.0", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@stoplight/ordered-object-literal": "^1.0.5", + "@stoplight/types": "^14.1.1", + "@stoplight/yaml-ast-parser": "0.0.50", + "tslib": "^2.2.0" + }, + "engines": { + "node": ">=10.8" + } + }, + "../../node_modules/@stoplight/yaml-ast-parser": { + "version": "0.0.50", + "dev": true, + "license": "Apache-2.0" + }, + "../../node_modules/@tootallnate/once": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10" + } + }, + "../../node_modules/@tsconfig/node10": { + "version": "1.0.11", + "dev": true, + "license": "MIT" + }, + "../../node_modules/@tsconfig/node12": { + "version": "1.0.11", + "dev": true, + "license": "MIT" + }, + "../../node_modules/@tsconfig/node14": { + "version": "1.0.3", + "dev": true, + "license": "MIT" + }, + "../../node_modules/@tsconfig/node16": { + "version": "1.0.4", + "dev": true, + "license": "MIT" + }, + "../../node_modules/@types/babel__core": { + "version": "7.20.5", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" + } + }, + "../../node_modules/@types/babel__generator": { + "version": "7.6.8", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.0.0" + } + }, + "../../node_modules/@types/babel__template": { + "version": "7.4.4", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "../../node_modules/@types/babel__traverse": { + "version": "7.20.6", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.20.7" + } + }, + "../../node_modules/@types/eslint": { + "version": "9.6.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, + "../../node_modules/@types/eslint__js": { + "version": "8.42.3", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/eslint": "*" + } + }, + "../../node_modules/@types/estree": { + "version": "1.0.5", + "dev": true, + "license": "MIT" + }, + "../../node_modules/@types/fined": { + "version": "1.1.5", + "dev": true, + "license": "MIT" + }, + "../../node_modules/@types/graceful-fs": { + "version": "4.1.9", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "../../node_modules/@types/inquirer": { + "version": "9.0.7", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/through": "*", + "rxjs": "^7.2.0" + } + }, + "../../node_modules/@types/istanbul-lib-coverage": { + "version": "2.0.6", + "dev": true, + "license": "MIT" + }, + "../../node_modules/@types/istanbul-lib-report": { + "version": "3.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/istanbul-lib-coverage": "*" + } + }, + "../../node_modules/@types/istanbul-reports": { + "version": "3.0.4", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/istanbul-lib-report": "*" + } + }, + "../../node_modules/@types/jest": { + "version": "29.5.13", + "dev": true, + "license": "MIT", + "dependencies": { + "expect": "^29.0.0", + "pretty-format": "^29.0.0" + } + }, + "../../node_modules/@types/json-schema": { + "version": "7.0.15", + "dev": true, + "license": "MIT" + }, + "../../node_modules/@types/liftoff": { + "version": "4.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/fined": "*", + "@types/node": "*" + } + }, + "../../node_modules/@types/node": { + "version": "22.7.3", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~6.19.2" + } + }, + "../../node_modules/@types/qs": { + "version": "6.9.15", + "dev": true, + "license": "MIT" + }, + "../../node_modules/@types/stack-utils": { + "version": "2.0.3", + "dev": true, + "license": "MIT" + }, + "../../node_modules/@types/swagger-schema-official": { + "version": "2.0.25", + "dev": true, + "license": "MIT" + }, + "../../node_modules/@types/through": { + "version": "0.0.33", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "../../node_modules/@types/type-is": { + "version": "1.6.6", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "../../node_modules/@types/yargs": { + "version": "17.0.33", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/yargs-parser": "*" + } + }, + "../../node_modules/@types/yargs-parser": { + "version": "21.0.3", + "dev": true, + "license": "MIT" + }, + "../../node_modules/@typescript-eslint/eslint-plugin": { + "version": "8.5.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/regexpp": "^4.10.0", + "@typescript-eslint/scope-manager": "8.5.0", + "@typescript-eslint/type-utils": "8.5.0", + "@typescript-eslint/utils": "8.5.0", + "@typescript-eslint/visitor-keys": "8.5.0", + "graphemer": "^1.4.0", + "ignore": "^5.3.1", + "natural-compare": "^1.4.0", + "ts-api-utils": "^1.3.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^8.0.0 || ^8.0.0-alpha.0", + "eslint": "^8.57.0 || ^9.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "../../node_modules/@typescript-eslint/parser": { + "version": "8.5.0", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@typescript-eslint/scope-manager": "8.5.0", + "@typescript-eslint/types": "8.5.0", + "@typescript-eslint/typescript-estree": "8.5.0", + "@typescript-eslint/visitor-keys": "8.5.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "../../node_modules/@typescript-eslint/scope-manager": { + "version": "8.5.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.5.0", + "@typescript-eslint/visitor-keys": "8.5.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "../../node_modules/@typescript-eslint/type-utils": { + "version": "8.5.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/typescript-estree": "8.5.0", + "@typescript-eslint/utils": "8.5.0", + "debug": "^4.3.4", + "ts-api-utils": "^1.3.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "../../node_modules/@typescript-eslint/types": { + "version": "8.5.0", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "../../node_modules/@typescript-eslint/typescript-estree": { + "version": "8.5.0", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@typescript-eslint/types": "8.5.0", + "@typescript-eslint/visitor-keys": "8.5.0", + "debug": "^4.3.4", + "fast-glob": "^3.3.2", + "is-glob": "^4.0.3", + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^1.3.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "../../node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "../../node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { + "version": "9.0.5", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "../../node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { + "version": "7.6.3", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "../../node_modules/@typescript-eslint/utils": { + "version": "8.5.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "@typescript-eslint/scope-manager": "8.5.0", + "@typescript-eslint/types": "8.5.0", + "@typescript-eslint/typescript-estree": "8.5.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0" + } + }, + "../../node_modules/@typescript-eslint/visitor-keys": { + "version": "8.5.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.5.0", + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "../../node_modules/@ungap/structured-clone": { + "version": "1.2.0", + "dev": true, + "license": "ISC" + }, + "../../node_modules/abstract-logging": { + "version": "2.0.1", + "dev": true, + "license": "MIT" + }, + "../../node_modules/accepts": { + "version": "1.3.8", + "dev": true, + "license": "MIT", + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, + "../../node_modules/acorn": { + "version": "8.12.1", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "../../node_modules/acorn-jsx": { + "version": "5.3.2", + "dev": true, + "license": "MIT", + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "../../node_modules/acorn-walk": { + "version": "8.3.4", + "dev": true, + "license": "MIT", + "dependencies": { + "acorn": "^8.11.0" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "../../node_modules/agent-base": { + "version": "6.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "../../node_modules/aggregate-error": { + "version": "3.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/ajv": { + "version": "6.12.6", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "../../node_modules/ajv-formats": { + "version": "2.1.1", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^8.0.0" + }, + "peerDependencies": { + "ajv": "^8.0.0" + }, + "peerDependenciesMeta": { + "ajv": { + "optional": true + } + } + }, + "../../node_modules/ajv-formats/node_modules/ajv": { + "version": "8.17.1", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "../../node_modules/ajv-formats/node_modules/json-schema-traverse": { + "version": "1.0.0", + "dev": true, + "license": "MIT" + }, + "../../node_modules/ansi-escapes": { + "version": "4.3.2", + "dev": true, + "license": "MIT", + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/ansi-escapes/node_modules/type-fest": { + "version": "0.21.3", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/ansi-regex": { + "version": "5.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../../node_modules/ansi-styles": { + "version": "4.3.0", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "../../node_modules/anymatch": { + "version": "3.1.3", + "dev": true, + "license": "ISC", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "../../node_modules/append-transform": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "default-require-extensions": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/archy": { + "version": "1.0.0", + "dev": true, + "license": "MIT" + }, + "../../node_modules/arg": { + "version": "4.1.3", + "dev": true, + "license": "MIT" + }, + "../../node_modules/argparse": { + "version": "1.0.10", + "dev": true, + "license": "MIT", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "../../node_modules/array-each": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/array-slice": { + "version": "1.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/async": { + "version": "3.2.6", + "dev": true, + "license": "MIT" + }, + "../../node_modules/atomic-sleep": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.0.0" + } + }, + "../../node_modules/babel-jest": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/transform": "^29.7.0", + "@types/babel__core": "^7.1.14", + "babel-plugin-istanbul": "^6.1.1", + "babel-preset-jest": "^29.6.3", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.8.0" + } + }, + "../../node_modules/babel-plugin-istanbul": { + "version": "6.1.1", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@babel/helper-plugin-utils": "^7.0.0", + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-instrument": "^5.0.4", + "test-exclude": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/babel-plugin-istanbul/node_modules/istanbul-lib-instrument": { + "version": "5.2.1", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@babel/core": "^7.12.3", + "@babel/parser": "^7.14.7", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/babel-plugin-jest-hoist": { + "version": "29.6.3", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/template": "^7.3.3", + "@babel/types": "^7.3.3", + "@types/babel__core": "^7.1.14", + "@types/babel__traverse": "^7.0.6" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/babel-preset-current-node-syntax": { + "version": "1.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-bigint": "^7.8.3", + "@babel/plugin-syntax-class-properties": "^7.12.13", + "@babel/plugin-syntax-class-static-block": "^7.14.5", + "@babel/plugin-syntax-import-attributes": "^7.24.7", + "@babel/plugin-syntax-import-meta": "^7.10.4", + "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.10.4", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5", + "@babel/plugin-syntax-top-level-await": "^7.14.5" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "../../node_modules/babel-preset-jest": { + "version": "29.6.3", + "dev": true, + "license": "MIT", + "dependencies": { + "babel-plugin-jest-hoist": "^29.6.3", + "babel-preset-current-node-syntax": "^1.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "../../node_modules/balanced-match": { + "version": "1.0.2", + "dev": true, + "license": "MIT" + }, + "../../node_modules/base64-js": { + "version": "1.5.1", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "../../node_modules/binary-extensions": { + "version": "2.3.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/bl": { + "version": "4.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "../../node_modules/bluebird": { + "version": "3.7.2", + "dev": true, + "license": "MIT" + }, + "../../node_modules/brace-expansion": { + "version": "1.1.11", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "../../node_modules/braces": { + "version": "3.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/browserslist": { + "version": "4.23.3", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "caniuse-lite": "^1.0.30001646", + "electron-to-chromium": "^1.5.4", + "node-releases": "^2.0.18", + "update-browserslist-db": "^1.1.0" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "../../node_modules/bs-logger": { + "version": "0.2.6", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-json-stable-stringify": "2.x" + }, + "engines": { + "node": ">= 6" + } + }, + "../../node_modules/bser": { + "version": "2.1.1", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "node-int64": "^0.4.0" + } + }, + "../../node_modules/buffer": { + "version": "5.7.1", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "../../node_modules/buffer-from": { + "version": "1.1.2", + "dev": true, + "license": "MIT" + }, + "../../node_modules/caching-transform": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "hasha": "^5.0.0", + "make-dir": "^3.0.0", + "package-hash": "^4.0.0", + "write-file-atomic": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/call-bind": { + "version": "1.0.7", + "dev": true, + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../../node_modules/call-me-maybe": { + "version": "1.0.2", + "dev": true, + "license": "MIT" + }, + "../../node_modules/callsites": { + "version": "3.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "../../node_modules/camel-case": { + "version": "4.1.2", + "dev": true, + "license": "MIT", + "dependencies": { + "pascal-case": "^3.1.2", + "tslib": "^2.0.3" + } + }, + "../../node_modules/camelcase": { + "version": "5.3.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "../../node_modules/caniuse-lite": { + "version": "1.0.30001653", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "CC-BY-4.0" + }, + "../../node_modules/capital-case": { + "version": "1.0.4", + "dev": true, + "license": "MIT", + "dependencies": { + "no-case": "^3.0.4", + "tslib": "^2.0.3", + "upper-case-first": "^2.0.2" + } + }, + "../../node_modules/caseless": { + "version": "0.12.0", + "dev": true, + "license": "Apache-2.0" + }, + "../../node_modules/chalk": { + "version": "4.1.2", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "../../node_modules/change-case": { + "version": "4.1.2", + "dev": true, + "license": "MIT", + "dependencies": { + "camel-case": "^4.1.2", + "capital-case": "^1.0.4", + "constant-case": "^3.0.4", + "dot-case": "^3.0.4", + "header-case": "^2.0.4", + "no-case": "^3.0.4", + "param-case": "^3.0.4", + "pascal-case": "^3.1.2", + "path-case": "^3.0.4", + "sentence-case": "^3.0.4", + "snake-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, + "../../node_modules/char-regex": { + "version": "1.0.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "../../node_modules/chardet": { + "version": "0.7.0", + "dev": true, + "license": "MIT" + }, + "../../node_modules/charset": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4.0.0" + } + }, + "../../node_modules/chokidar": { + "version": "3.6.0", + "dev": true, + "license": "MIT", + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "../../node_modules/chokidar/node_modules/glob-parent": { + "version": "5.1.2", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "../../node_modules/ci-info": { + "version": "3.9.0", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../../node_modules/cjs-module-lexer": { + "version": "1.4.1", + "dev": true, + "license": "MIT" + }, + "../../node_modules/clean-stack": { + "version": "2.2.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "../../node_modules/cli-cursor": { + "version": "5.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "restore-cursor": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/cli-spinners": { + "version": "2.9.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/cli-width": { + "version": "4.1.0", + "dev": true, + "license": "ISC", + "engines": { + "node": ">= 12" + } + }, + "../../node_modules/cliui": { + "version": "7.0.4", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "../../node_modules/clone": { + "version": "1.0.4", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8" + } + }, + "../../node_modules/co": { + "version": "4.6.0", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">= 1.0.0", + "node": ">= 0.12.0" + } + }, + "../../node_modules/collect-v8-coverage": { + "version": "1.0.2", + "dev": true, + "license": "MIT" + }, + "../../node_modules/color-convert": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "../../node_modules/color-name": { + "version": "1.1.4", + "dev": true, + "license": "MIT" + }, + "../../node_modules/commondir": { + "version": "1.0.1", + "dev": true, + "license": "MIT" + }, + "../../node_modules/compute-gcd": { + "version": "1.2.1", + "dev": true, + "dependencies": { + "validate.io-array": "^1.0.3", + "validate.io-function": "^1.0.2", + "validate.io-integer-array": "^1.0.0" + } + }, + "../../node_modules/compute-lcm": { + "version": "1.1.2", + "dev": true, + "dependencies": { + "compute-gcd": "^1.2.1", + "validate.io-array": "^1.0.3", + "validate.io-function": "^1.0.2", + "validate.io-integer-array": "^1.0.0" + } + }, + "../../node_modules/concat-map": { + "version": "0.0.1", + "dev": true, + "license": "MIT" + }, + "../../node_modules/constant-case": { + "version": "3.0.4", + "dev": true, + "license": "MIT", + "dependencies": { + "no-case": "^3.0.4", + "tslib": "^2.0.3", + "upper-case": "^2.0.2" + } + }, + "../../node_modules/content-type": { + "version": "1.0.5", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "../../node_modules/convert-source-map": { + "version": "1.9.0", + "dev": true, + "license": "MIT" + }, + "../../node_modules/create-jest": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "prompts": "^2.0.1" + }, + "bin": { + "create-jest": "bin/create-jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/create-require": { + "version": "1.1.1", + "dev": true, + "license": "MIT" + }, + "../../node_modules/cross-fetch": { + "version": "3.1.8", + "dev": true, + "license": "MIT", + "dependencies": { + "node-fetch": "^2.6.12" + } + }, + "../../node_modules/cross-spawn": { + "version": "7.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "../../node_modules/debug": { + "version": "4.3.6", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "../../node_modules/decamelize": { + "version": "1.2.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/dedent": { + "version": "1.5.3", + "dev": true, + "license": "MIT", + "peerDependencies": { + "babel-plugin-macros": "^3.1.0" + }, + "peerDependenciesMeta": { + "babel-plugin-macros": { + "optional": true + } + } + }, + "../../node_modules/deep-is": { + "version": "0.1.4", + "dev": true, + "license": "MIT" + }, + "../../node_modules/deepmerge": { + "version": "4.3.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/default-require-extensions": { + "version": "3.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "strip-bom": "^4.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/defaults": { + "version": "1.0.4", + "dev": true, + "license": "MIT", + "dependencies": { + "clone": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/define-data-property": { + "version": "1.1.4", + "dev": true, + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../../node_modules/del": { + "version": "7.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "globby": "^13.1.2", + "graceful-fs": "^4.2.10", + "is-glob": "^4.0.3", + "is-path-cwd": "^3.0.0", + "is-path-inside": "^4.0.0", + "p-map": "^5.5.0", + "rimraf": "^3.0.2", + "slash": "^4.0.0" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/del/node_modules/aggregate-error": { + "version": "4.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "clean-stack": "^4.0.0", + "indent-string": "^5.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/del/node_modules/clean-stack": { + "version": "4.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "escape-string-regexp": "5.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/del/node_modules/escape-string-regexp": { + "version": "5.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/del/node_modules/indent-string": { + "version": "5.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/del/node_modules/is-path-inside": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/del/node_modules/p-map": { + "version": "5.5.0", + "dev": true, + "license": "MIT", + "dependencies": { + "aggregate-error": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/del/node_modules/slash": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/detect-file": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/detect-newline": { + "version": "3.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../../node_modules/diff-sequences": { + "version": "29.6.3", + "dev": true, + "license": "MIT", + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/dir-glob": { + "version": "3.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/doctrine": { + "version": "3.0.0", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "../../node_modules/dot-case": { + "version": "3.0.4", + "dev": true, + "license": "MIT", + "dependencies": { + "no-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, + "../../node_modules/ejs": { + "version": "3.1.10", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "jake": "^10.8.5" + }, + "bin": { + "ejs": "bin/cli.js" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/electron-to-chromium": { + "version": "1.5.13", + "dev": true, + "license": "ISC" + }, + "../../node_modules/emittery": { + "version": "0.13.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sindresorhus/emittery?sponsor=1" + } + }, + "../../node_modules/emoji-regex": { + "version": "8.0.0", + "dev": true, + "license": "MIT" + }, + "../../node_modules/error-ex": { + "version": "1.3.2", + "dev": true, + "license": "MIT", + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "../../node_modules/es-define-property": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "../../node_modules/es-errors": { + "version": "1.3.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "../../node_modules/es6-error": { + "version": "4.1.1", + "dev": true, + "license": "MIT" + }, + "../../node_modules/escalade": { + "version": "3.2.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "../../node_modules/escape-string-regexp": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/eslint": { + "version": "8.57.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.57.0", + "@humanwhocodes/config-array": "^0.11.14", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "esquery": "^1.4.2", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "../../node_modules/eslint-config-prettier": { + "version": "9.1.0", + "dev": true, + "license": "MIT", + "bin": { + "eslint-config-prettier": "bin/cli.js" + }, + "peerDependencies": { + "eslint": ">=7.0.0" + } + }, + "../../node_modules/eslint-plugin-chai-friendly": { + "version": "0.7.4", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + }, + "peerDependencies": { + "eslint": ">=3.0.0" + } + }, + "../../node_modules/eslint-plugin-prettier": { + "version": "5.2.1", + "dev": true, + "license": "MIT", + "dependencies": { + "prettier-linter-helpers": "^1.0.0", + "synckit": "^0.9.1" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint-plugin-prettier" + }, + "peerDependencies": { + "@types/eslint": ">=8.0.0", + "eslint": ">=8.0.0", + "eslint-config-prettier": "*", + "prettier": ">=3.0.0" + }, + "peerDependenciesMeta": { + "@types/eslint": { + "optional": true + }, + "eslint-config-prettier": { + "optional": true + } + } + }, + "../../node_modules/eslint-scope": { + "version": "7.2.2", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "../../node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "../../node_modules/eslint/node_modules/@eslint/js": { + "version": "8.57.0", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "../../node_modules/eslint/node_modules/argparse": { + "version": "2.0.1", + "dev": true, + "license": "Python-2.0" + }, + "../../node_modules/eslint/node_modules/js-yaml": { + "version": "4.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "../../node_modules/espree": { + "version": "9.6.1", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "../../node_modules/esprima": { + "version": "4.0.1", + "dev": true, + "license": "BSD-2-Clause", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "../../node_modules/esquery": { + "version": "1.6.0", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "../../node_modules/esrecurse": { + "version": "4.3.0", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "../../node_modules/estraverse": { + "version": "5.3.0", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "../../node_modules/esutils": { + "version": "2.0.3", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/execa": { + "version": "5.1.1", + "dev": true, + "license": "MIT", + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "../../node_modules/exit": { + "version": "0.1.2", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "../../node_modules/expand-tilde": { + "version": "2.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "homedir-polyfill": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/expect": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/expect-utils": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/extend": { + "version": "3.0.2", + "dev": true, + "license": "MIT" + }, + "../../node_modules/external-editor": { + "version": "3.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + }, + "engines": { + "node": ">=4" + } + }, + "../../node_modules/external-editor/node_modules/iconv-lite": { + "version": "0.4.24", + "dev": true, + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/fast-deep-equal": { + "version": "3.1.3", + "dev": true, + "license": "MIT" + }, + "../../node_modules/fast-diff": { + "version": "1.3.0", + "dev": true, + "license": "Apache-2.0" + }, + "../../node_modules/fast-glob": { + "version": "3.3.2", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "../../node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "../../node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "dev": true, + "license": "MIT" + }, + "../../node_modules/fast-levenshtein": { + "version": "2.0.6", + "dev": true, + "license": "MIT" + }, + "../../node_modules/fast-redact": { + "version": "3.5.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "../../node_modules/fast-safe-stringify": { + "version": "2.1.1", + "dev": true, + "license": "MIT" + }, + "../../node_modules/fast-uri": { + "version": "3.0.1", + "dev": true, + "license": "MIT" + }, + "../../node_modules/fast-xml-parser": { + "version": "4.5.0", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + }, + { + "type": "paypal", + "url": "https://paypal.me/naturalintelligence" + } + ], + "license": "MIT", + "dependencies": { + "strnum": "^1.0.5" + }, + "bin": { + "fxparser": "src/cli/cli.js" + } + }, + "../../node_modules/fastestsmallesttextencoderdecoder": { + "version": "1.0.22", + "dev": true, + "license": "CC0-1.0" + }, + "../../node_modules/fastq": { + "version": "1.17.1", + "dev": true, + "license": "ISC", + "dependencies": { + "reusify": "^1.0.4" + } + }, + "../../node_modules/fb-watchman": { + "version": "2.0.2", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "bser": "2.1.1" + } + }, + "../../node_modules/figures": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "escape-string-regexp": "^1.0.5" + }, + "engines": { + "node": ">=4" + } + }, + "../../node_modules/figures/node_modules/escape-string-regexp": { + "version": "1.0.5", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "../../node_modules/file-entry-cache": { + "version": "6.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "../../node_modules/file-type": { + "version": "3.9.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/filelist": { + "version": "1.0.4", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "minimatch": "^5.0.1" + } + }, + "../../node_modules/filelist/node_modules/brace-expansion": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "../../node_modules/filelist/node_modules/minimatch": { + "version": "5.1.6", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "../../node_modules/fill-range": { + "version": "7.1.1", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/find-cache-dir": { + "version": "3.3.2", + "dev": true, + "license": "MIT", + "dependencies": { + "commondir": "^1.0.1", + "make-dir": "^3.0.2", + "pkg-dir": "^4.1.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/avajs/find-cache-dir?sponsor=1" + } + }, + "../../node_modules/find-up": { + "version": "5.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/findup-sync": { + "version": "5.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "detect-file": "^1.0.0", + "is-glob": "^4.0.3", + "micromatch": "^4.0.4", + "resolve-dir": "^1.0.1" + }, + "engines": { + "node": ">= 10.13.0" + } + }, + "../../node_modules/fined": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "expand-tilde": "^2.0.2", + "is-plain-object": "^5.0.0", + "object.defaults": "^1.1.0", + "object.pick": "^1.3.0", + "parse-filepath": "^1.0.2" + }, + "engines": { + "node": ">= 10.13.0" + } + }, + "../../node_modules/flagged-respawn": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10.13.0" + } + }, + "../../node_modules/flat-cache": { + "version": "3.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.3", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "../../node_modules/flatstr": { + "version": "1.0.12", + "dev": true, + "license": "MIT" + }, + "../../node_modules/flatted": { + "version": "3.3.1", + "dev": true, + "license": "ISC" + }, + "../../node_modules/fnv-plus": { + "version": "1.3.1", + "dev": true, + "license": "MIT" + }, + "../../node_modules/for-in": { + "version": "1.0.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/for-own": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "for-in": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/foreach": { + "version": "2.0.6", + "dev": true, + "license": "MIT" + }, + "../../node_modules/foreground-child": { + "version": "2.0.0", + "dev": true, + "license": "ISC", + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "../../node_modules/format-util": { + "version": "1.0.5", + "dev": true, + "license": "MIT" + }, + "../../node_modules/fp-ts": { + "version": "2.16.9", + "dev": true, + "license": "MIT" + }, + "../../node_modules/fromentries": { + "version": "1.3.2", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "../../node_modules/fs.realpath": { + "version": "1.0.0", + "dev": true, + "license": "ISC" + }, + "../../node_modules/fsevents": { + "version": "2.3.3", + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "../../node_modules/function-bind": { + "version": "1.1.2", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../../node_modules/gensync": { + "version": "1.0.0-beta.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "../../node_modules/get-caller-file": { + "version": "2.0.5", + "dev": true, + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "../../node_modules/get-east-asian-width": { + "version": "1.2.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/get-intrinsic": { + "version": "1.2.4", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../../node_modules/get-package-type": { + "version": "0.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.0.0" + } + }, + "../../node_modules/get-stream": { + "version": "6.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/glob-parent": { + "version": "6.0.2", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "../../node_modules/global-modules": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "global-prefix": "^1.0.1", + "is-windows": "^1.0.1", + "resolve-dir": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/global-prefix": { + "version": "1.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "expand-tilde": "^2.0.2", + "homedir-polyfill": "^1.0.1", + "ini": "^1.3.4", + "is-windows": "^1.0.1", + "which": "^1.2.14" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/global-prefix/node_modules/which": { + "version": "1.3.1", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, + "../../node_modules/globals": { + "version": "13.24.0", + "dev": true, + "license": "MIT", + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/globby": { + "version": "13.2.2", + "dev": true, + "license": "MIT", + "dependencies": { + "dir-glob": "^3.0.1", + "fast-glob": "^3.3.0", + "ignore": "^5.2.4", + "merge2": "^1.4.1", + "slash": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/globby/node_modules/slash": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/gopd": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../../node_modules/graceful-fs": { + "version": "4.2.11", + "dev": true, + "license": "ISC" + }, + "../../node_modules/graphemer": { + "version": "1.4.0", + "dev": true, + "license": "MIT" + }, + "../../node_modules/handlebars": { + "version": "4.7.8", + "dev": true, + "license": "MIT", + "dependencies": { + "minimist": "^1.2.5", + "neo-async": "^2.6.2", + "source-map": "^0.6.1", + "wordwrap": "^1.0.0" + }, + "bin": { + "handlebars": "bin/handlebars" + }, + "engines": { + "node": ">=0.4.7" + }, + "optionalDependencies": { + "uglify-js": "^3.1.4" + } + }, + "../../node_modules/handler-agent": { + "version": "0.2.0", + "dev": true, + "license": "MIT" + }, + "../../node_modules/has-flag": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../../node_modules/has-property-descriptors": { + "version": "1.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../../node_modules/has-proto": { + "version": "1.0.3", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../../node_modules/has-symbols": { + "version": "1.0.3", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../../node_modules/hasha": { + "version": "5.2.2", + "dev": true, + "license": "MIT", + "dependencies": { + "is-stream": "^2.0.0", + "type-fest": "^0.8.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/hasha/node_modules/type-fest": { + "version": "0.8.1", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=8" + } + }, + "../../node_modules/hasown": { + "version": "2.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "../../node_modules/header-case": { + "version": "2.0.4", + "dev": true, + "license": "MIT", + "dependencies": { + "capital-case": "^1.0.4", + "tslib": "^2.0.3" + } + }, + "../../node_modules/homedir-polyfill": { + "version": "1.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "parse-passwd": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/html-escaper": { + "version": "2.0.2", + "dev": true, + "license": "MIT" + }, + "../../node_modules/http-proxy-agent": { + "version": "5.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@tootallnate/once": "2", + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "../../node_modules/http-reasons": { + "version": "0.1.0", + "dev": true, + "license": "Apache-2.0" + }, + "../../node_modules/https-proxy-agent": { + "version": "5.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "../../node_modules/human-signals": { + "version": "2.1.0", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=10.17.0" + } + }, + "../../node_modules/iconv-lite": { + "version": "0.6.3", + "dev": true, + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/ieee754": { + "version": "1.2.1", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "BSD-3-Clause" + }, + "../../node_modules/ignore": { + "version": "5.3.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "../../node_modules/import-fresh": { + "version": "3.3.0", + "dev": true, + "license": "MIT", + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/import-local": { + "version": "3.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "pkg-dir": "^4.2.0", + "resolve-cwd": "^3.0.0" + }, + "bin": { + "import-local-fixture": "fixtures/cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/imurmurhash": { + "version": "0.1.4", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "../../node_modules/indent-string": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../../node_modules/inflight": { + "version": "1.0.6", + "dev": true, + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "../../node_modules/inherits": { + "version": "2.0.4", + "dev": true, + "license": "ISC" + }, + "../../node_modules/ini": { + "version": "1.3.8", + "dev": true, + "license": "ISC" + }, + "../../node_modules/inquirer": { + "version": "9.3.5", + "dev": true, + "license": "MIT", + "dependencies": { + "@inquirer/figures": "^1.0.3", + "ansi-escapes": "^4.3.2", + "cli-width": "^4.1.0", + "external-editor": "^3.1.0", + "mute-stream": "1.0.0", + "ora": "^5.4.1", + "run-async": "^3.0.0", + "rxjs": "^7.8.1", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^6.2.0", + "yoctocolors-cjs": "^2.1.2" + }, + "engines": { + "node": ">=18" + } + }, + "../../node_modules/inquirer/node_modules/cli-cursor": { + "version": "3.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "restore-cursor": "^3.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/inquirer/node_modules/is-interactive": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../../node_modules/inquirer/node_modules/is-unicode-supported": { + "version": "0.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/inquirer/node_modules/log-symbols": { + "version": "4.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/inquirer/node_modules/ora": { + "version": "5.4.1", + "dev": true, + "license": "MIT", + "dependencies": { + "bl": "^4.1.0", + "chalk": "^4.1.0", + "cli-cursor": "^3.1.0", + "cli-spinners": "^2.5.0", + "is-interactive": "^1.0.0", + "is-unicode-supported": "^0.1.0", + "log-symbols": "^4.1.0", + "strip-ansi": "^6.0.0", + "wcwidth": "^1.0.1" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/inquirer/node_modules/restore-cursor": { + "version": "3.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/inquirer/node_modules/wrap-ansi": { + "version": "6.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/interpret": { + "version": "3.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10.13.0" + } + }, + "../../node_modules/io-ts": { + "version": "2.2.21", + "dev": true, + "license": "MIT", + "peerDependencies": { + "fp-ts": "^2.5.0" + } + }, + "../../node_modules/is-absolute": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "is-relative": "^1.0.0", + "is-windows": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/is-arrayish": { + "version": "0.2.1", + "dev": true, + "license": "MIT" + }, + "../../node_modules/is-binary-path": { + "version": "2.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/is-core-module": { + "version": "2.15.1", + "dev": true, + "license": "MIT", + "dependencies": { + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../../node_modules/is-extglob": { + "version": "2.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../../node_modules/is-generator-fn": { + "version": "2.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "../../node_modules/is-glob": { + "version": "4.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/is-interactive": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/is-number": { + "version": "7.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "../../node_modules/is-path-cwd": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/is-path-inside": { + "version": "3.0.3", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../../node_modules/is-plain-object": { + "version": "5.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/is-relative": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "is-unc-path": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/is-stream": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/is-typedarray": { + "version": "1.0.0", + "dev": true, + "license": "MIT" + }, + "../../node_modules/is-unc-path": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "unc-path-regex": "^0.1.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/is-unicode-supported": { + "version": "2.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/is-windows": { + "version": "1.0.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/isbinaryfile": { + "version": "5.0.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 18.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/gjtorikian/" + } + }, + "../../node_modules/isexe": { + "version": "2.0.0", + "dev": true, + "license": "ISC" + }, + "../../node_modules/isobject": { + "version": "3.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/isomorphic-fetch": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "node-fetch": "^2.6.1", + "whatwg-fetch": "^3.4.1" + } + }, + "../../node_modules/istanbul-lib-coverage": { + "version": "3.2.2", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=8" + } + }, + "../../node_modules/istanbul-lib-hook": { + "version": "3.0.0", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "append-transform": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/istanbul-lib-instrument": { + "version": "4.0.3", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@babel/core": "^7.7.5", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.0.0", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/istanbul-lib-processinfo": { + "version": "2.0.3", + "dev": true, + "license": "ISC", + "dependencies": { + "archy": "^1.0.0", + "cross-spawn": "^7.0.3", + "istanbul-lib-coverage": "^3.2.0", + "p-map": "^3.0.0", + "rimraf": "^3.0.0", + "uuid": "^8.3.2" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/istanbul-lib-processinfo/node_modules/uuid": { + "version": "8.3.2", + "dev": true, + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "../../node_modules/istanbul-lib-report": { + "version": "3.0.1", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^4.0.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "../../node_modules/istanbul-lib-report/node_modules/make-dir": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "semver": "^7.5.3" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/istanbul-lib-report/node_modules/semver": { + "version": "7.6.3", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "../../node_modules/istanbul-lib-source-maps": { + "version": "4.0.1", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0", + "source-map": "^0.6.1" + }, + "engines": { + "node": ">=10" + } + }, + "../../node_modules/istanbul-reports": { + "version": "3.1.7", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/jake": { + "version": "10.9.2", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "async": "^3.2.3", + "chalk": "^4.0.2", + "filelist": "^1.0.4", + "minimatch": "^3.1.2" + }, + "bin": { + "jake": "bin/cli.js" + }, + "engines": { + "node": ">=10" + } + }, + "../../node_modules/jest": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/core": "^29.7.0", + "@jest/types": "^29.6.3", + "import-local": "^3.0.2", + "jest-cli": "^29.7.0" + }, + "bin": { + "jest": "bin/jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "../../node_modules/jest-changed-files": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "execa": "^5.0.0", + "jest-util": "^29.7.0", + "p-limit": "^3.1.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/jest-circus": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "co": "^4.6.0", + "dedent": "^1.0.0", + "is-generator-fn": "^2.0.0", + "jest-each": "^29.7.0", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "p-limit": "^3.1.0", + "pretty-format": "^29.7.0", + "pure-rand": "^6.0.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/jest-cli": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/core": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "create-jest": "^29.7.0", + "exit": "^0.1.2", + "import-local": "^3.0.2", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "yargs": "^17.3.1" + }, + "bin": { + "jest": "bin/jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "../../node_modules/jest-cli/node_modules/cliui": { + "version": "8.0.1", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "../../node_modules/jest-cli/node_modules/yargs": { + "version": "17.7.2", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "../../node_modules/jest-cli/node_modules/yargs-parser": { + "version": "21.1.1", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "../../node_modules/jest-config": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.11.6", + "@jest/test-sequencer": "^29.7.0", + "@jest/types": "^29.6.3", + "babel-jest": "^29.7.0", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "deepmerge": "^4.2.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-circus": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "micromatch": "^4.0.4", + "parse-json": "^5.2.0", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@types/node": "*", + "ts-node": ">=9.0.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "ts-node": { + "optional": true + } + } + }, + "../../node_modules/jest-config/node_modules/glob": { + "version": "7.2.3", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "../../node_modules/jest-diff": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.0.0", + "diff-sequences": "^29.6.3", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/jest-docblock": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "detect-newline": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/jest-each": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "jest-get-type": "^29.6.3", + "jest-util": "^29.7.0", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/jest-environment-node": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/jest-get-type": { + "version": "29.6.3", + "dev": true, + "license": "MIT", + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/jest-haste-map": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "@types/graceful-fs": "^4.1.3", + "@types/node": "*", + "anymatch": "^3.0.3", + "fb-watchman": "^2.0.0", + "graceful-fs": "^4.2.9", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", + "micromatch": "^4.0.4", + "walker": "^1.0.8" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "optionalDependencies": { + "fsevents": "^2.3.2" + } + }, + "../../node_modules/jest-leak-detector": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/jest-matcher-utils": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.0.0", + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/jest-message-util": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.12.13", + "@jest/types": "^29.6.3", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/jest-mock": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/jest-pnp-resolver": { + "version": "1.2.3", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + }, + "peerDependencies": { + "jest-resolve": "*" + }, + "peerDependenciesMeta": { + "jest-resolve": { + "optional": true + } + } + }, + "../../node_modules/jest-regex-util": { + "version": "29.6.3", + "dev": true, + "license": "MIT", + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/jest-resolve": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-pnp-resolver": "^1.2.2", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "resolve": "^1.20.0", + "resolve.exports": "^2.0.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/jest-resolve-dependencies": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "jest-regex-util": "^29.6.3", + "jest-snapshot": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/jest-runner": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/console": "^29.7.0", + "@jest/environment": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "emittery": "^0.13.1", + "graceful-fs": "^4.2.9", + "jest-docblock": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-leak-detector": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-resolve": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-util": "^29.7.0", + "jest-watcher": "^29.7.0", + "jest-worker": "^29.7.0", + "p-limit": "^3.1.0", + "source-map-support": "0.5.13" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/jest-runtime": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/globals": "^29.7.0", + "@jest/source-map": "^29.6.3", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "cjs-module-lexer": "^1.0.0", + "collect-v8-coverage": "^1.0.0", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "slash": "^3.0.0", + "strip-bom": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/jest-runtime/node_modules/glob": { + "version": "7.2.3", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "../../node_modules/jest-snapshot": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.11.6", + "@babel/generator": "^7.7.2", + "@babel/plugin-syntax-jsx": "^7.7.2", + "@babel/plugin-syntax-typescript": "^7.7.2", + "@babel/types": "^7.3.3", + "@jest/expect-utils": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "babel-preset-current-node-syntax": "^1.0.0", + "chalk": "^4.0.0", + "expect": "^29.7.0", + "graceful-fs": "^4.2.9", + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "natural-compare": "^1.4.0", + "pretty-format": "^29.7.0", + "semver": "^7.5.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/jest-snapshot/node_modules/semver": { + "version": "7.6.3", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "../../node_modules/jest-util": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/jest-validate": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "camelcase": "^6.2.0", + "chalk": "^4.0.0", + "jest-get-type": "^29.6.3", + "leven": "^3.1.0", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/jest-validate/node_modules/camelcase": { + "version": "6.3.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/jest-watcher": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "emittery": "^0.13.1", + "jest-util": "^29.7.0", + "string-length": "^4.0.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/jest-worker": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*", + "jest-util": "^29.7.0", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/jest-worker/node_modules/supports-color": { + "version": "8.1.1", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "../../node_modules/js-tokens": { + "version": "4.0.0", + "dev": true, + "license": "MIT" + }, + "../../node_modules/js-yaml": { + "version": "3.14.1", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "../../node_modules/jsesc": { + "version": "2.5.2", + "dev": true, + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=4" + } + }, + "../../node_modules/json-buffer": { + "version": "3.0.1", + "dev": true, + "license": "MIT" + }, + "../../node_modules/json-parse-better-errors": { + "version": "1.0.2", + "dev": true, + "license": "MIT" + }, + "../../node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "dev": true, + "license": "MIT" + }, + "../../node_modules/json-pointer": { + "version": "0.6.2", + "dev": true, + "license": "MIT", + "dependencies": { + "foreach": "^2.0.4" + } + }, + "../../node_modules/json-promise": { + "version": "1.1.8", + "dev": true, + "license": "MIT", + "dependencies": { + "bluebird": "*" + } + }, + "../../node_modules/json-schema-compare": { + "version": "0.2.2", + "dev": true, + "license": "MIT", + "dependencies": { + "lodash": "^4.17.4" + } + }, + "../../node_modules/json-schema-faker": { + "version": "0.5.6", + "dev": true, + "license": "MIT", + "dependencies": { + "json-schema-ref-parser": "^6.1.0", + "jsonpath-plus": "^7.2.0" + }, + "bin": { + "jsf": "bin/gen.cjs" + } + }, + "../../node_modules/json-schema-ref-parser": { + "version": "6.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "call-me-maybe": "^1.0.1", + "js-yaml": "^3.12.1", + "ono": "^4.0.11" + } + }, + "../../node_modules/json-schema-traverse": { + "version": "0.4.1", + "dev": true, + "license": "MIT" + }, + "../../node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "dev": true, + "license": "MIT" + }, + "../../node_modules/json-stringify-safe": { + "version": "5.0.1", + "dev": true, + "license": "ISC" + }, + "../../node_modules/json5": { + "version": "2.2.3", + "dev": true, + "license": "MIT", + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "../../node_modules/jsonc-parser": { + "version": "2.2.1", + "dev": true, + "license": "MIT" + }, + "../../node_modules/jsonpath-plus": { + "version": "7.2.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + } + }, + "../../node_modules/keyv": { + "version": "4.5.4", + "dev": true, + "license": "MIT", + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "../../node_modules/kind-of": { + "version": "6.0.3", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/kleur": { + "version": "3.0.3", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "../../node_modules/leven": { + "version": "3.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "../../node_modules/levn": { + "version": "0.4.1", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "../../node_modules/liftoff": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "extend": "^3.0.2", + "findup-sync": "^5.0.0", + "fined": "^2.0.0", + "flagged-respawn": "^2.0.0", + "is-plain-object": "^5.0.0", + "object.map": "^1.0.1", + "rechoir": "^0.8.0", + "resolve": "^1.20.0" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "../../node_modules/lines-and-columns": { + "version": "1.2.4", + "dev": true, + "license": "MIT" + }, + "../../node_modules/liquid-json": { + "version": "0.3.1", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=4" + } + }, + "../../node_modules/load-json-file": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "../../node_modules/load-json-file/node_modules/parse-json": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + }, + "engines": { + "node": ">=4" + } + }, + "../../node_modules/load-json-file/node_modules/strip-bom": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "../../node_modules/locate-path": { + "version": "6.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/lodash": { + "version": "4.17.21", + "dev": true, + "license": "MIT" + }, + "../../node_modules/lodash.camelcase": { + "version": "4.3.0", + "dev": true, + "license": "MIT" + }, + "../../node_modules/lodash.flattendeep": { + "version": "4.4.0", + "dev": true, + "license": "MIT" + }, + "../../node_modules/lodash.get": { + "version": "4.4.2", + "dev": true, + "license": "MIT" + }, + "../../node_modules/lodash.memoize": { + "version": "4.1.2", + "dev": true, + "license": "MIT" + }, + "../../node_modules/lodash.merge": { + "version": "4.6.2", + "dev": true, + "license": "MIT" + }, + "../../node_modules/log-symbols": { + "version": "6.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^5.3.0", + "is-unicode-supported": "^1.3.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/log-symbols/node_modules/chalk": { + "version": "5.3.0", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "../../node_modules/log-symbols/node_modules/is-unicode-supported": { + "version": "1.3.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/lower-case": { + "version": "2.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "tslib": "^2.0.3" + } + }, + "../../node_modules/lru-cache": { + "version": "5.1.1", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^3.0.2" + } + }, + "../../node_modules/make-dir": { + "version": "3.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "semver": "^6.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/make-error": { + "version": "1.3.6", + "dev": true, + "license": "ISC" + }, + "../../node_modules/make-iterator": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "kind-of": "^6.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/makeerror": { + "version": "1.0.12", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "tmpl": "1.0.5" + } + }, + "../../node_modules/map-cache": { + "version": "0.2.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/media-typer": { + "version": "0.3.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "../../node_modules/merge-stream": { + "version": "2.0.0", + "dev": true, + "license": "MIT" + }, + "../../node_modules/merge2": { + "version": "1.4.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "../../node_modules/micri": { + "version": "4.5.1", + "dev": true, + "license": "MIT", + "dependencies": { + "handler-agent": "0.2.0" + }, + "engines": { + "node": ">= 12.0.0" + } + }, + "../../node_modules/micromatch": { + "version": "4.0.8", + "dev": true, + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "../../node_modules/mime-db": { + "version": "1.52.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "../../node_modules/mime-format": { + "version": "2.0.1", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "charset": "^1.0.0" + } + }, + "../../node_modules/mime-types": { + "version": "2.1.35", + "dev": true, + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "../../node_modules/mimic-fn": { + "version": "2.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "../../node_modules/mimic-function": { + "version": "5.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/minimatch": { + "version": "3.1.2", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "../../node_modules/minimist": { + "version": "1.2.6", + "dev": true, + "license": "MIT" + }, + "../../node_modules/mkdirp": { + "version": "0.5.6", + "dev": true, + "license": "MIT", + "dependencies": { + "minimist": "^1.2.6" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "../../node_modules/ms": { + "version": "2.1.2", + "dev": true, + "license": "MIT" + }, + "../../node_modules/mute-stream": { + "version": "1.0.0", + "dev": true, + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "../../node_modules/natural-compare": { + "version": "1.4.0", + "dev": true, + "license": "MIT" + }, + "../../node_modules/negotiator": { + "version": "0.6.3", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "../../node_modules/neo-async": { + "version": "2.6.2", + "dev": true, + "license": "MIT" + }, + "../../node_modules/no-case": { + "version": "3.0.4", + "dev": true, + "license": "MIT", + "dependencies": { + "lower-case": "^2.0.2", + "tslib": "^2.0.3" + } + }, + "../../node_modules/nock": { + "version": "13.5.5", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^4.1.0", + "json-stringify-safe": "^5.0.1", + "propagate": "^2.0.0" + }, + "engines": { + "node": ">= 10.13" + } + }, + "../../node_modules/node-abort-controller": { + "version": "3.1.1", + "dev": true, + "license": "MIT" + }, + "../../node_modules/node-fetch": { + "version": "2.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "../../node_modules/node-int64": { + "version": "0.4.0", + "dev": true, + "license": "MIT" + }, + "../../node_modules/node-plop": { + "version": "0.32.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/inquirer": "^9.0.3", + "change-case": "^4.1.2", + "del": "^7.1.0", + "globby": "^13.2.2", + "handlebars": "^4.7.8", + "inquirer": "^9.2.10", + "isbinaryfile": "^5.0.0", + "lodash.get": "^4.4.2", + "lower-case": "^2.0.2", + "mkdirp": "^3.0.1", + "resolve": "^1.22.4", + "title-case": "^3.0.3", + "upper-case": "^2.0.2" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + } + }, + "../../node_modules/node-plop/node_modules/mkdirp": { + "version": "3.0.1", + "dev": true, + "license": "MIT", + "bin": { + "mkdirp": "dist/cjs/src/bin.js" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "../../node_modules/node-preload": { + "version": "0.2.1", + "dev": true, + "license": "MIT", + "dependencies": { + "process-on-spawn": "^1.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/node-releases": { + "version": "2.0.18", + "dev": true, + "license": "MIT" + }, + "../../node_modules/normalize-path": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/npm-run-path": { + "version": "4.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/nyc": { + "version": "15.1.0", + "dev": true, + "license": "ISC", + "dependencies": { + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.2", + "caching-transform": "^4.0.0", + "convert-source-map": "^1.7.0", + "decamelize": "^1.2.0", + "find-cache-dir": "^3.2.0", + "find-up": "^4.1.0", + "foreground-child": "^2.0.0", + "get-package-type": "^0.1.0", + "glob": "^7.1.6", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-hook": "^3.0.0", + "istanbul-lib-instrument": "^4.0.0", + "istanbul-lib-processinfo": "^2.0.2", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.0.2", + "make-dir": "^3.0.0", + "node-preload": "^0.2.1", + "p-map": "^3.0.0", + "process-on-spawn": "^1.0.0", + "resolve-from": "^5.0.0", + "rimraf": "^3.0.0", + "signal-exit": "^3.0.2", + "spawn-wrap": "^2.0.0", + "test-exclude": "^6.0.0", + "yargs": "^15.0.2" + }, + "bin": { + "nyc": "bin/nyc.js" + }, + "engines": { + "node": ">=8.9" + } + }, + "../../node_modules/nyc/node_modules/cliui": { + "version": "6.0.0", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" + } + }, + "../../node_modules/nyc/node_modules/find-up": { + "version": "4.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/nyc/node_modules/glob": { + "version": "7.2.3", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "../../node_modules/nyc/node_modules/locate-path": { + "version": "5.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/nyc/node_modules/p-limit": { + "version": "2.3.0", + "dev": true, + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/nyc/node_modules/p-locate": { + "version": "4.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/nyc/node_modules/resolve-from": { + "version": "5.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../../node_modules/nyc/node_modules/wrap-ansi": { + "version": "6.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/nyc/node_modules/y18n": { + "version": "4.0.3", + "dev": true, + "license": "ISC" + }, + "../../node_modules/nyc/node_modules/yargs": { + "version": "15.4.1", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.2" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/nyc/node_modules/yargs-parser": { + "version": "18.1.3", + "dev": true, + "license": "ISC", + "dependencies": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + }, + "engines": { + "node": ">=6" + } + }, + "../../node_modules/object-inspect": { + "version": "1.13.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../../node_modules/object.defaults": { + "version": "1.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "array-each": "^1.0.1", + "array-slice": "^1.0.0", + "for-own": "^1.0.0", + "isobject": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/object.map": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "for-own": "^1.0.0", + "make-iterator": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/object.pick": { + "version": "1.3.0", + "dev": true, + "license": "MIT", + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/once": { + "version": "1.4.0", + "dev": true, + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "../../node_modules/onetime": { + "version": "5.1.2", + "dev": true, + "license": "MIT", + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/ono": { + "version": "4.0.11", + "dev": true, + "license": "MIT", + "dependencies": { + "format-util": "^1.0.3" + } + }, + "../../node_modules/openapi3-ts": { + "version": "2.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "yaml": "^1.10.2" + } + }, + "../../node_modules/optionator": { + "version": "0.9.4", + "dev": true, + "license": "MIT", + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "../../node_modules/ora": { + "version": "8.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^5.3.0", + "cli-cursor": "^5.0.0", + "cli-spinners": "^2.9.2", + "is-interactive": "^2.0.0", + "is-unicode-supported": "^2.0.0", + "log-symbols": "^6.0.0", + "stdin-discarder": "^0.2.2", + "string-width": "^7.2.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/ora/node_modules/ansi-regex": { + "version": "6.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "../../node_modules/ora/node_modules/chalk": { + "version": "5.3.0", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "../../node_modules/ora/node_modules/emoji-regex": { + "version": "10.4.0", + "dev": true, + "license": "MIT" + }, + "../../node_modules/ora/node_modules/string-width": { + "version": "7.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/ora/node_modules/strip-ansi": { + "version": "7.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "../../node_modules/os-tmpdir": { + "version": "1.0.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/p-limit": { + "version": "3.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/p-locate": { + "version": "5.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/p-map": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "aggregate-error": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/p-try": { + "version": "2.2.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "../../node_modules/package-hash": { + "version": "4.0.0", + "dev": true, + "license": "ISC", + "dependencies": { + "graceful-fs": "^4.1.15", + "hasha": "^5.0.0", + "lodash.flattendeep": "^4.4.0", + "release-zalgo": "^1.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/param-case": { + "version": "3.0.4", + "dev": true, + "license": "MIT", + "dependencies": { + "dot-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, + "../../node_modules/parent-module": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "../../node_modules/parse-filepath": { + "version": "1.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "is-absolute": "^1.0.0", + "map-cache": "^0.2.0", + "path-root": "^0.1.1" + }, + "engines": { + "node": ">=0.8" + } + }, + "../../node_modules/parse-json": { + "version": "5.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/parse-multipart-data": { + "version": "1.5.0", + "dev": true, + "license": "MIT" + }, + "../../node_modules/parse-passwd": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/parse-prefer-header": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "lodash.camelcase": "^4.3.0" + } + }, + "../../node_modules/pascal-case": { + "version": "3.1.2", + "dev": true, + "license": "MIT", + "dependencies": { + "no-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, + "../../node_modules/path-case": { + "version": "3.0.4", + "dev": true, + "license": "MIT", + "dependencies": { + "dot-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, + "../../node_modules/path-exists": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../../node_modules/path-is-absolute": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/path-key": { + "version": "3.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../../node_modules/path-parse": { + "version": "1.0.7", + "dev": true, + "license": "MIT" + }, + "../../node_modules/path-root": { + "version": "0.1.1", + "dev": true, + "license": "MIT", + "dependencies": { + "path-root-regex": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/path-root-regex": { + "version": "0.1.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/path-type": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../../node_modules/picocolors": { + "version": "1.0.1", + "dev": true, + "license": "ISC" + }, + "../../node_modules/picomatch": { + "version": "2.3.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "../../node_modules/pify": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "../../node_modules/pino": { + "version": "6.14.0", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-redact": "^3.0.0", + "fast-safe-stringify": "^2.0.8", + "flatstr": "^1.0.12", + "pino-std-serializers": "^3.1.0", + "process-warning": "^1.0.0", + "quick-format-unescaped": "^4.0.3", + "sonic-boom": "^1.0.2" + }, + "bin": { + "pino": "bin.js" + } + }, + "../../node_modules/pino-std-serializers": { + "version": "3.2.0", + "dev": true, + "license": "MIT" + }, + "../../node_modules/pirates": { + "version": "4.0.6", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "../../node_modules/pkg-conf": { + "version": "2.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "find-up": "^2.0.0", + "load-json-file": "^4.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "../../node_modules/pkg-conf/node_modules/find-up": { + "version": "2.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "../../node_modules/pkg-conf/node_modules/locate-path": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "../../node_modules/pkg-conf/node_modules/p-limit": { + "version": "1.3.0", + "dev": true, + "license": "MIT", + "dependencies": { + "p-try": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "../../node_modules/pkg-conf/node_modules/p-locate": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^1.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "../../node_modules/pkg-conf/node_modules/p-try": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "../../node_modules/pkg-conf/node_modules/path-exists": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "../../node_modules/pkg-dir": { + "version": "4.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "find-up": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/pkg-dir/node_modules/find-up": { + "version": "4.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/pkg-dir/node_modules/locate-path": { + "version": "5.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/pkg-dir/node_modules/p-limit": { + "version": "2.3.0", + "dev": true, + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/pkg-dir/node_modules/p-locate": { + "version": "4.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/plop": { + "version": "4.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/liftoff": "^4.0.3", + "chalk": "^5.3.0", + "interpret": "^3.1.1", + "liftoff": "^4.0.0", + "minimist": "^1.2.8", + "node-plop": "^0.32.0", + "ora": "^8.0.0", + "v8flags": "^4.0.1" + }, + "bin": { + "plop": "bin/plop.js" + }, + "engines": { + "node": ">=18" + } + }, + "../../node_modules/plop/node_modules/chalk": { + "version": "5.3.0", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "../../node_modules/plop/node_modules/minimist": { + "version": "1.2.8", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../../node_modules/postman-collection": { + "version": "4.5.0", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@faker-js/faker": "5.5.3", + "file-type": "3.9.0", + "http-reasons": "0.1.0", + "iconv-lite": "0.6.3", + "liquid-json": "0.3.1", + "lodash": "4.17.21", + "mime-format": "2.0.1", + "mime-types": "2.1.35", + "postman-url-encoder": "3.0.5", + "semver": "7.6.3", + "uuid": "8.3.2" + }, + "engines": { + "node": ">=10" + } + }, + "../../node_modules/postman-collection/node_modules/@faker-js/faker": { + "version": "5.5.3", + "dev": true, + "license": "MIT" + }, + "../../node_modules/postman-collection/node_modules/semver": { + "version": "7.6.3", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "../../node_modules/postman-collection/node_modules/uuid": { + "version": "8.3.2", + "dev": true, + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "../../node_modules/postman-url-encoder": { + "version": "3.0.5", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "punycode": "^2.1.1" + }, + "engines": { + "node": ">=10" + } + }, + "../../node_modules/prelude-ls": { + "version": "1.2.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8.0" + } + }, + "../../node_modules/prettier": { + "version": "3.3.3", + "dev": true, + "license": "MIT", + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "../../node_modules/prettier-linter-helpers": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-diff": "^1.1.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "../../node_modules/pretty-data": { + "version": "0.40.0", + "dev": true, + "license": "MIT" + }, + "../../node_modules/pretty-format": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/schemas": "^29.6.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "../../node_modules/process-on-spawn": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "fromentries": "^1.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/process-warning": { + "version": "1.0.0", + "dev": true, + "license": "MIT" + }, + "../../node_modules/prompts": { + "version": "2.4.2", + "dev": true, + "license": "MIT", + "dependencies": { + "kleur": "^3.0.3", + "sisteransi": "^1.0.5" + }, + "engines": { + "node": ">= 6" + } + }, + "../../node_modules/propagate": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "../../node_modules/punycode": { + "version": "2.3.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "../../node_modules/pure-rand": { + "version": "6.1.0", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/dubzzz" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fast-check" + } + ], + "license": "MIT" + }, + "../../node_modules/qs": { + "version": "6.13.0", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "side-channel": "^1.0.6" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../../node_modules/queue-microtask": { + "version": "1.2.3", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "../../node_modules/quick-format-unescaped": { + "version": "4.0.4", + "dev": true, + "license": "MIT" + }, + "../../node_modules/react-is": { + "version": "18.3.1", + "dev": true, + "license": "MIT" + }, + "../../node_modules/readable-stream": { + "version": "3.6.2", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "../../node_modules/readdirp": { + "version": "3.6.0", + "dev": true, + "license": "MIT", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "../../node_modules/rechoir": { + "version": "0.8.0", + "dev": true, + "license": "MIT", + "dependencies": { + "resolve": "^1.20.0" + }, + "engines": { + "node": ">= 10.13.0" + } + }, + "../../node_modules/release-zalgo": { + "version": "1.0.0", + "dev": true, + "license": "ISC", + "dependencies": { + "es6-error": "^4.0.1" + }, + "engines": { + "node": ">=4" + } + }, + "../../node_modules/require-directory": { + "version": "2.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/require-from-string": { + "version": "2.0.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/require-main-filename": { + "version": "2.0.0", + "dev": true, + "license": "ISC" + }, + "../../node_modules/resolve": { + "version": "1.22.8", + "dev": true, + "license": "MIT", + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../../node_modules/resolve-cwd": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/resolve-cwd/node_modules/resolve-from": { + "version": "5.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../../node_modules/resolve-dir": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "expand-tilde": "^2.0.0", + "global-modules": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/resolve-from": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "../../node_modules/resolve.exports": { + "version": "2.0.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "../../node_modules/restore-cursor": { + "version": "5.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "onetime": "^7.0.0", + "signal-exit": "^4.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/restore-cursor/node_modules/onetime": { + "version": "7.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "mimic-function": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/restore-cursor/node_modules/signal-exit": { + "version": "4.1.0", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "../../node_modules/reusify": { + "version": "1.0.4", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "../../node_modules/rimraf": { + "version": "3.0.2", + "dev": true, + "license": "ISC", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "../../node_modules/rimraf/node_modules/glob": { + "version": "7.2.3", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "../../node_modules/run-async": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "../../node_modules/run-parallel": { + "version": "1.2.0", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "../../node_modules/rxjs": { + "version": "7.8.1", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + } + }, + "../../node_modules/safe-buffer": { + "version": "5.2.1", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "../../node_modules/safe-stable-stringify": { + "version": "1.1.1", + "dev": true, + "license": "MIT" + }, + "../../node_modules/safer-buffer": { + "version": "2.1.2", + "dev": true, + "license": "MIT" + }, + "../../node_modules/semver": { + "version": "6.3.1", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "../../node_modules/sentence-case": { + "version": "3.0.4", + "dev": true, + "license": "MIT", + "dependencies": { + "no-case": "^3.0.4", + "tslib": "^2.0.3", + "upper-case-first": "^2.0.2" + } + }, + "../../node_modules/set-blocking": { + "version": "2.0.0", + "dev": true, + "license": "ISC" + }, + "../../node_modules/set-function-length": { + "version": "1.2.2", + "dev": true, + "license": "MIT", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "../../node_modules/shebang-command": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/shebang-regex": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../../node_modules/side-channel": { + "version": "1.0.6", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../../node_modules/signal-exit": { + "version": "3.0.7", + "dev": true, + "license": "ISC" + }, + "../../node_modules/signale": { + "version": "1.4.0", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^2.3.2", + "figures": "^2.0.0", + "pkg-conf": "^2.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "../../node_modules/signale/node_modules/ansi-styles": { + "version": "3.2.1", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "../../node_modules/signale/node_modules/chalk": { + "version": "2.4.2", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "../../node_modules/signale/node_modules/color-convert": { + "version": "1.9.3", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "1.1.3" + } + }, + "../../node_modules/signale/node_modules/color-name": { + "version": "1.1.3", + "dev": true, + "license": "MIT" + }, + "../../node_modules/signale/node_modules/escape-string-regexp": { + "version": "1.0.5", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "../../node_modules/signale/node_modules/has-flag": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "../../node_modules/signale/node_modules/supports-color": { + "version": "5.5.0", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "../../node_modules/sisteransi": { + "version": "1.0.5", + "dev": true, + "license": "MIT" + }, + "../../node_modules/slash": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../../node_modules/snake-case": { + "version": "3.0.4", + "dev": true, + "license": "MIT", + "dependencies": { + "dot-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, + "../../node_modules/sonic-boom": { + "version": "1.4.1", + "dev": true, + "license": "MIT", + "dependencies": { + "atomic-sleep": "^1.0.0", + "flatstr": "^1.0.12" + } + }, + "../../node_modules/source-map": { + "version": "0.6.1", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/source-map-support": { + "version": "0.5.13", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "../../node_modules/spawn-wrap": { + "version": "2.0.0", + "dev": true, + "license": "ISC", + "dependencies": { + "foreground-child": "^2.0.0", + "is-windows": "^1.0.2", + "make-dir": "^3.0.0", + "rimraf": "^3.0.0", + "signal-exit": "^3.0.2", + "which": "^2.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/split2": { + "version": "3.2.2", + "dev": true, + "license": "ISC", + "dependencies": { + "readable-stream": "^3.0.0" + } + }, + "../../node_modules/sprintf-js": { + "version": "1.0.3", + "dev": true, + "license": "BSD-3-Clause" + }, + "../../node_modules/stack-utils": { + "version": "2.0.6", + "dev": true, + "license": "MIT", + "dependencies": { + "escape-string-regexp": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "../../node_modules/stack-utils/node_modules/escape-string-regexp": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../../node_modules/stdin-discarder": { + "version": "0.2.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/string_decoder": { + "version": "1.3.0", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "../../node_modules/string-length": { + "version": "4.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "char-regex": "^1.0.2", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "../../node_modules/string-width": { + "version": "4.2.3", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/strip-ansi": { + "version": "6.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/strip-bom": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../../node_modules/strip-final-newline": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "../../node_modules/strip-json-comments": { + "version": "3.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/strnum": { + "version": "1.0.5", + "dev": true, + "license": "MIT" + }, + "../../node_modules/supports-color": { + "version": "7.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../../node_modules/synckit": { + "version": "0.9.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@pkgr/core": "^0.1.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts" + } + }, + "../../node_modules/test-exclude": { + "version": "6.0.0", + "dev": true, + "license": "ISC", + "dependencies": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/test-exclude/node_modules/glob": { + "version": "7.2.3", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "../../node_modules/text-table": { + "version": "0.2.0", + "dev": true, + "license": "MIT" + }, + "../../node_modules/title-case": { + "version": "3.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "tslib": "^2.0.3" + } + }, + "../../node_modules/tmp": { + "version": "0.0.33", + "dev": true, + "license": "MIT", + "dependencies": { + "os-tmpdir": "~1.0.2" + }, + "engines": { + "node": ">=0.6.0" + } + }, + "../../node_modules/tmpl": { + "version": "1.0.5", + "dev": true, + "license": "BSD-3-Clause" + }, + "../../node_modules/to-fast-properties": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "../../node_modules/to-regex-range": { + "version": "5.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "../../node_modules/tr46": { + "version": "0.0.3", + "dev": true, + "license": "MIT" + }, + "../../node_modules/ts-api-utils": { + "version": "1.3.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "typescript": ">=4.2.0" + } + }, + "../../node_modules/ts-jest": { + "version": "29.2.5", + "dev": true, + "license": "MIT", + "dependencies": { + "bs-logger": "^0.2.6", + "ejs": "^3.1.10", + "fast-json-stable-stringify": "^2.1.0", + "jest-util": "^29.0.0", + "json5": "^2.2.3", + "lodash.memoize": "^4.1.2", + "make-error": "^1.3.6", + "semver": "^7.6.3", + "yargs-parser": "^21.1.1" + }, + "bin": { + "ts-jest": "cli.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" + }, + "peerDependencies": { + "@babel/core": ">=7.0.0-beta.0 <8", + "@jest/transform": "^29.0.0", + "@jest/types": "^29.0.0", + "babel-jest": "^29.0.0", + "jest": "^29.0.0", + "typescript": ">=4.3 <6" + }, + "peerDependenciesMeta": { + "@babel/core": { + "optional": true + }, + "@jest/transform": { + "optional": true + }, + "@jest/types": { + "optional": true + }, + "babel-jest": { + "optional": true + }, + "esbuild": { + "optional": true + } + } + }, + "../../node_modules/ts-jest/node_modules/semver": { + "version": "7.6.3", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "../../node_modules/ts-jest/node_modules/yargs-parser": { + "version": "21.1.1", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "../../node_modules/ts-node": { + "version": "10.9.2", + "dev": true, + "license": "MIT", + "dependencies": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" + }, + "bin": { + "ts-node": "dist/bin.js", + "ts-node-cwd": "dist/bin-cwd.js", + "ts-node-esm": "dist/bin-esm.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + }, + "peerDependencies": { + "@swc/core": ">=1.2.50", + "@swc/wasm": ">=1.2.50", + "@types/node": "*", + "typescript": ">=2.7" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "@swc/wasm": { + "optional": true + } + } + }, + "../../node_modules/ts-node/node_modules/diff": { + "version": "4.0.2", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.3.1" + } + }, + "../../node_modules/tslib": { + "version": "2.7.0", + "dev": true, + "license": "0BSD" + }, + "../../node_modules/tweetnacl": { + "version": "1.0.3", + "dev": true, + "license": "Unlicense" + }, + "../../node_modules/type-check": { + "version": "0.4.0", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "../../node_modules/type-fest": { + "version": "0.20.2", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/type-is": { + "version": "1.6.18", + "dev": true, + "license": "MIT", + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } + }, + "../../node_modules/typedarray-to-buffer": { + "version": "3.1.5", + "dev": true, + "license": "MIT", + "dependencies": { + "is-typedarray": "^1.0.0" + } + }, + "../../node_modules/typescript": { + "version": "5.6.2", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "../../node_modules/typescript-eslint": { + "version": "8.5.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/eslint-plugin": "8.5.0", + "@typescript-eslint/parser": "8.5.0", + "@typescript-eslint/utils": "8.5.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "../../node_modules/uglify-js": { + "version": "3.19.3", + "dev": true, + "license": "BSD-2-Clause", + "optional": true, + "bin": { + "uglifyjs": "bin/uglifyjs" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "../../node_modules/unc-path-regex": { + "version": "0.1.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/undici-types": { + "version": "6.19.8", + "dev": true, + "license": "MIT" + }, + "../../node_modules/update-browserslist-db": { + "version": "1.1.0", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "escalade": "^3.1.2", + "picocolors": "^1.0.1" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "../../node_modules/upper-case": { + "version": "2.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "tslib": "^2.0.3" + } + }, + "../../node_modules/upper-case-first": { + "version": "2.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "tslib": "^2.0.3" + } + }, + "../../node_modules/uri-js": { + "version": "4.4.1", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "../../node_modules/uri-template-lite": { + "version": "22.9.0", + "dev": true, + "license": "MIT" + }, + "../../node_modules/urijs": { + "version": "1.19.11", + "dev": true, + "license": "MIT" + }, + "../../node_modules/util-deprecate": { + "version": "1.0.2", + "dev": true, + "license": "MIT" + }, + "../../node_modules/utility-types": { + "version": "3.11.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "../../node_modules/uuid": { + "version": "9.0.1", + "dev": true, + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "../../node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "dev": true, + "license": "MIT" + }, + "../../node_modules/v8-to-istanbul": { + "version": "9.3.0", + "dev": true, + "license": "ISC", + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.12", + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^2.0.0" + }, + "engines": { + "node": ">=10.12.0" + } + }, + "../../node_modules/v8-to-istanbul/node_modules/convert-source-map": { + "version": "2.0.0", + "dev": true, + "license": "MIT" + }, + "../../node_modules/v8flags": { + "version": "4.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10.13.0" + } + }, + "../../node_modules/validate.io-array": { + "version": "1.0.6", + "dev": true, + "license": "MIT" + }, + "../../node_modules/validate.io-function": { + "version": "1.0.2", + "dev": true + }, + "../../node_modules/validate.io-integer": { + "version": "1.0.5", + "dev": true, + "dependencies": { + "validate.io-number": "^1.0.3" + } + }, + "../../node_modules/validate.io-integer-array": { + "version": "1.0.0", + "dev": true, + "dependencies": { + "validate.io-array": "^1.0.3", + "validate.io-integer": "^1.0.4" + } + }, + "../../node_modules/validate.io-number": { + "version": "1.0.3", + "dev": true + }, + "../../node_modules/walker": { + "version": "1.0.8", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "makeerror": "1.0.12" + } + }, + "../../node_modules/wcwidth": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "defaults": "^1.0.3" + } + }, + "../../node_modules/webidl-conversions": { + "version": "3.0.1", + "dev": true, + "license": "BSD-2-Clause" + }, + "../../node_modules/whatwg-fetch": { + "version": "3.6.20", + "dev": true, + "license": "MIT" + }, + "../../node_modules/whatwg-mimetype": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + } + }, + "../../node_modules/whatwg-url": { + "version": "5.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "../../node_modules/which": { + "version": "2.0.2", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "../../node_modules/which-module": { + "version": "2.0.1", + "dev": true, + "license": "ISC" + }, + "../../node_modules/word-wrap": { + "version": "1.2.5", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/wordwrap": { + "version": "1.0.0", + "dev": true, + "license": "MIT" + }, + "../../node_modules/wrap-ansi": { + "version": "7.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "../../node_modules/wrappy": { + "version": "1.0.2", + "dev": true, + "license": "ISC" + }, + "../../node_modules/write-file-atomic": { + "version": "3.0.3", + "dev": true, + "license": "ISC", + "dependencies": { + "imurmurhash": "^0.1.4", + "is-typedarray": "^1.0.0", + "signal-exit": "^3.0.2", + "typedarray-to-buffer": "^3.1.5" + } + }, + "../../node_modules/y18n": { + "version": "5.0.8", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "../../node_modules/yallist": { + "version": "3.1.1", + "dev": true, + "license": "ISC" + }, + "../../node_modules/yaml": { + "version": "1.10.2", + "dev": true, + "license": "ISC", + "engines": { + "node": ">= 6" + } + }, + "../../node_modules/yargs": { + "version": "16.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "../../node_modules/yargs-parser": { + "version": "20.2.9", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "../../node_modules/yn": { + "version": "3.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "../../node_modules/yocto-queue": { + "version": "0.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/yoctocolors-cjs": { + "version": "2.1.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.23.1.tgz", + "integrity": "sha512-6VhYk1diRqrhBAqpJEdjASR/+WVRtfjpqKuNw11cLiaWpAT/Uu+nokB+UJnevzy/P9C/ty6AOe0dwueMrGh/iQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.23.1.tgz", + "integrity": "sha512-uz6/tEy2IFm9RYOyvKl88zdzZfwEfKZmnX9Cj1BHjeSGNuGLuMD1kR8y5bteYmwqKm1tj8m4cb/aKEorr6fHWQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.23.1.tgz", + "integrity": "sha512-xw50ipykXcLstLeWH7WRdQuysJqejuAGPd30vd1i5zSyKK3WE+ijzHmLKxdiCMtH1pHz78rOg0BKSYOSB/2Khw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.23.1.tgz", + "integrity": "sha512-nlN9B69St9BwUoB+jkyU090bru8L0NA3yFvAd7k8dNsVH8bi9a8cUAUSEcEEgTp2z3dbEDGJGfP6VUnkQnlReg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.23.1.tgz", + "integrity": "sha512-YsS2e3Wtgnw7Wq53XXBLcV6JhRsEq8hkfg91ESVadIrzr9wO6jJDMZnCQbHm1Guc5t/CdDiFSSfWP58FNuvT3Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.23.1.tgz", + "integrity": "sha512-aClqdgTDVPSEGgoCS8QDG37Gu8yc9lTHNAQlsztQ6ENetKEO//b8y31MMu2ZaPbn4kVsIABzVLXYLhCGekGDqw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.23.1.tgz", + "integrity": "sha512-h1k6yS8/pN/NHlMl5+v4XPfikhJulk4G+tKGFIOwURBSFzE8bixw1ebjluLOjfwtLqY0kewfjLSrO6tN2MgIhA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.23.1.tgz", + "integrity": "sha512-lK1eJeyk1ZX8UklqFd/3A60UuZ/6UVfGT2LuGo3Wp4/z7eRTRYY+0xOu2kpClP+vMTi9wKOfXi2vjUpO1Ro76g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.23.1.tgz", + "integrity": "sha512-CXXkzgn+dXAPs3WBwE+Kvnrf4WECwBdfjfeYHpMeVxWE0EceB6vhWGShs6wi0IYEqMSIzdOF1XjQ/Mkm5d7ZdQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.23.1.tgz", + "integrity": "sha512-/93bf2yxencYDnItMYV/v116zff6UyTjo4EtEQjUBeGiVpMmffDNUyD9UN2zV+V3LRV3/on4xdZ26NKzn6754g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.23.1.tgz", + "integrity": "sha512-VTN4EuOHwXEkXzX5nTvVY4s7E/Krz7COC8xkftbbKRYAl96vPiUssGkeMELQMOnLOJ8k3BY1+ZY52tttZnHcXQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.23.1.tgz", + "integrity": "sha512-Vx09LzEoBa5zDnieH8LSMRToj7ir/Jeq0Gu6qJ/1GcBq9GkfoEAoXvLiW1U9J1qE/Y/Oyaq33w5p2ZWrNNHNEw==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.23.1.tgz", + "integrity": "sha512-nrFzzMQ7W4WRLNUOU5dlWAqa6yVeI0P78WKGUo7lg2HShq/yx+UYkeNSE0SSfSure0SqgnsxPvmAUu/vu0E+3Q==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.23.1.tgz", + "integrity": "sha512-dKN8fgVqd0vUIjxuJI6P/9SSSe/mB9rvA98CSH2sJnlZ/OCZWO1DJvxj8jvKTfYUdGfcq2dDxoKaC6bHuTlgcw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.23.1.tgz", + "integrity": "sha512-5AV4Pzp80fhHL83JM6LoA6pTQVWgB1HovMBsLQ9OZWLDqVY8MVobBXNSmAJi//Csh6tcY7e7Lny2Hg1tElMjIA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.23.1.tgz", + "integrity": "sha512-9ygs73tuFCe6f6m/Tb+9LtYxWR4c9yg7zjt2cYkjDbDpV/xVn+68cQxMXCjUpYwEkze2RcU/rMnfIXNRFmSoDw==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.23.1.tgz", + "integrity": "sha512-EV6+ovTsEXCPAp58g2dD68LxoP/wK5pRvgy0J/HxPGB009omFPv3Yet0HiaqvrIrgPTBuC6wCH1LTOY91EO5hQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.23.1.tgz", + "integrity": "sha512-aevEkCNu7KlPRpYLjwmdcuNz6bDFiE7Z8XC4CPqExjTvrHugh28QzUXVOZtiYghciKUacNktqxdpymplil1beA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.23.1.tgz", + "integrity": "sha512-3x37szhLexNA4bXhLrCC/LImN/YtWis6WXr1VESlfVtVeoFJBRINPJ3f0a/6LV8zpikqoUg4hyXw0sFBt5Cr+Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.23.1.tgz", + "integrity": "sha512-aY2gMmKmPhxfU+0EdnN+XNtGbjfQgwZj43k8G3fyrDM/UdZww6xrWxmDkuz2eCZchqVeABjV5BpildOrUbBTqA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.23.1.tgz", + "integrity": "sha512-RBRT2gqEl0IKQABT4XTj78tpk9v7ehp+mazn2HbUeZl1YMdaGAQqhapjGTCe7uw7y0frDi4gS0uHzhvpFuI1sA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.23.1.tgz", + "integrity": "sha512-4O+gPR5rEBe2FpKOVyiJ7wNDPA8nGzDuJ6gN4okSA1gEOYZ67N8JPk58tkWtdtPeLz7lBnY6I5L3jdsr3S+A6A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.23.1.tgz", + "integrity": "sha512-BcaL0Vn6QwCwre3Y717nVHZbAa4UBEigzFm6VdsVdT/MbZ38xoj1X9HPkZhbmaBGUD1W8vxAfffbDe8bA6AKnQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.23.1.tgz", + "integrity": "sha512-BHpFFeslkWrXWyUPnbKm+xYYVYruCinGcftSBaa8zoF9hZO4BcSCFUvHVTtzpIY6YzUnYtuEhZ+C9iEXjxnasg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@types/node": { + "version": "22.7.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.7.3.tgz", + "integrity": "sha512-qXKfhXXqGTyBskvWEzJZPUxSslAiLaB6JGP1ic/XTH9ctGgzdgYguuLP1C601aRTSDNlLb0jbKqXjZ48GNraSA==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~6.19.2" + } + }, + "node_modules/esbuild": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.23.1.tgz", + "integrity": "sha512-VVNz/9Sa0bs5SELtn3f7qhJCDPCF5oMEl5cO9/SSinpE9hbPVvxbd572HH5AKiP7WD8INO53GgfDDhRjkylHEg==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.23.1", + "@esbuild/android-arm": "0.23.1", + "@esbuild/android-arm64": "0.23.1", + "@esbuild/android-x64": "0.23.1", + "@esbuild/darwin-arm64": "0.23.1", + "@esbuild/darwin-x64": "0.23.1", + "@esbuild/freebsd-arm64": "0.23.1", + "@esbuild/freebsd-x64": "0.23.1", + "@esbuild/linux-arm": "0.23.1", + "@esbuild/linux-arm64": "0.23.1", + "@esbuild/linux-ia32": "0.23.1", + "@esbuild/linux-loong64": "0.23.1", + "@esbuild/linux-mips64el": "0.23.1", + "@esbuild/linux-ppc64": "0.23.1", + "@esbuild/linux-riscv64": "0.23.1", + "@esbuild/linux-s390x": "0.23.1", + "@esbuild/linux-x64": "0.23.1", + "@esbuild/netbsd-x64": "0.23.1", + "@esbuild/openbsd-arm64": "0.23.1", + "@esbuild/openbsd-x64": "0.23.1", + "@esbuild/sunos-x64": "0.23.1", + "@esbuild/win32-arm64": "0.23.1", + "@esbuild/win32-ia32": "0.23.1", + "@esbuild/win32-x64": "0.23.1" + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/get-tsconfig": { + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.8.1.tgz", + "integrity": "sha512-k9PN+cFBmaLWtVz29SkUoqU5O0slLuHJXt/2P+tMVFT+phsSGXGkp9t3rQIqdz0e+06EHNGs3oM6ZX1s2zHxRg==", + "dev": true, + "license": "MIT", + "dependencies": { + "resolve-pkg-maps": "^1.0.0" + }, + "funding": { + "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" + } + }, + "node_modules/resolve-pkg-maps": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", + "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" + } + }, + "node_modules/tsx": { + "version": "4.19.1", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.19.1.tgz", + "integrity": "sha512-0flMz1lh74BR4wOvBjuh9olbnwqCPc35OOlfyzHba0Dc+QNUeWX/Gq2YTbnwcWPO3BMd8fkzRVrHcsR+a7z7rA==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "~0.23.0", + "get-tsconfig": "^4.7.5" + }, + "bin": { + "tsx": "dist/cli.mjs" + }, + "engines": { + "node": ">=18.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + } + }, + "node_modules/typescript": { + "version": "5.6.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.2.tgz", + "integrity": "sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/undici-types": { + "version": "6.19.8", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", + "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", + "dev": true, + "license": "MIT" + } + } +} diff --git a/examples/call-control/package.json b/examples/call-control/package.json new file mode 100644 index 0000000..ea35e2c --- /dev/null +++ b/examples/call-control/package.json @@ -0,0 +1,24 @@ +{ + "name": "telnyx-call-control-example", + "version": "1.0.0", + "description": "", + "main": "index.ts", + "scripts": { + "debug": "tsx index.ts", + "start": "tsx index.ts" + }, + "author": "Telnyx (https://www.telnyx.com/)", + "license": "ISC", + "type": "module", + "engines": { + "node": "^18 || >=20" + }, + "dependencies": { + "telnyx": "2.0.0-alpha.0" + }, + "devDependencies": { + "@types/node": "^22.7.3", + "tsx": "^4.19.1", + "typescript": "^5.6.2" + } +} diff --git a/examples/call-control/tsconfig.json b/examples/call-control/tsconfig.json new file mode 100644 index 0000000..744be51 --- /dev/null +++ b/examples/call-control/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "rootDir": "./", + "lib": ["ES2023"], + "module": "EsNext", + "moduleResolution": "node", + "target": "ES2022", + "checkJs": false, + "alwaysStrict": true, + "noImplicitAny": true, + "noImplicitThis": true, + "strict": true, + "strictFunctionTypes": true, + "types": [ "node" ], + "esModuleInterop": true, + "noUncheckedIndexedAccess": true, + }, +} From 3656ee546e63404963aeb4cd37a3e3278fea1783 Mon Sep 17 00:00:00 2001 From: Lucas Rosa Date: Fri, 27 Sep 2024 00:15:58 -0300 Subject: [PATCH 19/59] remove previous Call example --- examples/webhook-signing/call-control/index.js | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 examples/webhook-signing/call-control/index.js diff --git a/examples/webhook-signing/call-control/index.js b/examples/webhook-signing/call-control/index.js deleted file mode 100644 index 0d6c4f0..0000000 --- a/examples/webhook-signing/call-control/index.js +++ /dev/null @@ -1,18 +0,0 @@ -'use strict'; - -const Telnyx = require('telnyx'); - -/** - * To run this file, just provide your Secret API Key, like so: - * TELNYX_API_KEY=KEYXXX node index.js - */ - -const apiKey = process.env.TELNYX_API_KEY; - -const telnyx = Telnyx(apiKey); - -try { - telnyx.calls.create({connection_id: 'uuid', to: '+1111111111111', from: '+1111111111111'}); -} catch (e) { - console.error(e); -} From b81ad21254d3095214140291f8bf62e0859798e2 Mon Sep 17 00:00:00 2001 From: Lucas Rosa Date: Mon, 30 Sep 2024 12:20:22 -0300 Subject: [PATCH 20/59] add Messaging example --- LICENSE | 2 +- examples/call-control/README.md | 8 +- examples/call-control/index.ts | 2 +- examples/call-control/package.json | 2 +- .../.eslintrc.js | 0 examples/messaging/.nvmrc | 1 + examples/messaging/.tool-versions | 2 + examples/messaging/README.md | 9 + examples/messaging/index.ts | 33 + examples/messaging/package-lock.json | 7801 +++++++++++++++++ examples/messaging/package.json | 24 + examples/messaging/tsconfig.json | 18 + examples/webhook-signing/express.js | 109 - examples/webhook-signing/package-lock.json | 1215 --- examples/webhook-signing/package.json | 18 - package.json | 10 +- 16 files changed, 7903 insertions(+), 1351 deletions(-) rename examples/{webhook-signing => messaging}/.eslintrc.js (100%) create mode 100644 examples/messaging/.nvmrc create mode 100644 examples/messaging/.tool-versions create mode 100644 examples/messaging/README.md create mode 100644 examples/messaging/index.ts create mode 100644 examples/messaging/package-lock.json create mode 100644 examples/messaging/package.json create mode 100644 examples/messaging/tsconfig.json delete mode 100644 examples/webhook-signing/express.js delete mode 100644 examples/webhook-signing/package-lock.json delete mode 100644 examples/webhook-signing/package.json diff --git a/LICENSE b/LICENSE index a64c5e6..095df51 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ Copyright (C) 2011 Ask Bjørn Hansen Copyright (C) 2013 Stripe, Inc. (https://stripe.com) -Copyright (C) 2019 Telnyx, Inc. (https://www.telnyx.com) +Copyright (C) 2019 Telnyx, Inc. (https://telnyx.com) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/examples/call-control/README.md b/examples/call-control/README.md index 4b26302..66c95dd 100644 --- a/examples/call-control/README.md +++ b/examples/call-control/README.md @@ -1,3 +1,9 @@ # Node SDK Example - Call Control -To test this run `npm install` and then run the main script in `package.json` with `ts-node` +To test this run `npm install` and then run the main script in `package.json` with `ts-node`: + +```bash +npm run start +``` + +> don't forget to populate your Telnyx API Key with `export TELNYX_API_KEY=KEY...` diff --git a/examples/call-control/index.ts b/examples/call-control/index.ts index 7a99f85..514ba7a 100644 --- a/examples/call-control/index.ts +++ b/examples/call-control/index.ts @@ -1,6 +1,6 @@ /** * To run this file, just provide your Secret API Key, like so: - * TELNYX_API_KEY=KEYXXX node index.js + * TELNYX_API_KEY=KEY... node index.js */ import Telnyx from 'telnyx'; diff --git a/examples/call-control/package.json b/examples/call-control/package.json index ea35e2c..04bd919 100644 --- a/examples/call-control/package.json +++ b/examples/call-control/package.json @@ -7,7 +7,7 @@ "debug": "tsx index.ts", "start": "tsx index.ts" }, - "author": "Telnyx (https://www.telnyx.com/)", + "author": "Telnyx (https://telnyx.com)", "license": "ISC", "type": "module", "engines": { diff --git a/examples/webhook-signing/.eslintrc.js b/examples/messaging/.eslintrc.js similarity index 100% rename from examples/webhook-signing/.eslintrc.js rename to examples/messaging/.eslintrc.js diff --git a/examples/messaging/.nvmrc b/examples/messaging/.nvmrc new file mode 100644 index 0000000..035651d --- /dev/null +++ b/examples/messaging/.nvmrc @@ -0,0 +1 @@ +20.7.0 diff --git a/examples/messaging/.tool-versions b/examples/messaging/.tool-versions new file mode 100644 index 0000000..f53a99f --- /dev/null +++ b/examples/messaging/.tool-versions @@ -0,0 +1,2 @@ +nodejs 20.7.0 +npm 10.1.0 diff --git a/examples/messaging/README.md b/examples/messaging/README.md new file mode 100644 index 0000000..7c50c3a --- /dev/null +++ b/examples/messaging/README.md @@ -0,0 +1,9 @@ +# Node SDK Example - Messaging + +To test this run `npm install` and then run the main script in `package.json` with `ts-node`: + +```bash +npm run start +``` + +> don't forget to populate your Telnyx API Key with `export TELNYX_API_KEY=KEY...` diff --git a/examples/messaging/index.ts b/examples/messaging/index.ts new file mode 100644 index 0000000..8ea6ed8 --- /dev/null +++ b/examples/messaging/index.ts @@ -0,0 +1,33 @@ +/** + * To run this file, just provide your Secret API Key, like so: + * TELNYX_API_KEY=KEY... node index.js + */ + +import Telnyx from 'telnyx'; + +const apiKey = String(process.env.TELNYX_API_KEY || ''); +const telnyx = new Telnyx(apiKey); + +const params: Telnyx.MessagingProfilesCreateParams = { + name: 'Node SDK MP', + whitelisted_destinations: ['US'], + enabled: true, + webhook_url: null, + webhook_failover_url: null, + webhook_api_version: '2', +}; + +(async function callControl() { + try { + const {data: mp} = await telnyx.messagingProfiles.create(params); + + console.log(mp); + } catch (e: unknown) { + console.error(e); + + const rawError: Telnyx.TelnyxRawError = (e as {raw: Telnyx.TelnyxRawError}) + .raw; + + console.dir(JSON.stringify(rawError.errors)); + } +})(); diff --git a/examples/messaging/package-lock.json b/examples/messaging/package-lock.json new file mode 100644 index 0000000..ef9881a --- /dev/null +++ b/examples/messaging/package-lock.json @@ -0,0 +1,7801 @@ +{ + "name": "telnyx-messaging-example", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "telnyx-messaging-example", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "telnyx": "2.0.0-alpha.0" + }, + "devDependencies": { + "@types/node": "^22.7.3", + "tsx": "^4.19.1", + "typescript": "^5.6.2" + }, + "engines": { + "node": "^18 || >=20" + } + }, + "../..": { + "name": "telnyx", + "version": "2.0.0-alpha.0", + "license": "MIT", + "devDependencies": { + "@eslint/js": "^9.10.0", + "@stoplight/prism-cli": "^5.10.0", + "@types/eslint__js": "^8.42.3", + "@types/jest": "^29.5.13", + "@types/node": "^22.7.3", + "@types/qs": "^6.9.15", + "debug": "^4.3.4", + "eslint": "^8.57.0", + "eslint-config-prettier": "^9.1.0", + "eslint-plugin-chai-friendly": "^0.7.4", + "eslint-plugin-prettier": "^5.2.1", + "jest": "^29.7.0", + "nock": "^13.5.4", + "nyc": "^15.1.0", + "plop": "^4.0.1", + "prettier": "^3.0.0", + "qs": "^6.11.2", + "ts-jest": "^29.2.5", + "ts-node": "^10.9.2", + "tweetnacl": "^1.0.3", + "typescript": "^5.6.2", + "typescript-eslint": "^8.5.0", + "uuid": "^9.0.1" + }, + "engines": { + "node": "^18 || >=20" + } + }, + "../../node_modules/@ampproject/remapping": { + "version": "2.3.0", + "license": "Apache-2.0", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "../../node_modules/@babel/code-frame": { + "version": "7.24.7", + "license": "MIT", + "dependencies": { + "@babel/highlight": "^7.24.7", + "picocolors": "^1.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "../../node_modules/@babel/compat-data": { + "version": "7.25.4", + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "../../node_modules/@babel/core": { + "version": "7.25.2", + "license": "MIT", + "dependencies": { + "@ampproject/remapping": "^2.2.0", + "@babel/code-frame": "^7.24.7", + "@babel/generator": "^7.25.0", + "@babel/helper-compilation-targets": "^7.25.2", + "@babel/helper-module-transforms": "^7.25.2", + "@babel/helpers": "^7.25.0", + "@babel/parser": "^7.25.0", + "@babel/template": "^7.25.0", + "@babel/traverse": "^7.25.2", + "@babel/types": "^7.25.2", + "convert-source-map": "^2.0.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.3", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "../../node_modules/@babel/core/node_modules/convert-source-map": { + "version": "2.0.0", + "license": "MIT" + }, + "../../node_modules/@babel/generator": { + "version": "7.25.6", + "license": "MIT", + "dependencies": { + "@babel/types": "^7.25.6", + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25", + "jsesc": "^2.5.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "../../node_modules/@babel/helper-compilation-targets": { + "version": "7.25.2", + "license": "MIT", + "dependencies": { + "@babel/compat-data": "^7.25.2", + "@babel/helper-validator-option": "^7.24.8", + "browserslist": "^4.23.1", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "../../node_modules/@babel/helper-module-imports": { + "version": "7.24.7", + "license": "MIT", + "dependencies": { + "@babel/traverse": "^7.24.7", + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "../../node_modules/@babel/helper-module-transforms": { + "version": "7.25.2", + "license": "MIT", + "dependencies": { + "@babel/helper-module-imports": "^7.24.7", + "@babel/helper-simple-access": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", + "@babel/traverse": "^7.25.2" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "../../node_modules/@babel/helper-plugin-utils": { + "version": "7.24.8", + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "../../node_modules/@babel/helper-simple-access": { + "version": "7.24.7", + "license": "MIT", + "dependencies": { + "@babel/traverse": "^7.24.7", + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "../../node_modules/@babel/helper-string-parser": { + "version": "7.24.8", + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "../../node_modules/@babel/helper-validator-identifier": { + "version": "7.24.7", + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "../../node_modules/@babel/helper-validator-option": { + "version": "7.24.8", + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "../../node_modules/@babel/helpers": { + "version": "7.25.6", + "license": "MIT", + "dependencies": { + "@babel/template": "^7.25.0", + "@babel/types": "^7.25.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "../../node_modules/@babel/highlight": { + "version": "7.24.7", + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.24.7", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "../../node_modules/@babel/highlight/node_modules/ansi-styles": { + "version": "3.2.1", + "license": "MIT", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "../../node_modules/@babel/highlight/node_modules/chalk": { + "version": "2.4.2", + "license": "MIT", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "../../node_modules/@babel/highlight/node_modules/color-convert": { + "version": "1.9.3", + "license": "MIT", + "dependencies": { + "color-name": "1.1.3" + } + }, + "../../node_modules/@babel/highlight/node_modules/color-name": { + "version": "1.1.3", + "license": "MIT" + }, + "../../node_modules/@babel/highlight/node_modules/escape-string-regexp": { + "version": "1.0.5", + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "../../node_modules/@babel/highlight/node_modules/has-flag": { + "version": "3.0.0", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "../../node_modules/@babel/highlight/node_modules/supports-color": { + "version": "5.5.0", + "license": "MIT", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "../../node_modules/@babel/parser": { + "version": "7.25.6", + "license": "MIT", + "dependencies": { + "@babel/types": "^7.25.6" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "../../node_modules/@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "../../node_modules/@babel/plugin-syntax-bigint": { + "version": "7.8.3", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "../../node_modules/@babel/plugin-syntax-class-properties": { + "version": "7.12.13", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "../../node_modules/@babel/plugin-syntax-class-static-block": { + "version": "7.14.5", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "../../node_modules/@babel/plugin-syntax-import-attributes": { + "version": "7.25.6", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.8" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "../../node_modules/@babel/plugin-syntax-import-meta": { + "version": "7.10.4", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "../../node_modules/@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "../../node_modules/@babel/plugin-syntax-jsx": { + "version": "7.24.7", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "../../node_modules/@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "../../node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "../../node_modules/@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "../../node_modules/@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "../../node_modules/@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "../../node_modules/@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "../../node_modules/@babel/plugin-syntax-private-property-in-object": { + "version": "7.14.5", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "../../node_modules/@babel/plugin-syntax-top-level-await": { + "version": "7.14.5", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "../../node_modules/@babel/plugin-syntax-typescript": { + "version": "7.25.4", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.8" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "../../node_modules/@babel/template": { + "version": "7.25.0", + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.24.7", + "@babel/parser": "^7.25.0", + "@babel/types": "^7.25.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "../../node_modules/@babel/traverse": { + "version": "7.25.6", + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.24.7", + "@babel/generator": "^7.25.6", + "@babel/parser": "^7.25.6", + "@babel/template": "^7.25.0", + "@babel/types": "^7.25.6", + "debug": "^4.3.1", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "../../node_modules/@babel/traverse/node_modules/globals": { + "version": "11.12.0", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "../../node_modules/@babel/types": { + "version": "7.25.6", + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.24.8", + "@babel/helper-validator-identifier": "^7.24.7", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "../../node_modules/@bcoe/v8-coverage": { + "version": "0.2.3", + "license": "MIT" + }, + "../../node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "license": "MIT", + "dependencies": { + "@jridgewell/trace-mapping": "0.3.9" + }, + "engines": { + "node": ">=12" + } + }, + "../../node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, + "../../node_modules/@eslint-community/eslint-utils": { + "version": "4.4.0", + "license": "MIT", + "dependencies": { + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "../../node_modules/@eslint-community/regexpp": { + "version": "4.11.0", + "license": "MIT", + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "../../node_modules/@eslint/eslintrc": { + "version": "2.1.4", + "license": "MIT", + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "../../node_modules/@eslint/eslintrc/node_modules/argparse": { + "version": "2.0.1", + "license": "Python-2.0" + }, + "../../node_modules/@eslint/eslintrc/node_modules/js-yaml": { + "version": "4.1.0", + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "../../node_modules/@eslint/js": { + "version": "9.10.0", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "../../node_modules/@faker-js/faker": { + "version": "6.3.1", + "license": "MIT", + "engines": { + "node": ">=14.0.0", + "npm": ">=6.0.0" + } + }, + "../../node_modules/@humanwhocodes/config-array": { + "version": "0.11.14", + "license": "Apache-2.0", + "dependencies": { + "@humanwhocodes/object-schema": "^2.0.2", + "debug": "^4.3.1", + "minimatch": "^3.0.5" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "../../node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "license": "Apache-2.0", + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "../../node_modules/@humanwhocodes/object-schema": { + "version": "2.0.3", + "license": "BSD-3-Clause" + }, + "../../node_modules/@inquirer/figures": { + "version": "1.0.6", + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "../../node_modules/@istanbuljs/load-nyc-config": { + "version": "1.1.0", + "license": "ISC", + "dependencies": { + "camelcase": "^5.3.1", + "find-up": "^4.1.0", + "get-package-type": "^0.1.0", + "js-yaml": "^3.13.1", + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/@istanbuljs/load-nyc-config/node_modules/find-up": { + "version": "4.1.0", + "license": "MIT", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/@istanbuljs/load-nyc-config/node_modules/locate-path": { + "version": "5.0.0", + "license": "MIT", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/@istanbuljs/load-nyc-config/node_modules/p-limit": { + "version": "2.3.0", + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/@istanbuljs/load-nyc-config/node_modules/p-locate": { + "version": "4.1.0", + "license": "MIT", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/@istanbuljs/load-nyc-config/node_modules/resolve-from": { + "version": "5.0.0", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../../node_modules/@istanbuljs/schema": { + "version": "0.1.3", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../../node_modules/@jest/console": { + "version": "29.7.0", + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/@jest/core": { + "version": "29.7.0", + "license": "MIT", + "dependencies": { + "@jest/console": "^29.7.0", + "@jest/reporters": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-changed-files": "^29.7.0", + "jest-config": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-resolve-dependencies": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "jest-watcher": "^29.7.0", + "micromatch": "^4.0.4", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "../../node_modules/@jest/environment": { + "version": "29.7.0", + "license": "MIT", + "dependencies": { + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-mock": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/@jest/expect": { + "version": "29.7.0", + "license": "MIT", + "dependencies": { + "expect": "^29.7.0", + "jest-snapshot": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/@jest/expect-utils": { + "version": "29.7.0", + "license": "MIT", + "dependencies": { + "jest-get-type": "^29.6.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/@jest/fake-timers": { + "version": "29.7.0", + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "@sinonjs/fake-timers": "^10.0.2", + "@types/node": "*", + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/@jest/globals": { + "version": "29.7.0", + "license": "MIT", + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/types": "^29.6.3", + "jest-mock": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/@jest/reporters": { + "version": "29.7.0", + "license": "MIT", + "dependencies": { + "@bcoe/v8-coverage": "^0.2.3", + "@jest/console": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", + "@types/node": "*", + "chalk": "^4.0.0", + "collect-v8-coverage": "^1.0.0", + "exit": "^0.1.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-instrument": "^6.0.0", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.1.3", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", + "slash": "^3.0.0", + "string-length": "^4.0.1", + "strip-ansi": "^6.0.0", + "v8-to-istanbul": "^9.0.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "../../node_modules/@jest/reporters/node_modules/glob": { + "version": "7.2.3", + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "../../node_modules/@jest/reporters/node_modules/istanbul-lib-instrument": { + "version": "6.0.3", + "license": "BSD-3-Clause", + "dependencies": { + "@babel/core": "^7.23.9", + "@babel/parser": "^7.23.9", + "@istanbuljs/schema": "^0.1.3", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^7.5.4" + }, + "engines": { + "node": ">=10" + } + }, + "../../node_modules/@jest/reporters/node_modules/semver": { + "version": "7.6.3", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "../../node_modules/@jest/schemas": { + "version": "29.6.3", + "license": "MIT", + "dependencies": { + "@sinclair/typebox": "^0.27.8" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/@jest/source-map": { + "version": "29.6.3", + "license": "MIT", + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.18", + "callsites": "^3.0.0", + "graceful-fs": "^4.2.9" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/@jest/test-result": { + "version": "29.7.0", + "license": "MIT", + "dependencies": { + "@jest/console": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "collect-v8-coverage": "^1.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/@jest/test-sequencer": { + "version": "29.7.0", + "license": "MIT", + "dependencies": { + "@jest/test-result": "^29.7.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/@jest/transform": { + "version": "29.7.0", + "license": "MIT", + "dependencies": { + "@babel/core": "^7.11.6", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", + "babel-plugin-istanbul": "^6.1.1", + "chalk": "^4.0.0", + "convert-source-map": "^2.0.0", + "fast-json-stable-stringify": "^2.1.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", + "micromatch": "^4.0.4", + "pirates": "^4.0.4", + "slash": "^3.0.0", + "write-file-atomic": "^4.0.2" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/@jest/transform/node_modules/convert-source-map": { + "version": "2.0.0", + "license": "MIT" + }, + "../../node_modules/@jest/transform/node_modules/write-file-atomic": { + "version": "4.0.2", + "license": "ISC", + "dependencies": { + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.7" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "../../node_modules/@jest/types": { + "version": "29.6.3", + "license": "MIT", + "dependencies": { + "@jest/schemas": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/@jridgewell/gen-mapping": { + "version": "0.3.5", + "license": "MIT", + "dependencies": { + "@jridgewell/set-array": "^1.2.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "../../node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "../../node_modules/@jridgewell/set-array": { + "version": "1.2.1", + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "../../node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.0", + "license": "MIT" + }, + "../../node_modules/@jridgewell/trace-mapping": { + "version": "0.3.25", + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "../../node_modules/@jsdevtools/ono": { + "version": "7.1.3", + "license": "MIT" + }, + "../../node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "../../node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "../../node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "license": "MIT", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "../../node_modules/@pkgr/core": { + "version": "0.1.1", + "license": "MIT", + "engines": { + "node": "^12.20.0 || ^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts" + } + }, + "../../node_modules/@sinclair/typebox": { + "version": "0.27.8", + "license": "MIT" + }, + "../../node_modules/@sinonjs/commons": { + "version": "3.0.1", + "license": "BSD-3-Clause", + "dependencies": { + "type-detect": "4.0.8" + } + }, + "../../node_modules/@sinonjs/commons/node_modules/type-detect": { + "version": "4.0.8", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "../../node_modules/@sinonjs/fake-timers": { + "version": "10.3.0", + "license": "BSD-3-Clause", + "dependencies": { + "@sinonjs/commons": "^3.0.0" + } + }, + "../../node_modules/@stoplight/http-spec": { + "version": "7.1.0", + "license": "Apache-2.0", + "dependencies": { + "@stoplight/json": "^3.18.1", + "@stoplight/json-schema-generator": "1.0.2", + "@stoplight/types": "14.1.0", + "@types/json-schema": "7.0.11", + "@types/swagger-schema-official": "~2.0.22", + "@types/type-is": "^1.6.3", + "fnv-plus": "^1.3.1", + "lodash": "^4.17.21", + "openapi3-ts": "^2.0.2", + "postman-collection": "^4.1.3", + "tslib": "^2.6.2", + "type-is": "^1.6.18" + }, + "engines": { + "node": ">=14.13" + } + }, + "../../node_modules/@stoplight/http-spec/node_modules/@stoplight/types": { + "version": "14.1.0", + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.4", + "utility-types": "^3.10.0" + }, + "engines": { + "node": "^12.20 || >=14.13" + } + }, + "../../node_modules/@stoplight/http-spec/node_modules/@types/json-schema": { + "version": "7.0.11", + "license": "MIT" + }, + "../../node_modules/@stoplight/json": { + "version": "3.21.7", + "license": "Apache-2.0", + "dependencies": { + "@stoplight/ordered-object-literal": "^1.0.3", + "@stoplight/path": "^1.3.2", + "@stoplight/types": "^13.6.0", + "jsonc-parser": "~2.2.1", + "lodash": "^4.17.21", + "safe-stable-stringify": "^1.1" + }, + "engines": { + "node": ">=8.3.0" + } + }, + "../../node_modules/@stoplight/json-schema-generator": { + "version": "1.0.2", + "license": "MIT", + "dependencies": { + "cross-fetch": "^3.1.5", + "json-promise": "1.1.x", + "minimist": "1.2.6", + "mkdirp": "0.5.x", + "pretty-data": "0.40.x" + }, + "bin": { + "json-schema-generator": "bin/cli.js" + } + }, + "../../node_modules/@stoplight/json-schema-merge-allof": { + "version": "0.7.8", + "license": "MIT", + "dependencies": { + "compute-lcm": "^1.1.0", + "json-schema-compare": "^0.2.2", + "lodash": "^4.17.4" + } + }, + "../../node_modules/@stoplight/json-schema-ref-parser": { + "version": "9.2.7", + "license": "MIT", + "dependencies": { + "@jsdevtools/ono": "^7.1.3", + "@stoplight/path": "^1.3.2", + "@stoplight/yaml": "^4.0.2", + "call-me-maybe": "^1.0.1", + "fastestsmallesttextencoderdecoder": "^1.0.22", + "isomorphic-fetch": "^3.0.0", + "node-abort-controller": "^3.0.1" + } + }, + "../../node_modules/@stoplight/json-schema-sampler": { + "version": "0.3.0", + "license": "MIT", + "dependencies": { + "@types/json-schema": "^7.0.7", + "json-pointer": "^0.6.1" + } + }, + "../../node_modules/@stoplight/json/node_modules/@stoplight/types": { + "version": "13.20.0", + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.4", + "utility-types": "^3.10.0" + }, + "engines": { + "node": "^12.20 || >=14.13" + } + }, + "../../node_modules/@stoplight/ordered-object-literal": { + "version": "1.0.5", + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "../../node_modules/@stoplight/path": { + "version": "1.3.2", + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "../../node_modules/@stoplight/prism-cli": { + "version": "5.10.0", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@stoplight/json": "3.21.7", + "@stoplight/json-schema-ref-parser": "9.2.7", + "@stoplight/prism-core": "^5.8.0", + "@stoplight/prism-http": "5.10.0", + "@stoplight/prism-http-server": "^5.10.0", + "@stoplight/types": "^14.1.0", + "chalk": "^4.1.2", + "chokidar": "^3.5.2", + "fp-ts": "^2.11.5", + "json-schema-faker": "0.5.6", + "lodash": "^4.17.21", + "node-fetch": "^2.6.5", + "pino": "^6.13.3", + "signale": "^1.4.0", + "split2": "^3.2.2", + "tslib": "^2.3.1", + "uri-template-lite": "^22.9.0", + "urijs": "^1.19.11", + "yargs": "^16.2.0" + }, + "bin": { + "prism": "dist/index.js" + }, + "engines": { + "node": ">=18.20.1" + } + }, + "../../node_modules/@stoplight/prism-core": { + "version": "5.8.0", + "license": "Apache-2.0", + "dependencies": { + "fp-ts": "^2.11.5", + "lodash": "^4.17.21", + "pino": "^6.13.3", + "tslib": "^2.3.1" + }, + "engines": { + "node": ">=18.20.1" + } + }, + "../../node_modules/@stoplight/prism-http": { + "version": "5.10.0", + "license": "Apache-2.0", + "dependencies": { + "@faker-js/faker": "^6.0.0", + "@stoplight/http-spec": "^7.0.3", + "@stoplight/json": "3.21.7", + "@stoplight/json-schema-merge-allof": "0.7.8", + "@stoplight/json-schema-ref-parser": "9.2.7", + "@stoplight/json-schema-sampler": "0.3.0", + "@stoplight/prism-core": "^5.8.0", + "@stoplight/types": "^14.1.0", + "@stoplight/yaml": "^4.2.3", + "abstract-logging": "^2.0.1", + "accepts": "^1.3.7", + "ajv": "^8.4.0", + "ajv-formats": "^2.1.1", + "caseless": "^0.12.0", + "chalk": "^4.1.2", + "content-type": "^1.0.4", + "fp-ts": "^2.11.5", + "http-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.0", + "json-schema-faker": "0.5.6", + "lodash": "^4.17.21", + "node-fetch": "^2.6.5", + "parse-multipart-data": "^1.5.0", + "pino": "^6.13.3", + "tslib": "^2.3.1", + "type-is": "^1.6.18", + "uri-template-lite": "^22.9.0", + "whatwg-mimetype": "^3.0.0" + }, + "engines": { + "node": ">=18.20.1" + } + }, + "../../node_modules/@stoplight/prism-http-server": { + "version": "5.10.0", + "license": "Apache-2.0", + "dependencies": { + "@stoplight/prism-core": "^5.8.0", + "@stoplight/prism-http": "^5.10.0", + "@stoplight/types": "^14.1.0", + "fast-xml-parser": "^4.2.0", + "fp-ts": "^2.11.5", + "io-ts": "^2.2.16", + "lodash": "^4.17.21", + "micri": "^4.3.0", + "node-fetch": "^2.6.5", + "parse-prefer-header": "1.0.0", + "tslib": "^2.3.1", + "type-is": "^1.6.18" + }, + "engines": { + "node": ">=18.20.1" + } + }, + "../../node_modules/@stoplight/prism-http/node_modules/ajv": { + "version": "8.17.1", + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "../../node_modules/@stoplight/prism-http/node_modules/json-schema-traverse": { + "version": "1.0.0", + "license": "MIT" + }, + "../../node_modules/@stoplight/types": { + "version": "14.1.1", + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.4", + "utility-types": "^3.10.0" + }, + "engines": { + "node": "^12.20 || >=14.13" + } + }, + "../../node_modules/@stoplight/yaml": { + "version": "4.3.0", + "license": "Apache-2.0", + "dependencies": { + "@stoplight/ordered-object-literal": "^1.0.5", + "@stoplight/types": "^14.1.1", + "@stoplight/yaml-ast-parser": "0.0.50", + "tslib": "^2.2.0" + }, + "engines": { + "node": ">=10.8" + } + }, + "../../node_modules/@stoplight/yaml-ast-parser": { + "version": "0.0.50", + "license": "Apache-2.0" + }, + "../../node_modules/@tootallnate/once": { + "version": "2.0.0", + "license": "MIT", + "engines": { + "node": ">= 10" + } + }, + "../../node_modules/@tsconfig/node10": { + "version": "1.0.11", + "license": "MIT" + }, + "../../node_modules/@tsconfig/node12": { + "version": "1.0.11", + "license": "MIT" + }, + "../../node_modules/@tsconfig/node14": { + "version": "1.0.3", + "license": "MIT" + }, + "../../node_modules/@tsconfig/node16": { + "version": "1.0.4", + "license": "MIT" + }, + "../../node_modules/@types/babel__core": { + "version": "7.20.5", + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" + } + }, + "../../node_modules/@types/babel__generator": { + "version": "7.6.8", + "license": "MIT", + "dependencies": { + "@babel/types": "^7.0.0" + } + }, + "../../node_modules/@types/babel__template": { + "version": "7.4.4", + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "../../node_modules/@types/babel__traverse": { + "version": "7.20.6", + "license": "MIT", + "dependencies": { + "@babel/types": "^7.20.7" + } + }, + "../../node_modules/@types/eslint": { + "version": "9.6.1", + "license": "MIT", + "dependencies": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, + "../../node_modules/@types/eslint__js": { + "version": "8.42.3", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/eslint": "*" + } + }, + "../../node_modules/@types/estree": { + "version": "1.0.5", + "license": "MIT" + }, + "../../node_modules/@types/fined": { + "version": "1.1.5", + "license": "MIT" + }, + "../../node_modules/@types/graceful-fs": { + "version": "4.1.9", + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "../../node_modules/@types/inquirer": { + "version": "9.0.7", + "license": "MIT", + "dependencies": { + "@types/through": "*", + "rxjs": "^7.2.0" + } + }, + "../../node_modules/@types/istanbul-lib-coverage": { + "version": "2.0.6", + "license": "MIT" + }, + "../../node_modules/@types/istanbul-lib-report": { + "version": "3.0.3", + "license": "MIT", + "dependencies": { + "@types/istanbul-lib-coverage": "*" + } + }, + "../../node_modules/@types/istanbul-reports": { + "version": "3.0.4", + "license": "MIT", + "dependencies": { + "@types/istanbul-lib-report": "*" + } + }, + "../../node_modules/@types/jest": { + "version": "29.5.13", + "dev": true, + "license": "MIT", + "dependencies": { + "expect": "^29.0.0", + "pretty-format": "^29.0.0" + } + }, + "../../node_modules/@types/json-schema": { + "version": "7.0.15", + "license": "MIT" + }, + "../../node_modules/@types/liftoff": { + "version": "4.0.3", + "license": "MIT", + "dependencies": { + "@types/fined": "*", + "@types/node": "*" + } + }, + "../../node_modules/@types/node": { + "version": "22.7.3", + "license": "MIT", + "dependencies": { + "undici-types": "~6.19.2" + } + }, + "../../node_modules/@types/qs": { + "version": "6.9.15", + "dev": true, + "license": "MIT" + }, + "../../node_modules/@types/stack-utils": { + "version": "2.0.3", + "license": "MIT" + }, + "../../node_modules/@types/swagger-schema-official": { + "version": "2.0.25", + "license": "MIT" + }, + "../../node_modules/@types/through": { + "version": "0.0.33", + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "../../node_modules/@types/type-is": { + "version": "1.6.6", + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "../../node_modules/@types/yargs": { + "version": "17.0.33", + "license": "MIT", + "dependencies": { + "@types/yargs-parser": "*" + } + }, + "../../node_modules/@types/yargs-parser": { + "version": "21.0.3", + "license": "MIT" + }, + "../../node_modules/@typescript-eslint/eslint-plugin": { + "version": "8.5.0", + "license": "MIT", + "dependencies": { + "@eslint-community/regexpp": "^4.10.0", + "@typescript-eslint/scope-manager": "8.5.0", + "@typescript-eslint/type-utils": "8.5.0", + "@typescript-eslint/utils": "8.5.0", + "@typescript-eslint/visitor-keys": "8.5.0", + "graphemer": "^1.4.0", + "ignore": "^5.3.1", + "natural-compare": "^1.4.0", + "ts-api-utils": "^1.3.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^8.0.0 || ^8.0.0-alpha.0", + "eslint": "^8.57.0 || ^9.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "../../node_modules/@typescript-eslint/parser": { + "version": "8.5.0", + "license": "BSD-2-Clause", + "dependencies": { + "@typescript-eslint/scope-manager": "8.5.0", + "@typescript-eslint/types": "8.5.0", + "@typescript-eslint/typescript-estree": "8.5.0", + "@typescript-eslint/visitor-keys": "8.5.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "../../node_modules/@typescript-eslint/scope-manager": { + "version": "8.5.0", + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.5.0", + "@typescript-eslint/visitor-keys": "8.5.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "../../node_modules/@typescript-eslint/type-utils": { + "version": "8.5.0", + "license": "MIT", + "dependencies": { + "@typescript-eslint/typescript-estree": "8.5.0", + "@typescript-eslint/utils": "8.5.0", + "debug": "^4.3.4", + "ts-api-utils": "^1.3.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "../../node_modules/@typescript-eslint/types": { + "version": "8.5.0", + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "../../node_modules/@typescript-eslint/typescript-estree": { + "version": "8.5.0", + "license": "BSD-2-Clause", + "dependencies": { + "@typescript-eslint/types": "8.5.0", + "@typescript-eslint/visitor-keys": "8.5.0", + "debug": "^4.3.4", + "fast-glob": "^3.3.2", + "is-glob": "^4.0.3", + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^1.3.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "../../node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { + "version": "2.0.1", + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "../../node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { + "version": "9.0.5", + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "../../node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { + "version": "7.6.3", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "../../node_modules/@typescript-eslint/utils": { + "version": "8.5.0", + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "@typescript-eslint/scope-manager": "8.5.0", + "@typescript-eslint/types": "8.5.0", + "@typescript-eslint/typescript-estree": "8.5.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0" + } + }, + "../../node_modules/@typescript-eslint/visitor-keys": { + "version": "8.5.0", + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.5.0", + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "../../node_modules/@ungap/structured-clone": { + "version": "1.2.0", + "license": "ISC" + }, + "../../node_modules/abstract-logging": { + "version": "2.0.1", + "license": "MIT" + }, + "../../node_modules/accepts": { + "version": "1.3.8", + "license": "MIT", + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, + "../../node_modules/acorn": { + "version": "8.12.1", + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "../../node_modules/acorn-jsx": { + "version": "5.3.2", + "license": "MIT", + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "../../node_modules/acorn-walk": { + "version": "8.3.4", + "license": "MIT", + "dependencies": { + "acorn": "^8.11.0" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "../../node_modules/agent-base": { + "version": "6.0.2", + "license": "MIT", + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "../../node_modules/aggregate-error": { + "version": "3.1.0", + "license": "MIT", + "dependencies": { + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/ajv": { + "version": "6.12.6", + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "../../node_modules/ajv-formats": { + "version": "2.1.1", + "license": "MIT", + "dependencies": { + "ajv": "^8.0.0" + }, + "peerDependencies": { + "ajv": "^8.0.0" + }, + "peerDependenciesMeta": { + "ajv": { + "optional": true + } + } + }, + "../../node_modules/ajv-formats/node_modules/ajv": { + "version": "8.17.1", + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "../../node_modules/ajv-formats/node_modules/json-schema-traverse": { + "version": "1.0.0", + "license": "MIT" + }, + "../../node_modules/ansi-escapes": { + "version": "4.3.2", + "license": "MIT", + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/ansi-escapes/node_modules/type-fest": { + "version": "0.21.3", + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/ansi-regex": { + "version": "5.0.1", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../../node_modules/ansi-styles": { + "version": "4.3.0", + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "../../node_modules/anymatch": { + "version": "3.1.3", + "license": "ISC", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "../../node_modules/append-transform": { + "version": "2.0.0", + "license": "MIT", + "dependencies": { + "default-require-extensions": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/archy": { + "version": "1.0.0", + "license": "MIT" + }, + "../../node_modules/arg": { + "version": "4.1.3", + "license": "MIT" + }, + "../../node_modules/argparse": { + "version": "1.0.10", + "license": "MIT", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "../../node_modules/array-each": { + "version": "1.0.1", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/array-slice": { + "version": "1.1.0", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/async": { + "version": "3.2.6", + "license": "MIT" + }, + "../../node_modules/atomic-sleep": { + "version": "1.0.0", + "license": "MIT", + "engines": { + "node": ">=8.0.0" + } + }, + "../../node_modules/babel-jest": { + "version": "29.7.0", + "license": "MIT", + "dependencies": { + "@jest/transform": "^29.7.0", + "@types/babel__core": "^7.1.14", + "babel-plugin-istanbul": "^6.1.1", + "babel-preset-jest": "^29.6.3", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.8.0" + } + }, + "../../node_modules/babel-plugin-istanbul": { + "version": "6.1.1", + "license": "BSD-3-Clause", + "dependencies": { + "@babel/helper-plugin-utils": "^7.0.0", + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-instrument": "^5.0.4", + "test-exclude": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/babel-plugin-istanbul/node_modules/istanbul-lib-instrument": { + "version": "5.2.1", + "license": "BSD-3-Clause", + "dependencies": { + "@babel/core": "^7.12.3", + "@babel/parser": "^7.14.7", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/babel-plugin-jest-hoist": { + "version": "29.6.3", + "license": "MIT", + "dependencies": { + "@babel/template": "^7.3.3", + "@babel/types": "^7.3.3", + "@types/babel__core": "^7.1.14", + "@types/babel__traverse": "^7.0.6" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/babel-preset-current-node-syntax": { + "version": "1.1.0", + "license": "MIT", + "dependencies": { + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-bigint": "^7.8.3", + "@babel/plugin-syntax-class-properties": "^7.12.13", + "@babel/plugin-syntax-class-static-block": "^7.14.5", + "@babel/plugin-syntax-import-attributes": "^7.24.7", + "@babel/plugin-syntax-import-meta": "^7.10.4", + "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.10.4", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5", + "@babel/plugin-syntax-top-level-await": "^7.14.5" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "../../node_modules/babel-preset-jest": { + "version": "29.6.3", + "license": "MIT", + "dependencies": { + "babel-plugin-jest-hoist": "^29.6.3", + "babel-preset-current-node-syntax": "^1.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "../../node_modules/balanced-match": { + "version": "1.0.2", + "license": "MIT" + }, + "../../node_modules/base64-js": { + "version": "1.5.1", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "../../node_modules/binary-extensions": { + "version": "2.3.0", + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/bl": { + "version": "4.1.0", + "license": "MIT", + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "../../node_modules/bluebird": { + "version": "3.7.2", + "license": "MIT" + }, + "../../node_modules/brace-expansion": { + "version": "1.1.11", + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "../../node_modules/braces": { + "version": "3.0.3", + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/browserslist": { + "version": "4.23.3", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "caniuse-lite": "^1.0.30001646", + "electron-to-chromium": "^1.5.4", + "node-releases": "^2.0.18", + "update-browserslist-db": "^1.1.0" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "../../node_modules/bs-logger": { + "version": "0.2.6", + "license": "MIT", + "dependencies": { + "fast-json-stable-stringify": "2.x" + }, + "engines": { + "node": ">= 6" + } + }, + "../../node_modules/bser": { + "version": "2.1.1", + "license": "Apache-2.0", + "dependencies": { + "node-int64": "^0.4.0" + } + }, + "../../node_modules/buffer": { + "version": "5.7.1", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "../../node_modules/buffer-from": { + "version": "1.1.2", + "license": "MIT" + }, + "../../node_modules/caching-transform": { + "version": "4.0.0", + "license": "MIT", + "dependencies": { + "hasha": "^5.0.0", + "make-dir": "^3.0.0", + "package-hash": "^4.0.0", + "write-file-atomic": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/call-bind": { + "version": "1.0.7", + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../../node_modules/call-me-maybe": { + "version": "1.0.2", + "license": "MIT" + }, + "../../node_modules/callsites": { + "version": "3.1.0", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "../../node_modules/camel-case": { + "version": "4.1.2", + "license": "MIT", + "dependencies": { + "pascal-case": "^3.1.2", + "tslib": "^2.0.3" + } + }, + "../../node_modules/camelcase": { + "version": "5.3.1", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "../../node_modules/caniuse-lite": { + "version": "1.0.30001653", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "CC-BY-4.0" + }, + "../../node_modules/capital-case": { + "version": "1.0.4", + "license": "MIT", + "dependencies": { + "no-case": "^3.0.4", + "tslib": "^2.0.3", + "upper-case-first": "^2.0.2" + } + }, + "../../node_modules/caseless": { + "version": "0.12.0", + "license": "Apache-2.0" + }, + "../../node_modules/chalk": { + "version": "4.1.2", + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "../../node_modules/change-case": { + "version": "4.1.2", + "license": "MIT", + "dependencies": { + "camel-case": "^4.1.2", + "capital-case": "^1.0.4", + "constant-case": "^3.0.4", + "dot-case": "^3.0.4", + "header-case": "^2.0.4", + "no-case": "^3.0.4", + "param-case": "^3.0.4", + "pascal-case": "^3.1.2", + "path-case": "^3.0.4", + "sentence-case": "^3.0.4", + "snake-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, + "../../node_modules/char-regex": { + "version": "1.0.2", + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "../../node_modules/chardet": { + "version": "0.7.0", + "license": "MIT" + }, + "../../node_modules/charset": { + "version": "1.0.1", + "license": "MIT", + "engines": { + "node": ">=4.0.0" + } + }, + "../../node_modules/chokidar": { + "version": "3.6.0", + "license": "MIT", + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "../../node_modules/chokidar/node_modules/glob-parent": { + "version": "5.1.2", + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "../../node_modules/ci-info": { + "version": "3.9.0", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../../node_modules/cjs-module-lexer": { + "version": "1.4.1", + "license": "MIT" + }, + "../../node_modules/clean-stack": { + "version": "2.2.0", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "../../node_modules/cli-cursor": { + "version": "5.0.0", + "license": "MIT", + "dependencies": { + "restore-cursor": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/cli-spinners": { + "version": "2.9.2", + "license": "MIT", + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/cli-width": { + "version": "4.1.0", + "license": "ISC", + "engines": { + "node": ">= 12" + } + }, + "../../node_modules/cliui": { + "version": "7.0.4", + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "../../node_modules/clone": { + "version": "1.0.4", + "license": "MIT", + "engines": { + "node": ">=0.8" + } + }, + "../../node_modules/co": { + "version": "4.6.0", + "license": "MIT", + "engines": { + "iojs": ">= 1.0.0", + "node": ">= 0.12.0" + } + }, + "../../node_modules/collect-v8-coverage": { + "version": "1.0.2", + "license": "MIT" + }, + "../../node_modules/color-convert": { + "version": "2.0.1", + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "../../node_modules/color-name": { + "version": "1.1.4", + "license": "MIT" + }, + "../../node_modules/commondir": { + "version": "1.0.1", + "license": "MIT" + }, + "../../node_modules/compute-gcd": { + "version": "1.2.1", + "dependencies": { + "validate.io-array": "^1.0.3", + "validate.io-function": "^1.0.2", + "validate.io-integer-array": "^1.0.0" + } + }, + "../../node_modules/compute-lcm": { + "version": "1.1.2", + "dependencies": { + "compute-gcd": "^1.2.1", + "validate.io-array": "^1.0.3", + "validate.io-function": "^1.0.2", + "validate.io-integer-array": "^1.0.0" + } + }, + "../../node_modules/concat-map": { + "version": "0.0.1", + "license": "MIT" + }, + "../../node_modules/constant-case": { + "version": "3.0.4", + "license": "MIT", + "dependencies": { + "no-case": "^3.0.4", + "tslib": "^2.0.3", + "upper-case": "^2.0.2" + } + }, + "../../node_modules/content-type": { + "version": "1.0.5", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "../../node_modules/convert-source-map": { + "version": "1.9.0", + "license": "MIT" + }, + "../../node_modules/create-jest": { + "version": "29.7.0", + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "prompts": "^2.0.1" + }, + "bin": { + "create-jest": "bin/create-jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/create-require": { + "version": "1.1.1", + "license": "MIT" + }, + "../../node_modules/cross-fetch": { + "version": "3.1.8", + "license": "MIT", + "dependencies": { + "node-fetch": "^2.6.12" + } + }, + "../../node_modules/cross-spawn": { + "version": "7.0.3", + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "../../node_modules/debug": { + "version": "4.3.6", + "license": "MIT", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "../../node_modules/decamelize": { + "version": "1.2.0", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/dedent": { + "version": "1.5.3", + "license": "MIT", + "peerDependencies": { + "babel-plugin-macros": "^3.1.0" + }, + "peerDependenciesMeta": { + "babel-plugin-macros": { + "optional": true + } + } + }, + "../../node_modules/deep-is": { + "version": "0.1.4", + "license": "MIT" + }, + "../../node_modules/deepmerge": { + "version": "4.3.1", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/default-require-extensions": { + "version": "3.0.1", + "license": "MIT", + "dependencies": { + "strip-bom": "^4.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/defaults": { + "version": "1.0.4", + "license": "MIT", + "dependencies": { + "clone": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/define-data-property": { + "version": "1.1.4", + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../../node_modules/del": { + "version": "7.1.0", + "license": "MIT", + "dependencies": { + "globby": "^13.1.2", + "graceful-fs": "^4.2.10", + "is-glob": "^4.0.3", + "is-path-cwd": "^3.0.0", + "is-path-inside": "^4.0.0", + "p-map": "^5.5.0", + "rimraf": "^3.0.2", + "slash": "^4.0.0" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/del/node_modules/aggregate-error": { + "version": "4.0.1", + "license": "MIT", + "dependencies": { + "clean-stack": "^4.0.0", + "indent-string": "^5.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/del/node_modules/clean-stack": { + "version": "4.2.0", + "license": "MIT", + "dependencies": { + "escape-string-regexp": "5.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/del/node_modules/escape-string-regexp": { + "version": "5.0.0", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/del/node_modules/indent-string": { + "version": "5.0.0", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/del/node_modules/is-path-inside": { + "version": "4.0.0", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/del/node_modules/p-map": { + "version": "5.5.0", + "license": "MIT", + "dependencies": { + "aggregate-error": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/del/node_modules/slash": { + "version": "4.0.0", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/detect-file": { + "version": "1.0.0", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/detect-newline": { + "version": "3.1.0", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../../node_modules/diff-sequences": { + "version": "29.6.3", + "license": "MIT", + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/dir-glob": { + "version": "3.0.1", + "license": "MIT", + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/doctrine": { + "version": "3.0.0", + "license": "Apache-2.0", + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "../../node_modules/dot-case": { + "version": "3.0.4", + "license": "MIT", + "dependencies": { + "no-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, + "../../node_modules/ejs": { + "version": "3.1.10", + "license": "Apache-2.0", + "dependencies": { + "jake": "^10.8.5" + }, + "bin": { + "ejs": "bin/cli.js" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/electron-to-chromium": { + "version": "1.5.13", + "license": "ISC" + }, + "../../node_modules/emittery": { + "version": "0.13.1", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sindresorhus/emittery?sponsor=1" + } + }, + "../../node_modules/emoji-regex": { + "version": "8.0.0", + "license": "MIT" + }, + "../../node_modules/error-ex": { + "version": "1.3.2", + "license": "MIT", + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "../../node_modules/es-define-property": { + "version": "1.0.0", + "license": "MIT", + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "../../node_modules/es-errors": { + "version": "1.3.0", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "../../node_modules/es6-error": { + "version": "4.1.1", + "license": "MIT" + }, + "../../node_modules/escalade": { + "version": "3.2.0", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "../../node_modules/escape-string-regexp": { + "version": "4.0.0", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/eslint": { + "version": "8.57.0", + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.57.0", + "@humanwhocodes/config-array": "^0.11.14", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "esquery": "^1.4.2", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "../../node_modules/eslint-config-prettier": { + "version": "9.1.0", + "dev": true, + "license": "MIT", + "bin": { + "eslint-config-prettier": "bin/cli.js" + }, + "peerDependencies": { + "eslint": ">=7.0.0" + } + }, + "../../node_modules/eslint-plugin-chai-friendly": { + "version": "0.7.4", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + }, + "peerDependencies": { + "eslint": ">=3.0.0" + } + }, + "../../node_modules/eslint-plugin-prettier": { + "version": "5.2.1", + "dev": true, + "license": "MIT", + "dependencies": { + "prettier-linter-helpers": "^1.0.0", + "synckit": "^0.9.1" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint-plugin-prettier" + }, + "peerDependencies": { + "@types/eslint": ">=8.0.0", + "eslint": ">=8.0.0", + "eslint-config-prettier": "*", + "prettier": ">=3.0.0" + }, + "peerDependenciesMeta": { + "@types/eslint": { + "optional": true + }, + "eslint-config-prettier": { + "optional": true + } + } + }, + "../../node_modules/eslint-scope": { + "version": "7.2.2", + "license": "BSD-2-Clause", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "../../node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "license": "Apache-2.0", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "../../node_modules/eslint/node_modules/@eslint/js": { + "version": "8.57.0", + "license": "MIT", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "../../node_modules/eslint/node_modules/argparse": { + "version": "2.0.1", + "license": "Python-2.0" + }, + "../../node_modules/eslint/node_modules/js-yaml": { + "version": "4.1.0", + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "../../node_modules/espree": { + "version": "9.6.1", + "license": "BSD-2-Clause", + "dependencies": { + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "../../node_modules/esprima": { + "version": "4.0.1", + "license": "BSD-2-Clause", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "../../node_modules/esquery": { + "version": "1.6.0", + "license": "BSD-3-Clause", + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "../../node_modules/esrecurse": { + "version": "4.3.0", + "license": "BSD-2-Clause", + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "../../node_modules/estraverse": { + "version": "5.3.0", + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "../../node_modules/esutils": { + "version": "2.0.3", + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/execa": { + "version": "5.1.1", + "license": "MIT", + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "../../node_modules/exit": { + "version": "0.1.2", + "engines": { + "node": ">= 0.8.0" + } + }, + "../../node_modules/expand-tilde": { + "version": "2.0.2", + "license": "MIT", + "dependencies": { + "homedir-polyfill": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/expect": { + "version": "29.7.0", + "license": "MIT", + "dependencies": { + "@jest/expect-utils": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/extend": { + "version": "3.0.2", + "license": "MIT" + }, + "../../node_modules/external-editor": { + "version": "3.1.0", + "license": "MIT", + "dependencies": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + }, + "engines": { + "node": ">=4" + } + }, + "../../node_modules/external-editor/node_modules/iconv-lite": { + "version": "0.4.24", + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/fast-deep-equal": { + "version": "3.1.3", + "license": "MIT" + }, + "../../node_modules/fast-diff": { + "version": "1.3.0", + "license": "Apache-2.0" + }, + "../../node_modules/fast-glob": { + "version": "3.3.2", + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "../../node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "../../node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "license": "MIT" + }, + "../../node_modules/fast-levenshtein": { + "version": "2.0.6", + "license": "MIT" + }, + "../../node_modules/fast-redact": { + "version": "3.5.0", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "../../node_modules/fast-safe-stringify": { + "version": "2.1.1", + "license": "MIT" + }, + "../../node_modules/fast-uri": { + "version": "3.0.1", + "license": "MIT" + }, + "../../node_modules/fast-xml-parser": { + "version": "4.5.0", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + }, + { + "type": "paypal", + "url": "https://paypal.me/naturalintelligence" + } + ], + "license": "MIT", + "dependencies": { + "strnum": "^1.0.5" + }, + "bin": { + "fxparser": "src/cli/cli.js" + } + }, + "../../node_modules/fastestsmallesttextencoderdecoder": { + "version": "1.0.22", + "license": "CC0-1.0" + }, + "../../node_modules/fastq": { + "version": "1.17.1", + "license": "ISC", + "dependencies": { + "reusify": "^1.0.4" + } + }, + "../../node_modules/fb-watchman": { + "version": "2.0.2", + "license": "Apache-2.0", + "dependencies": { + "bser": "2.1.1" + } + }, + "../../node_modules/figures": { + "version": "2.0.0", + "license": "MIT", + "dependencies": { + "escape-string-regexp": "^1.0.5" + }, + "engines": { + "node": ">=4" + } + }, + "../../node_modules/figures/node_modules/escape-string-regexp": { + "version": "1.0.5", + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "../../node_modules/file-entry-cache": { + "version": "6.0.1", + "license": "MIT", + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "../../node_modules/file-type": { + "version": "3.9.0", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/filelist": { + "version": "1.0.4", + "license": "Apache-2.0", + "dependencies": { + "minimatch": "^5.0.1" + } + }, + "../../node_modules/filelist/node_modules/brace-expansion": { + "version": "2.0.1", + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "../../node_modules/filelist/node_modules/minimatch": { + "version": "5.1.6", + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "../../node_modules/fill-range": { + "version": "7.1.1", + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/find-cache-dir": { + "version": "3.3.2", + "license": "MIT", + "dependencies": { + "commondir": "^1.0.1", + "make-dir": "^3.0.2", + "pkg-dir": "^4.1.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/avajs/find-cache-dir?sponsor=1" + } + }, + "../../node_modules/find-up": { + "version": "5.0.0", + "license": "MIT", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/findup-sync": { + "version": "5.0.0", + "license": "MIT", + "dependencies": { + "detect-file": "^1.0.0", + "is-glob": "^4.0.3", + "micromatch": "^4.0.4", + "resolve-dir": "^1.0.1" + }, + "engines": { + "node": ">= 10.13.0" + } + }, + "../../node_modules/fined": { + "version": "2.0.0", + "license": "MIT", + "dependencies": { + "expand-tilde": "^2.0.2", + "is-plain-object": "^5.0.0", + "object.defaults": "^1.1.0", + "object.pick": "^1.3.0", + "parse-filepath": "^1.0.2" + }, + "engines": { + "node": ">= 10.13.0" + } + }, + "../../node_modules/flagged-respawn": { + "version": "2.0.0", + "license": "MIT", + "engines": { + "node": ">= 10.13.0" + } + }, + "../../node_modules/flat-cache": { + "version": "3.2.0", + "license": "MIT", + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.3", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "../../node_modules/flatstr": { + "version": "1.0.12", + "license": "MIT" + }, + "../../node_modules/flatted": { + "version": "3.3.1", + "license": "ISC" + }, + "../../node_modules/fnv-plus": { + "version": "1.3.1", + "license": "MIT" + }, + "../../node_modules/for-in": { + "version": "1.0.2", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/for-own": { + "version": "1.0.0", + "license": "MIT", + "dependencies": { + "for-in": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/foreach": { + "version": "2.0.6", + "license": "MIT" + }, + "../../node_modules/foreground-child": { + "version": "2.0.0", + "license": "ISC", + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "../../node_modules/format-util": { + "version": "1.0.5", + "license": "MIT" + }, + "../../node_modules/fp-ts": { + "version": "2.16.9", + "license": "MIT" + }, + "../../node_modules/fromentries": { + "version": "1.3.2", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "../../node_modules/fs.realpath": { + "version": "1.0.0", + "license": "ISC" + }, + "../../node_modules/fsevents": { + "version": "2.3.3", + "license": "MIT", + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "../../node_modules/function-bind": { + "version": "1.1.2", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../../node_modules/gensync": { + "version": "1.0.0-beta.2", + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "../../node_modules/get-caller-file": { + "version": "2.0.5", + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "../../node_modules/get-east-asian-width": { + "version": "1.2.0", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/get-intrinsic": { + "version": "1.2.4", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../../node_modules/get-package-type": { + "version": "0.1.0", + "license": "MIT", + "engines": { + "node": ">=8.0.0" + } + }, + "../../node_modules/get-stream": { + "version": "6.0.1", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/glob-parent": { + "version": "6.0.2", + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "../../node_modules/global-modules": { + "version": "1.0.0", + "license": "MIT", + "dependencies": { + "global-prefix": "^1.0.1", + "is-windows": "^1.0.1", + "resolve-dir": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/global-prefix": { + "version": "1.0.2", + "license": "MIT", + "dependencies": { + "expand-tilde": "^2.0.2", + "homedir-polyfill": "^1.0.1", + "ini": "^1.3.4", + "is-windows": "^1.0.1", + "which": "^1.2.14" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/global-prefix/node_modules/which": { + "version": "1.3.1", + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, + "../../node_modules/globals": { + "version": "13.24.0", + "license": "MIT", + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/globby": { + "version": "13.2.2", + "license": "MIT", + "dependencies": { + "dir-glob": "^3.0.1", + "fast-glob": "^3.3.0", + "ignore": "^5.2.4", + "merge2": "^1.4.1", + "slash": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/globby/node_modules/slash": { + "version": "4.0.0", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/gopd": { + "version": "1.0.1", + "license": "MIT", + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../../node_modules/graceful-fs": { + "version": "4.2.11", + "license": "ISC" + }, + "../../node_modules/graphemer": { + "version": "1.4.0", + "license": "MIT" + }, + "../../node_modules/handlebars": { + "version": "4.7.8", + "license": "MIT", + "dependencies": { + "minimist": "^1.2.5", + "neo-async": "^2.6.2", + "source-map": "^0.6.1", + "wordwrap": "^1.0.0" + }, + "bin": { + "handlebars": "bin/handlebars" + }, + "engines": { + "node": ">=0.4.7" + }, + "optionalDependencies": { + "uglify-js": "^3.1.4" + } + }, + "../../node_modules/handler-agent": { + "version": "0.2.0", + "license": "MIT" + }, + "../../node_modules/has-flag": { + "version": "4.0.0", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../../node_modules/has-property-descriptors": { + "version": "1.0.2", + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../../node_modules/has-proto": { + "version": "1.0.3", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../../node_modules/has-symbols": { + "version": "1.0.3", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../../node_modules/hasha": { + "version": "5.2.2", + "license": "MIT", + "dependencies": { + "is-stream": "^2.0.0", + "type-fest": "^0.8.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/hasha/node_modules/type-fest": { + "version": "0.8.1", + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=8" + } + }, + "../../node_modules/hasown": { + "version": "2.0.2", + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "../../node_modules/header-case": { + "version": "2.0.4", + "license": "MIT", + "dependencies": { + "capital-case": "^1.0.4", + "tslib": "^2.0.3" + } + }, + "../../node_modules/homedir-polyfill": { + "version": "1.0.3", + "license": "MIT", + "dependencies": { + "parse-passwd": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/html-escaper": { + "version": "2.0.2", + "license": "MIT" + }, + "../../node_modules/http-proxy-agent": { + "version": "5.0.0", + "license": "MIT", + "dependencies": { + "@tootallnate/once": "2", + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "../../node_modules/http-reasons": { + "version": "0.1.0", + "license": "Apache-2.0" + }, + "../../node_modules/https-proxy-agent": { + "version": "5.0.1", + "license": "MIT", + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "../../node_modules/human-signals": { + "version": "2.1.0", + "license": "Apache-2.0", + "engines": { + "node": ">=10.17.0" + } + }, + "../../node_modules/iconv-lite": { + "version": "0.6.3", + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/ieee754": { + "version": "1.2.1", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "BSD-3-Clause" + }, + "../../node_modules/ignore": { + "version": "5.3.2", + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "../../node_modules/import-fresh": { + "version": "3.3.0", + "license": "MIT", + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/import-local": { + "version": "3.2.0", + "license": "MIT", + "dependencies": { + "pkg-dir": "^4.2.0", + "resolve-cwd": "^3.0.0" + }, + "bin": { + "import-local-fixture": "fixtures/cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/imurmurhash": { + "version": "0.1.4", + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "../../node_modules/indent-string": { + "version": "4.0.0", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../../node_modules/inflight": { + "version": "1.0.6", + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "../../node_modules/inherits": { + "version": "2.0.4", + "license": "ISC" + }, + "../../node_modules/ini": { + "version": "1.3.8", + "license": "ISC" + }, + "../../node_modules/inquirer": { + "version": "9.3.5", + "license": "MIT", + "dependencies": { + "@inquirer/figures": "^1.0.3", + "ansi-escapes": "^4.3.2", + "cli-width": "^4.1.0", + "external-editor": "^3.1.0", + "mute-stream": "1.0.0", + "ora": "^5.4.1", + "run-async": "^3.0.0", + "rxjs": "^7.8.1", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^6.2.0", + "yoctocolors-cjs": "^2.1.2" + }, + "engines": { + "node": ">=18" + } + }, + "../../node_modules/inquirer/node_modules/cli-cursor": { + "version": "3.1.0", + "license": "MIT", + "dependencies": { + "restore-cursor": "^3.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/inquirer/node_modules/is-interactive": { + "version": "1.0.0", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../../node_modules/inquirer/node_modules/is-unicode-supported": { + "version": "0.1.0", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/inquirer/node_modules/log-symbols": { + "version": "4.1.0", + "license": "MIT", + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/inquirer/node_modules/ora": { + "version": "5.4.1", + "license": "MIT", + "dependencies": { + "bl": "^4.1.0", + "chalk": "^4.1.0", + "cli-cursor": "^3.1.0", + "cli-spinners": "^2.5.0", + "is-interactive": "^1.0.0", + "is-unicode-supported": "^0.1.0", + "log-symbols": "^4.1.0", + "strip-ansi": "^6.0.0", + "wcwidth": "^1.0.1" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/inquirer/node_modules/restore-cursor": { + "version": "3.1.0", + "license": "MIT", + "dependencies": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/inquirer/node_modules/wrap-ansi": { + "version": "6.2.0", + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/interpret": { + "version": "3.1.1", + "license": "MIT", + "engines": { + "node": ">=10.13.0" + } + }, + "../../node_modules/io-ts": { + "version": "2.2.21", + "license": "MIT", + "peerDependencies": { + "fp-ts": "^2.5.0" + } + }, + "../../node_modules/is-absolute": { + "version": "1.0.0", + "license": "MIT", + "dependencies": { + "is-relative": "^1.0.0", + "is-windows": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/is-arrayish": { + "version": "0.2.1", + "license": "MIT" + }, + "../../node_modules/is-binary-path": { + "version": "2.1.0", + "license": "MIT", + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/is-core-module": { + "version": "2.15.1", + "license": "MIT", + "dependencies": { + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../../node_modules/is-extglob": { + "version": "2.1.1", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../../node_modules/is-generator-fn": { + "version": "2.1.0", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "../../node_modules/is-glob": { + "version": "4.0.3", + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/is-interactive": { + "version": "2.0.0", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/is-number": { + "version": "7.0.0", + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "../../node_modules/is-path-cwd": { + "version": "3.0.0", + "license": "MIT", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/is-path-inside": { + "version": "3.0.3", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../../node_modules/is-plain-object": { + "version": "5.0.0", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/is-relative": { + "version": "1.0.0", + "license": "MIT", + "dependencies": { + "is-unc-path": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/is-stream": { + "version": "2.0.1", + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/is-typedarray": { + "version": "1.0.0", + "license": "MIT" + }, + "../../node_modules/is-unc-path": { + "version": "1.0.0", + "license": "MIT", + "dependencies": { + "unc-path-regex": "^0.1.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/is-unicode-supported": { + "version": "2.1.0", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/is-windows": { + "version": "1.0.2", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/isbinaryfile": { + "version": "5.0.2", + "license": "MIT", + "engines": { + "node": ">= 18.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/gjtorikian/" + } + }, + "../../node_modules/isexe": { + "version": "2.0.0", + "license": "ISC" + }, + "../../node_modules/isobject": { + "version": "3.0.1", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/isomorphic-fetch": { + "version": "3.0.0", + "license": "MIT", + "dependencies": { + "node-fetch": "^2.6.1", + "whatwg-fetch": "^3.4.1" + } + }, + "../../node_modules/istanbul-lib-coverage": { + "version": "3.2.2", + "license": "BSD-3-Clause", + "engines": { + "node": ">=8" + } + }, + "../../node_modules/istanbul-lib-hook": { + "version": "3.0.0", + "license": "BSD-3-Clause", + "dependencies": { + "append-transform": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/istanbul-lib-instrument": { + "version": "4.0.3", + "license": "BSD-3-Clause", + "dependencies": { + "@babel/core": "^7.7.5", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.0.0", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/istanbul-lib-processinfo": { + "version": "2.0.3", + "license": "ISC", + "dependencies": { + "archy": "^1.0.0", + "cross-spawn": "^7.0.3", + "istanbul-lib-coverage": "^3.2.0", + "p-map": "^3.0.0", + "rimraf": "^3.0.0", + "uuid": "^8.3.2" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/istanbul-lib-processinfo/node_modules/uuid": { + "version": "8.3.2", + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "../../node_modules/istanbul-lib-report": { + "version": "3.0.1", + "license": "BSD-3-Clause", + "dependencies": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^4.0.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "../../node_modules/istanbul-lib-report/node_modules/make-dir": { + "version": "4.0.0", + "license": "MIT", + "dependencies": { + "semver": "^7.5.3" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/istanbul-lib-report/node_modules/semver": { + "version": "7.6.3", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "../../node_modules/istanbul-lib-source-maps": { + "version": "4.0.1", + "license": "BSD-3-Clause", + "dependencies": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0", + "source-map": "^0.6.1" + }, + "engines": { + "node": ">=10" + } + }, + "../../node_modules/istanbul-reports": { + "version": "3.1.7", + "license": "BSD-3-Clause", + "dependencies": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/jake": { + "version": "10.9.2", + "license": "Apache-2.0", + "dependencies": { + "async": "^3.2.3", + "chalk": "^4.0.2", + "filelist": "^1.0.4", + "minimatch": "^3.1.2" + }, + "bin": { + "jake": "bin/cli.js" + }, + "engines": { + "node": ">=10" + } + }, + "../../node_modules/jest": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/core": "^29.7.0", + "@jest/types": "^29.6.3", + "import-local": "^3.0.2", + "jest-cli": "^29.7.0" + }, + "bin": { + "jest": "bin/jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "../../node_modules/jest-changed-files": { + "version": "29.7.0", + "license": "MIT", + "dependencies": { + "execa": "^5.0.0", + "jest-util": "^29.7.0", + "p-limit": "^3.1.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/jest-circus": { + "version": "29.7.0", + "license": "MIT", + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "co": "^4.6.0", + "dedent": "^1.0.0", + "is-generator-fn": "^2.0.0", + "jest-each": "^29.7.0", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "p-limit": "^3.1.0", + "pretty-format": "^29.7.0", + "pure-rand": "^6.0.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/jest-cli": { + "version": "29.7.0", + "license": "MIT", + "dependencies": { + "@jest/core": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "create-jest": "^29.7.0", + "exit": "^0.1.2", + "import-local": "^3.0.2", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "yargs": "^17.3.1" + }, + "bin": { + "jest": "bin/jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "../../node_modules/jest-cli/node_modules/cliui": { + "version": "8.0.1", + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "../../node_modules/jest-cli/node_modules/yargs": { + "version": "17.7.2", + "license": "MIT", + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "../../node_modules/jest-cli/node_modules/yargs-parser": { + "version": "21.1.1", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "../../node_modules/jest-config": { + "version": "29.7.0", + "license": "MIT", + "dependencies": { + "@babel/core": "^7.11.6", + "@jest/test-sequencer": "^29.7.0", + "@jest/types": "^29.6.3", + "babel-jest": "^29.7.0", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "deepmerge": "^4.2.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-circus": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "micromatch": "^4.0.4", + "parse-json": "^5.2.0", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@types/node": "*", + "ts-node": ">=9.0.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "ts-node": { + "optional": true + } + } + }, + "../../node_modules/jest-config/node_modules/glob": { + "version": "7.2.3", + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "../../node_modules/jest-diff": { + "version": "29.7.0", + "license": "MIT", + "dependencies": { + "chalk": "^4.0.0", + "diff-sequences": "^29.6.3", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/jest-docblock": { + "version": "29.7.0", + "license": "MIT", + "dependencies": { + "detect-newline": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/jest-each": { + "version": "29.7.0", + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "jest-get-type": "^29.6.3", + "jest-util": "^29.7.0", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/jest-environment-node": { + "version": "29.7.0", + "license": "MIT", + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/jest-get-type": { + "version": "29.6.3", + "license": "MIT", + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/jest-haste-map": { + "version": "29.7.0", + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "@types/graceful-fs": "^4.1.3", + "@types/node": "*", + "anymatch": "^3.0.3", + "fb-watchman": "^2.0.0", + "graceful-fs": "^4.2.9", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", + "micromatch": "^4.0.4", + "walker": "^1.0.8" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "optionalDependencies": { + "fsevents": "^2.3.2" + } + }, + "../../node_modules/jest-leak-detector": { + "version": "29.7.0", + "license": "MIT", + "dependencies": { + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/jest-matcher-utils": { + "version": "29.7.0", + "license": "MIT", + "dependencies": { + "chalk": "^4.0.0", + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/jest-message-util": { + "version": "29.7.0", + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.12.13", + "@jest/types": "^29.6.3", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/jest-mock": { + "version": "29.7.0", + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/jest-pnp-resolver": { + "version": "1.2.3", + "license": "MIT", + "engines": { + "node": ">=6" + }, + "peerDependencies": { + "jest-resolve": "*" + }, + "peerDependenciesMeta": { + "jest-resolve": { + "optional": true + } + } + }, + "../../node_modules/jest-regex-util": { + "version": "29.6.3", + "license": "MIT", + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/jest-resolve": { + "version": "29.7.0", + "license": "MIT", + "dependencies": { + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-pnp-resolver": "^1.2.2", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "resolve": "^1.20.0", + "resolve.exports": "^2.0.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/jest-resolve-dependencies": { + "version": "29.7.0", + "license": "MIT", + "dependencies": { + "jest-regex-util": "^29.6.3", + "jest-snapshot": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/jest-runner": { + "version": "29.7.0", + "license": "MIT", + "dependencies": { + "@jest/console": "^29.7.0", + "@jest/environment": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "emittery": "^0.13.1", + "graceful-fs": "^4.2.9", + "jest-docblock": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-leak-detector": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-resolve": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-util": "^29.7.0", + "jest-watcher": "^29.7.0", + "jest-worker": "^29.7.0", + "p-limit": "^3.1.0", + "source-map-support": "0.5.13" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/jest-runtime": { + "version": "29.7.0", + "license": "MIT", + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/globals": "^29.7.0", + "@jest/source-map": "^29.6.3", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "cjs-module-lexer": "^1.0.0", + "collect-v8-coverage": "^1.0.0", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "slash": "^3.0.0", + "strip-bom": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/jest-runtime/node_modules/glob": { + "version": "7.2.3", + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "../../node_modules/jest-snapshot": { + "version": "29.7.0", + "license": "MIT", + "dependencies": { + "@babel/core": "^7.11.6", + "@babel/generator": "^7.7.2", + "@babel/plugin-syntax-jsx": "^7.7.2", + "@babel/plugin-syntax-typescript": "^7.7.2", + "@babel/types": "^7.3.3", + "@jest/expect-utils": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "babel-preset-current-node-syntax": "^1.0.0", + "chalk": "^4.0.0", + "expect": "^29.7.0", + "graceful-fs": "^4.2.9", + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "natural-compare": "^1.4.0", + "pretty-format": "^29.7.0", + "semver": "^7.5.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/jest-snapshot/node_modules/semver": { + "version": "7.6.3", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "../../node_modules/jest-util": { + "version": "29.7.0", + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/jest-validate": { + "version": "29.7.0", + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "camelcase": "^6.2.0", + "chalk": "^4.0.0", + "jest-get-type": "^29.6.3", + "leven": "^3.1.0", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/jest-validate/node_modules/camelcase": { + "version": "6.3.0", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/jest-watcher": { + "version": "29.7.0", + "license": "MIT", + "dependencies": { + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "emittery": "^0.13.1", + "jest-util": "^29.7.0", + "string-length": "^4.0.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/jest-worker": { + "version": "29.7.0", + "license": "MIT", + "dependencies": { + "@types/node": "*", + "jest-util": "^29.7.0", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/jest-worker/node_modules/supports-color": { + "version": "8.1.1", + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "../../node_modules/js-tokens": { + "version": "4.0.0", + "license": "MIT" + }, + "../../node_modules/js-yaml": { + "version": "3.14.1", + "license": "MIT", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "../../node_modules/jsesc": { + "version": "2.5.2", + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=4" + } + }, + "../../node_modules/json-buffer": { + "version": "3.0.1", + "license": "MIT" + }, + "../../node_modules/json-parse-better-errors": { + "version": "1.0.2", + "license": "MIT" + }, + "../../node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "license": "MIT" + }, + "../../node_modules/json-pointer": { + "version": "0.6.2", + "license": "MIT", + "dependencies": { + "foreach": "^2.0.4" + } + }, + "../../node_modules/json-promise": { + "version": "1.1.8", + "license": "MIT", + "dependencies": { + "bluebird": "*" + } + }, + "../../node_modules/json-schema-compare": { + "version": "0.2.2", + "license": "MIT", + "dependencies": { + "lodash": "^4.17.4" + } + }, + "../../node_modules/json-schema-faker": { + "version": "0.5.6", + "license": "MIT", + "dependencies": { + "json-schema-ref-parser": "^6.1.0", + "jsonpath-plus": "^7.2.0" + }, + "bin": { + "jsf": "bin/gen.cjs" + } + }, + "../../node_modules/json-schema-ref-parser": { + "version": "6.1.0", + "license": "MIT", + "dependencies": { + "call-me-maybe": "^1.0.1", + "js-yaml": "^3.12.1", + "ono": "^4.0.11" + } + }, + "../../node_modules/json-schema-traverse": { + "version": "0.4.1", + "license": "MIT" + }, + "../../node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "license": "MIT" + }, + "../../node_modules/json-stringify-safe": { + "version": "5.0.1", + "license": "ISC" + }, + "../../node_modules/json5": { + "version": "2.2.3", + "license": "MIT", + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "../../node_modules/jsonc-parser": { + "version": "2.2.1", + "license": "MIT" + }, + "../../node_modules/jsonpath-plus": { + "version": "7.2.0", + "license": "MIT", + "engines": { + "node": ">=12.0.0" + } + }, + "../../node_modules/keyv": { + "version": "4.5.4", + "license": "MIT", + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "../../node_modules/kind-of": { + "version": "6.0.3", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/kleur": { + "version": "3.0.3", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "../../node_modules/leven": { + "version": "3.1.0", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "../../node_modules/levn": { + "version": "0.4.1", + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "../../node_modules/liftoff": { + "version": "4.0.0", + "license": "MIT", + "dependencies": { + "extend": "^3.0.2", + "findup-sync": "^5.0.0", + "fined": "^2.0.0", + "flagged-respawn": "^2.0.0", + "is-plain-object": "^5.0.0", + "object.map": "^1.0.1", + "rechoir": "^0.8.0", + "resolve": "^1.20.0" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "../../node_modules/lines-and-columns": { + "version": "1.2.4", + "license": "MIT" + }, + "../../node_modules/liquid-json": { + "version": "0.3.1", + "license": "Apache-2.0", + "engines": { + "node": ">=4" + } + }, + "../../node_modules/load-json-file": { + "version": "4.0.0", + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "../../node_modules/load-json-file/node_modules/parse-json": { + "version": "4.0.0", + "license": "MIT", + "dependencies": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + }, + "engines": { + "node": ">=4" + } + }, + "../../node_modules/load-json-file/node_modules/strip-bom": { + "version": "3.0.0", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "../../node_modules/locate-path": { + "version": "6.0.0", + "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/lodash": { + "version": "4.17.21", + "license": "MIT" + }, + "../../node_modules/lodash.camelcase": { + "version": "4.3.0", + "license": "MIT" + }, + "../../node_modules/lodash.flattendeep": { + "version": "4.4.0", + "license": "MIT" + }, + "../../node_modules/lodash.get": { + "version": "4.4.2", + "license": "MIT" + }, + "../../node_modules/lodash.memoize": { + "version": "4.1.2", + "license": "MIT" + }, + "../../node_modules/lodash.merge": { + "version": "4.6.2", + "license": "MIT" + }, + "../../node_modules/log-symbols": { + "version": "6.0.0", + "license": "MIT", + "dependencies": { + "chalk": "^5.3.0", + "is-unicode-supported": "^1.3.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/log-symbols/node_modules/chalk": { + "version": "5.3.0", + "license": "MIT", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "../../node_modules/log-symbols/node_modules/is-unicode-supported": { + "version": "1.3.0", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/lower-case": { + "version": "2.0.2", + "license": "MIT", + "dependencies": { + "tslib": "^2.0.3" + } + }, + "../../node_modules/lru-cache": { + "version": "5.1.1", + "license": "ISC", + "dependencies": { + "yallist": "^3.0.2" + } + }, + "../../node_modules/make-dir": { + "version": "3.1.0", + "license": "MIT", + "dependencies": { + "semver": "^6.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/make-error": { + "version": "1.3.6", + "license": "ISC" + }, + "../../node_modules/make-iterator": { + "version": "1.0.1", + "license": "MIT", + "dependencies": { + "kind-of": "^6.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/makeerror": { + "version": "1.0.12", + "license": "BSD-3-Clause", + "dependencies": { + "tmpl": "1.0.5" + } + }, + "../../node_modules/map-cache": { + "version": "0.2.2", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/media-typer": { + "version": "0.3.0", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "../../node_modules/merge-stream": { + "version": "2.0.0", + "license": "MIT" + }, + "../../node_modules/merge2": { + "version": "1.4.1", + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "../../node_modules/micri": { + "version": "4.5.1", + "license": "MIT", + "dependencies": { + "handler-agent": "0.2.0" + }, + "engines": { + "node": ">= 12.0.0" + } + }, + "../../node_modules/micromatch": { + "version": "4.0.8", + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "../../node_modules/mime-db": { + "version": "1.52.0", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "../../node_modules/mime-format": { + "version": "2.0.1", + "license": "Apache-2.0", + "dependencies": { + "charset": "^1.0.0" + } + }, + "../../node_modules/mime-types": { + "version": "2.1.35", + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "../../node_modules/mimic-fn": { + "version": "2.1.0", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "../../node_modules/mimic-function": { + "version": "5.0.1", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/minimatch": { + "version": "3.1.2", + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "../../node_modules/minimist": { + "version": "1.2.6", + "license": "MIT" + }, + "../../node_modules/mkdirp": { + "version": "0.5.6", + "license": "MIT", + "dependencies": { + "minimist": "^1.2.6" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "../../node_modules/ms": { + "version": "2.1.2", + "license": "MIT" + }, + "../../node_modules/mute-stream": { + "version": "1.0.0", + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "../../node_modules/natural-compare": { + "version": "1.4.0", + "license": "MIT" + }, + "../../node_modules/negotiator": { + "version": "0.6.3", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "../../node_modules/neo-async": { + "version": "2.6.2", + "license": "MIT" + }, + "../../node_modules/no-case": { + "version": "3.0.4", + "license": "MIT", + "dependencies": { + "lower-case": "^2.0.2", + "tslib": "^2.0.3" + } + }, + "../../node_modules/nock": { + "version": "13.5.5", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^4.1.0", + "json-stringify-safe": "^5.0.1", + "propagate": "^2.0.0" + }, + "engines": { + "node": ">= 10.13" + } + }, + "../../node_modules/node-abort-controller": { + "version": "3.1.1", + "license": "MIT" + }, + "../../node_modules/node-fetch": { + "version": "2.7.0", + "license": "MIT", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "../../node_modules/node-int64": { + "version": "0.4.0", + "license": "MIT" + }, + "../../node_modules/node-plop": { + "version": "0.32.0", + "license": "MIT", + "dependencies": { + "@types/inquirer": "^9.0.3", + "change-case": "^4.1.2", + "del": "^7.1.0", + "globby": "^13.2.2", + "handlebars": "^4.7.8", + "inquirer": "^9.2.10", + "isbinaryfile": "^5.0.0", + "lodash.get": "^4.4.2", + "lower-case": "^2.0.2", + "mkdirp": "^3.0.1", + "resolve": "^1.22.4", + "title-case": "^3.0.3", + "upper-case": "^2.0.2" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + } + }, + "../../node_modules/node-plop/node_modules/mkdirp": { + "version": "3.0.1", + "license": "MIT", + "bin": { + "mkdirp": "dist/cjs/src/bin.js" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "../../node_modules/node-preload": { + "version": "0.2.1", + "license": "MIT", + "dependencies": { + "process-on-spawn": "^1.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/node-releases": { + "version": "2.0.18", + "license": "MIT" + }, + "../../node_modules/normalize-path": { + "version": "3.0.0", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/npm-run-path": { + "version": "4.0.1", + "license": "MIT", + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/nyc": { + "version": "15.1.0", + "dev": true, + "license": "ISC", + "dependencies": { + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.2", + "caching-transform": "^4.0.0", + "convert-source-map": "^1.7.0", + "decamelize": "^1.2.0", + "find-cache-dir": "^3.2.0", + "find-up": "^4.1.0", + "foreground-child": "^2.0.0", + "get-package-type": "^0.1.0", + "glob": "^7.1.6", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-hook": "^3.0.0", + "istanbul-lib-instrument": "^4.0.0", + "istanbul-lib-processinfo": "^2.0.2", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.0.2", + "make-dir": "^3.0.0", + "node-preload": "^0.2.1", + "p-map": "^3.0.0", + "process-on-spawn": "^1.0.0", + "resolve-from": "^5.0.0", + "rimraf": "^3.0.0", + "signal-exit": "^3.0.2", + "spawn-wrap": "^2.0.0", + "test-exclude": "^6.0.0", + "yargs": "^15.0.2" + }, + "bin": { + "nyc": "bin/nyc.js" + }, + "engines": { + "node": ">=8.9" + } + }, + "../../node_modules/nyc/node_modules/cliui": { + "version": "6.0.0", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" + } + }, + "../../node_modules/nyc/node_modules/find-up": { + "version": "4.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/nyc/node_modules/glob": { + "version": "7.2.3", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "../../node_modules/nyc/node_modules/locate-path": { + "version": "5.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/nyc/node_modules/p-limit": { + "version": "2.3.0", + "dev": true, + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/nyc/node_modules/p-locate": { + "version": "4.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/nyc/node_modules/resolve-from": { + "version": "5.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../../node_modules/nyc/node_modules/wrap-ansi": { + "version": "6.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/nyc/node_modules/y18n": { + "version": "4.0.3", + "dev": true, + "license": "ISC" + }, + "../../node_modules/nyc/node_modules/yargs": { + "version": "15.4.1", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.2" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/nyc/node_modules/yargs-parser": { + "version": "18.1.3", + "dev": true, + "license": "ISC", + "dependencies": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + }, + "engines": { + "node": ">=6" + } + }, + "../../node_modules/object-inspect": { + "version": "1.13.2", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../../node_modules/object.defaults": { + "version": "1.1.0", + "license": "MIT", + "dependencies": { + "array-each": "^1.0.1", + "array-slice": "^1.0.0", + "for-own": "^1.0.0", + "isobject": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/object.map": { + "version": "1.0.1", + "license": "MIT", + "dependencies": { + "for-own": "^1.0.0", + "make-iterator": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/object.pick": { + "version": "1.3.0", + "license": "MIT", + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/once": { + "version": "1.4.0", + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "../../node_modules/onetime": { + "version": "5.1.2", + "license": "MIT", + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/ono": { + "version": "4.0.11", + "license": "MIT", + "dependencies": { + "format-util": "^1.0.3" + } + }, + "../../node_modules/openapi3-ts": { + "version": "2.0.2", + "license": "MIT", + "dependencies": { + "yaml": "^1.10.2" + } + }, + "../../node_modules/optionator": { + "version": "0.9.4", + "license": "MIT", + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "../../node_modules/ora": { + "version": "8.1.0", + "license": "MIT", + "dependencies": { + "chalk": "^5.3.0", + "cli-cursor": "^5.0.0", + "cli-spinners": "^2.9.2", + "is-interactive": "^2.0.0", + "is-unicode-supported": "^2.0.0", + "log-symbols": "^6.0.0", + "stdin-discarder": "^0.2.2", + "string-width": "^7.2.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/ora/node_modules/ansi-regex": { + "version": "6.1.0", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "../../node_modules/ora/node_modules/chalk": { + "version": "5.3.0", + "license": "MIT", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "../../node_modules/ora/node_modules/emoji-regex": { + "version": "10.4.0", + "license": "MIT" + }, + "../../node_modules/ora/node_modules/string-width": { + "version": "7.2.0", + "license": "MIT", + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/ora/node_modules/strip-ansi": { + "version": "7.1.0", + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "../../node_modules/os-tmpdir": { + "version": "1.0.2", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/p-limit": { + "version": "3.1.0", + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/p-locate": { + "version": "5.0.0", + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/p-map": { + "version": "3.0.0", + "license": "MIT", + "dependencies": { + "aggregate-error": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/p-try": { + "version": "2.2.0", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "../../node_modules/package-hash": { + "version": "4.0.0", + "license": "ISC", + "dependencies": { + "graceful-fs": "^4.1.15", + "hasha": "^5.0.0", + "lodash.flattendeep": "^4.4.0", + "release-zalgo": "^1.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/param-case": { + "version": "3.0.4", + "license": "MIT", + "dependencies": { + "dot-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, + "../../node_modules/parent-module": { + "version": "1.0.1", + "license": "MIT", + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "../../node_modules/parse-filepath": { + "version": "1.0.2", + "license": "MIT", + "dependencies": { + "is-absolute": "^1.0.0", + "map-cache": "^0.2.0", + "path-root": "^0.1.1" + }, + "engines": { + "node": ">=0.8" + } + }, + "../../node_modules/parse-json": { + "version": "5.2.0", + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/parse-multipart-data": { + "version": "1.5.0", + "license": "MIT" + }, + "../../node_modules/parse-passwd": { + "version": "1.0.0", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/parse-prefer-header": { + "version": "1.0.0", + "license": "MIT", + "dependencies": { + "lodash.camelcase": "^4.3.0" + } + }, + "../../node_modules/pascal-case": { + "version": "3.1.2", + "license": "MIT", + "dependencies": { + "no-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, + "../../node_modules/path-case": { + "version": "3.0.4", + "license": "MIT", + "dependencies": { + "dot-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, + "../../node_modules/path-exists": { + "version": "4.0.0", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../../node_modules/path-is-absolute": { + "version": "1.0.1", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/path-key": { + "version": "3.1.1", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../../node_modules/path-parse": { + "version": "1.0.7", + "license": "MIT" + }, + "../../node_modules/path-root": { + "version": "0.1.1", + "license": "MIT", + "dependencies": { + "path-root-regex": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/path-root-regex": { + "version": "0.1.2", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/path-type": { + "version": "4.0.0", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../../node_modules/picocolors": { + "version": "1.0.1", + "license": "ISC" + }, + "../../node_modules/picomatch": { + "version": "2.3.1", + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "../../node_modules/pify": { + "version": "3.0.0", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "../../node_modules/pino": { + "version": "6.14.0", + "license": "MIT", + "dependencies": { + "fast-redact": "^3.0.0", + "fast-safe-stringify": "^2.0.8", + "flatstr": "^1.0.12", + "pino-std-serializers": "^3.1.0", + "process-warning": "^1.0.0", + "quick-format-unescaped": "^4.0.3", + "sonic-boom": "^1.0.2" + }, + "bin": { + "pino": "bin.js" + } + }, + "../../node_modules/pino-std-serializers": { + "version": "3.2.0", + "license": "MIT" + }, + "../../node_modules/pirates": { + "version": "4.0.6", + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "../../node_modules/pkg-conf": { + "version": "2.1.0", + "license": "MIT", + "dependencies": { + "find-up": "^2.0.0", + "load-json-file": "^4.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "../../node_modules/pkg-conf/node_modules/find-up": { + "version": "2.1.0", + "license": "MIT", + "dependencies": { + "locate-path": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "../../node_modules/pkg-conf/node_modules/locate-path": { + "version": "2.0.0", + "license": "MIT", + "dependencies": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "../../node_modules/pkg-conf/node_modules/p-limit": { + "version": "1.3.0", + "license": "MIT", + "dependencies": { + "p-try": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "../../node_modules/pkg-conf/node_modules/p-locate": { + "version": "2.0.0", + "license": "MIT", + "dependencies": { + "p-limit": "^1.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "../../node_modules/pkg-conf/node_modules/p-try": { + "version": "1.0.0", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "../../node_modules/pkg-conf/node_modules/path-exists": { + "version": "3.0.0", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "../../node_modules/pkg-dir": { + "version": "4.2.0", + "license": "MIT", + "dependencies": { + "find-up": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/pkg-dir/node_modules/find-up": { + "version": "4.1.0", + "license": "MIT", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/pkg-dir/node_modules/locate-path": { + "version": "5.0.0", + "license": "MIT", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/pkg-dir/node_modules/p-limit": { + "version": "2.3.0", + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/pkg-dir/node_modules/p-locate": { + "version": "4.1.0", + "license": "MIT", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/plop": { + "version": "4.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/liftoff": "^4.0.3", + "chalk": "^5.3.0", + "interpret": "^3.1.1", + "liftoff": "^4.0.0", + "minimist": "^1.2.8", + "node-plop": "^0.32.0", + "ora": "^8.0.0", + "v8flags": "^4.0.1" + }, + "bin": { + "plop": "bin/plop.js" + }, + "engines": { + "node": ">=18" + } + }, + "../../node_modules/plop/node_modules/chalk": { + "version": "5.3.0", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "../../node_modules/plop/node_modules/minimist": { + "version": "1.2.8", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../../node_modules/postman-collection": { + "version": "4.5.0", + "license": "Apache-2.0", + "dependencies": { + "@faker-js/faker": "5.5.3", + "file-type": "3.9.0", + "http-reasons": "0.1.0", + "iconv-lite": "0.6.3", + "liquid-json": "0.3.1", + "lodash": "4.17.21", + "mime-format": "2.0.1", + "mime-types": "2.1.35", + "postman-url-encoder": "3.0.5", + "semver": "7.6.3", + "uuid": "8.3.2" + }, + "engines": { + "node": ">=10" + } + }, + "../../node_modules/postman-collection/node_modules/@faker-js/faker": { + "version": "5.5.3", + "license": "MIT" + }, + "../../node_modules/postman-collection/node_modules/semver": { + "version": "7.6.3", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "../../node_modules/postman-collection/node_modules/uuid": { + "version": "8.3.2", + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "../../node_modules/postman-url-encoder": { + "version": "3.0.5", + "license": "Apache-2.0", + "dependencies": { + "punycode": "^2.1.1" + }, + "engines": { + "node": ">=10" + } + }, + "../../node_modules/prelude-ls": { + "version": "1.2.1", + "license": "MIT", + "engines": { + "node": ">= 0.8.0" + } + }, + "../../node_modules/prettier": { + "version": "3.3.3", + "dev": true, + "license": "MIT", + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "../../node_modules/prettier-linter-helpers": { + "version": "1.0.0", + "license": "MIT", + "dependencies": { + "fast-diff": "^1.1.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "../../node_modules/pretty-data": { + "version": "0.40.0", + "license": "MIT" + }, + "../../node_modules/pretty-format": { + "version": "29.7.0", + "license": "MIT", + "dependencies": { + "@jest/schemas": "^29.6.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "../../node_modules/process-on-spawn": { + "version": "1.0.0", + "license": "MIT", + "dependencies": { + "fromentries": "^1.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/process-warning": { + "version": "1.0.0", + "license": "MIT" + }, + "../../node_modules/prompts": { + "version": "2.4.2", + "license": "MIT", + "dependencies": { + "kleur": "^3.0.3", + "sisteransi": "^1.0.5" + }, + "engines": { + "node": ">= 6" + } + }, + "../../node_modules/propagate": { + "version": "2.0.1", + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "../../node_modules/punycode": { + "version": "2.3.1", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "../../node_modules/pure-rand": { + "version": "6.1.0", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/dubzzz" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fast-check" + } + ], + "license": "MIT" + }, + "../../node_modules/qs": { + "version": "6.13.0", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "side-channel": "^1.0.6" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../../node_modules/queue-microtask": { + "version": "1.2.3", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "../../node_modules/quick-format-unescaped": { + "version": "4.0.4", + "license": "MIT" + }, + "../../node_modules/react-is": { + "version": "18.3.1", + "license": "MIT" + }, + "../../node_modules/readable-stream": { + "version": "3.6.2", + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "../../node_modules/readdirp": { + "version": "3.6.0", + "license": "MIT", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "../../node_modules/rechoir": { + "version": "0.8.0", + "license": "MIT", + "dependencies": { + "resolve": "^1.20.0" + }, + "engines": { + "node": ">= 10.13.0" + } + }, + "../../node_modules/release-zalgo": { + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "es6-error": "^4.0.1" + }, + "engines": { + "node": ">=4" + } + }, + "../../node_modules/require-directory": { + "version": "2.1.1", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/require-from-string": { + "version": "2.0.2", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/require-main-filename": { + "version": "2.0.0", + "license": "ISC" + }, + "../../node_modules/resolve": { + "version": "1.22.8", + "license": "MIT", + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../../node_modules/resolve-cwd": { + "version": "3.0.0", + "license": "MIT", + "dependencies": { + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/resolve-cwd/node_modules/resolve-from": { + "version": "5.0.0", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../../node_modules/resolve-dir": { + "version": "1.0.1", + "license": "MIT", + "dependencies": { + "expand-tilde": "^2.0.0", + "global-modules": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/resolve-from": { + "version": "4.0.0", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "../../node_modules/resolve.exports": { + "version": "2.0.2", + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "../../node_modules/restore-cursor": { + "version": "5.1.0", + "license": "MIT", + "dependencies": { + "onetime": "^7.0.0", + "signal-exit": "^4.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/restore-cursor/node_modules/onetime": { + "version": "7.0.0", + "license": "MIT", + "dependencies": { + "mimic-function": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/restore-cursor/node_modules/signal-exit": { + "version": "4.1.0", + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "../../node_modules/reusify": { + "version": "1.0.4", + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "../../node_modules/rimraf": { + "version": "3.0.2", + "license": "ISC", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "../../node_modules/rimraf/node_modules/glob": { + "version": "7.2.3", + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "../../node_modules/run-async": { + "version": "3.0.0", + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "../../node_modules/run-parallel": { + "version": "1.2.0", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "../../node_modules/rxjs": { + "version": "7.8.1", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + } + }, + "../../node_modules/safe-buffer": { + "version": "5.2.1", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "../../node_modules/safe-stable-stringify": { + "version": "1.1.1", + "license": "MIT" + }, + "../../node_modules/safer-buffer": { + "version": "2.1.2", + "license": "MIT" + }, + "../../node_modules/semver": { + "version": "6.3.1", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "../../node_modules/sentence-case": { + "version": "3.0.4", + "license": "MIT", + "dependencies": { + "no-case": "^3.0.4", + "tslib": "^2.0.3", + "upper-case-first": "^2.0.2" + } + }, + "../../node_modules/set-blocking": { + "version": "2.0.0", + "license": "ISC" + }, + "../../node_modules/set-function-length": { + "version": "1.2.2", + "license": "MIT", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "../../node_modules/shebang-command": { + "version": "2.0.0", + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/shebang-regex": { + "version": "3.0.0", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../../node_modules/side-channel": { + "version": "1.0.6", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../../node_modules/signal-exit": { + "version": "3.0.7", + "license": "ISC" + }, + "../../node_modules/signale": { + "version": "1.4.0", + "license": "MIT", + "dependencies": { + "chalk": "^2.3.2", + "figures": "^2.0.0", + "pkg-conf": "^2.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "../../node_modules/signale/node_modules/ansi-styles": { + "version": "3.2.1", + "license": "MIT", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "../../node_modules/signale/node_modules/chalk": { + "version": "2.4.2", + "license": "MIT", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "../../node_modules/signale/node_modules/color-convert": { + "version": "1.9.3", + "license": "MIT", + "dependencies": { + "color-name": "1.1.3" + } + }, + "../../node_modules/signale/node_modules/color-name": { + "version": "1.1.3", + "license": "MIT" + }, + "../../node_modules/signale/node_modules/escape-string-regexp": { + "version": "1.0.5", + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "../../node_modules/signale/node_modules/has-flag": { + "version": "3.0.0", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "../../node_modules/signale/node_modules/supports-color": { + "version": "5.5.0", + "license": "MIT", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "../../node_modules/sisteransi": { + "version": "1.0.5", + "license": "MIT" + }, + "../../node_modules/slash": { + "version": "3.0.0", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../../node_modules/snake-case": { + "version": "3.0.4", + "license": "MIT", + "dependencies": { + "dot-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, + "../../node_modules/sonic-boom": { + "version": "1.4.1", + "license": "MIT", + "dependencies": { + "atomic-sleep": "^1.0.0", + "flatstr": "^1.0.12" + } + }, + "../../node_modules/source-map": { + "version": "0.6.1", + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/source-map-support": { + "version": "0.5.13", + "license": "MIT", + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "../../node_modules/spawn-wrap": { + "version": "2.0.0", + "license": "ISC", + "dependencies": { + "foreground-child": "^2.0.0", + "is-windows": "^1.0.2", + "make-dir": "^3.0.0", + "rimraf": "^3.0.0", + "signal-exit": "^3.0.2", + "which": "^2.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/split2": { + "version": "3.2.2", + "license": "ISC", + "dependencies": { + "readable-stream": "^3.0.0" + } + }, + "../../node_modules/sprintf-js": { + "version": "1.0.3", + "license": "BSD-3-Clause" + }, + "../../node_modules/stack-utils": { + "version": "2.0.6", + "license": "MIT", + "dependencies": { + "escape-string-regexp": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "../../node_modules/stack-utils/node_modules/escape-string-regexp": { + "version": "2.0.0", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../../node_modules/stdin-discarder": { + "version": "0.2.2", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/string_decoder": { + "version": "1.3.0", + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "../../node_modules/string-length": { + "version": "4.0.2", + "license": "MIT", + "dependencies": { + "char-regex": "^1.0.2", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "../../node_modules/string-width": { + "version": "4.2.3", + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/strip-ansi": { + "version": "6.0.1", + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/strip-bom": { + "version": "4.0.0", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../../node_modules/strip-final-newline": { + "version": "2.0.0", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "../../node_modules/strip-json-comments": { + "version": "3.1.1", + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/strnum": { + "version": "1.0.5", + "license": "MIT" + }, + "../../node_modules/supports-color": { + "version": "7.2.0", + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../../node_modules/synckit": { + "version": "0.9.1", + "license": "MIT", + "dependencies": { + "@pkgr/core": "^0.1.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts" + } + }, + "../../node_modules/test-exclude": { + "version": "6.0.0", + "license": "ISC", + "dependencies": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/test-exclude/node_modules/glob": { + "version": "7.2.3", + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "../../node_modules/text-table": { + "version": "0.2.0", + "license": "MIT" + }, + "../../node_modules/title-case": { + "version": "3.0.3", + "license": "MIT", + "dependencies": { + "tslib": "^2.0.3" + } + }, + "../../node_modules/tmp": { + "version": "0.0.33", + "license": "MIT", + "dependencies": { + "os-tmpdir": "~1.0.2" + }, + "engines": { + "node": ">=0.6.0" + } + }, + "../../node_modules/tmpl": { + "version": "1.0.5", + "license": "BSD-3-Clause" + }, + "../../node_modules/to-fast-properties": { + "version": "2.0.0", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "../../node_modules/to-regex-range": { + "version": "5.0.1", + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "../../node_modules/tr46": { + "version": "0.0.3", + "license": "MIT" + }, + "../../node_modules/ts-api-utils": { + "version": "1.3.0", + "license": "MIT", + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "typescript": ">=4.2.0" + } + }, + "../../node_modules/ts-jest": { + "version": "29.2.5", + "dev": true, + "license": "MIT", + "dependencies": { + "bs-logger": "^0.2.6", + "ejs": "^3.1.10", + "fast-json-stable-stringify": "^2.1.0", + "jest-util": "^29.0.0", + "json5": "^2.2.3", + "lodash.memoize": "^4.1.2", + "make-error": "^1.3.6", + "semver": "^7.6.3", + "yargs-parser": "^21.1.1" + }, + "bin": { + "ts-jest": "cli.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" + }, + "peerDependencies": { + "@babel/core": ">=7.0.0-beta.0 <8", + "@jest/transform": "^29.0.0", + "@jest/types": "^29.0.0", + "babel-jest": "^29.0.0", + "jest": "^29.0.0", + "typescript": ">=4.3 <6" + }, + "peerDependenciesMeta": { + "@babel/core": { + "optional": true + }, + "@jest/transform": { + "optional": true + }, + "@jest/types": { + "optional": true + }, + "babel-jest": { + "optional": true + }, + "esbuild": { + "optional": true + } + } + }, + "../../node_modules/ts-jest/node_modules/semver": { + "version": "7.6.3", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "../../node_modules/ts-jest/node_modules/yargs-parser": { + "version": "21.1.1", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "../../node_modules/ts-node": { + "version": "10.9.2", + "devOptional": true, + "license": "MIT", + "dependencies": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" + }, + "bin": { + "ts-node": "dist/bin.js", + "ts-node-cwd": "dist/bin-cwd.js", + "ts-node-esm": "dist/bin-esm.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + }, + "peerDependencies": { + "@swc/core": ">=1.2.50", + "@swc/wasm": ">=1.2.50", + "@types/node": "*", + "typescript": ">=2.7" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "@swc/wasm": { + "optional": true + } + } + }, + "../../node_modules/ts-node/node_modules/diff": { + "version": "4.0.2", + "devOptional": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.3.1" + } + }, + "../../node_modules/tslib": { + "version": "2.7.0", + "license": "0BSD" + }, + "../../node_modules/tweetnacl": { + "version": "1.0.3", + "dev": true, + "license": "Unlicense" + }, + "../../node_modules/type-check": { + "version": "0.4.0", + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "../../node_modules/type-fest": { + "version": "0.20.2", + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/type-is": { + "version": "1.6.18", + "license": "MIT", + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } + }, + "../../node_modules/typedarray-to-buffer": { + "version": "3.1.5", + "license": "MIT", + "dependencies": { + "is-typedarray": "^1.0.0" + } + }, + "../../node_modules/typescript": { + "version": "5.6.2", + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "../../node_modules/typescript-eslint": { + "version": "8.5.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/eslint-plugin": "8.5.0", + "@typescript-eslint/parser": "8.5.0", + "@typescript-eslint/utils": "8.5.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "../../node_modules/uglify-js": { + "version": "3.19.3", + "license": "BSD-2-Clause", + "bin": { + "uglifyjs": "bin/uglifyjs" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "../../node_modules/unc-path-regex": { + "version": "0.1.2", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/undici-types": { + "version": "6.19.8", + "license": "MIT" + }, + "../../node_modules/update-browserslist-db": { + "version": "1.1.0", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "escalade": "^3.1.2", + "picocolors": "^1.0.1" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "../../node_modules/upper-case": { + "version": "2.0.2", + "license": "MIT", + "dependencies": { + "tslib": "^2.0.3" + } + }, + "../../node_modules/upper-case-first": { + "version": "2.0.2", + "license": "MIT", + "dependencies": { + "tslib": "^2.0.3" + } + }, + "../../node_modules/uri-js": { + "version": "4.4.1", + "license": "BSD-2-Clause", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "../../node_modules/uri-template-lite": { + "version": "22.9.0", + "license": "MIT" + }, + "../../node_modules/urijs": { + "version": "1.19.11", + "license": "MIT" + }, + "../../node_modules/util-deprecate": { + "version": "1.0.2", + "license": "MIT" + }, + "../../node_modules/utility-types": { + "version": "3.11.0", + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "../../node_modules/uuid": { + "version": "9.0.1", + "dev": true, + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "../../node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "license": "MIT" + }, + "../../node_modules/v8-to-istanbul": { + "version": "9.3.0", + "license": "ISC", + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.12", + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^2.0.0" + }, + "engines": { + "node": ">=10.12.0" + } + }, + "../../node_modules/v8-to-istanbul/node_modules/convert-source-map": { + "version": "2.0.0", + "license": "MIT" + }, + "../../node_modules/v8flags": { + "version": "4.0.1", + "license": "MIT", + "engines": { + "node": ">= 10.13.0" + } + }, + "../../node_modules/validate.io-array": { + "version": "1.0.6", + "license": "MIT" + }, + "../../node_modules/validate.io-function": { + "version": "1.0.2" + }, + "../../node_modules/validate.io-integer": { + "version": "1.0.5", + "dependencies": { + "validate.io-number": "^1.0.3" + } + }, + "../../node_modules/validate.io-integer-array": { + "version": "1.0.0", + "dependencies": { + "validate.io-array": "^1.0.3", + "validate.io-integer": "^1.0.4" + } + }, + "../../node_modules/validate.io-number": { + "version": "1.0.3" + }, + "../../node_modules/walker": { + "version": "1.0.8", + "license": "Apache-2.0", + "dependencies": { + "makeerror": "1.0.12" + } + }, + "../../node_modules/wcwidth": { + "version": "1.0.1", + "license": "MIT", + "dependencies": { + "defaults": "^1.0.3" + } + }, + "../../node_modules/webidl-conversions": { + "version": "3.0.1", + "license": "BSD-2-Clause" + }, + "../../node_modules/whatwg-fetch": { + "version": "3.6.20", + "license": "MIT" + }, + "../../node_modules/whatwg-mimetype": { + "version": "3.0.0", + "license": "MIT", + "engines": { + "node": ">=12" + } + }, + "../../node_modules/whatwg-url": { + "version": "5.0.0", + "license": "MIT", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "../../node_modules/which": { + "version": "2.0.2", + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "../../node_modules/which-module": { + "version": "2.0.1", + "license": "ISC" + }, + "../../node_modules/word-wrap": { + "version": "1.2.5", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/wordwrap": { + "version": "1.0.0", + "license": "MIT" + }, + "../../node_modules/wrap-ansi": { + "version": "7.0.0", + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "../../node_modules/wrappy": { + "version": "1.0.2", + "license": "ISC" + }, + "../../node_modules/write-file-atomic": { + "version": "3.0.3", + "license": "ISC", + "dependencies": { + "imurmurhash": "^0.1.4", + "is-typedarray": "^1.0.0", + "signal-exit": "^3.0.2", + "typedarray-to-buffer": "^3.1.5" + } + }, + "../../node_modules/y18n": { + "version": "5.0.8", + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "../../node_modules/yallist": { + "version": "3.1.1", + "license": "ISC" + }, + "../../node_modules/yaml": { + "version": "1.10.2", + "license": "ISC", + "engines": { + "node": ">= 6" + } + }, + "../../node_modules/yargs": { + "version": "16.2.0", + "license": "MIT", + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "../../node_modules/yargs-parser": { + "version": "20.2.9", + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "../../node_modules/yn": { + "version": "3.1.1", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "../../node_modules/yocto-queue": { + "version": "0.1.0", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/yoctocolors-cjs": { + "version": "2.1.2", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.23.1.tgz", + "integrity": "sha512-YsS2e3Wtgnw7Wq53XXBLcV6JhRsEq8hkfg91ESVadIrzr9wO6jJDMZnCQbHm1Guc5t/CdDiFSSfWP58FNuvT3Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@types/node": { + "version": "22.7.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.7.3.tgz", + "integrity": "sha512-qXKfhXXqGTyBskvWEzJZPUxSslAiLaB6JGP1ic/XTH9ctGgzdgYguuLP1C601aRTSDNlLb0jbKqXjZ48GNraSA==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~6.19.2" + } + }, + "node_modules/esbuild": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.23.1.tgz", + "integrity": "sha512-VVNz/9Sa0bs5SELtn3f7qhJCDPCF5oMEl5cO9/SSinpE9hbPVvxbd572HH5AKiP7WD8INO53GgfDDhRjkylHEg==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.23.1", + "@esbuild/android-arm": "0.23.1", + "@esbuild/android-arm64": "0.23.1", + "@esbuild/android-x64": "0.23.1", + "@esbuild/darwin-arm64": "0.23.1", + "@esbuild/darwin-x64": "0.23.1", + "@esbuild/freebsd-arm64": "0.23.1", + "@esbuild/freebsd-x64": "0.23.1", + "@esbuild/linux-arm": "0.23.1", + "@esbuild/linux-arm64": "0.23.1", + "@esbuild/linux-ia32": "0.23.1", + "@esbuild/linux-loong64": "0.23.1", + "@esbuild/linux-mips64el": "0.23.1", + "@esbuild/linux-ppc64": "0.23.1", + "@esbuild/linux-riscv64": "0.23.1", + "@esbuild/linux-s390x": "0.23.1", + "@esbuild/linux-x64": "0.23.1", + "@esbuild/netbsd-x64": "0.23.1", + "@esbuild/openbsd-arm64": "0.23.1", + "@esbuild/openbsd-x64": "0.23.1", + "@esbuild/sunos-x64": "0.23.1", + "@esbuild/win32-arm64": "0.23.1", + "@esbuild/win32-ia32": "0.23.1", + "@esbuild/win32-x64": "0.23.1" + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/get-tsconfig": { + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.8.1.tgz", + "integrity": "sha512-k9PN+cFBmaLWtVz29SkUoqU5O0slLuHJXt/2P+tMVFT+phsSGXGkp9t3rQIqdz0e+06EHNGs3oM6ZX1s2zHxRg==", + "dev": true, + "license": "MIT", + "dependencies": { + "resolve-pkg-maps": "^1.0.0" + }, + "funding": { + "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" + } + }, + "node_modules/resolve-pkg-maps": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", + "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" + } + }, + "node_modules/telnyx": { + "resolved": "../..", + "link": true + }, + "node_modules/tsx": { + "version": "4.19.1", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.19.1.tgz", + "integrity": "sha512-0flMz1lh74BR4wOvBjuh9olbnwqCPc35OOlfyzHba0Dc+QNUeWX/Gq2YTbnwcWPO3BMd8fkzRVrHcsR+a7z7rA==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "~0.23.0", + "get-tsconfig": "^4.7.5" + }, + "bin": { + "tsx": "dist/cli.mjs" + }, + "engines": { + "node": ">=18.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + } + }, + "node_modules/typescript": { + "version": "5.6.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.2.tgz", + "integrity": "sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/undici-types": { + "version": "6.19.8", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", + "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", + "dev": true, + "license": "MIT" + } + } +} diff --git a/examples/messaging/package.json b/examples/messaging/package.json new file mode 100644 index 0000000..d42c63c --- /dev/null +++ b/examples/messaging/package.json @@ -0,0 +1,24 @@ +{ + "name": "telnyx-messaging-example", + "version": "1.0.0", + "description": "", + "main": "index.ts", + "scripts": { + "debug": "tsx index.ts", + "start": "tsx index.ts" + }, + "author": "Telnyx (https://telnyx.com)", + "license": "ISC", + "type": "module", + "engines": { + "node": "^18 || >=20" + }, + "dependencies": { + "telnyx": "2.0.0-alpha.0" + }, + "devDependencies": { + "@types/node": "^22.7.3", + "tsx": "^4.19.1", + "typescript": "^5.6.2" + } +} diff --git a/examples/messaging/tsconfig.json b/examples/messaging/tsconfig.json new file mode 100644 index 0000000..744be51 --- /dev/null +++ b/examples/messaging/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "rootDir": "./", + "lib": ["ES2023"], + "module": "EsNext", + "moduleResolution": "node", + "target": "ES2022", + "checkJs": false, + "alwaysStrict": true, + "noImplicitAny": true, + "noImplicitThis": true, + "strict": true, + "strictFunctionTypes": true, + "types": [ "node" ], + "esModuleInterop": true, + "noUncheckedIndexedAccess": true, + }, +} diff --git a/examples/webhook-signing/express.js b/examples/webhook-signing/express.js deleted file mode 100644 index 8697a78..0000000 --- a/examples/webhook-signing/express.js +++ /dev/null @@ -1,109 +0,0 @@ -'use strict'; - -const Telnyx = require('telnyx'); -const Express = require('express'); -const bodyParser = require('body-parser'); -const app = Express(); - -/** - * You'll need to make sure this is externally accessible. ngrok (https://ngrok.com/) - * makes this really easy. - * - * To run this file, just provide your Secret API Key and Webhook Secret, like so: - * TELNYX_API_KEY=KEYXXX TELNYX_PUBLIC_KEY=ZZZXXX node express.js - */ - -const apiKey = process.env.TELNYX_API_KEY; -const publicKey = process.env.TELNYX_PUBLIC_KEY; - -const telnyx = Telnyx(apiKey); - -app.post('/webhooks', bodyParser.json(), function(req, res) { - var event; - - try { - event = telnyx.webhooks.constructEvent( - // webhook data needs to be passed raw for verification - JSON.stringify(req.body, null, 2), - req.header('telnyx-signature-ed25519'), - req.header('telnyx-timestamp'), - publicKey - ); - } catch (e) { - // If `constructEvent` throws an error, respond with the message and return. - console.log('Error', e.message); - - return res.status(400).send('Webhook Error:' + e.message); - } - - /** - * Messaging: - */ - if (event.data.event_type === 'message.finalized') { - console.log('Message Finalized.Status: ' + event.data.payload.call_control_id); - } - - /** - * Inbound Call Control: - * first we listen for an initiation event and then answer the call - */ - if (event.data.event_type === 'call.initiated') { - console.log('Call Initiated. Answering call with call control id: ' + event.data.payload.call_control_id); - - const call = new telnyx.Call({call_control_id: event.data.payload.call_control_id}); - - call.answer(); - } - if (event.data.event_type === 'call.answered') { - console.log('Call Answered. Gather audio with the call control id: ' + event.data.payload.call_control_id); - - const call = new telnyx.Call({call_control_id: event.data.payload.call_control_id}); - - call.gather_using_audio({audio_url: 'https://file-examples-com.github.io/uploads/2017/11/file_example_MP3_700KB.mp3'}); - } - if (event.data.event_type === 'call.gather.ended') { - console.log('Call Gathered with Audio. Hanging up call control id: ' + event.data.payload.call_control_id); - - const call = new telnyx.Call({call_control_id: event.data.payload.call_control_id}); - - call.hangup(); - } - if (event.data.event_type === 'call.hangup') { - console.log('Call Hangup. call control id: ' + event.data.payload.call_control_id); - } - - // Event was 'constructed', so we can respond with a 200 OK - res.status(200).send(`Signed Webhook Received: ${event.data.event_type}, ${event.data.id}`); -}); - - -app.post('/texml', bodyParser.text({type: '*/*'}), function(req, res) { - const timeToleranceInSeconds = 300; // Will validate signatures of webhooks up to 5 minutes after Telnyx sent the request - const webhookTelnyxSignatureHeader = req.header('telnyx-signature-ed25519'); - const webhookTelnyxTimestampHeader = req.header('telnyx-timestamp'); - const webhookRawBody = req.body; - console.log(req.body); - try { - telnyx.webhooks.signature.verifySignature( - webhookRawBody, - webhookTelnyxSignatureHeader, - webhookTelnyxTimestampHeader, - publicKey, - timeToleranceInSeconds - ); - } catch (e) { - console.log('Failed to validate the signature') - console.log(e.message); - res.send(400); - return; - } - res.send(` - - Webhook Validated - -`); -}); - -app.listen(3000, function() { - console.log('Example app listening on port 3000!'); -}); diff --git a/examples/webhook-signing/package-lock.json b/examples/webhook-signing/package-lock.json deleted file mode 100644 index e863a3d..0000000 --- a/examples/webhook-signing/package-lock.json +++ /dev/null @@ -1,1215 +0,0 @@ -{ - "name": "webhook-signing-example-express", - "version": "1.0.0", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "webhook-signing-example-express", - "version": "1.0.0", - "license": "ISC", - "dependencies": { - "body-parser": "^1.17.1", - "express": "^4.15.2", - "morgan": "^1.8.1", - "nodemon": "^2.0.15", - "telnyx": "^1.25.5" - } - }, - "node_modules/accepts": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", - "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", - "license": "MIT", - "dependencies": { - "mime-types": "~2.1.34", - "negotiator": "0.6.3" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "license": "ISC", - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/array-flatten": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", - "license": "MIT" - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "license": "MIT" - }, - "node_modules/basic-auth": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz", - "integrity": "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==", - "license": "MIT", - "dependencies": { - "safe-buffer": "5.1.2" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/basic-auth/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "license": "MIT" - }, - "node_modules/binary-extensions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", - "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/body-parser": { - "version": "1.20.3", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz", - "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==", - "license": "MIT", - "dependencies": { - "bytes": "3.1.2", - "content-type": "~1.0.5", - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "on-finished": "2.4.1", - "qs": "6.13.0", - "raw-body": "2.5.2", - "type-is": "~1.6.18", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/braces": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", - "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "license": "MIT", - "dependencies": { - "fill-range": "^7.1.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/bytes": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", - "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/call-bind": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", - "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", - "license": "MIT", - "dependencies": { - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "set-function-length": "^1.2.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/chokidar": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", - "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", - "license": "MIT", - "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "license": "MIT" - }, - "node_modules/content-disposition": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", - "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", - "license": "MIT", - "dependencies": { - "safe-buffer": "5.2.1" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/content-type": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", - "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/cookie": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", - "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/cookie-signature": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", - "license": "MIT" - }, - "node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/define-data-property": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", - "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", - "license": "MIT", - "dependencies": { - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "gopd": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/depd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", - "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/destroy": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", - "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", - "license": "MIT", - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, - "node_modules/ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", - "license": "MIT" - }, - "node_modules/encodeurl": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", - "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/es-define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", - "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", - "license": "MIT", - "dependencies": { - "get-intrinsic": "^1.2.4" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-errors": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", - "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", - "license": "MIT" - }, - "node_modules/etag": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/express": { - "version": "4.21.0", - "resolved": "https://registry.npmjs.org/express/-/express-4.21.0.tgz", - "integrity": "sha512-VqcNGcj/Id5ZT1LZ/cfihi3ttTn+NJmkli2eZADigjq29qTlWi/hAQ43t/VLPq8+UX06FCEx3ByOYet6ZFblng==", - "license": "MIT", - "dependencies": { - "accepts": "~1.3.8", - "array-flatten": "1.1.1", - "body-parser": "1.20.3", - "content-disposition": "0.5.4", - "content-type": "~1.0.4", - "cookie": "0.6.0", - "cookie-signature": "1.0.6", - "debug": "2.6.9", - "depd": "2.0.0", - "encodeurl": "~2.0.0", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "1.3.1", - "fresh": "0.5.2", - "http-errors": "2.0.0", - "merge-descriptors": "1.0.3", - "methods": "~1.1.2", - "on-finished": "2.4.1", - "parseurl": "~1.3.3", - "path-to-regexp": "0.1.10", - "proxy-addr": "~2.0.7", - "qs": "6.13.0", - "range-parser": "~1.2.1", - "safe-buffer": "5.2.1", - "send": "0.19.0", - "serve-static": "1.16.2", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "type-is": "~1.6.18", - "utils-merge": "1.0.1", - "vary": "~1.1.2" - }, - "engines": { - "node": ">= 0.10.0" - } - }, - "node_modules/fill-range": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", - "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "license": "MIT", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/finalhandler": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.1.tgz", - "integrity": "sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==", - "license": "MIT", - "dependencies": { - "debug": "2.6.9", - "encodeurl": "~2.0.0", - "escape-html": "~1.0.3", - "on-finished": "2.4.1", - "parseurl": "~1.3.3", - "statuses": "2.0.1", - "unpipe": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/forwarded": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", - "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/fresh": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "hasInstallScript": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/function-bind": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", - "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/get-intrinsic": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", - "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3", - "hasown": "^2.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/gopd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", - "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", - "license": "MIT", - "dependencies": { - "get-intrinsic": "^1.1.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/has-property-descriptors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", - "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", - "license": "MIT", - "dependencies": { - "es-define-property": "^1.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-proto": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", - "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/hasown": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", - "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/http-errors": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", - "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", - "license": "MIT", - "dependencies": { - "depd": "2.0.0", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "toidentifier": "1.0.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "license": "MIT", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/ignore-by-default": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", - "integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==", - "license": "ISC" - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "license": "ISC" - }, - "node_modules/ipaddr.js": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", - "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", - "license": "MIT", - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "license": "MIT", - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "license": "MIT", - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/lodash.isplainobject": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", - "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==", - "license": "MIT" - }, - "node_modules/media-typer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/merge-descriptors": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz", - "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/methods": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", - "license": "MIT", - "bin": { - "mime": "cli.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "license": "MIT", - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/morgan": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.10.0.tgz", - "integrity": "sha512-AbegBVI4sh6El+1gNwvD5YIck7nSA36weD7xvIxG4in80j/UoK8AEGaWnnz8v1GxonMCltmlNs5ZKbGvl9b1XQ==", - "license": "MIT", - "dependencies": { - "basic-auth": "~2.0.1", - "debug": "2.6.9", - "depd": "~2.0.0", - "on-finished": "~2.3.0", - "on-headers": "~1.0.2" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/morgan/node_modules/on-finished": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", - "integrity": "sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==", - "license": "MIT", - "dependencies": { - "ee-first": "1.1.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "license": "MIT" - }, - "node_modules/negotiator": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", - "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/nodemon": { - "version": "2.0.22", - "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.22.tgz", - "integrity": "sha512-B8YqaKMmyuCO7BowF1Z1/mkPqLk6cs/l63Ojtd6otKjMx47Dq1utxfRxcavH1I7VSaL8n5BUaoutadnsX3AAVQ==", - "license": "MIT", - "dependencies": { - "chokidar": "^3.5.2", - "debug": "^3.2.7", - "ignore-by-default": "^1.0.1", - "minimatch": "^3.1.2", - "pstree.remy": "^1.1.8", - "semver": "^5.7.1", - "simple-update-notifier": "^1.0.7", - "supports-color": "^5.5.0", - "touch": "^3.1.0", - "undefsafe": "^2.0.5" - }, - "bin": { - "nodemon": "bin/nodemon.js" - }, - "engines": { - "node": ">=8.10.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/nodemon" - } - }, - "node_modules/nodemon/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "license": "MIT", - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/nodemon/node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "license": "MIT" - }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-inspect": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz", - "integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==", - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/on-finished": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", - "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", - "license": "MIT", - "dependencies": { - "ee-first": "1.1.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/on-headers": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", - "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/parseurl": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", - "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/path-to-regexp": { - "version": "0.1.10", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.10.tgz", - "integrity": "sha512-7lf7qcQidTku0Gu3YDPc8DJ1q7OOucfa/BSsIwjuh56VU7katFvuM8hULfkwB3Fns/rsVF7PwPKVw1sl5KQS9w==", - "license": "MIT" - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/proxy-addr": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", - "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", - "license": "MIT", - "dependencies": { - "forwarded": "0.2.0", - "ipaddr.js": "1.9.1" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/pstree.remy": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz", - "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==", - "license": "MIT" - }, - "node_modules/qs": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", - "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", - "license": "BSD-3-Clause", - "dependencies": { - "side-channel": "^1.0.6" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/range-parser": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", - "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/raw-body": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", - "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", - "license": "MIT", - "dependencies": { - "bytes": "3.1.2", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "license": "MIT", - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "license": "MIT" - }, - "node_modules/semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", - "license": "ISC", - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/send": { - "version": "0.19.0", - "resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz", - "integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==", - "license": "MIT", - "dependencies": { - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "2.0.0", - "mime": "1.6.0", - "ms": "2.1.3", - "on-finished": "2.4.1", - "range-parser": "~1.2.1", - "statuses": "2.0.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/send/node_modules/encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/send/node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "license": "MIT" - }, - "node_modules/serve-static": { - "version": "1.16.2", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz", - "integrity": "sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==", - "license": "MIT", - "dependencies": { - "encodeurl": "~2.0.0", - "escape-html": "~1.0.3", - "parseurl": "~1.3.3", - "send": "0.19.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/set-function-length": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", - "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", - "license": "MIT", - "dependencies": { - "define-data-property": "^1.1.4", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/setprototypeof": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", - "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", - "license": "ISC" - }, - "node_modules/side-channel": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", - "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4", - "object-inspect": "^1.13.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/simple-update-notifier": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-1.1.0.tgz", - "integrity": "sha512-VpsrsJSUcJEseSbMHkrsrAVSdvVS5I96Qo1QAQ4FxQ9wXFcB+pjj7FB7/us9+GcgfW4ziHtYMc1J0PLczb55mg==", - "license": "MIT", - "dependencies": { - "semver": "~7.0.0" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "node_modules/simple-update-notifier/node_modules/semver": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz", - "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==", - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/statuses": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", - "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "license": "MIT", - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/telnyx": { - "version": "1.27.0", - "resolved": "https://registry.npmjs.org/telnyx/-/telnyx-1.27.0.tgz", - "integrity": "sha512-cVbP3jEW4TbmNL5U0UbZc3OkLg+6dHRnMYByYfJnrGw5ZRn0XKb17Hx3fLMWmGgRFow7eqVP4hlCogbIB6T3+w==", - "license": "MIT", - "dependencies": { - "lodash.isplainobject": "^4.0.6", - "qs": "^6.11.2", - "safe-buffer": "^5.2.1", - "telnyx": "^1.26.2", - "tweetnacl": "^1.0.3", - "uuid": "^9.0.1" - }, - "engines": { - "node": "^6 || >=8" - } - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "license": "MIT", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/toidentifier": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", - "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", - "license": "MIT", - "engines": { - "node": ">=0.6" - } - }, - "node_modules/touch": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.1.tgz", - "integrity": "sha512-r0eojU4bI8MnHr8c5bNo7lJDdI2qXlWWJk6a9EAFG7vbhTjElYhBVS3/miuE0uOuoLdb8Mc/rVfsmm6eo5o9GA==", - "license": "ISC", - "bin": { - "nodetouch": "bin/nodetouch.js" - } - }, - "node_modules/tweetnacl": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz", - "integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==", - "license": "Unlicense" - }, - "node_modules/type-is": { - "version": "1.6.18", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", - "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", - "license": "MIT", - "dependencies": { - "media-typer": "0.3.0", - "mime-types": "~2.1.24" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/undefsafe": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz", - "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==", - "license": "MIT" - }, - "node_modules/unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/utils-merge": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", - "license": "MIT", - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/uuid": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", - "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" - ], - "license": "MIT", - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "node_modules/vary": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - } - } -} diff --git a/examples/webhook-signing/package.json b/examples/webhook-signing/package.json deleted file mode 100644 index 4338bbd..0000000 --- a/examples/webhook-signing/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "webhook-signing-example-express", - "version": "1.0.0", - "description": "", - "main": "index.js", - "scripts": { - "debug": "nodemon express.js" - }, - "author": "", - "license": "ISC", - "dependencies": { - "body-parser": "^1.17.1", - "express": "^4.15.2", - "morgan": "^1.8.1", - "nodemon": "^2.0.15", - "telnyx": "^1.25.5" - } -} diff --git a/package.json b/package.json index a0bc368..bff1f9b 100644 --- a/package.json +++ b/package.json @@ -11,12 +11,12 @@ "sdk" ], "homepage": "https://developers.telnyx.com", - "author": "Telnyx (https://www.telnyx.com/)", + "author": "Telnyx (https://telnyx.com)", "contributors": [ - "Vlad Ionash (http://www.telnyx.com/)", - "Gabriel Taylor Russ (http://www.telnyx.com/)", - "Lucas Rosa (http://www.telnyx.com/)", - "Rômulo Garofalo (http://www.telnyx.com/)", + "Vlad Ionash (http://telnyx.com)", + "Gabriel Taylor Russ (http://telnyx.com)", + "Lucas Rosa (http://telnyx.com)", + "Rômulo Garofalo (http://telnyx.com)", "Khalil Mohammad (https://khalilmohammadmirza.com)" ], "repository": { From fd74b66be0ba733661989c55f0efef5d36f9c474 Mon Sep 17 00:00:00 2001 From: Lucas Rosa Date: Mon, 30 Sep 2024 12:42:52 -0300 Subject: [PATCH 21/59] update npm and node target versions --- .nvmrc | 2 +- .tool-versions | 4 ++-- examples/call-control/.nvmrc | 2 +- examples/call-control/.tool-versions | 4 ++-- examples/messaging/.nvmrc | 2 +- examples/messaging/.tool-versions | 4 ++-- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.nvmrc b/.nvmrc index 035651d..3516580 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -20.7.0 +20.17.0 diff --git a/.tool-versions b/.tool-versions index f53a99f..6a6191a 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,2 +1,2 @@ -nodejs 20.7.0 -npm 10.1.0 +nodejs 20.17.0 +npm 10.8.1 diff --git a/examples/call-control/.nvmrc b/examples/call-control/.nvmrc index 035651d..3516580 100644 --- a/examples/call-control/.nvmrc +++ b/examples/call-control/.nvmrc @@ -1 +1 @@ -20.7.0 +20.17.0 diff --git a/examples/call-control/.tool-versions b/examples/call-control/.tool-versions index f53a99f..6a6191a 100644 --- a/examples/call-control/.tool-versions +++ b/examples/call-control/.tool-versions @@ -1,2 +1,2 @@ -nodejs 20.7.0 -npm 10.1.0 +nodejs 20.17.0 +npm 10.8.1 diff --git a/examples/messaging/.nvmrc b/examples/messaging/.nvmrc index 035651d..3516580 100644 --- a/examples/messaging/.nvmrc +++ b/examples/messaging/.nvmrc @@ -1 +1 @@ -20.7.0 +20.17.0 diff --git a/examples/messaging/.tool-versions b/examples/messaging/.tool-versions index f53a99f..6a6191a 100644 --- a/examples/messaging/.tool-versions +++ b/examples/messaging/.tool-versions @@ -1,2 +1,2 @@ -nodejs 20.7.0 -npm 10.1.0 +nodejs 20.17.0 +npm 10.8.1 From d364c7a0c3fcbd255a8d83532752bce83ec9d643 Mon Sep 17 00:00:00 2001 From: Lucas Rosa Date: Mon, 30 Sep 2024 16:15:43 -0300 Subject: [PATCH 22/59] update examples lockfile and changelog --- CHANGELOG.md | 1 + examples/call-control/package-lock.json | 463 ++------------- examples/messaging/package-lock.json | 757 ++++++++++++++++++++++-- 3 files changed, 761 insertions(+), 460 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1271d58..e0a33d4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,7 @@ - Remove `SimCards` `deletePublicIp` and `setPublicIp` according to API sepc - Update `Queues` method names to camelCase - Remove `VerifiedCallsDisplayProfile` resource according to API spec +- Update examples to Typescript ## v1 diff --git a/examples/call-control/package-lock.json b/examples/call-control/package-lock.json index 5f0b108..bbb7c1b 100644 --- a/examples/call-control/package-lock.json +++ b/examples/call-control/package-lock.json @@ -17,7 +17,40 @@ "typescript": "^5.6.2" }, "engines": { - "node": ">=22" + "node": "^18 || >=20" + } + }, + "../..": { + "name": "telnyx", + "version": "2.0.0-alpha.0", + "license": "MIT", + "devDependencies": { + "@eslint/js": "^9.10.0", + "@stoplight/prism-cli": "^5.10.0", + "@types/eslint__js": "^8.42.3", + "@types/jest": "^29.5.13", + "@types/node": "^22.7.3", + "@types/qs": "^6.9.15", + "debug": "^4.3.4", + "eslint": "^8.57.0", + "eslint-config-prettier": "^9.1.0", + "eslint-plugin-chai-friendly": "^0.7.4", + "eslint-plugin-prettier": "^5.2.1", + "jest": "^29.7.0", + "nock": "^13.5.4", + "nyc": "^15.1.0", + "plop": "^4.0.1", + "prettier": "^3.0.0", + "qs": "^6.11.2", + "ts-jest": "^29.2.5", + "ts-node": "^10.9.2", + "tweetnacl": "^1.0.3", + "typescript": "^5.6.2", + "typescript-eslint": "^8.5.0", + "uuid": "^9.0.1" + }, + "engines": { + "node": "^18 || >=20" } }, "../../node_modules/@ampproject/remapping": { @@ -8330,78 +8363,8 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@esbuild/aix-ppc64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.23.1.tgz", - "integrity": "sha512-6VhYk1diRqrhBAqpJEdjASR/+WVRtfjpqKuNw11cLiaWpAT/Uu+nokB+UJnevzy/P9C/ty6AOe0dwueMrGh/iQ==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "aix" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/android-arm": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.23.1.tgz", - "integrity": "sha512-uz6/tEy2IFm9RYOyvKl88zdzZfwEfKZmnX9Cj1BHjeSGNuGLuMD1kR8y5bteYmwqKm1tj8m4cb/aKEorr6fHWQ==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/android-arm64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.23.1.tgz", - "integrity": "sha512-xw50ipykXcLstLeWH7WRdQuysJqejuAGPd30vd1i5zSyKK3WE+ijzHmLKxdiCMtH1pHz78rOg0BKSYOSB/2Khw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/android-x64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.23.1.tgz", - "integrity": "sha512-nlN9B69St9BwUoB+jkyU090bru8L0NA3yFvAd7k8dNsVH8bi9a8cUAUSEcEEgTp2z3dbEDGJGfP6VUnkQnlReg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, "node_modules/@esbuild/darwin-arm64": { "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.23.1.tgz", - "integrity": "sha512-YsS2e3Wtgnw7Wq53XXBLcV6JhRsEq8hkfg91ESVadIrzr9wO6jJDMZnCQbHm1Guc5t/CdDiFSSfWP58FNuvT3Q==", "cpu": [ "arm64" ], @@ -8415,333 +8378,8 @@ "node": ">=18" } }, - "node_modules/@esbuild/darwin-x64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.23.1.tgz", - "integrity": "sha512-aClqdgTDVPSEGgoCS8QDG37Gu8yc9lTHNAQlsztQ6ENetKEO//b8y31MMu2ZaPbn4kVsIABzVLXYLhCGekGDqw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/freebsd-arm64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.23.1.tgz", - "integrity": "sha512-h1k6yS8/pN/NHlMl5+v4XPfikhJulk4G+tKGFIOwURBSFzE8bixw1ebjluLOjfwtLqY0kewfjLSrO6tN2MgIhA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/freebsd-x64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.23.1.tgz", - "integrity": "sha512-lK1eJeyk1ZX8UklqFd/3A60UuZ/6UVfGT2LuGo3Wp4/z7eRTRYY+0xOu2kpClP+vMTi9wKOfXi2vjUpO1Ro76g==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-arm": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.23.1.tgz", - "integrity": "sha512-CXXkzgn+dXAPs3WBwE+Kvnrf4WECwBdfjfeYHpMeVxWE0EceB6vhWGShs6wi0IYEqMSIzdOF1XjQ/Mkm5d7ZdQ==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-arm64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.23.1.tgz", - "integrity": "sha512-/93bf2yxencYDnItMYV/v116zff6UyTjo4EtEQjUBeGiVpMmffDNUyD9UN2zV+V3LRV3/on4xdZ26NKzn6754g==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-ia32": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.23.1.tgz", - "integrity": "sha512-VTN4EuOHwXEkXzX5nTvVY4s7E/Krz7COC8xkftbbKRYAl96vPiUssGkeMELQMOnLOJ8k3BY1+ZY52tttZnHcXQ==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-loong64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.23.1.tgz", - "integrity": "sha512-Vx09LzEoBa5zDnieH8LSMRToj7ir/Jeq0Gu6qJ/1GcBq9GkfoEAoXvLiW1U9J1qE/Y/Oyaq33w5p2ZWrNNHNEw==", - "cpu": [ - "loong64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-mips64el": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.23.1.tgz", - "integrity": "sha512-nrFzzMQ7W4WRLNUOU5dlWAqa6yVeI0P78WKGUo7lg2HShq/yx+UYkeNSE0SSfSure0SqgnsxPvmAUu/vu0E+3Q==", - "cpu": [ - "mips64el" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-ppc64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.23.1.tgz", - "integrity": "sha512-dKN8fgVqd0vUIjxuJI6P/9SSSe/mB9rvA98CSH2sJnlZ/OCZWO1DJvxj8jvKTfYUdGfcq2dDxoKaC6bHuTlgcw==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-riscv64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.23.1.tgz", - "integrity": "sha512-5AV4Pzp80fhHL83JM6LoA6pTQVWgB1HovMBsLQ9OZWLDqVY8MVobBXNSmAJi//Csh6tcY7e7Lny2Hg1tElMjIA==", - "cpu": [ - "riscv64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-s390x": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.23.1.tgz", - "integrity": "sha512-9ygs73tuFCe6f6m/Tb+9LtYxWR4c9yg7zjt2cYkjDbDpV/xVn+68cQxMXCjUpYwEkze2RcU/rMnfIXNRFmSoDw==", - "cpu": [ - "s390x" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-x64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.23.1.tgz", - "integrity": "sha512-EV6+ovTsEXCPAp58g2dD68LxoP/wK5pRvgy0J/HxPGB009omFPv3Yet0HiaqvrIrgPTBuC6wCH1LTOY91EO5hQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/netbsd-x64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.23.1.tgz", - "integrity": "sha512-aevEkCNu7KlPRpYLjwmdcuNz6bDFiE7Z8XC4CPqExjTvrHugh28QzUXVOZtiYghciKUacNktqxdpymplil1beA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/openbsd-arm64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.23.1.tgz", - "integrity": "sha512-3x37szhLexNA4bXhLrCC/LImN/YtWis6WXr1VESlfVtVeoFJBRINPJ3f0a/6LV8zpikqoUg4hyXw0sFBt5Cr+Q==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/openbsd-x64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.23.1.tgz", - "integrity": "sha512-aY2gMmKmPhxfU+0EdnN+XNtGbjfQgwZj43k8G3fyrDM/UdZww6xrWxmDkuz2eCZchqVeABjV5BpildOrUbBTqA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/sunos-x64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.23.1.tgz", - "integrity": "sha512-RBRT2gqEl0IKQABT4XTj78tpk9v7ehp+mazn2HbUeZl1YMdaGAQqhapjGTCe7uw7y0frDi4gS0uHzhvpFuI1sA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "sunos" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/win32-arm64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.23.1.tgz", - "integrity": "sha512-4O+gPR5rEBe2FpKOVyiJ7wNDPA8nGzDuJ6gN4okSA1gEOYZ67N8JPk58tkWtdtPeLz7lBnY6I5L3jdsr3S+A6A==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/win32-ia32": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.23.1.tgz", - "integrity": "sha512-BcaL0Vn6QwCwre3Y717nVHZbAa4UBEigzFm6VdsVdT/MbZ38xoj1X9HPkZhbmaBGUD1W8vxAfffbDe8bA6AKnQ==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/win32-x64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.23.1.tgz", - "integrity": "sha512-BHpFFeslkWrXWyUPnbKm+xYYVYruCinGcftSBaa8zoF9hZO4BcSCFUvHVTtzpIY6YzUnYtuEhZ+C9iEXjxnasg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, "node_modules/@types/node": { - "version": "22.7.3", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.7.3.tgz", - "integrity": "sha512-qXKfhXXqGTyBskvWEzJZPUxSslAiLaB6JGP1ic/XTH9ctGgzdgYguuLP1C601aRTSDNlLb0jbKqXjZ48GNraSA==", + "version": "22.7.4", "dev": true, "license": "MIT", "dependencies": { @@ -8750,8 +8388,6 @@ }, "node_modules/esbuild": { "version": "0.23.1", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.23.1.tgz", - "integrity": "sha512-VVNz/9Sa0bs5SELtn3f7qhJCDPCF5oMEl5cO9/SSinpE9hbPVvxbd572HH5AKiP7WD8INO53GgfDDhRjkylHEg==", "dev": true, "hasInstallScript": true, "license": "MIT", @@ -8788,25 +8424,8 @@ "@esbuild/win32-x64": "0.23.1" } }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, "node_modules/get-tsconfig": { "version": "4.8.1", - "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.8.1.tgz", - "integrity": "sha512-k9PN+cFBmaLWtVz29SkUoqU5O0slLuHJXt/2P+tMVFT+phsSGXGkp9t3rQIqdz0e+06EHNGs3oM6ZX1s2zHxRg==", "dev": true, "license": "MIT", "dependencies": { @@ -8818,18 +8437,18 @@ }, "node_modules/resolve-pkg-maps": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", - "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", "dev": true, "license": "MIT", "funding": { "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" } }, + "node_modules/telnyx": { + "resolved": "../..", + "link": true + }, "node_modules/tsx": { "version": "4.19.1", - "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.19.1.tgz", - "integrity": "sha512-0flMz1lh74BR4wOvBjuh9olbnwqCPc35OOlfyzHba0Dc+QNUeWX/Gq2YTbnwcWPO3BMd8fkzRVrHcsR+a7z7rA==", "dev": true, "license": "MIT", "dependencies": { @@ -8848,8 +8467,6 @@ }, "node_modules/typescript": { "version": "5.6.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.2.tgz", - "integrity": "sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==", "dev": true, "license": "Apache-2.0", "bin": { @@ -8862,8 +8479,6 @@ }, "node_modules/undici-types": { "version": "6.19.8", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", - "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", "dev": true, "license": "MIT" } diff --git a/examples/messaging/package-lock.json b/examples/messaging/package-lock.json index ef9881a..bbcb891 100644 --- a/examples/messaging/package-lock.json +++ b/examples/messaging/package-lock.json @@ -55,6 +55,7 @@ }, "../../node_modules/@ampproject/remapping": { "version": "2.3.0", + "dev": true, "license": "Apache-2.0", "dependencies": { "@jridgewell/gen-mapping": "^0.3.5", @@ -66,6 +67,7 @@ }, "../../node_modules/@babel/code-frame": { "version": "7.24.7", + "dev": true, "license": "MIT", "dependencies": { "@babel/highlight": "^7.24.7", @@ -77,6 +79,7 @@ }, "../../node_modules/@babel/compat-data": { "version": "7.25.4", + "dev": true, "license": "MIT", "engines": { "node": ">=6.9.0" @@ -84,6 +87,7 @@ }, "../../node_modules/@babel/core": { "version": "7.25.2", + "dev": true, "license": "MIT", "dependencies": { "@ampproject/remapping": "^2.2.0", @@ -112,10 +116,12 @@ }, "../../node_modules/@babel/core/node_modules/convert-source-map": { "version": "2.0.0", + "dev": true, "license": "MIT" }, "../../node_modules/@babel/generator": { "version": "7.25.6", + "dev": true, "license": "MIT", "dependencies": { "@babel/types": "^7.25.6", @@ -129,6 +135,7 @@ }, "../../node_modules/@babel/helper-compilation-targets": { "version": "7.25.2", + "dev": true, "license": "MIT", "dependencies": { "@babel/compat-data": "^7.25.2", @@ -143,6 +150,7 @@ }, "../../node_modules/@babel/helper-module-imports": { "version": "7.24.7", + "dev": true, "license": "MIT", "dependencies": { "@babel/traverse": "^7.24.7", @@ -154,6 +162,7 @@ }, "../../node_modules/@babel/helper-module-transforms": { "version": "7.25.2", + "dev": true, "license": "MIT", "dependencies": { "@babel/helper-module-imports": "^7.24.7", @@ -170,6 +179,7 @@ }, "../../node_modules/@babel/helper-plugin-utils": { "version": "7.24.8", + "dev": true, "license": "MIT", "engines": { "node": ">=6.9.0" @@ -177,6 +187,7 @@ }, "../../node_modules/@babel/helper-simple-access": { "version": "7.24.7", + "dev": true, "license": "MIT", "dependencies": { "@babel/traverse": "^7.24.7", @@ -188,6 +199,7 @@ }, "../../node_modules/@babel/helper-string-parser": { "version": "7.24.8", + "dev": true, "license": "MIT", "engines": { "node": ">=6.9.0" @@ -195,6 +207,7 @@ }, "../../node_modules/@babel/helper-validator-identifier": { "version": "7.24.7", + "dev": true, "license": "MIT", "engines": { "node": ">=6.9.0" @@ -202,6 +215,7 @@ }, "../../node_modules/@babel/helper-validator-option": { "version": "7.24.8", + "dev": true, "license": "MIT", "engines": { "node": ">=6.9.0" @@ -209,6 +223,7 @@ }, "../../node_modules/@babel/helpers": { "version": "7.25.6", + "dev": true, "license": "MIT", "dependencies": { "@babel/template": "^7.25.0", @@ -220,6 +235,7 @@ }, "../../node_modules/@babel/highlight": { "version": "7.24.7", + "dev": true, "license": "MIT", "dependencies": { "@babel/helper-validator-identifier": "^7.24.7", @@ -233,6 +249,7 @@ }, "../../node_modules/@babel/highlight/node_modules/ansi-styles": { "version": "3.2.1", + "dev": true, "license": "MIT", "dependencies": { "color-convert": "^1.9.0" @@ -243,6 +260,7 @@ }, "../../node_modules/@babel/highlight/node_modules/chalk": { "version": "2.4.2", + "dev": true, "license": "MIT", "dependencies": { "ansi-styles": "^3.2.1", @@ -255,6 +273,7 @@ }, "../../node_modules/@babel/highlight/node_modules/color-convert": { "version": "1.9.3", + "dev": true, "license": "MIT", "dependencies": { "color-name": "1.1.3" @@ -262,10 +281,12 @@ }, "../../node_modules/@babel/highlight/node_modules/color-name": { "version": "1.1.3", + "dev": true, "license": "MIT" }, "../../node_modules/@babel/highlight/node_modules/escape-string-regexp": { "version": "1.0.5", + "dev": true, "license": "MIT", "engines": { "node": ">=0.8.0" @@ -273,6 +294,7 @@ }, "../../node_modules/@babel/highlight/node_modules/has-flag": { "version": "3.0.0", + "dev": true, "license": "MIT", "engines": { "node": ">=4" @@ -280,6 +302,7 @@ }, "../../node_modules/@babel/highlight/node_modules/supports-color": { "version": "5.5.0", + "dev": true, "license": "MIT", "dependencies": { "has-flag": "^3.0.0" @@ -290,6 +313,7 @@ }, "../../node_modules/@babel/parser": { "version": "7.25.6", + "dev": true, "license": "MIT", "dependencies": { "@babel/types": "^7.25.6" @@ -303,6 +327,7 @@ }, "../../node_modules/@babel/plugin-syntax-async-generators": { "version": "7.8.4", + "dev": true, "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" @@ -313,6 +338,7 @@ }, "../../node_modules/@babel/plugin-syntax-bigint": { "version": "7.8.3", + "dev": true, "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" @@ -323,6 +349,7 @@ }, "../../node_modules/@babel/plugin-syntax-class-properties": { "version": "7.12.13", + "dev": true, "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.12.13" @@ -333,6 +360,7 @@ }, "../../node_modules/@babel/plugin-syntax-class-static-block": { "version": "7.14.5", + "dev": true, "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.14.5" @@ -346,6 +374,7 @@ }, "../../node_modules/@babel/plugin-syntax-import-attributes": { "version": "7.25.6", + "dev": true, "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.24.8" @@ -359,6 +388,7 @@ }, "../../node_modules/@babel/plugin-syntax-import-meta": { "version": "7.10.4", + "dev": true, "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.10.4" @@ -369,6 +399,7 @@ }, "../../node_modules/@babel/plugin-syntax-json-strings": { "version": "7.8.3", + "dev": true, "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" @@ -379,6 +410,7 @@ }, "../../node_modules/@babel/plugin-syntax-jsx": { "version": "7.24.7", + "dev": true, "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.24.7" @@ -392,6 +424,7 @@ }, "../../node_modules/@babel/plugin-syntax-logical-assignment-operators": { "version": "7.10.4", + "dev": true, "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.10.4" @@ -402,6 +435,7 @@ }, "../../node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { "version": "7.8.3", + "dev": true, "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" @@ -412,6 +446,7 @@ }, "../../node_modules/@babel/plugin-syntax-numeric-separator": { "version": "7.10.4", + "dev": true, "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.10.4" @@ -422,6 +457,7 @@ }, "../../node_modules/@babel/plugin-syntax-object-rest-spread": { "version": "7.8.3", + "dev": true, "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" @@ -432,6 +468,7 @@ }, "../../node_modules/@babel/plugin-syntax-optional-catch-binding": { "version": "7.8.3", + "dev": true, "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" @@ -442,6 +479,7 @@ }, "../../node_modules/@babel/plugin-syntax-optional-chaining": { "version": "7.8.3", + "dev": true, "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" @@ -452,6 +490,7 @@ }, "../../node_modules/@babel/plugin-syntax-private-property-in-object": { "version": "7.14.5", + "dev": true, "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.14.5" @@ -465,6 +504,7 @@ }, "../../node_modules/@babel/plugin-syntax-top-level-await": { "version": "7.14.5", + "dev": true, "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.14.5" @@ -478,6 +518,7 @@ }, "../../node_modules/@babel/plugin-syntax-typescript": { "version": "7.25.4", + "dev": true, "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.24.8" @@ -491,6 +532,7 @@ }, "../../node_modules/@babel/template": { "version": "7.25.0", + "dev": true, "license": "MIT", "dependencies": { "@babel/code-frame": "^7.24.7", @@ -503,6 +545,7 @@ }, "../../node_modules/@babel/traverse": { "version": "7.25.6", + "dev": true, "license": "MIT", "dependencies": { "@babel/code-frame": "^7.24.7", @@ -519,6 +562,7 @@ }, "../../node_modules/@babel/traverse/node_modules/globals": { "version": "11.12.0", + "dev": true, "license": "MIT", "engines": { "node": ">=4" @@ -526,6 +570,7 @@ }, "../../node_modules/@babel/types": { "version": "7.25.6", + "dev": true, "license": "MIT", "dependencies": { "@babel/helper-string-parser": "^7.24.8", @@ -538,10 +583,12 @@ }, "../../node_modules/@bcoe/v8-coverage": { "version": "0.2.3", + "dev": true, "license": "MIT" }, "../../node_modules/@cspotcode/source-map-support": { "version": "0.8.1", + "dev": true, "license": "MIT", "dependencies": { "@jridgewell/trace-mapping": "0.3.9" @@ -552,6 +599,7 @@ }, "../../node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": { "version": "0.3.9", + "dev": true, "license": "MIT", "dependencies": { "@jridgewell/resolve-uri": "^3.0.3", @@ -560,6 +608,7 @@ }, "../../node_modules/@eslint-community/eslint-utils": { "version": "4.4.0", + "dev": true, "license": "MIT", "dependencies": { "eslint-visitor-keys": "^3.3.0" @@ -573,6 +622,7 @@ }, "../../node_modules/@eslint-community/regexpp": { "version": "4.11.0", + "dev": true, "license": "MIT", "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" @@ -580,6 +630,7 @@ }, "../../node_modules/@eslint/eslintrc": { "version": "2.1.4", + "dev": true, "license": "MIT", "dependencies": { "ajv": "^6.12.4", @@ -601,10 +652,12 @@ }, "../../node_modules/@eslint/eslintrc/node_modules/argparse": { "version": "2.0.1", + "dev": true, "license": "Python-2.0" }, "../../node_modules/@eslint/eslintrc/node_modules/js-yaml": { "version": "4.1.0", + "dev": true, "license": "MIT", "dependencies": { "argparse": "^2.0.1" @@ -623,6 +676,7 @@ }, "../../node_modules/@faker-js/faker": { "version": "6.3.1", + "dev": true, "license": "MIT", "engines": { "node": ">=14.0.0", @@ -631,6 +685,7 @@ }, "../../node_modules/@humanwhocodes/config-array": { "version": "0.11.14", + "dev": true, "license": "Apache-2.0", "dependencies": { "@humanwhocodes/object-schema": "^2.0.2", @@ -643,6 +698,7 @@ }, "../../node_modules/@humanwhocodes/module-importer": { "version": "1.0.1", + "dev": true, "license": "Apache-2.0", "engines": { "node": ">=12.22" @@ -654,10 +710,12 @@ }, "../../node_modules/@humanwhocodes/object-schema": { "version": "2.0.3", + "dev": true, "license": "BSD-3-Clause" }, "../../node_modules/@inquirer/figures": { "version": "1.0.6", + "dev": true, "license": "MIT", "engines": { "node": ">=18" @@ -665,6 +723,7 @@ }, "../../node_modules/@istanbuljs/load-nyc-config": { "version": "1.1.0", + "dev": true, "license": "ISC", "dependencies": { "camelcase": "^5.3.1", @@ -679,6 +738,7 @@ }, "../../node_modules/@istanbuljs/load-nyc-config/node_modules/find-up": { "version": "4.1.0", + "dev": true, "license": "MIT", "dependencies": { "locate-path": "^5.0.0", @@ -690,6 +750,7 @@ }, "../../node_modules/@istanbuljs/load-nyc-config/node_modules/locate-path": { "version": "5.0.0", + "dev": true, "license": "MIT", "dependencies": { "p-locate": "^4.1.0" @@ -700,6 +761,7 @@ }, "../../node_modules/@istanbuljs/load-nyc-config/node_modules/p-limit": { "version": "2.3.0", + "dev": true, "license": "MIT", "dependencies": { "p-try": "^2.0.0" @@ -713,6 +775,7 @@ }, "../../node_modules/@istanbuljs/load-nyc-config/node_modules/p-locate": { "version": "4.1.0", + "dev": true, "license": "MIT", "dependencies": { "p-limit": "^2.2.0" @@ -723,6 +786,7 @@ }, "../../node_modules/@istanbuljs/load-nyc-config/node_modules/resolve-from": { "version": "5.0.0", + "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -730,6 +794,7 @@ }, "../../node_modules/@istanbuljs/schema": { "version": "0.1.3", + "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -737,6 +802,7 @@ }, "../../node_modules/@jest/console": { "version": "29.7.0", + "dev": true, "license": "MIT", "dependencies": { "@jest/types": "^29.6.3", @@ -752,6 +818,7 @@ }, "../../node_modules/@jest/core": { "version": "29.7.0", + "dev": true, "license": "MIT", "dependencies": { "@jest/console": "^29.7.0", @@ -797,6 +864,7 @@ }, "../../node_modules/@jest/environment": { "version": "29.7.0", + "dev": true, "license": "MIT", "dependencies": { "@jest/fake-timers": "^29.7.0", @@ -810,6 +878,7 @@ }, "../../node_modules/@jest/expect": { "version": "29.7.0", + "dev": true, "license": "MIT", "dependencies": { "expect": "^29.7.0", @@ -821,6 +890,7 @@ }, "../../node_modules/@jest/expect-utils": { "version": "29.7.0", + "dev": true, "license": "MIT", "dependencies": { "jest-get-type": "^29.6.3" @@ -831,6 +901,7 @@ }, "../../node_modules/@jest/fake-timers": { "version": "29.7.0", + "dev": true, "license": "MIT", "dependencies": { "@jest/types": "^29.6.3", @@ -846,6 +917,7 @@ }, "../../node_modules/@jest/globals": { "version": "29.7.0", + "dev": true, "license": "MIT", "dependencies": { "@jest/environment": "^29.7.0", @@ -859,6 +931,7 @@ }, "../../node_modules/@jest/reporters": { "version": "29.7.0", + "dev": true, "license": "MIT", "dependencies": { "@bcoe/v8-coverage": "^0.2.3", @@ -900,6 +973,7 @@ }, "../../node_modules/@jest/reporters/node_modules/glob": { "version": "7.2.3", + "dev": true, "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", @@ -918,6 +992,7 @@ }, "../../node_modules/@jest/reporters/node_modules/istanbul-lib-instrument": { "version": "6.0.3", + "dev": true, "license": "BSD-3-Clause", "dependencies": { "@babel/core": "^7.23.9", @@ -932,6 +1007,7 @@ }, "../../node_modules/@jest/reporters/node_modules/semver": { "version": "7.6.3", + "dev": true, "license": "ISC", "bin": { "semver": "bin/semver.js" @@ -942,6 +1018,7 @@ }, "../../node_modules/@jest/schemas": { "version": "29.6.3", + "dev": true, "license": "MIT", "dependencies": { "@sinclair/typebox": "^0.27.8" @@ -952,6 +1029,7 @@ }, "../../node_modules/@jest/source-map": { "version": "29.6.3", + "dev": true, "license": "MIT", "dependencies": { "@jridgewell/trace-mapping": "^0.3.18", @@ -964,6 +1042,7 @@ }, "../../node_modules/@jest/test-result": { "version": "29.7.0", + "dev": true, "license": "MIT", "dependencies": { "@jest/console": "^29.7.0", @@ -977,6 +1056,7 @@ }, "../../node_modules/@jest/test-sequencer": { "version": "29.7.0", + "dev": true, "license": "MIT", "dependencies": { "@jest/test-result": "^29.7.0", @@ -990,6 +1070,7 @@ }, "../../node_modules/@jest/transform": { "version": "29.7.0", + "dev": true, "license": "MIT", "dependencies": { "@babel/core": "^7.11.6", @@ -1014,10 +1095,12 @@ }, "../../node_modules/@jest/transform/node_modules/convert-source-map": { "version": "2.0.0", + "dev": true, "license": "MIT" }, "../../node_modules/@jest/transform/node_modules/write-file-atomic": { "version": "4.0.2", + "dev": true, "license": "ISC", "dependencies": { "imurmurhash": "^0.1.4", @@ -1029,6 +1112,7 @@ }, "../../node_modules/@jest/types": { "version": "29.6.3", + "dev": true, "license": "MIT", "dependencies": { "@jest/schemas": "^29.6.3", @@ -1044,6 +1128,7 @@ }, "../../node_modules/@jridgewell/gen-mapping": { "version": "0.3.5", + "dev": true, "license": "MIT", "dependencies": { "@jridgewell/set-array": "^1.2.1", @@ -1056,6 +1141,7 @@ }, "../../node_modules/@jridgewell/resolve-uri": { "version": "3.1.2", + "dev": true, "license": "MIT", "engines": { "node": ">=6.0.0" @@ -1063,6 +1149,7 @@ }, "../../node_modules/@jridgewell/set-array": { "version": "1.2.1", + "dev": true, "license": "MIT", "engines": { "node": ">=6.0.0" @@ -1070,10 +1157,12 @@ }, "../../node_modules/@jridgewell/sourcemap-codec": { "version": "1.5.0", + "dev": true, "license": "MIT" }, "../../node_modules/@jridgewell/trace-mapping": { "version": "0.3.25", + "dev": true, "license": "MIT", "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", @@ -1082,10 +1171,12 @@ }, "../../node_modules/@jsdevtools/ono": { "version": "7.1.3", + "dev": true, "license": "MIT" }, "../../node_modules/@nodelib/fs.scandir": { "version": "2.1.5", + "dev": true, "license": "MIT", "dependencies": { "@nodelib/fs.stat": "2.0.5", @@ -1097,6 +1188,7 @@ }, "../../node_modules/@nodelib/fs.stat": { "version": "2.0.5", + "dev": true, "license": "MIT", "engines": { "node": ">= 8" @@ -1104,6 +1196,7 @@ }, "../../node_modules/@nodelib/fs.walk": { "version": "1.2.8", + "dev": true, "license": "MIT", "dependencies": { "@nodelib/fs.scandir": "2.1.5", @@ -1115,6 +1208,7 @@ }, "../../node_modules/@pkgr/core": { "version": "0.1.1", + "dev": true, "license": "MIT", "engines": { "node": "^12.20.0 || ^14.18.0 || >=16.0.0" @@ -1125,10 +1219,12 @@ }, "../../node_modules/@sinclair/typebox": { "version": "0.27.8", + "dev": true, "license": "MIT" }, "../../node_modules/@sinonjs/commons": { "version": "3.0.1", + "dev": true, "license": "BSD-3-Clause", "dependencies": { "type-detect": "4.0.8" @@ -1136,6 +1232,7 @@ }, "../../node_modules/@sinonjs/commons/node_modules/type-detect": { "version": "4.0.8", + "dev": true, "license": "MIT", "engines": { "node": ">=4" @@ -1143,6 +1240,7 @@ }, "../../node_modules/@sinonjs/fake-timers": { "version": "10.3.0", + "dev": true, "license": "BSD-3-Clause", "dependencies": { "@sinonjs/commons": "^3.0.0" @@ -1150,6 +1248,7 @@ }, "../../node_modules/@stoplight/http-spec": { "version": "7.1.0", + "dev": true, "license": "Apache-2.0", "dependencies": { "@stoplight/json": "^3.18.1", @@ -1171,6 +1270,7 @@ }, "../../node_modules/@stoplight/http-spec/node_modules/@stoplight/types": { "version": "14.1.0", + "dev": true, "license": "Apache-2.0", "dependencies": { "@types/json-schema": "^7.0.4", @@ -1182,10 +1282,12 @@ }, "../../node_modules/@stoplight/http-spec/node_modules/@types/json-schema": { "version": "7.0.11", + "dev": true, "license": "MIT" }, "../../node_modules/@stoplight/json": { "version": "3.21.7", + "dev": true, "license": "Apache-2.0", "dependencies": { "@stoplight/ordered-object-literal": "^1.0.3", @@ -1201,6 +1303,7 @@ }, "../../node_modules/@stoplight/json-schema-generator": { "version": "1.0.2", + "dev": true, "license": "MIT", "dependencies": { "cross-fetch": "^3.1.5", @@ -1215,6 +1318,7 @@ }, "../../node_modules/@stoplight/json-schema-merge-allof": { "version": "0.7.8", + "dev": true, "license": "MIT", "dependencies": { "compute-lcm": "^1.1.0", @@ -1224,6 +1328,7 @@ }, "../../node_modules/@stoplight/json-schema-ref-parser": { "version": "9.2.7", + "dev": true, "license": "MIT", "dependencies": { "@jsdevtools/ono": "^7.1.3", @@ -1237,6 +1342,7 @@ }, "../../node_modules/@stoplight/json-schema-sampler": { "version": "0.3.0", + "dev": true, "license": "MIT", "dependencies": { "@types/json-schema": "^7.0.7", @@ -1245,6 +1351,7 @@ }, "../../node_modules/@stoplight/json/node_modules/@stoplight/types": { "version": "13.20.0", + "dev": true, "license": "Apache-2.0", "dependencies": { "@types/json-schema": "^7.0.4", @@ -1256,6 +1363,7 @@ }, "../../node_modules/@stoplight/ordered-object-literal": { "version": "1.0.5", + "dev": true, "license": "Apache-2.0", "engines": { "node": ">=8" @@ -1263,6 +1371,7 @@ }, "../../node_modules/@stoplight/path": { "version": "1.3.2", + "dev": true, "license": "Apache-2.0", "engines": { "node": ">=8" @@ -1302,6 +1411,7 @@ }, "../../node_modules/@stoplight/prism-core": { "version": "5.8.0", + "dev": true, "license": "Apache-2.0", "dependencies": { "fp-ts": "^2.11.5", @@ -1315,6 +1425,7 @@ }, "../../node_modules/@stoplight/prism-http": { "version": "5.10.0", + "dev": true, "license": "Apache-2.0", "dependencies": { "@faker-js/faker": "^6.0.0", @@ -1352,6 +1463,7 @@ }, "../../node_modules/@stoplight/prism-http-server": { "version": "5.10.0", + "dev": true, "license": "Apache-2.0", "dependencies": { "@stoplight/prism-core": "^5.8.0", @@ -1373,6 +1485,7 @@ }, "../../node_modules/@stoplight/prism-http/node_modules/ajv": { "version": "8.17.1", + "dev": true, "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.3", @@ -1387,10 +1500,12 @@ }, "../../node_modules/@stoplight/prism-http/node_modules/json-schema-traverse": { "version": "1.0.0", + "dev": true, "license": "MIT" }, "../../node_modules/@stoplight/types": { "version": "14.1.1", + "dev": true, "license": "Apache-2.0", "dependencies": { "@types/json-schema": "^7.0.4", @@ -1402,6 +1517,7 @@ }, "../../node_modules/@stoplight/yaml": { "version": "4.3.0", + "dev": true, "license": "Apache-2.0", "dependencies": { "@stoplight/ordered-object-literal": "^1.0.5", @@ -1415,10 +1531,12 @@ }, "../../node_modules/@stoplight/yaml-ast-parser": { "version": "0.0.50", + "dev": true, "license": "Apache-2.0" }, "../../node_modules/@tootallnate/once": { "version": "2.0.0", + "dev": true, "license": "MIT", "engines": { "node": ">= 10" @@ -1426,22 +1544,27 @@ }, "../../node_modules/@tsconfig/node10": { "version": "1.0.11", + "dev": true, "license": "MIT" }, "../../node_modules/@tsconfig/node12": { "version": "1.0.11", + "dev": true, "license": "MIT" }, "../../node_modules/@tsconfig/node14": { "version": "1.0.3", + "dev": true, "license": "MIT" }, "../../node_modules/@tsconfig/node16": { "version": "1.0.4", + "dev": true, "license": "MIT" }, "../../node_modules/@types/babel__core": { "version": "7.20.5", + "dev": true, "license": "MIT", "dependencies": { "@babel/parser": "^7.20.7", @@ -1453,6 +1576,7 @@ }, "../../node_modules/@types/babel__generator": { "version": "7.6.8", + "dev": true, "license": "MIT", "dependencies": { "@babel/types": "^7.0.0" @@ -1460,6 +1584,7 @@ }, "../../node_modules/@types/babel__template": { "version": "7.4.4", + "dev": true, "license": "MIT", "dependencies": { "@babel/parser": "^7.1.0", @@ -1468,6 +1593,7 @@ }, "../../node_modules/@types/babel__traverse": { "version": "7.20.6", + "dev": true, "license": "MIT", "dependencies": { "@babel/types": "^7.20.7" @@ -1475,6 +1601,7 @@ }, "../../node_modules/@types/eslint": { "version": "9.6.1", + "dev": true, "license": "MIT", "dependencies": { "@types/estree": "*", @@ -1491,14 +1618,17 @@ }, "../../node_modules/@types/estree": { "version": "1.0.5", + "dev": true, "license": "MIT" }, "../../node_modules/@types/fined": { "version": "1.1.5", + "dev": true, "license": "MIT" }, "../../node_modules/@types/graceful-fs": { "version": "4.1.9", + "dev": true, "license": "MIT", "dependencies": { "@types/node": "*" @@ -1506,6 +1636,7 @@ }, "../../node_modules/@types/inquirer": { "version": "9.0.7", + "dev": true, "license": "MIT", "dependencies": { "@types/through": "*", @@ -1514,10 +1645,12 @@ }, "../../node_modules/@types/istanbul-lib-coverage": { "version": "2.0.6", + "dev": true, "license": "MIT" }, "../../node_modules/@types/istanbul-lib-report": { "version": "3.0.3", + "dev": true, "license": "MIT", "dependencies": { "@types/istanbul-lib-coverage": "*" @@ -1525,6 +1658,7 @@ }, "../../node_modules/@types/istanbul-reports": { "version": "3.0.4", + "dev": true, "license": "MIT", "dependencies": { "@types/istanbul-lib-report": "*" @@ -1541,10 +1675,12 @@ }, "../../node_modules/@types/json-schema": { "version": "7.0.15", + "dev": true, "license": "MIT" }, "../../node_modules/@types/liftoff": { "version": "4.0.3", + "dev": true, "license": "MIT", "dependencies": { "@types/fined": "*", @@ -1553,6 +1689,7 @@ }, "../../node_modules/@types/node": { "version": "22.7.3", + "dev": true, "license": "MIT", "dependencies": { "undici-types": "~6.19.2" @@ -1565,14 +1702,17 @@ }, "../../node_modules/@types/stack-utils": { "version": "2.0.3", + "dev": true, "license": "MIT" }, "../../node_modules/@types/swagger-schema-official": { "version": "2.0.25", + "dev": true, "license": "MIT" }, "../../node_modules/@types/through": { "version": "0.0.33", + "dev": true, "license": "MIT", "dependencies": { "@types/node": "*" @@ -1580,6 +1720,7 @@ }, "../../node_modules/@types/type-is": { "version": "1.6.6", + "dev": true, "license": "MIT", "dependencies": { "@types/node": "*" @@ -1587,6 +1728,7 @@ }, "../../node_modules/@types/yargs": { "version": "17.0.33", + "dev": true, "license": "MIT", "dependencies": { "@types/yargs-parser": "*" @@ -1594,10 +1736,12 @@ }, "../../node_modules/@types/yargs-parser": { "version": "21.0.3", + "dev": true, "license": "MIT" }, "../../node_modules/@typescript-eslint/eslint-plugin": { "version": "8.5.0", + "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.10.0", @@ -1629,6 +1773,7 @@ }, "../../node_modules/@typescript-eslint/parser": { "version": "8.5.0", + "dev": true, "license": "BSD-2-Clause", "dependencies": { "@typescript-eslint/scope-manager": "8.5.0", @@ -1655,6 +1800,7 @@ }, "../../node_modules/@typescript-eslint/scope-manager": { "version": "8.5.0", + "dev": true, "license": "MIT", "dependencies": { "@typescript-eslint/types": "8.5.0", @@ -1670,6 +1816,7 @@ }, "../../node_modules/@typescript-eslint/type-utils": { "version": "8.5.0", + "dev": true, "license": "MIT", "dependencies": { "@typescript-eslint/typescript-estree": "8.5.0", @@ -1692,6 +1839,7 @@ }, "../../node_modules/@typescript-eslint/types": { "version": "8.5.0", + "dev": true, "license": "MIT", "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1703,6 +1851,7 @@ }, "../../node_modules/@typescript-eslint/typescript-estree": { "version": "8.5.0", + "dev": true, "license": "BSD-2-Clause", "dependencies": { "@typescript-eslint/types": "8.5.0", @@ -1729,6 +1878,7 @@ }, "../../node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { "version": "2.0.1", + "dev": true, "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" @@ -1736,6 +1886,7 @@ }, "../../node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { "version": "9.0.5", + "dev": true, "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" @@ -1749,6 +1900,7 @@ }, "../../node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { "version": "7.6.3", + "dev": true, "license": "ISC", "bin": { "semver": "bin/semver.js" @@ -1759,6 +1911,7 @@ }, "../../node_modules/@typescript-eslint/utils": { "version": "8.5.0", + "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", @@ -1779,6 +1932,7 @@ }, "../../node_modules/@typescript-eslint/visitor-keys": { "version": "8.5.0", + "dev": true, "license": "MIT", "dependencies": { "@typescript-eslint/types": "8.5.0", @@ -1794,14 +1948,17 @@ }, "../../node_modules/@ungap/structured-clone": { "version": "1.2.0", + "dev": true, "license": "ISC" }, "../../node_modules/abstract-logging": { "version": "2.0.1", + "dev": true, "license": "MIT" }, "../../node_modules/accepts": { "version": "1.3.8", + "dev": true, "license": "MIT", "dependencies": { "mime-types": "~2.1.34", @@ -1813,6 +1970,7 @@ }, "../../node_modules/acorn": { "version": "8.12.1", + "dev": true, "license": "MIT", "bin": { "acorn": "bin/acorn" @@ -1823,6 +1981,7 @@ }, "../../node_modules/acorn-jsx": { "version": "5.3.2", + "dev": true, "license": "MIT", "peerDependencies": { "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" @@ -1830,6 +1989,7 @@ }, "../../node_modules/acorn-walk": { "version": "8.3.4", + "dev": true, "license": "MIT", "dependencies": { "acorn": "^8.11.0" @@ -1840,6 +2000,7 @@ }, "../../node_modules/agent-base": { "version": "6.0.2", + "dev": true, "license": "MIT", "dependencies": { "debug": "4" @@ -1850,6 +2011,7 @@ }, "../../node_modules/aggregate-error": { "version": "3.1.0", + "dev": true, "license": "MIT", "dependencies": { "clean-stack": "^2.0.0", @@ -1861,6 +2023,7 @@ }, "../../node_modules/ajv": { "version": "6.12.6", + "dev": true, "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.1", @@ -1875,6 +2038,7 @@ }, "../../node_modules/ajv-formats": { "version": "2.1.1", + "dev": true, "license": "MIT", "dependencies": { "ajv": "^8.0.0" @@ -1890,6 +2054,7 @@ }, "../../node_modules/ajv-formats/node_modules/ajv": { "version": "8.17.1", + "dev": true, "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.3", @@ -1904,10 +2069,12 @@ }, "../../node_modules/ajv-formats/node_modules/json-schema-traverse": { "version": "1.0.0", + "dev": true, "license": "MIT" }, "../../node_modules/ansi-escapes": { "version": "4.3.2", + "dev": true, "license": "MIT", "dependencies": { "type-fest": "^0.21.3" @@ -1921,6 +2088,7 @@ }, "../../node_modules/ansi-escapes/node_modules/type-fest": { "version": "0.21.3", + "dev": true, "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=10" @@ -1931,6 +2099,7 @@ }, "../../node_modules/ansi-regex": { "version": "5.0.1", + "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -1938,6 +2107,7 @@ }, "../../node_modules/ansi-styles": { "version": "4.3.0", + "dev": true, "license": "MIT", "dependencies": { "color-convert": "^2.0.1" @@ -1951,6 +2121,7 @@ }, "../../node_modules/anymatch": { "version": "3.1.3", + "dev": true, "license": "ISC", "dependencies": { "normalize-path": "^3.0.0", @@ -1962,6 +2133,7 @@ }, "../../node_modules/append-transform": { "version": "2.0.0", + "dev": true, "license": "MIT", "dependencies": { "default-require-extensions": "^3.0.0" @@ -1972,14 +2144,17 @@ }, "../../node_modules/archy": { "version": "1.0.0", + "dev": true, "license": "MIT" }, "../../node_modules/arg": { "version": "4.1.3", + "dev": true, "license": "MIT" }, "../../node_modules/argparse": { "version": "1.0.10", + "dev": true, "license": "MIT", "dependencies": { "sprintf-js": "~1.0.2" @@ -1987,6 +2162,7 @@ }, "../../node_modules/array-each": { "version": "1.0.1", + "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -1994,6 +2170,7 @@ }, "../../node_modules/array-slice": { "version": "1.1.0", + "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -2001,10 +2178,12 @@ }, "../../node_modules/async": { "version": "3.2.6", + "dev": true, "license": "MIT" }, "../../node_modules/atomic-sleep": { "version": "1.0.0", + "dev": true, "license": "MIT", "engines": { "node": ">=8.0.0" @@ -2012,6 +2191,7 @@ }, "../../node_modules/babel-jest": { "version": "29.7.0", + "dev": true, "license": "MIT", "dependencies": { "@jest/transform": "^29.7.0", @@ -2031,6 +2211,7 @@ }, "../../node_modules/babel-plugin-istanbul": { "version": "6.1.1", + "dev": true, "license": "BSD-3-Clause", "dependencies": { "@babel/helper-plugin-utils": "^7.0.0", @@ -2045,6 +2226,7 @@ }, "../../node_modules/babel-plugin-istanbul/node_modules/istanbul-lib-instrument": { "version": "5.2.1", + "dev": true, "license": "BSD-3-Clause", "dependencies": { "@babel/core": "^7.12.3", @@ -2059,6 +2241,7 @@ }, "../../node_modules/babel-plugin-jest-hoist": { "version": "29.6.3", + "dev": true, "license": "MIT", "dependencies": { "@babel/template": "^7.3.3", @@ -2072,6 +2255,7 @@ }, "../../node_modules/babel-preset-current-node-syntax": { "version": "1.1.0", + "dev": true, "license": "MIT", "dependencies": { "@babel/plugin-syntax-async-generators": "^7.8.4", @@ -2096,6 +2280,7 @@ }, "../../node_modules/babel-preset-jest": { "version": "29.6.3", + "dev": true, "license": "MIT", "dependencies": { "babel-plugin-jest-hoist": "^29.6.3", @@ -2110,10 +2295,12 @@ }, "../../node_modules/balanced-match": { "version": "1.0.2", + "dev": true, "license": "MIT" }, "../../node_modules/base64-js": { "version": "1.5.1", + "dev": true, "funding": [ { "type": "github", @@ -2132,6 +2319,7 @@ }, "../../node_modules/binary-extensions": { "version": "2.3.0", + "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -2142,6 +2330,7 @@ }, "../../node_modules/bl": { "version": "4.1.0", + "dev": true, "license": "MIT", "dependencies": { "buffer": "^5.5.0", @@ -2151,10 +2340,12 @@ }, "../../node_modules/bluebird": { "version": "3.7.2", + "dev": true, "license": "MIT" }, "../../node_modules/brace-expansion": { "version": "1.1.11", + "dev": true, "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", @@ -2163,6 +2354,7 @@ }, "../../node_modules/braces": { "version": "3.0.3", + "dev": true, "license": "MIT", "dependencies": { "fill-range": "^7.1.1" @@ -2173,6 +2365,7 @@ }, "../../node_modules/browserslist": { "version": "4.23.3", + "dev": true, "funding": [ { "type": "opencollective", @@ -2203,6 +2396,7 @@ }, "../../node_modules/bs-logger": { "version": "0.2.6", + "dev": true, "license": "MIT", "dependencies": { "fast-json-stable-stringify": "2.x" @@ -2213,6 +2407,7 @@ }, "../../node_modules/bser": { "version": "2.1.1", + "dev": true, "license": "Apache-2.0", "dependencies": { "node-int64": "^0.4.0" @@ -2220,6 +2415,7 @@ }, "../../node_modules/buffer": { "version": "5.7.1", + "dev": true, "funding": [ { "type": "github", @@ -2242,10 +2438,12 @@ }, "../../node_modules/buffer-from": { "version": "1.1.2", + "dev": true, "license": "MIT" }, "../../node_modules/caching-transform": { "version": "4.0.0", + "dev": true, "license": "MIT", "dependencies": { "hasha": "^5.0.0", @@ -2259,6 +2457,7 @@ }, "../../node_modules/call-bind": { "version": "1.0.7", + "dev": true, "license": "MIT", "dependencies": { "es-define-property": "^1.0.0", @@ -2276,10 +2475,12 @@ }, "../../node_modules/call-me-maybe": { "version": "1.0.2", + "dev": true, "license": "MIT" }, "../../node_modules/callsites": { "version": "3.1.0", + "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -2287,6 +2488,7 @@ }, "../../node_modules/camel-case": { "version": "4.1.2", + "dev": true, "license": "MIT", "dependencies": { "pascal-case": "^3.1.2", @@ -2295,6 +2497,7 @@ }, "../../node_modules/camelcase": { "version": "5.3.1", + "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -2302,6 +2505,7 @@ }, "../../node_modules/caniuse-lite": { "version": "1.0.30001653", + "dev": true, "funding": [ { "type": "opencollective", @@ -2320,6 +2524,7 @@ }, "../../node_modules/capital-case": { "version": "1.0.4", + "dev": true, "license": "MIT", "dependencies": { "no-case": "^3.0.4", @@ -2329,10 +2534,12 @@ }, "../../node_modules/caseless": { "version": "0.12.0", + "dev": true, "license": "Apache-2.0" }, "../../node_modules/chalk": { "version": "4.1.2", + "dev": true, "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", @@ -2347,6 +2554,7 @@ }, "../../node_modules/change-case": { "version": "4.1.2", + "dev": true, "license": "MIT", "dependencies": { "camel-case": "^4.1.2", @@ -2365,6 +2573,7 @@ }, "../../node_modules/char-regex": { "version": "1.0.2", + "dev": true, "license": "MIT", "engines": { "node": ">=10" @@ -2372,10 +2581,12 @@ }, "../../node_modules/chardet": { "version": "0.7.0", + "dev": true, "license": "MIT" }, "../../node_modules/charset": { "version": "1.0.1", + "dev": true, "license": "MIT", "engines": { "node": ">=4.0.0" @@ -2383,6 +2594,7 @@ }, "../../node_modules/chokidar": { "version": "3.6.0", + "dev": true, "license": "MIT", "dependencies": { "anymatch": "~3.1.2", @@ -2405,6 +2617,7 @@ }, "../../node_modules/chokidar/node_modules/glob-parent": { "version": "5.1.2", + "dev": true, "license": "ISC", "dependencies": { "is-glob": "^4.0.1" @@ -2415,6 +2628,7 @@ }, "../../node_modules/ci-info": { "version": "3.9.0", + "dev": true, "funding": [ { "type": "github", @@ -2428,10 +2642,12 @@ }, "../../node_modules/cjs-module-lexer": { "version": "1.4.1", + "dev": true, "license": "MIT" }, "../../node_modules/clean-stack": { "version": "2.2.0", + "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -2439,6 +2655,7 @@ }, "../../node_modules/cli-cursor": { "version": "5.0.0", + "dev": true, "license": "MIT", "dependencies": { "restore-cursor": "^5.0.0" @@ -2452,6 +2669,7 @@ }, "../../node_modules/cli-spinners": { "version": "2.9.2", + "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -2462,6 +2680,7 @@ }, "../../node_modules/cli-width": { "version": "4.1.0", + "dev": true, "license": "ISC", "engines": { "node": ">= 12" @@ -2469,6 +2688,7 @@ }, "../../node_modules/cliui": { "version": "7.0.4", + "dev": true, "license": "ISC", "dependencies": { "string-width": "^4.2.0", @@ -2478,6 +2698,7 @@ }, "../../node_modules/clone": { "version": "1.0.4", + "dev": true, "license": "MIT", "engines": { "node": ">=0.8" @@ -2485,6 +2706,7 @@ }, "../../node_modules/co": { "version": "4.6.0", + "dev": true, "license": "MIT", "engines": { "iojs": ">= 1.0.0", @@ -2493,10 +2715,12 @@ }, "../../node_modules/collect-v8-coverage": { "version": "1.0.2", + "dev": true, "license": "MIT" }, "../../node_modules/color-convert": { "version": "2.0.1", + "dev": true, "license": "MIT", "dependencies": { "color-name": "~1.1.4" @@ -2507,14 +2731,17 @@ }, "../../node_modules/color-name": { "version": "1.1.4", + "dev": true, "license": "MIT" }, "../../node_modules/commondir": { "version": "1.0.1", + "dev": true, "license": "MIT" }, "../../node_modules/compute-gcd": { "version": "1.2.1", + "dev": true, "dependencies": { "validate.io-array": "^1.0.3", "validate.io-function": "^1.0.2", @@ -2523,6 +2750,7 @@ }, "../../node_modules/compute-lcm": { "version": "1.1.2", + "dev": true, "dependencies": { "compute-gcd": "^1.2.1", "validate.io-array": "^1.0.3", @@ -2532,10 +2760,12 @@ }, "../../node_modules/concat-map": { "version": "0.0.1", + "dev": true, "license": "MIT" }, "../../node_modules/constant-case": { "version": "3.0.4", + "dev": true, "license": "MIT", "dependencies": { "no-case": "^3.0.4", @@ -2545,6 +2775,7 @@ }, "../../node_modules/content-type": { "version": "1.0.5", + "dev": true, "license": "MIT", "engines": { "node": ">= 0.6" @@ -2552,10 +2783,12 @@ }, "../../node_modules/convert-source-map": { "version": "1.9.0", + "dev": true, "license": "MIT" }, "../../node_modules/create-jest": { "version": "29.7.0", + "dev": true, "license": "MIT", "dependencies": { "@jest/types": "^29.6.3", @@ -2575,10 +2808,12 @@ }, "../../node_modules/create-require": { "version": "1.1.1", + "dev": true, "license": "MIT" }, "../../node_modules/cross-fetch": { "version": "3.1.8", + "dev": true, "license": "MIT", "dependencies": { "node-fetch": "^2.6.12" @@ -2586,6 +2821,7 @@ }, "../../node_modules/cross-spawn": { "version": "7.0.3", + "dev": true, "license": "MIT", "dependencies": { "path-key": "^3.1.0", @@ -2598,6 +2834,7 @@ }, "../../node_modules/debug": { "version": "4.3.6", + "dev": true, "license": "MIT", "dependencies": { "ms": "2.1.2" @@ -2613,6 +2850,7 @@ }, "../../node_modules/decamelize": { "version": "1.2.0", + "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -2620,6 +2858,7 @@ }, "../../node_modules/dedent": { "version": "1.5.3", + "dev": true, "license": "MIT", "peerDependencies": { "babel-plugin-macros": "^3.1.0" @@ -2632,10 +2871,12 @@ }, "../../node_modules/deep-is": { "version": "0.1.4", + "dev": true, "license": "MIT" }, "../../node_modules/deepmerge": { "version": "4.3.1", + "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -2643,6 +2884,7 @@ }, "../../node_modules/default-require-extensions": { "version": "3.0.1", + "dev": true, "license": "MIT", "dependencies": { "strip-bom": "^4.0.0" @@ -2656,6 +2898,7 @@ }, "../../node_modules/defaults": { "version": "1.0.4", + "dev": true, "license": "MIT", "dependencies": { "clone": "^1.0.2" @@ -2666,6 +2909,7 @@ }, "../../node_modules/define-data-property": { "version": "1.1.4", + "dev": true, "license": "MIT", "dependencies": { "es-define-property": "^1.0.0", @@ -2681,6 +2925,7 @@ }, "../../node_modules/del": { "version": "7.1.0", + "dev": true, "license": "MIT", "dependencies": { "globby": "^13.1.2", @@ -2701,6 +2946,7 @@ }, "../../node_modules/del/node_modules/aggregate-error": { "version": "4.0.1", + "dev": true, "license": "MIT", "dependencies": { "clean-stack": "^4.0.0", @@ -2715,6 +2961,7 @@ }, "../../node_modules/del/node_modules/clean-stack": { "version": "4.2.0", + "dev": true, "license": "MIT", "dependencies": { "escape-string-regexp": "5.0.0" @@ -2728,6 +2975,7 @@ }, "../../node_modules/del/node_modules/escape-string-regexp": { "version": "5.0.0", + "dev": true, "license": "MIT", "engines": { "node": ">=12" @@ -2738,6 +2986,7 @@ }, "../../node_modules/del/node_modules/indent-string": { "version": "5.0.0", + "dev": true, "license": "MIT", "engines": { "node": ">=12" @@ -2748,6 +2997,7 @@ }, "../../node_modules/del/node_modules/is-path-inside": { "version": "4.0.0", + "dev": true, "license": "MIT", "engines": { "node": ">=12" @@ -2758,6 +3008,7 @@ }, "../../node_modules/del/node_modules/p-map": { "version": "5.5.0", + "dev": true, "license": "MIT", "dependencies": { "aggregate-error": "^4.0.0" @@ -2771,6 +3022,7 @@ }, "../../node_modules/del/node_modules/slash": { "version": "4.0.0", + "dev": true, "license": "MIT", "engines": { "node": ">=12" @@ -2781,6 +3033,7 @@ }, "../../node_modules/detect-file": { "version": "1.0.0", + "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -2788,6 +3041,7 @@ }, "../../node_modules/detect-newline": { "version": "3.1.0", + "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -2795,6 +3049,7 @@ }, "../../node_modules/diff-sequences": { "version": "29.6.3", + "dev": true, "license": "MIT", "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" @@ -2802,6 +3057,7 @@ }, "../../node_modules/dir-glob": { "version": "3.0.1", + "dev": true, "license": "MIT", "dependencies": { "path-type": "^4.0.0" @@ -2812,6 +3068,7 @@ }, "../../node_modules/doctrine": { "version": "3.0.0", + "dev": true, "license": "Apache-2.0", "dependencies": { "esutils": "^2.0.2" @@ -2822,6 +3079,7 @@ }, "../../node_modules/dot-case": { "version": "3.0.4", + "dev": true, "license": "MIT", "dependencies": { "no-case": "^3.0.4", @@ -2830,6 +3088,7 @@ }, "../../node_modules/ejs": { "version": "3.1.10", + "dev": true, "license": "Apache-2.0", "dependencies": { "jake": "^10.8.5" @@ -2843,10 +3102,12 @@ }, "../../node_modules/electron-to-chromium": { "version": "1.5.13", + "dev": true, "license": "ISC" }, "../../node_modules/emittery": { "version": "0.13.1", + "dev": true, "license": "MIT", "engines": { "node": ">=12" @@ -2857,10 +3118,12 @@ }, "../../node_modules/emoji-regex": { "version": "8.0.0", + "dev": true, "license": "MIT" }, "../../node_modules/error-ex": { "version": "1.3.2", + "dev": true, "license": "MIT", "dependencies": { "is-arrayish": "^0.2.1" @@ -2868,6 +3131,7 @@ }, "../../node_modules/es-define-property": { "version": "1.0.0", + "dev": true, "license": "MIT", "dependencies": { "get-intrinsic": "^1.2.4" @@ -2878,6 +3142,7 @@ }, "../../node_modules/es-errors": { "version": "1.3.0", + "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -2885,10 +3150,12 @@ }, "../../node_modules/es6-error": { "version": "4.1.1", + "dev": true, "license": "MIT" }, "../../node_modules/escalade": { "version": "3.2.0", + "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -2896,6 +3163,7 @@ }, "../../node_modules/escape-string-regexp": { "version": "4.0.0", + "dev": true, "license": "MIT", "engines": { "node": ">=10" @@ -2906,6 +3174,7 @@ }, "../../node_modules/eslint": { "version": "8.57.0", + "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", @@ -3010,6 +3279,7 @@ }, "../../node_modules/eslint-scope": { "version": "7.2.2", + "dev": true, "license": "BSD-2-Clause", "dependencies": { "esrecurse": "^4.3.0", @@ -3024,6 +3294,7 @@ }, "../../node_modules/eslint-visitor-keys": { "version": "3.4.3", + "dev": true, "license": "Apache-2.0", "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -3034,6 +3305,7 @@ }, "../../node_modules/eslint/node_modules/@eslint/js": { "version": "8.57.0", + "dev": true, "license": "MIT", "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -3041,10 +3313,12 @@ }, "../../node_modules/eslint/node_modules/argparse": { "version": "2.0.1", + "dev": true, "license": "Python-2.0" }, "../../node_modules/eslint/node_modules/js-yaml": { "version": "4.1.0", + "dev": true, "license": "MIT", "dependencies": { "argparse": "^2.0.1" @@ -3055,6 +3329,7 @@ }, "../../node_modules/espree": { "version": "9.6.1", + "dev": true, "license": "BSD-2-Clause", "dependencies": { "acorn": "^8.9.0", @@ -3070,6 +3345,7 @@ }, "../../node_modules/esprima": { "version": "4.0.1", + "dev": true, "license": "BSD-2-Clause", "bin": { "esparse": "bin/esparse.js", @@ -3081,6 +3357,7 @@ }, "../../node_modules/esquery": { "version": "1.6.0", + "dev": true, "license": "BSD-3-Clause", "dependencies": { "estraverse": "^5.1.0" @@ -3091,6 +3368,7 @@ }, "../../node_modules/esrecurse": { "version": "4.3.0", + "dev": true, "license": "BSD-2-Clause", "dependencies": { "estraverse": "^5.2.0" @@ -3101,6 +3379,7 @@ }, "../../node_modules/estraverse": { "version": "5.3.0", + "dev": true, "license": "BSD-2-Clause", "engines": { "node": ">=4.0" @@ -3108,6 +3387,7 @@ }, "../../node_modules/esutils": { "version": "2.0.3", + "dev": true, "license": "BSD-2-Clause", "engines": { "node": ">=0.10.0" @@ -3115,6 +3395,7 @@ }, "../../node_modules/execa": { "version": "5.1.1", + "dev": true, "license": "MIT", "dependencies": { "cross-spawn": "^7.0.3", @@ -3136,12 +3417,14 @@ }, "../../node_modules/exit": { "version": "0.1.2", + "dev": true, "engines": { "node": ">= 0.8.0" } }, "../../node_modules/expand-tilde": { "version": "2.0.2", + "dev": true, "license": "MIT", "dependencies": { "homedir-polyfill": "^1.0.1" @@ -3152,6 +3435,7 @@ }, "../../node_modules/expect": { "version": "29.7.0", + "dev": true, "license": "MIT", "dependencies": { "@jest/expect-utils": "^29.7.0", @@ -3166,10 +3450,12 @@ }, "../../node_modules/extend": { "version": "3.0.2", + "dev": true, "license": "MIT" }, "../../node_modules/external-editor": { "version": "3.1.0", + "dev": true, "license": "MIT", "dependencies": { "chardet": "^0.7.0", @@ -3182,6 +3468,7 @@ }, "../../node_modules/external-editor/node_modules/iconv-lite": { "version": "0.4.24", + "dev": true, "license": "MIT", "dependencies": { "safer-buffer": ">= 2.1.2 < 3" @@ -3192,14 +3479,17 @@ }, "../../node_modules/fast-deep-equal": { "version": "3.1.3", + "dev": true, "license": "MIT" }, "../../node_modules/fast-diff": { "version": "1.3.0", + "dev": true, "license": "Apache-2.0" }, "../../node_modules/fast-glob": { "version": "3.3.2", + "dev": true, "license": "MIT", "dependencies": { "@nodelib/fs.stat": "^2.0.2", @@ -3214,6 +3504,7 @@ }, "../../node_modules/fast-glob/node_modules/glob-parent": { "version": "5.1.2", + "dev": true, "license": "ISC", "dependencies": { "is-glob": "^4.0.1" @@ -3224,14 +3515,17 @@ }, "../../node_modules/fast-json-stable-stringify": { "version": "2.1.0", + "dev": true, "license": "MIT" }, "../../node_modules/fast-levenshtein": { "version": "2.0.6", + "dev": true, "license": "MIT" }, "../../node_modules/fast-redact": { "version": "3.5.0", + "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -3239,14 +3533,17 @@ }, "../../node_modules/fast-safe-stringify": { "version": "2.1.1", + "dev": true, "license": "MIT" }, "../../node_modules/fast-uri": { "version": "3.0.1", + "dev": true, "license": "MIT" }, "../../node_modules/fast-xml-parser": { "version": "4.5.0", + "dev": true, "funding": [ { "type": "github", @@ -3267,10 +3564,12 @@ }, "../../node_modules/fastestsmallesttextencoderdecoder": { "version": "1.0.22", + "dev": true, "license": "CC0-1.0" }, "../../node_modules/fastq": { "version": "1.17.1", + "dev": true, "license": "ISC", "dependencies": { "reusify": "^1.0.4" @@ -3278,6 +3577,7 @@ }, "../../node_modules/fb-watchman": { "version": "2.0.2", + "dev": true, "license": "Apache-2.0", "dependencies": { "bser": "2.1.1" @@ -3285,6 +3585,7 @@ }, "../../node_modules/figures": { "version": "2.0.0", + "dev": true, "license": "MIT", "dependencies": { "escape-string-regexp": "^1.0.5" @@ -3295,6 +3596,7 @@ }, "../../node_modules/figures/node_modules/escape-string-regexp": { "version": "1.0.5", + "dev": true, "license": "MIT", "engines": { "node": ">=0.8.0" @@ -3302,6 +3604,7 @@ }, "../../node_modules/file-entry-cache": { "version": "6.0.1", + "dev": true, "license": "MIT", "dependencies": { "flat-cache": "^3.0.4" @@ -3312,6 +3615,7 @@ }, "../../node_modules/file-type": { "version": "3.9.0", + "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -3319,6 +3623,7 @@ }, "../../node_modules/filelist": { "version": "1.0.4", + "dev": true, "license": "Apache-2.0", "dependencies": { "minimatch": "^5.0.1" @@ -3326,6 +3631,7 @@ }, "../../node_modules/filelist/node_modules/brace-expansion": { "version": "2.0.1", + "dev": true, "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" @@ -3333,6 +3639,7 @@ }, "../../node_modules/filelist/node_modules/minimatch": { "version": "5.1.6", + "dev": true, "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" @@ -3343,6 +3650,7 @@ }, "../../node_modules/fill-range": { "version": "7.1.1", + "dev": true, "license": "MIT", "dependencies": { "to-regex-range": "^5.0.1" @@ -3353,6 +3661,7 @@ }, "../../node_modules/find-cache-dir": { "version": "3.3.2", + "dev": true, "license": "MIT", "dependencies": { "commondir": "^1.0.1", @@ -3368,6 +3677,7 @@ }, "../../node_modules/find-up": { "version": "5.0.0", + "dev": true, "license": "MIT", "dependencies": { "locate-path": "^6.0.0", @@ -3382,6 +3692,7 @@ }, "../../node_modules/findup-sync": { "version": "5.0.0", + "dev": true, "license": "MIT", "dependencies": { "detect-file": "^1.0.0", @@ -3395,6 +3706,7 @@ }, "../../node_modules/fined": { "version": "2.0.0", + "dev": true, "license": "MIT", "dependencies": { "expand-tilde": "^2.0.2", @@ -3409,6 +3721,7 @@ }, "../../node_modules/flagged-respawn": { "version": "2.0.0", + "dev": true, "license": "MIT", "engines": { "node": ">= 10.13.0" @@ -3416,6 +3729,7 @@ }, "../../node_modules/flat-cache": { "version": "3.2.0", + "dev": true, "license": "MIT", "dependencies": { "flatted": "^3.2.9", @@ -3428,18 +3742,22 @@ }, "../../node_modules/flatstr": { "version": "1.0.12", + "dev": true, "license": "MIT" }, "../../node_modules/flatted": { "version": "3.3.1", + "dev": true, "license": "ISC" }, "../../node_modules/fnv-plus": { "version": "1.3.1", + "dev": true, "license": "MIT" }, "../../node_modules/for-in": { "version": "1.0.2", + "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -3447,6 +3765,7 @@ }, "../../node_modules/for-own": { "version": "1.0.0", + "dev": true, "license": "MIT", "dependencies": { "for-in": "^1.0.1" @@ -3457,10 +3776,12 @@ }, "../../node_modules/foreach": { "version": "2.0.6", + "dev": true, "license": "MIT" }, "../../node_modules/foreground-child": { "version": "2.0.0", + "dev": true, "license": "ISC", "dependencies": { "cross-spawn": "^7.0.0", @@ -3472,14 +3793,17 @@ }, "../../node_modules/format-util": { "version": "1.0.5", + "dev": true, "license": "MIT" }, "../../node_modules/fp-ts": { "version": "2.16.9", + "dev": true, "license": "MIT" }, "../../node_modules/fromentries": { "version": "1.3.2", + "dev": true, "funding": [ { "type": "github", @@ -3498,11 +3822,14 @@ }, "../../node_modules/fs.realpath": { "version": "1.0.0", + "dev": true, "license": "ISC" }, "../../node_modules/fsevents": { "version": "2.3.3", + "dev": true, "license": "MIT", + "optional": true, "os": [ "darwin" ], @@ -3512,6 +3839,7 @@ }, "../../node_modules/function-bind": { "version": "1.1.2", + "dev": true, "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" @@ -3519,6 +3847,7 @@ }, "../../node_modules/gensync": { "version": "1.0.0-beta.2", + "dev": true, "license": "MIT", "engines": { "node": ">=6.9.0" @@ -3526,6 +3855,7 @@ }, "../../node_modules/get-caller-file": { "version": "2.0.5", + "dev": true, "license": "ISC", "engines": { "node": "6.* || 8.* || >= 10.*" @@ -3533,6 +3863,7 @@ }, "../../node_modules/get-east-asian-width": { "version": "1.2.0", + "dev": true, "license": "MIT", "engines": { "node": ">=18" @@ -3543,6 +3874,7 @@ }, "../../node_modules/get-intrinsic": { "version": "1.2.4", + "dev": true, "license": "MIT", "dependencies": { "es-errors": "^1.3.0", @@ -3560,6 +3892,7 @@ }, "../../node_modules/get-package-type": { "version": "0.1.0", + "dev": true, "license": "MIT", "engines": { "node": ">=8.0.0" @@ -3567,6 +3900,7 @@ }, "../../node_modules/get-stream": { "version": "6.0.1", + "dev": true, "license": "MIT", "engines": { "node": ">=10" @@ -3577,6 +3911,7 @@ }, "../../node_modules/glob-parent": { "version": "6.0.2", + "dev": true, "license": "ISC", "dependencies": { "is-glob": "^4.0.3" @@ -3587,6 +3922,7 @@ }, "../../node_modules/global-modules": { "version": "1.0.0", + "dev": true, "license": "MIT", "dependencies": { "global-prefix": "^1.0.1", @@ -3599,6 +3935,7 @@ }, "../../node_modules/global-prefix": { "version": "1.0.2", + "dev": true, "license": "MIT", "dependencies": { "expand-tilde": "^2.0.2", @@ -3613,6 +3950,7 @@ }, "../../node_modules/global-prefix/node_modules/which": { "version": "1.3.1", + "dev": true, "license": "ISC", "dependencies": { "isexe": "^2.0.0" @@ -3623,6 +3961,7 @@ }, "../../node_modules/globals": { "version": "13.24.0", + "dev": true, "license": "MIT", "dependencies": { "type-fest": "^0.20.2" @@ -3636,6 +3975,7 @@ }, "../../node_modules/globby": { "version": "13.2.2", + "dev": true, "license": "MIT", "dependencies": { "dir-glob": "^3.0.1", @@ -3653,6 +3993,7 @@ }, "../../node_modules/globby/node_modules/slash": { "version": "4.0.0", + "dev": true, "license": "MIT", "engines": { "node": ">=12" @@ -3663,6 +4004,7 @@ }, "../../node_modules/gopd": { "version": "1.0.1", + "dev": true, "license": "MIT", "dependencies": { "get-intrinsic": "^1.1.3" @@ -3673,14 +4015,17 @@ }, "../../node_modules/graceful-fs": { "version": "4.2.11", + "dev": true, "license": "ISC" }, "../../node_modules/graphemer": { "version": "1.4.0", + "dev": true, "license": "MIT" }, "../../node_modules/handlebars": { "version": "4.7.8", + "dev": true, "license": "MIT", "dependencies": { "minimist": "^1.2.5", @@ -3700,10 +4045,12 @@ }, "../../node_modules/handler-agent": { "version": "0.2.0", + "dev": true, "license": "MIT" }, "../../node_modules/has-flag": { "version": "4.0.0", + "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -3711,6 +4058,7 @@ }, "../../node_modules/has-property-descriptors": { "version": "1.0.2", + "dev": true, "license": "MIT", "dependencies": { "es-define-property": "^1.0.0" @@ -3721,6 +4069,7 @@ }, "../../node_modules/has-proto": { "version": "1.0.3", + "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -3731,6 +4080,7 @@ }, "../../node_modules/has-symbols": { "version": "1.0.3", + "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -3741,6 +4091,7 @@ }, "../../node_modules/hasha": { "version": "5.2.2", + "dev": true, "license": "MIT", "dependencies": { "is-stream": "^2.0.0", @@ -3755,6 +4106,7 @@ }, "../../node_modules/hasha/node_modules/type-fest": { "version": "0.8.1", + "dev": true, "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=8" @@ -3762,6 +4114,7 @@ }, "../../node_modules/hasown": { "version": "2.0.2", + "dev": true, "license": "MIT", "dependencies": { "function-bind": "^1.1.2" @@ -3772,6 +4125,7 @@ }, "../../node_modules/header-case": { "version": "2.0.4", + "dev": true, "license": "MIT", "dependencies": { "capital-case": "^1.0.4", @@ -3780,6 +4134,7 @@ }, "../../node_modules/homedir-polyfill": { "version": "1.0.3", + "dev": true, "license": "MIT", "dependencies": { "parse-passwd": "^1.0.0" @@ -3790,10 +4145,12 @@ }, "../../node_modules/html-escaper": { "version": "2.0.2", + "dev": true, "license": "MIT" }, "../../node_modules/http-proxy-agent": { "version": "5.0.0", + "dev": true, "license": "MIT", "dependencies": { "@tootallnate/once": "2", @@ -3806,10 +4163,12 @@ }, "../../node_modules/http-reasons": { "version": "0.1.0", + "dev": true, "license": "Apache-2.0" }, "../../node_modules/https-proxy-agent": { "version": "5.0.1", + "dev": true, "license": "MIT", "dependencies": { "agent-base": "6", @@ -3821,6 +4180,7 @@ }, "../../node_modules/human-signals": { "version": "2.1.0", + "dev": true, "license": "Apache-2.0", "engines": { "node": ">=10.17.0" @@ -3828,6 +4188,7 @@ }, "../../node_modules/iconv-lite": { "version": "0.6.3", + "dev": true, "license": "MIT", "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" @@ -3838,6 +4199,7 @@ }, "../../node_modules/ieee754": { "version": "1.2.1", + "dev": true, "funding": [ { "type": "github", @@ -3856,6 +4218,7 @@ }, "../../node_modules/ignore": { "version": "5.3.2", + "dev": true, "license": "MIT", "engines": { "node": ">= 4" @@ -3863,6 +4226,7 @@ }, "../../node_modules/import-fresh": { "version": "3.3.0", + "dev": true, "license": "MIT", "dependencies": { "parent-module": "^1.0.0", @@ -3877,6 +4241,7 @@ }, "../../node_modules/import-local": { "version": "3.2.0", + "dev": true, "license": "MIT", "dependencies": { "pkg-dir": "^4.2.0", @@ -3894,6 +4259,7 @@ }, "../../node_modules/imurmurhash": { "version": "0.1.4", + "dev": true, "license": "MIT", "engines": { "node": ">=0.8.19" @@ -3901,6 +4267,7 @@ }, "../../node_modules/indent-string": { "version": "4.0.0", + "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -3908,6 +4275,7 @@ }, "../../node_modules/inflight": { "version": "1.0.6", + "dev": true, "license": "ISC", "dependencies": { "once": "^1.3.0", @@ -3916,14 +4284,17 @@ }, "../../node_modules/inherits": { "version": "2.0.4", + "dev": true, "license": "ISC" }, "../../node_modules/ini": { "version": "1.3.8", + "dev": true, "license": "ISC" }, "../../node_modules/inquirer": { "version": "9.3.5", + "dev": true, "license": "MIT", "dependencies": { "@inquirer/figures": "^1.0.3", @@ -3945,6 +4316,7 @@ }, "../../node_modules/inquirer/node_modules/cli-cursor": { "version": "3.1.0", + "dev": true, "license": "MIT", "dependencies": { "restore-cursor": "^3.1.0" @@ -3955,6 +4327,7 @@ }, "../../node_modules/inquirer/node_modules/is-interactive": { "version": "1.0.0", + "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -3962,6 +4335,7 @@ }, "../../node_modules/inquirer/node_modules/is-unicode-supported": { "version": "0.1.0", + "dev": true, "license": "MIT", "engines": { "node": ">=10" @@ -3972,6 +4346,7 @@ }, "../../node_modules/inquirer/node_modules/log-symbols": { "version": "4.1.0", + "dev": true, "license": "MIT", "dependencies": { "chalk": "^4.1.0", @@ -3986,6 +4361,7 @@ }, "../../node_modules/inquirer/node_modules/ora": { "version": "5.4.1", + "dev": true, "license": "MIT", "dependencies": { "bl": "^4.1.0", @@ -4007,6 +4383,7 @@ }, "../../node_modules/inquirer/node_modules/restore-cursor": { "version": "3.1.0", + "dev": true, "license": "MIT", "dependencies": { "onetime": "^5.1.0", @@ -4018,6 +4395,7 @@ }, "../../node_modules/inquirer/node_modules/wrap-ansi": { "version": "6.2.0", + "dev": true, "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", @@ -4030,6 +4408,7 @@ }, "../../node_modules/interpret": { "version": "3.1.1", + "dev": true, "license": "MIT", "engines": { "node": ">=10.13.0" @@ -4037,6 +4416,7 @@ }, "../../node_modules/io-ts": { "version": "2.2.21", + "dev": true, "license": "MIT", "peerDependencies": { "fp-ts": "^2.5.0" @@ -4044,6 +4424,7 @@ }, "../../node_modules/is-absolute": { "version": "1.0.0", + "dev": true, "license": "MIT", "dependencies": { "is-relative": "^1.0.0", @@ -4055,10 +4436,12 @@ }, "../../node_modules/is-arrayish": { "version": "0.2.1", + "dev": true, "license": "MIT" }, "../../node_modules/is-binary-path": { "version": "2.1.0", + "dev": true, "license": "MIT", "dependencies": { "binary-extensions": "^2.0.0" @@ -4069,6 +4452,7 @@ }, "../../node_modules/is-core-module": { "version": "2.15.1", + "dev": true, "license": "MIT", "dependencies": { "hasown": "^2.0.2" @@ -4082,6 +4466,7 @@ }, "../../node_modules/is-extglob": { "version": "2.1.1", + "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -4089,6 +4474,7 @@ }, "../../node_modules/is-fullwidth-code-point": { "version": "3.0.0", + "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -4096,6 +4482,7 @@ }, "../../node_modules/is-generator-fn": { "version": "2.1.0", + "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -4103,6 +4490,7 @@ }, "../../node_modules/is-glob": { "version": "4.0.3", + "dev": true, "license": "MIT", "dependencies": { "is-extglob": "^2.1.1" @@ -4113,6 +4501,7 @@ }, "../../node_modules/is-interactive": { "version": "2.0.0", + "dev": true, "license": "MIT", "engines": { "node": ">=12" @@ -4123,6 +4512,7 @@ }, "../../node_modules/is-number": { "version": "7.0.0", + "dev": true, "license": "MIT", "engines": { "node": ">=0.12.0" @@ -4130,6 +4520,7 @@ }, "../../node_modules/is-path-cwd": { "version": "3.0.0", + "dev": true, "license": "MIT", "engines": { "node": "^12.20.0 || ^14.13.1 || >=16.0.0" @@ -4140,6 +4531,7 @@ }, "../../node_modules/is-path-inside": { "version": "3.0.3", + "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -4147,6 +4539,7 @@ }, "../../node_modules/is-plain-object": { "version": "5.0.0", + "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -4154,6 +4547,7 @@ }, "../../node_modules/is-relative": { "version": "1.0.0", + "dev": true, "license": "MIT", "dependencies": { "is-unc-path": "^1.0.0" @@ -4164,6 +4558,7 @@ }, "../../node_modules/is-stream": { "version": "2.0.1", + "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -4174,10 +4569,12 @@ }, "../../node_modules/is-typedarray": { "version": "1.0.0", + "dev": true, "license": "MIT" }, "../../node_modules/is-unc-path": { "version": "1.0.0", + "dev": true, "license": "MIT", "dependencies": { "unc-path-regex": "^0.1.2" @@ -4188,6 +4585,7 @@ }, "../../node_modules/is-unicode-supported": { "version": "2.1.0", + "dev": true, "license": "MIT", "engines": { "node": ">=18" @@ -4198,6 +4596,7 @@ }, "../../node_modules/is-windows": { "version": "1.0.2", + "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -4205,6 +4604,7 @@ }, "../../node_modules/isbinaryfile": { "version": "5.0.2", + "dev": true, "license": "MIT", "engines": { "node": ">= 18.0.0" @@ -4215,10 +4615,12 @@ }, "../../node_modules/isexe": { "version": "2.0.0", + "dev": true, "license": "ISC" }, "../../node_modules/isobject": { "version": "3.0.1", + "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -4226,6 +4628,7 @@ }, "../../node_modules/isomorphic-fetch": { "version": "3.0.0", + "dev": true, "license": "MIT", "dependencies": { "node-fetch": "^2.6.1", @@ -4234,6 +4637,7 @@ }, "../../node_modules/istanbul-lib-coverage": { "version": "3.2.2", + "dev": true, "license": "BSD-3-Clause", "engines": { "node": ">=8" @@ -4241,6 +4645,7 @@ }, "../../node_modules/istanbul-lib-hook": { "version": "3.0.0", + "dev": true, "license": "BSD-3-Clause", "dependencies": { "append-transform": "^2.0.0" @@ -4251,6 +4656,7 @@ }, "../../node_modules/istanbul-lib-instrument": { "version": "4.0.3", + "dev": true, "license": "BSD-3-Clause", "dependencies": { "@babel/core": "^7.7.5", @@ -4264,6 +4670,7 @@ }, "../../node_modules/istanbul-lib-processinfo": { "version": "2.0.3", + "dev": true, "license": "ISC", "dependencies": { "archy": "^1.0.0", @@ -4279,6 +4686,7 @@ }, "../../node_modules/istanbul-lib-processinfo/node_modules/uuid": { "version": "8.3.2", + "dev": true, "license": "MIT", "bin": { "uuid": "dist/bin/uuid" @@ -4286,6 +4694,7 @@ }, "../../node_modules/istanbul-lib-report": { "version": "3.0.1", + "dev": true, "license": "BSD-3-Clause", "dependencies": { "istanbul-lib-coverage": "^3.0.0", @@ -4298,6 +4707,7 @@ }, "../../node_modules/istanbul-lib-report/node_modules/make-dir": { "version": "4.0.0", + "dev": true, "license": "MIT", "dependencies": { "semver": "^7.5.3" @@ -4311,6 +4721,7 @@ }, "../../node_modules/istanbul-lib-report/node_modules/semver": { "version": "7.6.3", + "dev": true, "license": "ISC", "bin": { "semver": "bin/semver.js" @@ -4321,6 +4732,7 @@ }, "../../node_modules/istanbul-lib-source-maps": { "version": "4.0.1", + "dev": true, "license": "BSD-3-Clause", "dependencies": { "debug": "^4.1.1", @@ -4333,6 +4745,7 @@ }, "../../node_modules/istanbul-reports": { "version": "3.1.7", + "dev": true, "license": "BSD-3-Clause", "dependencies": { "html-escaper": "^2.0.0", @@ -4344,6 +4757,7 @@ }, "../../node_modules/jake": { "version": "10.9.2", + "dev": true, "license": "Apache-2.0", "dependencies": { "async": "^3.2.3", @@ -4385,6 +4799,7 @@ }, "../../node_modules/jest-changed-files": { "version": "29.7.0", + "dev": true, "license": "MIT", "dependencies": { "execa": "^5.0.0", @@ -4397,6 +4812,7 @@ }, "../../node_modules/jest-circus": { "version": "29.7.0", + "dev": true, "license": "MIT", "dependencies": { "@jest/environment": "^29.7.0", @@ -4426,6 +4842,7 @@ }, "../../node_modules/jest-cli": { "version": "29.7.0", + "dev": true, "license": "MIT", "dependencies": { "@jest/core": "^29.7.0", @@ -4457,6 +4874,7 @@ }, "../../node_modules/jest-cli/node_modules/cliui": { "version": "8.0.1", + "dev": true, "license": "ISC", "dependencies": { "string-width": "^4.2.0", @@ -4469,6 +4887,7 @@ }, "../../node_modules/jest-cli/node_modules/yargs": { "version": "17.7.2", + "dev": true, "license": "MIT", "dependencies": { "cliui": "^8.0.1", @@ -4485,6 +4904,7 @@ }, "../../node_modules/jest-cli/node_modules/yargs-parser": { "version": "21.1.1", + "dev": true, "license": "ISC", "engines": { "node": ">=12" @@ -4492,6 +4912,7 @@ }, "../../node_modules/jest-config": { "version": "29.7.0", + "dev": true, "license": "MIT", "dependencies": { "@babel/core": "^7.11.6", @@ -4535,6 +4956,7 @@ }, "../../node_modules/jest-config/node_modules/glob": { "version": "7.2.3", + "dev": true, "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", @@ -4553,6 +4975,7 @@ }, "../../node_modules/jest-diff": { "version": "29.7.0", + "dev": true, "license": "MIT", "dependencies": { "chalk": "^4.0.0", @@ -4566,6 +4989,7 @@ }, "../../node_modules/jest-docblock": { "version": "29.7.0", + "dev": true, "license": "MIT", "dependencies": { "detect-newline": "^3.0.0" @@ -4576,6 +5000,7 @@ }, "../../node_modules/jest-each": { "version": "29.7.0", + "dev": true, "license": "MIT", "dependencies": { "@jest/types": "^29.6.3", @@ -4590,6 +5015,7 @@ }, "../../node_modules/jest-environment-node": { "version": "29.7.0", + "dev": true, "license": "MIT", "dependencies": { "@jest/environment": "^29.7.0", @@ -4605,6 +5031,7 @@ }, "../../node_modules/jest-get-type": { "version": "29.6.3", + "dev": true, "license": "MIT", "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" @@ -4612,6 +5039,7 @@ }, "../../node_modules/jest-haste-map": { "version": "29.7.0", + "dev": true, "license": "MIT", "dependencies": { "@jest/types": "^29.6.3", @@ -4635,6 +5063,7 @@ }, "../../node_modules/jest-leak-detector": { "version": "29.7.0", + "dev": true, "license": "MIT", "dependencies": { "jest-get-type": "^29.6.3", @@ -4646,6 +5075,7 @@ }, "../../node_modules/jest-matcher-utils": { "version": "29.7.0", + "dev": true, "license": "MIT", "dependencies": { "chalk": "^4.0.0", @@ -4659,6 +5089,7 @@ }, "../../node_modules/jest-message-util": { "version": "29.7.0", + "dev": true, "license": "MIT", "dependencies": { "@babel/code-frame": "^7.12.13", @@ -4677,6 +5108,7 @@ }, "../../node_modules/jest-mock": { "version": "29.7.0", + "dev": true, "license": "MIT", "dependencies": { "@jest/types": "^29.6.3", @@ -4689,6 +5121,7 @@ }, "../../node_modules/jest-pnp-resolver": { "version": "1.2.3", + "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -4704,6 +5137,7 @@ }, "../../node_modules/jest-regex-util": { "version": "29.6.3", + "dev": true, "license": "MIT", "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" @@ -4711,6 +5145,7 @@ }, "../../node_modules/jest-resolve": { "version": "29.7.0", + "dev": true, "license": "MIT", "dependencies": { "chalk": "^4.0.0", @@ -4729,6 +5164,7 @@ }, "../../node_modules/jest-resolve-dependencies": { "version": "29.7.0", + "dev": true, "license": "MIT", "dependencies": { "jest-regex-util": "^29.6.3", @@ -4740,6 +5176,7 @@ }, "../../node_modules/jest-runner": { "version": "29.7.0", + "dev": true, "license": "MIT", "dependencies": { "@jest/console": "^29.7.0", @@ -4770,6 +5207,7 @@ }, "../../node_modules/jest-runtime": { "version": "29.7.0", + "dev": true, "license": "MIT", "dependencies": { "@jest/environment": "^29.7.0", @@ -4801,6 +5239,7 @@ }, "../../node_modules/jest-runtime/node_modules/glob": { "version": "7.2.3", + "dev": true, "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", @@ -4819,6 +5258,7 @@ }, "../../node_modules/jest-snapshot": { "version": "29.7.0", + "dev": true, "license": "MIT", "dependencies": { "@babel/core": "^7.11.6", @@ -4848,6 +5288,7 @@ }, "../../node_modules/jest-snapshot/node_modules/semver": { "version": "7.6.3", + "dev": true, "license": "ISC", "bin": { "semver": "bin/semver.js" @@ -4858,6 +5299,7 @@ }, "../../node_modules/jest-util": { "version": "29.7.0", + "dev": true, "license": "MIT", "dependencies": { "@jest/types": "^29.6.3", @@ -4873,6 +5315,7 @@ }, "../../node_modules/jest-validate": { "version": "29.7.0", + "dev": true, "license": "MIT", "dependencies": { "@jest/types": "^29.6.3", @@ -4888,6 +5331,7 @@ }, "../../node_modules/jest-validate/node_modules/camelcase": { "version": "6.3.0", + "dev": true, "license": "MIT", "engines": { "node": ">=10" @@ -4898,6 +5342,7 @@ }, "../../node_modules/jest-watcher": { "version": "29.7.0", + "dev": true, "license": "MIT", "dependencies": { "@jest/test-result": "^29.7.0", @@ -4915,6 +5360,7 @@ }, "../../node_modules/jest-worker": { "version": "29.7.0", + "dev": true, "license": "MIT", "dependencies": { "@types/node": "*", @@ -4928,6 +5374,7 @@ }, "../../node_modules/jest-worker/node_modules/supports-color": { "version": "8.1.1", + "dev": true, "license": "MIT", "dependencies": { "has-flag": "^4.0.0" @@ -4941,10 +5388,12 @@ }, "../../node_modules/js-tokens": { "version": "4.0.0", + "dev": true, "license": "MIT" }, "../../node_modules/js-yaml": { "version": "3.14.1", + "dev": true, "license": "MIT", "dependencies": { "argparse": "^1.0.7", @@ -4956,6 +5405,7 @@ }, "../../node_modules/jsesc": { "version": "2.5.2", + "dev": true, "license": "MIT", "bin": { "jsesc": "bin/jsesc" @@ -4966,18 +5416,22 @@ }, "../../node_modules/json-buffer": { "version": "3.0.1", + "dev": true, "license": "MIT" }, "../../node_modules/json-parse-better-errors": { "version": "1.0.2", + "dev": true, "license": "MIT" }, "../../node_modules/json-parse-even-better-errors": { "version": "2.3.1", + "dev": true, "license": "MIT" }, "../../node_modules/json-pointer": { "version": "0.6.2", + "dev": true, "license": "MIT", "dependencies": { "foreach": "^2.0.4" @@ -4985,6 +5439,7 @@ }, "../../node_modules/json-promise": { "version": "1.1.8", + "dev": true, "license": "MIT", "dependencies": { "bluebird": "*" @@ -4992,6 +5447,7 @@ }, "../../node_modules/json-schema-compare": { "version": "0.2.2", + "dev": true, "license": "MIT", "dependencies": { "lodash": "^4.17.4" @@ -4999,6 +5455,7 @@ }, "../../node_modules/json-schema-faker": { "version": "0.5.6", + "dev": true, "license": "MIT", "dependencies": { "json-schema-ref-parser": "^6.1.0", @@ -5010,6 +5467,7 @@ }, "../../node_modules/json-schema-ref-parser": { "version": "6.1.0", + "dev": true, "license": "MIT", "dependencies": { "call-me-maybe": "^1.0.1", @@ -5019,18 +5477,22 @@ }, "../../node_modules/json-schema-traverse": { "version": "0.4.1", + "dev": true, "license": "MIT" }, "../../node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", + "dev": true, "license": "MIT" }, "../../node_modules/json-stringify-safe": { "version": "5.0.1", + "dev": true, "license": "ISC" }, "../../node_modules/json5": { "version": "2.2.3", + "dev": true, "license": "MIT", "bin": { "json5": "lib/cli.js" @@ -5041,10 +5503,12 @@ }, "../../node_modules/jsonc-parser": { "version": "2.2.1", + "dev": true, "license": "MIT" }, "../../node_modules/jsonpath-plus": { "version": "7.2.0", + "dev": true, "license": "MIT", "engines": { "node": ">=12.0.0" @@ -5052,6 +5516,7 @@ }, "../../node_modules/keyv": { "version": "4.5.4", + "dev": true, "license": "MIT", "dependencies": { "json-buffer": "3.0.1" @@ -5059,6 +5524,7 @@ }, "../../node_modules/kind-of": { "version": "6.0.3", + "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -5066,6 +5532,7 @@ }, "../../node_modules/kleur": { "version": "3.0.3", + "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -5073,6 +5540,7 @@ }, "../../node_modules/leven": { "version": "3.1.0", + "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -5080,6 +5548,7 @@ }, "../../node_modules/levn": { "version": "0.4.1", + "dev": true, "license": "MIT", "dependencies": { "prelude-ls": "^1.2.1", @@ -5091,6 +5560,7 @@ }, "../../node_modules/liftoff": { "version": "4.0.0", + "dev": true, "license": "MIT", "dependencies": { "extend": "^3.0.2", @@ -5108,10 +5578,12 @@ }, "../../node_modules/lines-and-columns": { "version": "1.2.4", + "dev": true, "license": "MIT" }, "../../node_modules/liquid-json": { "version": "0.3.1", + "dev": true, "license": "Apache-2.0", "engines": { "node": ">=4" @@ -5119,6 +5591,7 @@ }, "../../node_modules/load-json-file": { "version": "4.0.0", + "dev": true, "license": "MIT", "dependencies": { "graceful-fs": "^4.1.2", @@ -5132,6 +5605,7 @@ }, "../../node_modules/load-json-file/node_modules/parse-json": { "version": "4.0.0", + "dev": true, "license": "MIT", "dependencies": { "error-ex": "^1.3.1", @@ -5143,6 +5617,7 @@ }, "../../node_modules/load-json-file/node_modules/strip-bom": { "version": "3.0.0", + "dev": true, "license": "MIT", "engines": { "node": ">=4" @@ -5150,6 +5625,7 @@ }, "../../node_modules/locate-path": { "version": "6.0.0", + "dev": true, "license": "MIT", "dependencies": { "p-locate": "^5.0.0" @@ -5163,30 +5639,37 @@ }, "../../node_modules/lodash": { "version": "4.17.21", + "dev": true, "license": "MIT" }, "../../node_modules/lodash.camelcase": { "version": "4.3.0", + "dev": true, "license": "MIT" }, "../../node_modules/lodash.flattendeep": { "version": "4.4.0", + "dev": true, "license": "MIT" }, "../../node_modules/lodash.get": { "version": "4.4.2", + "dev": true, "license": "MIT" }, "../../node_modules/lodash.memoize": { "version": "4.1.2", + "dev": true, "license": "MIT" }, "../../node_modules/lodash.merge": { "version": "4.6.2", + "dev": true, "license": "MIT" }, "../../node_modules/log-symbols": { "version": "6.0.0", + "dev": true, "license": "MIT", "dependencies": { "chalk": "^5.3.0", @@ -5201,6 +5684,7 @@ }, "../../node_modules/log-symbols/node_modules/chalk": { "version": "5.3.0", + "dev": true, "license": "MIT", "engines": { "node": "^12.17.0 || ^14.13 || >=16.0.0" @@ -5211,6 +5695,7 @@ }, "../../node_modules/log-symbols/node_modules/is-unicode-supported": { "version": "1.3.0", + "dev": true, "license": "MIT", "engines": { "node": ">=12" @@ -5221,6 +5706,7 @@ }, "../../node_modules/lower-case": { "version": "2.0.2", + "dev": true, "license": "MIT", "dependencies": { "tslib": "^2.0.3" @@ -5228,6 +5714,7 @@ }, "../../node_modules/lru-cache": { "version": "5.1.1", + "dev": true, "license": "ISC", "dependencies": { "yallist": "^3.0.2" @@ -5235,6 +5722,7 @@ }, "../../node_modules/make-dir": { "version": "3.1.0", + "dev": true, "license": "MIT", "dependencies": { "semver": "^6.0.0" @@ -5248,10 +5736,12 @@ }, "../../node_modules/make-error": { "version": "1.3.6", + "dev": true, "license": "ISC" }, "../../node_modules/make-iterator": { "version": "1.0.1", + "dev": true, "license": "MIT", "dependencies": { "kind-of": "^6.0.2" @@ -5262,6 +5752,7 @@ }, "../../node_modules/makeerror": { "version": "1.0.12", + "dev": true, "license": "BSD-3-Clause", "dependencies": { "tmpl": "1.0.5" @@ -5269,6 +5760,7 @@ }, "../../node_modules/map-cache": { "version": "0.2.2", + "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -5276,6 +5768,7 @@ }, "../../node_modules/media-typer": { "version": "0.3.0", + "dev": true, "license": "MIT", "engines": { "node": ">= 0.6" @@ -5283,10 +5776,12 @@ }, "../../node_modules/merge-stream": { "version": "2.0.0", + "dev": true, "license": "MIT" }, "../../node_modules/merge2": { "version": "1.4.1", + "dev": true, "license": "MIT", "engines": { "node": ">= 8" @@ -5294,6 +5789,7 @@ }, "../../node_modules/micri": { "version": "4.5.1", + "dev": true, "license": "MIT", "dependencies": { "handler-agent": "0.2.0" @@ -5304,6 +5800,7 @@ }, "../../node_modules/micromatch": { "version": "4.0.8", + "dev": true, "license": "MIT", "dependencies": { "braces": "^3.0.3", @@ -5315,6 +5812,7 @@ }, "../../node_modules/mime-db": { "version": "1.52.0", + "dev": true, "license": "MIT", "engines": { "node": ">= 0.6" @@ -5322,6 +5820,7 @@ }, "../../node_modules/mime-format": { "version": "2.0.1", + "dev": true, "license": "Apache-2.0", "dependencies": { "charset": "^1.0.0" @@ -5329,6 +5828,7 @@ }, "../../node_modules/mime-types": { "version": "2.1.35", + "dev": true, "license": "MIT", "dependencies": { "mime-db": "1.52.0" @@ -5339,6 +5839,7 @@ }, "../../node_modules/mimic-fn": { "version": "2.1.0", + "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -5346,6 +5847,7 @@ }, "../../node_modules/mimic-function": { "version": "5.0.1", + "dev": true, "license": "MIT", "engines": { "node": ">=18" @@ -5356,6 +5858,7 @@ }, "../../node_modules/minimatch": { "version": "3.1.2", + "dev": true, "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" @@ -5366,10 +5869,12 @@ }, "../../node_modules/minimist": { "version": "1.2.6", + "dev": true, "license": "MIT" }, "../../node_modules/mkdirp": { "version": "0.5.6", + "dev": true, "license": "MIT", "dependencies": { "minimist": "^1.2.6" @@ -5380,10 +5885,12 @@ }, "../../node_modules/ms": { "version": "2.1.2", + "dev": true, "license": "MIT" }, "../../node_modules/mute-stream": { "version": "1.0.0", + "dev": true, "license": "ISC", "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" @@ -5391,10 +5898,12 @@ }, "../../node_modules/natural-compare": { "version": "1.4.0", + "dev": true, "license": "MIT" }, "../../node_modules/negotiator": { "version": "0.6.3", + "dev": true, "license": "MIT", "engines": { "node": ">= 0.6" @@ -5402,10 +5911,12 @@ }, "../../node_modules/neo-async": { "version": "2.6.2", + "dev": true, "license": "MIT" }, "../../node_modules/no-case": { "version": "3.0.4", + "dev": true, "license": "MIT", "dependencies": { "lower-case": "^2.0.2", @@ -5427,10 +5938,12 @@ }, "../../node_modules/node-abort-controller": { "version": "3.1.1", + "dev": true, "license": "MIT" }, "../../node_modules/node-fetch": { "version": "2.7.0", + "dev": true, "license": "MIT", "dependencies": { "whatwg-url": "^5.0.0" @@ -5449,10 +5962,12 @@ }, "../../node_modules/node-int64": { "version": "0.4.0", + "dev": true, "license": "MIT" }, "../../node_modules/node-plop": { "version": "0.32.0", + "dev": true, "license": "MIT", "dependencies": { "@types/inquirer": "^9.0.3", @@ -5475,6 +5990,7 @@ }, "../../node_modules/node-plop/node_modules/mkdirp": { "version": "3.0.1", + "dev": true, "license": "MIT", "bin": { "mkdirp": "dist/cjs/src/bin.js" @@ -5488,6 +6004,7 @@ }, "../../node_modules/node-preload": { "version": "0.2.1", + "dev": true, "license": "MIT", "dependencies": { "process-on-spawn": "^1.0.0" @@ -5498,10 +6015,12 @@ }, "../../node_modules/node-releases": { "version": "2.0.18", + "dev": true, "license": "MIT" }, "../../node_modules/normalize-path": { "version": "3.0.0", + "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -5509,6 +6028,7 @@ }, "../../node_modules/npm-run-path": { "version": "4.0.1", + "dev": true, "license": "MIT", "dependencies": { "path-key": "^3.0.0" @@ -5695,6 +6215,7 @@ }, "../../node_modules/object-inspect": { "version": "1.13.2", + "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -5705,6 +6226,7 @@ }, "../../node_modules/object.defaults": { "version": "1.1.0", + "dev": true, "license": "MIT", "dependencies": { "array-each": "^1.0.1", @@ -5718,6 +6240,7 @@ }, "../../node_modules/object.map": { "version": "1.0.1", + "dev": true, "license": "MIT", "dependencies": { "for-own": "^1.0.0", @@ -5729,6 +6252,7 @@ }, "../../node_modules/object.pick": { "version": "1.3.0", + "dev": true, "license": "MIT", "dependencies": { "isobject": "^3.0.1" @@ -5739,6 +6263,7 @@ }, "../../node_modules/once": { "version": "1.4.0", + "dev": true, "license": "ISC", "dependencies": { "wrappy": "1" @@ -5746,6 +6271,7 @@ }, "../../node_modules/onetime": { "version": "5.1.2", + "dev": true, "license": "MIT", "dependencies": { "mimic-fn": "^2.1.0" @@ -5759,6 +6285,7 @@ }, "../../node_modules/ono": { "version": "4.0.11", + "dev": true, "license": "MIT", "dependencies": { "format-util": "^1.0.3" @@ -5766,6 +6293,7 @@ }, "../../node_modules/openapi3-ts": { "version": "2.0.2", + "dev": true, "license": "MIT", "dependencies": { "yaml": "^1.10.2" @@ -5773,6 +6301,7 @@ }, "../../node_modules/optionator": { "version": "0.9.4", + "dev": true, "license": "MIT", "dependencies": { "deep-is": "^0.1.3", @@ -5788,6 +6317,7 @@ }, "../../node_modules/ora": { "version": "8.1.0", + "dev": true, "license": "MIT", "dependencies": { "chalk": "^5.3.0", @@ -5809,6 +6339,7 @@ }, "../../node_modules/ora/node_modules/ansi-regex": { "version": "6.1.0", + "dev": true, "license": "MIT", "engines": { "node": ">=12" @@ -5819,6 +6350,7 @@ }, "../../node_modules/ora/node_modules/chalk": { "version": "5.3.0", + "dev": true, "license": "MIT", "engines": { "node": "^12.17.0 || ^14.13 || >=16.0.0" @@ -5829,10 +6361,12 @@ }, "../../node_modules/ora/node_modules/emoji-regex": { "version": "10.4.0", + "dev": true, "license": "MIT" }, "../../node_modules/ora/node_modules/string-width": { "version": "7.2.0", + "dev": true, "license": "MIT", "dependencies": { "emoji-regex": "^10.3.0", @@ -5848,6 +6382,7 @@ }, "../../node_modules/ora/node_modules/strip-ansi": { "version": "7.1.0", + "dev": true, "license": "MIT", "dependencies": { "ansi-regex": "^6.0.1" @@ -5861,6 +6396,7 @@ }, "../../node_modules/os-tmpdir": { "version": "1.0.2", + "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -5868,6 +6404,7 @@ }, "../../node_modules/p-limit": { "version": "3.1.0", + "dev": true, "license": "MIT", "dependencies": { "yocto-queue": "^0.1.0" @@ -5881,6 +6418,7 @@ }, "../../node_modules/p-locate": { "version": "5.0.0", + "dev": true, "license": "MIT", "dependencies": { "p-limit": "^3.0.2" @@ -5894,6 +6432,7 @@ }, "../../node_modules/p-map": { "version": "3.0.0", + "dev": true, "license": "MIT", "dependencies": { "aggregate-error": "^3.0.0" @@ -5904,6 +6443,7 @@ }, "../../node_modules/p-try": { "version": "2.2.0", + "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -5911,6 +6451,7 @@ }, "../../node_modules/package-hash": { "version": "4.0.0", + "dev": true, "license": "ISC", "dependencies": { "graceful-fs": "^4.1.15", @@ -5924,6 +6465,7 @@ }, "../../node_modules/param-case": { "version": "3.0.4", + "dev": true, "license": "MIT", "dependencies": { "dot-case": "^3.0.4", @@ -5932,6 +6474,7 @@ }, "../../node_modules/parent-module": { "version": "1.0.1", + "dev": true, "license": "MIT", "dependencies": { "callsites": "^3.0.0" @@ -5942,6 +6485,7 @@ }, "../../node_modules/parse-filepath": { "version": "1.0.2", + "dev": true, "license": "MIT", "dependencies": { "is-absolute": "^1.0.0", @@ -5954,6 +6498,7 @@ }, "../../node_modules/parse-json": { "version": "5.2.0", + "dev": true, "license": "MIT", "dependencies": { "@babel/code-frame": "^7.0.0", @@ -5970,10 +6515,12 @@ }, "../../node_modules/parse-multipart-data": { "version": "1.5.0", + "dev": true, "license": "MIT" }, "../../node_modules/parse-passwd": { "version": "1.0.0", + "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -5981,6 +6528,7 @@ }, "../../node_modules/parse-prefer-header": { "version": "1.0.0", + "dev": true, "license": "MIT", "dependencies": { "lodash.camelcase": "^4.3.0" @@ -5988,6 +6536,7 @@ }, "../../node_modules/pascal-case": { "version": "3.1.2", + "dev": true, "license": "MIT", "dependencies": { "no-case": "^3.0.4", @@ -5996,6 +6545,7 @@ }, "../../node_modules/path-case": { "version": "3.0.4", + "dev": true, "license": "MIT", "dependencies": { "dot-case": "^3.0.4", @@ -6004,6 +6554,7 @@ }, "../../node_modules/path-exists": { "version": "4.0.0", + "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -6011,6 +6562,7 @@ }, "../../node_modules/path-is-absolute": { "version": "1.0.1", + "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -6018,6 +6570,7 @@ }, "../../node_modules/path-key": { "version": "3.1.1", + "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -6025,10 +6578,12 @@ }, "../../node_modules/path-parse": { "version": "1.0.7", + "dev": true, "license": "MIT" }, "../../node_modules/path-root": { "version": "0.1.1", + "dev": true, "license": "MIT", "dependencies": { "path-root-regex": "^0.1.0" @@ -6039,6 +6594,7 @@ }, "../../node_modules/path-root-regex": { "version": "0.1.2", + "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -6046,6 +6602,7 @@ }, "../../node_modules/path-type": { "version": "4.0.0", + "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -6053,10 +6610,12 @@ }, "../../node_modules/picocolors": { "version": "1.0.1", + "dev": true, "license": "ISC" }, "../../node_modules/picomatch": { "version": "2.3.1", + "dev": true, "license": "MIT", "engines": { "node": ">=8.6" @@ -6067,6 +6626,7 @@ }, "../../node_modules/pify": { "version": "3.0.0", + "dev": true, "license": "MIT", "engines": { "node": ">=4" @@ -6074,6 +6634,7 @@ }, "../../node_modules/pino": { "version": "6.14.0", + "dev": true, "license": "MIT", "dependencies": { "fast-redact": "^3.0.0", @@ -6090,10 +6651,12 @@ }, "../../node_modules/pino-std-serializers": { "version": "3.2.0", + "dev": true, "license": "MIT" }, "../../node_modules/pirates": { "version": "4.0.6", + "dev": true, "license": "MIT", "engines": { "node": ">= 6" @@ -6101,6 +6664,7 @@ }, "../../node_modules/pkg-conf": { "version": "2.1.0", + "dev": true, "license": "MIT", "dependencies": { "find-up": "^2.0.0", @@ -6112,6 +6676,7 @@ }, "../../node_modules/pkg-conf/node_modules/find-up": { "version": "2.1.0", + "dev": true, "license": "MIT", "dependencies": { "locate-path": "^2.0.0" @@ -6122,6 +6687,7 @@ }, "../../node_modules/pkg-conf/node_modules/locate-path": { "version": "2.0.0", + "dev": true, "license": "MIT", "dependencies": { "p-locate": "^2.0.0", @@ -6133,6 +6699,7 @@ }, "../../node_modules/pkg-conf/node_modules/p-limit": { "version": "1.3.0", + "dev": true, "license": "MIT", "dependencies": { "p-try": "^1.0.0" @@ -6143,6 +6710,7 @@ }, "../../node_modules/pkg-conf/node_modules/p-locate": { "version": "2.0.0", + "dev": true, "license": "MIT", "dependencies": { "p-limit": "^1.1.0" @@ -6153,6 +6721,7 @@ }, "../../node_modules/pkg-conf/node_modules/p-try": { "version": "1.0.0", + "dev": true, "license": "MIT", "engines": { "node": ">=4" @@ -6160,6 +6729,7 @@ }, "../../node_modules/pkg-conf/node_modules/path-exists": { "version": "3.0.0", + "dev": true, "license": "MIT", "engines": { "node": ">=4" @@ -6167,6 +6737,7 @@ }, "../../node_modules/pkg-dir": { "version": "4.2.0", + "dev": true, "license": "MIT", "dependencies": { "find-up": "^4.0.0" @@ -6177,6 +6748,7 @@ }, "../../node_modules/pkg-dir/node_modules/find-up": { "version": "4.1.0", + "dev": true, "license": "MIT", "dependencies": { "locate-path": "^5.0.0", @@ -6188,6 +6760,7 @@ }, "../../node_modules/pkg-dir/node_modules/locate-path": { "version": "5.0.0", + "dev": true, "license": "MIT", "dependencies": { "p-locate": "^4.1.0" @@ -6198,6 +6771,7 @@ }, "../../node_modules/pkg-dir/node_modules/p-limit": { "version": "2.3.0", + "dev": true, "license": "MIT", "dependencies": { "p-try": "^2.0.0" @@ -6211,6 +6785,7 @@ }, "../../node_modules/pkg-dir/node_modules/p-locate": { "version": "4.1.0", + "dev": true, "license": "MIT", "dependencies": { "p-limit": "^2.2.0" @@ -6261,6 +6836,7 @@ }, "../../node_modules/postman-collection": { "version": "4.5.0", + "dev": true, "license": "Apache-2.0", "dependencies": { "@faker-js/faker": "5.5.3", @@ -6281,10 +6857,12 @@ }, "../../node_modules/postman-collection/node_modules/@faker-js/faker": { "version": "5.5.3", + "dev": true, "license": "MIT" }, "../../node_modules/postman-collection/node_modules/semver": { "version": "7.6.3", + "dev": true, "license": "ISC", "bin": { "semver": "bin/semver.js" @@ -6295,6 +6873,7 @@ }, "../../node_modules/postman-collection/node_modules/uuid": { "version": "8.3.2", + "dev": true, "license": "MIT", "bin": { "uuid": "dist/bin/uuid" @@ -6302,6 +6881,7 @@ }, "../../node_modules/postman-url-encoder": { "version": "3.0.5", + "dev": true, "license": "Apache-2.0", "dependencies": { "punycode": "^2.1.1" @@ -6312,6 +6892,7 @@ }, "../../node_modules/prelude-ls": { "version": "1.2.1", + "dev": true, "license": "MIT", "engines": { "node": ">= 0.8.0" @@ -6333,6 +6914,7 @@ }, "../../node_modules/prettier-linter-helpers": { "version": "1.0.0", + "dev": true, "license": "MIT", "dependencies": { "fast-diff": "^1.1.2" @@ -6343,10 +6925,12 @@ }, "../../node_modules/pretty-data": { "version": "0.40.0", + "dev": true, "license": "MIT" }, "../../node_modules/pretty-format": { "version": "29.7.0", + "dev": true, "license": "MIT", "dependencies": { "@jest/schemas": "^29.6.3", @@ -6359,6 +6943,7 @@ }, "../../node_modules/pretty-format/node_modules/ansi-styles": { "version": "5.2.0", + "dev": true, "license": "MIT", "engines": { "node": ">=10" @@ -6369,6 +6954,7 @@ }, "../../node_modules/process-on-spawn": { "version": "1.0.0", + "dev": true, "license": "MIT", "dependencies": { "fromentries": "^1.2.0" @@ -6379,10 +6965,12 @@ }, "../../node_modules/process-warning": { "version": "1.0.0", + "dev": true, "license": "MIT" }, "../../node_modules/prompts": { "version": "2.4.2", + "dev": true, "license": "MIT", "dependencies": { "kleur": "^3.0.3", @@ -6394,6 +6982,7 @@ }, "../../node_modules/propagate": { "version": "2.0.1", + "dev": true, "license": "MIT", "engines": { "node": ">= 8" @@ -6401,6 +6990,7 @@ }, "../../node_modules/punycode": { "version": "2.3.1", + "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -6408,6 +6998,7 @@ }, "../../node_modules/pure-rand": { "version": "6.1.0", + "dev": true, "funding": [ { "type": "individual", @@ -6436,6 +7027,7 @@ }, "../../node_modules/queue-microtask": { "version": "1.2.3", + "dev": true, "funding": [ { "type": "github", @@ -6454,14 +7046,17 @@ }, "../../node_modules/quick-format-unescaped": { "version": "4.0.4", + "dev": true, "license": "MIT" }, "../../node_modules/react-is": { "version": "18.3.1", + "dev": true, "license": "MIT" }, "../../node_modules/readable-stream": { "version": "3.6.2", + "dev": true, "license": "MIT", "dependencies": { "inherits": "^2.0.3", @@ -6474,6 +7069,7 @@ }, "../../node_modules/readdirp": { "version": "3.6.0", + "dev": true, "license": "MIT", "dependencies": { "picomatch": "^2.2.1" @@ -6484,6 +7080,7 @@ }, "../../node_modules/rechoir": { "version": "0.8.0", + "dev": true, "license": "MIT", "dependencies": { "resolve": "^1.20.0" @@ -6494,6 +7091,7 @@ }, "../../node_modules/release-zalgo": { "version": "1.0.0", + "dev": true, "license": "ISC", "dependencies": { "es6-error": "^4.0.1" @@ -6504,6 +7102,7 @@ }, "../../node_modules/require-directory": { "version": "2.1.1", + "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -6511,6 +7110,7 @@ }, "../../node_modules/require-from-string": { "version": "2.0.2", + "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -6518,10 +7118,12 @@ }, "../../node_modules/require-main-filename": { "version": "2.0.0", + "dev": true, "license": "ISC" }, "../../node_modules/resolve": { "version": "1.22.8", + "dev": true, "license": "MIT", "dependencies": { "is-core-module": "^2.13.0", @@ -6537,6 +7139,7 @@ }, "../../node_modules/resolve-cwd": { "version": "3.0.0", + "dev": true, "license": "MIT", "dependencies": { "resolve-from": "^5.0.0" @@ -6547,6 +7150,7 @@ }, "../../node_modules/resolve-cwd/node_modules/resolve-from": { "version": "5.0.0", + "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -6554,6 +7158,7 @@ }, "../../node_modules/resolve-dir": { "version": "1.0.1", + "dev": true, "license": "MIT", "dependencies": { "expand-tilde": "^2.0.0", @@ -6565,6 +7170,7 @@ }, "../../node_modules/resolve-from": { "version": "4.0.0", + "dev": true, "license": "MIT", "engines": { "node": ">=4" @@ -6572,6 +7178,7 @@ }, "../../node_modules/resolve.exports": { "version": "2.0.2", + "dev": true, "license": "MIT", "engines": { "node": ">=10" @@ -6579,6 +7186,7 @@ }, "../../node_modules/restore-cursor": { "version": "5.1.0", + "dev": true, "license": "MIT", "dependencies": { "onetime": "^7.0.0", @@ -6593,6 +7201,7 @@ }, "../../node_modules/restore-cursor/node_modules/onetime": { "version": "7.0.0", + "dev": true, "license": "MIT", "dependencies": { "mimic-function": "^5.0.0" @@ -6606,6 +7215,7 @@ }, "../../node_modules/restore-cursor/node_modules/signal-exit": { "version": "4.1.0", + "dev": true, "license": "ISC", "engines": { "node": ">=14" @@ -6616,6 +7226,7 @@ }, "../../node_modules/reusify": { "version": "1.0.4", + "dev": true, "license": "MIT", "engines": { "iojs": ">=1.0.0", @@ -6624,6 +7235,7 @@ }, "../../node_modules/rimraf": { "version": "3.0.2", + "dev": true, "license": "ISC", "dependencies": { "glob": "^7.1.3" @@ -6637,6 +7249,7 @@ }, "../../node_modules/rimraf/node_modules/glob": { "version": "7.2.3", + "dev": true, "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", @@ -6655,6 +7268,7 @@ }, "../../node_modules/run-async": { "version": "3.0.0", + "dev": true, "license": "MIT", "engines": { "node": ">=0.12.0" @@ -6662,6 +7276,7 @@ }, "../../node_modules/run-parallel": { "version": "1.2.0", + "dev": true, "funding": [ { "type": "github", @@ -6683,6 +7298,7 @@ }, "../../node_modules/rxjs": { "version": "7.8.1", + "dev": true, "license": "Apache-2.0", "dependencies": { "tslib": "^2.1.0" @@ -6690,6 +7306,7 @@ }, "../../node_modules/safe-buffer": { "version": "5.2.1", + "dev": true, "funding": [ { "type": "github", @@ -6708,14 +7325,17 @@ }, "../../node_modules/safe-stable-stringify": { "version": "1.1.1", + "dev": true, "license": "MIT" }, "../../node_modules/safer-buffer": { "version": "2.1.2", + "dev": true, "license": "MIT" }, "../../node_modules/semver": { "version": "6.3.1", + "dev": true, "license": "ISC", "bin": { "semver": "bin/semver.js" @@ -6723,6 +7343,7 @@ }, "../../node_modules/sentence-case": { "version": "3.0.4", + "dev": true, "license": "MIT", "dependencies": { "no-case": "^3.0.4", @@ -6732,10 +7353,12 @@ }, "../../node_modules/set-blocking": { "version": "2.0.0", + "dev": true, "license": "ISC" }, "../../node_modules/set-function-length": { "version": "1.2.2", + "dev": true, "license": "MIT", "dependencies": { "define-data-property": "^1.1.4", @@ -6751,6 +7374,7 @@ }, "../../node_modules/shebang-command": { "version": "2.0.0", + "dev": true, "license": "MIT", "dependencies": { "shebang-regex": "^3.0.0" @@ -6761,6 +7385,7 @@ }, "../../node_modules/shebang-regex": { "version": "3.0.0", + "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -6768,6 +7393,7 @@ }, "../../node_modules/side-channel": { "version": "1.0.6", + "dev": true, "license": "MIT", "dependencies": { "call-bind": "^1.0.7", @@ -6784,10 +7410,12 @@ }, "../../node_modules/signal-exit": { "version": "3.0.7", + "dev": true, "license": "ISC" }, "../../node_modules/signale": { "version": "1.4.0", + "dev": true, "license": "MIT", "dependencies": { "chalk": "^2.3.2", @@ -6800,6 +7428,7 @@ }, "../../node_modules/signale/node_modules/ansi-styles": { "version": "3.2.1", + "dev": true, "license": "MIT", "dependencies": { "color-convert": "^1.9.0" @@ -6810,6 +7439,7 @@ }, "../../node_modules/signale/node_modules/chalk": { "version": "2.4.2", + "dev": true, "license": "MIT", "dependencies": { "ansi-styles": "^3.2.1", @@ -6822,6 +7452,7 @@ }, "../../node_modules/signale/node_modules/color-convert": { "version": "1.9.3", + "dev": true, "license": "MIT", "dependencies": { "color-name": "1.1.3" @@ -6829,10 +7460,12 @@ }, "../../node_modules/signale/node_modules/color-name": { "version": "1.1.3", + "dev": true, "license": "MIT" }, "../../node_modules/signale/node_modules/escape-string-regexp": { "version": "1.0.5", + "dev": true, "license": "MIT", "engines": { "node": ">=0.8.0" @@ -6840,6 +7473,7 @@ }, "../../node_modules/signale/node_modules/has-flag": { "version": "3.0.0", + "dev": true, "license": "MIT", "engines": { "node": ">=4" @@ -6847,6 +7481,7 @@ }, "../../node_modules/signale/node_modules/supports-color": { "version": "5.5.0", + "dev": true, "license": "MIT", "dependencies": { "has-flag": "^3.0.0" @@ -6857,10 +7492,12 @@ }, "../../node_modules/sisteransi": { "version": "1.0.5", + "dev": true, "license": "MIT" }, "../../node_modules/slash": { "version": "3.0.0", + "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -6868,6 +7505,7 @@ }, "../../node_modules/snake-case": { "version": "3.0.4", + "dev": true, "license": "MIT", "dependencies": { "dot-case": "^3.0.4", @@ -6876,6 +7514,7 @@ }, "../../node_modules/sonic-boom": { "version": "1.4.1", + "dev": true, "license": "MIT", "dependencies": { "atomic-sleep": "^1.0.0", @@ -6884,6 +7523,7 @@ }, "../../node_modules/source-map": { "version": "0.6.1", + "dev": true, "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" @@ -6891,6 +7531,7 @@ }, "../../node_modules/source-map-support": { "version": "0.5.13", + "dev": true, "license": "MIT", "dependencies": { "buffer-from": "^1.0.0", @@ -6899,6 +7540,7 @@ }, "../../node_modules/spawn-wrap": { "version": "2.0.0", + "dev": true, "license": "ISC", "dependencies": { "foreground-child": "^2.0.0", @@ -6914,6 +7556,7 @@ }, "../../node_modules/split2": { "version": "3.2.2", + "dev": true, "license": "ISC", "dependencies": { "readable-stream": "^3.0.0" @@ -6921,10 +7564,12 @@ }, "../../node_modules/sprintf-js": { "version": "1.0.3", + "dev": true, "license": "BSD-3-Clause" }, "../../node_modules/stack-utils": { "version": "2.0.6", + "dev": true, "license": "MIT", "dependencies": { "escape-string-regexp": "^2.0.0" @@ -6935,6 +7580,7 @@ }, "../../node_modules/stack-utils/node_modules/escape-string-regexp": { "version": "2.0.0", + "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -6942,6 +7588,7 @@ }, "../../node_modules/stdin-discarder": { "version": "0.2.2", + "dev": true, "license": "MIT", "engines": { "node": ">=18" @@ -6952,6 +7599,7 @@ }, "../../node_modules/string_decoder": { "version": "1.3.0", + "dev": true, "license": "MIT", "dependencies": { "safe-buffer": "~5.2.0" @@ -6959,6 +7607,7 @@ }, "../../node_modules/string-length": { "version": "4.0.2", + "dev": true, "license": "MIT", "dependencies": { "char-regex": "^1.0.2", @@ -6970,6 +7619,7 @@ }, "../../node_modules/string-width": { "version": "4.2.3", + "dev": true, "license": "MIT", "dependencies": { "emoji-regex": "^8.0.0", @@ -6982,6 +7632,7 @@ }, "../../node_modules/strip-ansi": { "version": "6.0.1", + "dev": true, "license": "MIT", "dependencies": { "ansi-regex": "^5.0.1" @@ -6992,6 +7643,7 @@ }, "../../node_modules/strip-bom": { "version": "4.0.0", + "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -6999,6 +7651,7 @@ }, "../../node_modules/strip-final-newline": { "version": "2.0.0", + "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -7006,6 +7659,7 @@ }, "../../node_modules/strip-json-comments": { "version": "3.1.1", + "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -7016,10 +7670,12 @@ }, "../../node_modules/strnum": { "version": "1.0.5", + "dev": true, "license": "MIT" }, "../../node_modules/supports-color": { "version": "7.2.0", + "dev": true, "license": "MIT", "dependencies": { "has-flag": "^4.0.0" @@ -7030,6 +7686,7 @@ }, "../../node_modules/supports-preserve-symlinks-flag": { "version": "1.0.0", + "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -7040,6 +7697,7 @@ }, "../../node_modules/synckit": { "version": "0.9.1", + "dev": true, "license": "MIT", "dependencies": { "@pkgr/core": "^0.1.0", @@ -7054,6 +7712,7 @@ }, "../../node_modules/test-exclude": { "version": "6.0.0", + "dev": true, "license": "ISC", "dependencies": { "@istanbuljs/schema": "^0.1.2", @@ -7066,6 +7725,7 @@ }, "../../node_modules/test-exclude/node_modules/glob": { "version": "7.2.3", + "dev": true, "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", @@ -7084,10 +7744,12 @@ }, "../../node_modules/text-table": { "version": "0.2.0", + "dev": true, "license": "MIT" }, "../../node_modules/title-case": { "version": "3.0.3", + "dev": true, "license": "MIT", "dependencies": { "tslib": "^2.0.3" @@ -7095,6 +7757,7 @@ }, "../../node_modules/tmp": { "version": "0.0.33", + "dev": true, "license": "MIT", "dependencies": { "os-tmpdir": "~1.0.2" @@ -7105,10 +7768,12 @@ }, "../../node_modules/tmpl": { "version": "1.0.5", + "dev": true, "license": "BSD-3-Clause" }, "../../node_modules/to-fast-properties": { "version": "2.0.0", + "dev": true, "license": "MIT", "engines": { "node": ">=4" @@ -7116,6 +7781,7 @@ }, "../../node_modules/to-regex-range": { "version": "5.0.1", + "dev": true, "license": "MIT", "dependencies": { "is-number": "^7.0.0" @@ -7126,10 +7792,12 @@ }, "../../node_modules/tr46": { "version": "0.0.3", + "dev": true, "license": "MIT" }, "../../node_modules/ts-api-utils": { "version": "1.3.0", + "dev": true, "license": "MIT", "engines": { "node": ">=16" @@ -7206,7 +7874,7 @@ }, "../../node_modules/ts-node": { "version": "10.9.2", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "@cspotcode/source-map-support": "^0.8.0", @@ -7248,7 +7916,7 @@ }, "../../node_modules/ts-node/node_modules/diff": { "version": "4.0.2", - "devOptional": true, + "dev": true, "license": "BSD-3-Clause", "engines": { "node": ">=0.3.1" @@ -7256,6 +7924,7 @@ }, "../../node_modules/tslib": { "version": "2.7.0", + "dev": true, "license": "0BSD" }, "../../node_modules/tweetnacl": { @@ -7265,6 +7934,7 @@ }, "../../node_modules/type-check": { "version": "0.4.0", + "dev": true, "license": "MIT", "dependencies": { "prelude-ls": "^1.2.1" @@ -7275,6 +7945,7 @@ }, "../../node_modules/type-fest": { "version": "0.20.2", + "dev": true, "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=10" @@ -7285,6 +7956,7 @@ }, "../../node_modules/type-is": { "version": "1.6.18", + "dev": true, "license": "MIT", "dependencies": { "media-typer": "0.3.0", @@ -7296,6 +7968,7 @@ }, "../../node_modules/typedarray-to-buffer": { "version": "3.1.5", + "dev": true, "license": "MIT", "dependencies": { "is-typedarray": "^1.0.0" @@ -7303,6 +7976,7 @@ }, "../../node_modules/typescript": { "version": "5.6.2", + "dev": true, "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", @@ -7336,7 +8010,9 @@ }, "../../node_modules/uglify-js": { "version": "3.19.3", + "dev": true, "license": "BSD-2-Clause", + "optional": true, "bin": { "uglifyjs": "bin/uglifyjs" }, @@ -7346,6 +8022,7 @@ }, "../../node_modules/unc-path-regex": { "version": "0.1.2", + "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -7353,10 +8030,12 @@ }, "../../node_modules/undici-types": { "version": "6.19.8", + "dev": true, "license": "MIT" }, "../../node_modules/update-browserslist-db": { "version": "1.1.0", + "dev": true, "funding": [ { "type": "opencollective", @@ -7385,6 +8064,7 @@ }, "../../node_modules/upper-case": { "version": "2.0.2", + "dev": true, "license": "MIT", "dependencies": { "tslib": "^2.0.3" @@ -7392,6 +8072,7 @@ }, "../../node_modules/upper-case-first": { "version": "2.0.2", + "dev": true, "license": "MIT", "dependencies": { "tslib": "^2.0.3" @@ -7399,6 +8080,7 @@ }, "../../node_modules/uri-js": { "version": "4.4.1", + "dev": true, "license": "BSD-2-Clause", "dependencies": { "punycode": "^2.1.0" @@ -7406,18 +8088,22 @@ }, "../../node_modules/uri-template-lite": { "version": "22.9.0", + "dev": true, "license": "MIT" }, "../../node_modules/urijs": { "version": "1.19.11", + "dev": true, "license": "MIT" }, "../../node_modules/util-deprecate": { "version": "1.0.2", + "dev": true, "license": "MIT" }, "../../node_modules/utility-types": { "version": "3.11.0", + "dev": true, "license": "MIT", "engines": { "node": ">= 4" @@ -7437,10 +8123,12 @@ }, "../../node_modules/v8-compile-cache-lib": { "version": "3.0.1", + "dev": true, "license": "MIT" }, "../../node_modules/v8-to-istanbul": { "version": "9.3.0", + "dev": true, "license": "ISC", "dependencies": { "@jridgewell/trace-mapping": "^0.3.12", @@ -7453,10 +8141,12 @@ }, "../../node_modules/v8-to-istanbul/node_modules/convert-source-map": { "version": "2.0.0", + "dev": true, "license": "MIT" }, "../../node_modules/v8flags": { "version": "4.0.1", + "dev": true, "license": "MIT", "engines": { "node": ">= 10.13.0" @@ -7464,29 +8154,35 @@ }, "../../node_modules/validate.io-array": { "version": "1.0.6", + "dev": true, "license": "MIT" }, "../../node_modules/validate.io-function": { - "version": "1.0.2" + "version": "1.0.2", + "dev": true }, "../../node_modules/validate.io-integer": { "version": "1.0.5", + "dev": true, "dependencies": { "validate.io-number": "^1.0.3" } }, "../../node_modules/validate.io-integer-array": { "version": "1.0.0", + "dev": true, "dependencies": { "validate.io-array": "^1.0.3", "validate.io-integer": "^1.0.4" } }, "../../node_modules/validate.io-number": { - "version": "1.0.3" + "version": "1.0.3", + "dev": true }, "../../node_modules/walker": { "version": "1.0.8", + "dev": true, "license": "Apache-2.0", "dependencies": { "makeerror": "1.0.12" @@ -7494,6 +8190,7 @@ }, "../../node_modules/wcwidth": { "version": "1.0.1", + "dev": true, "license": "MIT", "dependencies": { "defaults": "^1.0.3" @@ -7501,14 +8198,17 @@ }, "../../node_modules/webidl-conversions": { "version": "3.0.1", + "dev": true, "license": "BSD-2-Clause" }, "../../node_modules/whatwg-fetch": { "version": "3.6.20", + "dev": true, "license": "MIT" }, "../../node_modules/whatwg-mimetype": { "version": "3.0.0", + "dev": true, "license": "MIT", "engines": { "node": ">=12" @@ -7516,6 +8216,7 @@ }, "../../node_modules/whatwg-url": { "version": "5.0.0", + "dev": true, "license": "MIT", "dependencies": { "tr46": "~0.0.3", @@ -7524,6 +8225,7 @@ }, "../../node_modules/which": { "version": "2.0.2", + "dev": true, "license": "ISC", "dependencies": { "isexe": "^2.0.0" @@ -7537,10 +8239,12 @@ }, "../../node_modules/which-module": { "version": "2.0.1", + "dev": true, "license": "ISC" }, "../../node_modules/word-wrap": { "version": "1.2.5", + "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -7548,10 +8252,12 @@ }, "../../node_modules/wordwrap": { "version": "1.0.0", + "dev": true, "license": "MIT" }, "../../node_modules/wrap-ansi": { "version": "7.0.0", + "dev": true, "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", @@ -7567,10 +8273,12 @@ }, "../../node_modules/wrappy": { "version": "1.0.2", + "dev": true, "license": "ISC" }, "../../node_modules/write-file-atomic": { "version": "3.0.3", + "dev": true, "license": "ISC", "dependencies": { "imurmurhash": "^0.1.4", @@ -7581,6 +8289,7 @@ }, "../../node_modules/y18n": { "version": "5.0.8", + "dev": true, "license": "ISC", "engines": { "node": ">=10" @@ -7588,10 +8297,12 @@ }, "../../node_modules/yallist": { "version": "3.1.1", + "dev": true, "license": "ISC" }, "../../node_modules/yaml": { "version": "1.10.2", + "dev": true, "license": "ISC", "engines": { "node": ">= 6" @@ -7599,6 +8310,7 @@ }, "../../node_modules/yargs": { "version": "16.2.0", + "dev": true, "license": "MIT", "dependencies": { "cliui": "^7.0.2", @@ -7615,6 +8327,7 @@ }, "../../node_modules/yargs-parser": { "version": "20.2.9", + "dev": true, "license": "ISC", "engines": { "node": ">=10" @@ -7622,6 +8335,7 @@ }, "../../node_modules/yn": { "version": "3.1.1", + "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -7629,6 +8343,7 @@ }, "../../node_modules/yocto-queue": { "version": "0.1.0", + "dev": true, "license": "MIT", "engines": { "node": ">=10" @@ -7639,6 +8354,7 @@ }, "../../node_modules/yoctocolors-cjs": { "version": "2.1.2", + "dev": true, "license": "MIT", "engines": { "node": ">=18" @@ -7649,8 +8365,6 @@ }, "node_modules/@esbuild/darwin-arm64": { "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.23.1.tgz", - "integrity": "sha512-YsS2e3Wtgnw7Wq53XXBLcV6JhRsEq8hkfg91ESVadIrzr9wO6jJDMZnCQbHm1Guc5t/CdDiFSSfWP58FNuvT3Q==", "cpu": [ "arm64" ], @@ -7665,9 +8379,7 @@ } }, "node_modules/@types/node": { - "version": "22.7.3", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.7.3.tgz", - "integrity": "sha512-qXKfhXXqGTyBskvWEzJZPUxSslAiLaB6JGP1ic/XTH9ctGgzdgYguuLP1C601aRTSDNlLb0jbKqXjZ48GNraSA==", + "version": "22.7.4", "dev": true, "license": "MIT", "dependencies": { @@ -7676,8 +8388,6 @@ }, "node_modules/esbuild": { "version": "0.23.1", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.23.1.tgz", - "integrity": "sha512-VVNz/9Sa0bs5SELtn3f7qhJCDPCF5oMEl5cO9/SSinpE9hbPVvxbd572HH5AKiP7WD8INO53GgfDDhRjkylHEg==", "dev": true, "hasInstallScript": true, "license": "MIT", @@ -7714,25 +8424,8 @@ "@esbuild/win32-x64": "0.23.1" } }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, "node_modules/get-tsconfig": { "version": "4.8.1", - "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.8.1.tgz", - "integrity": "sha512-k9PN+cFBmaLWtVz29SkUoqU5O0slLuHJXt/2P+tMVFT+phsSGXGkp9t3rQIqdz0e+06EHNGs3oM6ZX1s2zHxRg==", "dev": true, "license": "MIT", "dependencies": { @@ -7744,8 +8437,6 @@ }, "node_modules/resolve-pkg-maps": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", - "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", "dev": true, "license": "MIT", "funding": { @@ -7758,8 +8449,6 @@ }, "node_modules/tsx": { "version": "4.19.1", - "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.19.1.tgz", - "integrity": "sha512-0flMz1lh74BR4wOvBjuh9olbnwqCPc35OOlfyzHba0Dc+QNUeWX/Gq2YTbnwcWPO3BMd8fkzRVrHcsR+a7z7rA==", "dev": true, "license": "MIT", "dependencies": { @@ -7778,8 +8467,6 @@ }, "node_modules/typescript": { "version": "5.6.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.2.tgz", - "integrity": "sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==", "dev": true, "license": "Apache-2.0", "bin": { @@ -7792,8 +8479,6 @@ }, "node_modules/undici-types": { "version": "6.19.8", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", - "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", "dev": true, "license": "MIT" } From a1dce661f17c5f6e3bd4b7b6c42ba54c1134cae2 Mon Sep 17 00:00:00 2001 From: Lucas Rosa Date: Tue, 1 Oct 2024 17:06:35 -0300 Subject: [PATCH 23/59] add more detailed instructions on env setup --- README.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c6625b2..3a64ea6 100644 --- a/README.md +++ b/README.md @@ -316,13 +316,21 @@ const allMessagingProfiles = await telnyx.messagingProfiles ### Setup -Run the following scripts to setup your envs +Run the following to create your env file ```bash cp .env.local .env ``` -> Don't forget to update your local envs accordingly. +> Don't forget to update your `.env` values accordingly. + +Now inject envs into terminal: + +```bash +. ./setup_env.sh +``` + +> Feel free to use Node `--env-file` parameter to [setup envs](https://nodejs.org/en/learn/command-line/how-to-read-environment-variables-from-nodejs) if you prefer The test suite depends on the [Prism Mock Server](https://github.com/stoplightio/prism). From 36b543e0cc7eb431eb09a5edb409935fc72e7585 Mon Sep 17 00:00:00 2001 From: Lucas Rosa Date: Tue, 1 Oct 2024 21:53:45 -0300 Subject: [PATCH 24/59] update legacy Resources --- CHANGELOG.md | 21 +- examples/call-control/package-lock.json | 1821 ++++++++++++++++- examples/call-control/package.json | 3 +- examples/messaging/package-lock.json | 1821 ++++++++++++++++- examples/messaging/package.json | 3 +- package-lock.json | 110 +- package.json | 2 +- plop-templates/ResourceTypes.ts.hbs | 3 + src/Types.d.ts | 2 +- src/resources/AccessTokens.ts | 6 - src/resources/AdvancedOptinoptout.ts | 18 - src/resources/AutorespConfigs.ts | 13 + src/resources/AvailablePhoneNumbers.ts | 2 +- src/resources/Billing.ts | 12 - src/resources/Brands.ts | 55 +- src/resources/Bucket.ts | 13 - src/resources/BucketUsage.ts | 18 - src/resources/BulkPhoneNumberCampaigns.ts | 22 - src/resources/BulkPhoneNumberOperations.ts | 29 - src/resources/MessagingProfiles.ts | 16 +- .../PhoneNumberAssignmentByProfile.ts | 16 + src/resources/SslCertificates.ts | 17 - src/resources/StorageBuckets.ts | 36 + src/telnyx.ts | 20 +- src/test/resources/MessagingProfiles.test.ts | 59 + types/AccessIpAddressResource.d.ts | 57 + types/AccessIpRangesResource.d.ts | 43 + types/AddressesResource.d.ts | 78 + types/AutorespConfigsResource.d.ts | 74 + types/AvailablePhoneNumbersResource.d.ts | 18 + types/BillingGroupsResource.d.ts | 72 + types/BrandsResource.d.ts | 142 ++ ...honeNumberAssignmentByProfileResource.d.ts | 53 + types/StorageBucketsResource.d.ts | 74 + types/index.d.ts | 19 + 35 files changed, 4415 insertions(+), 353 deletions(-) delete mode 100644 src/resources/AccessTokens.ts delete mode 100644 src/resources/AdvancedOptinoptout.ts create mode 100644 src/resources/AutorespConfigs.ts delete mode 100644 src/resources/Billing.ts delete mode 100644 src/resources/Bucket.ts delete mode 100644 src/resources/BucketUsage.ts delete mode 100644 src/resources/BulkPhoneNumberCampaigns.ts delete mode 100644 src/resources/BulkPhoneNumberOperations.ts delete mode 100644 src/resources/SslCertificates.ts create mode 100644 src/resources/StorageBuckets.ts create mode 100644 types/AccessIpAddressResource.d.ts create mode 100644 types/AccessIpRangesResource.d.ts create mode 100644 types/AddressesResource.d.ts create mode 100644 types/AutorespConfigsResource.d.ts create mode 100644 types/AvailablePhoneNumbersResource.d.ts create mode 100644 types/BillingGroupsResource.d.ts create mode 100644 types/BrandsResource.d.ts create mode 100644 types/PhoneNumberAssignmentByProfileResource.d.ts create mode 100644 types/StorageBucketsResource.d.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index e0a33d4..f1e2034 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,16 +20,23 @@ - Enabled `esModuleInterop` for Jest - Update files included when publishing - Remove custom resource get `generateAccessTokenFromCredential` from `TelephonyCredentials` -- Update `AutoRechargePreferences` resource to match API spec -- Remove `RegisterCall` according to API spec +- Update `AutoRechargePreferences` resource +- Remove `RegisterCall` resource - Remove `ProgrammableFaxCommants` specs -- Remove `BulkCreation` according to API sepc -- Update `TexmlApplications` resource to match API spec -- Remove `Conferences` `dial_participant` action according to API sepc -- Remove `SimCards` `deletePublicIp` and `setPublicIp` according to API sepc +- Remove `BulkCreation` resource +- Update `TexmlApplications` resource +- Remove `Conferences` `dial_participant` action +- Remove `SimCards` `deletePublicIp` and `setPublicIp` - Update `Queues` method names to camelCase -- Remove `VerifiedCallsDisplayProfile` resource according to API spec +- Remove `VerifiedCallsDisplayProfile` resource - Update examples to Typescript +- Remove duplicated `AccessTokens` resource +- Move custom `AdvancedOptinoptout` resource to be `AutoRespConfigs` resource +- Remove `Billing` resource +- Remove inexistent `Bucket` resource +- Move `BucketUsage` resource to `StorageBuckets` +- Remove duplicated `BulkPhoneNumberCampaigns` resource +- Remove duplicated `BulkPhoneNumberOperations` resource ## v1 diff --git a/examples/call-control/package-lock.json b/examples/call-control/package-lock.json index bbb7c1b..e7be923 100644 --- a/examples/call-control/package-lock.json +++ b/examples/call-control/package-lock.json @@ -14,7 +14,8 @@ "devDependencies": { "@types/node": "^22.7.3", "tsx": "^4.19.1", - "typescript": "^5.6.2" + "typescript": "^5.6.2", + "typescript-eslint": "^8.8.0" }, "engines": { "node": "^18 || >=20" @@ -46,7 +47,7 @@ "ts-node": "^10.9.2", "tweetnacl": "^1.0.3", "typescript": "^5.6.2", - "typescript-eslint": "^8.5.0", + "typescript-eslint": "^8.8.0", "uuid": "^9.0.1" }, "engines": { @@ -8378,109 +8379,1799 @@ "node": ">=18" } }, - "node_modules/@types/node": { - "version": "22.7.4", + "node_modules/@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", "dev": true, "license": "MIT", "dependencies": { - "undici-types": "~6.19.2" + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" } }, - "node_modules/esbuild": { - "version": "0.23.1", + "node_modules/@eslint-community/regexpp": { + "version": "4.11.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.11.1.tgz", + "integrity": "sha512-m4DVN9ZqskZoLU5GlWZadwDnYo3vAEydiUayB9widCl9ffWx2IvPnp6n3on5rJmziJSw9Bv+Z3ChDVdMwXCY8Q==", "dev": true, - "hasInstallScript": true, "license": "MIT", - "bin": { - "esbuild": "bin/esbuild" + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/config-array": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.18.0.tgz", + "integrity": "sha512-fTxvnS1sRMu3+JjXwJG0j/i4RT9u4qJ+lqS/yCGap4lH4zZGzQ7tu+xZqQmcMZq5OBZDL4QRxQzRjkWcGt8IVw==", + "dev": true, + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@eslint/object-schema": "^2.1.4", + "debug": "^4.3.1", + "minimatch": "^3.1.2" }, "engines": { - "node": ">=18" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/config-array/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@eslint/config-array/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "brace-expansion": "^1.1.7" }, - "optionalDependencies": { - "@esbuild/aix-ppc64": "0.23.1", - "@esbuild/android-arm": "0.23.1", - "@esbuild/android-arm64": "0.23.1", - "@esbuild/android-x64": "0.23.1", - "@esbuild/darwin-arm64": "0.23.1", - "@esbuild/darwin-x64": "0.23.1", - "@esbuild/freebsd-arm64": "0.23.1", - "@esbuild/freebsd-x64": "0.23.1", - "@esbuild/linux-arm": "0.23.1", - "@esbuild/linux-arm64": "0.23.1", - "@esbuild/linux-ia32": "0.23.1", - "@esbuild/linux-loong64": "0.23.1", - "@esbuild/linux-mips64el": "0.23.1", - "@esbuild/linux-ppc64": "0.23.1", - "@esbuild/linux-riscv64": "0.23.1", - "@esbuild/linux-s390x": "0.23.1", - "@esbuild/linux-x64": "0.23.1", - "@esbuild/netbsd-x64": "0.23.1", - "@esbuild/openbsd-arm64": "0.23.1", - "@esbuild/openbsd-x64": "0.23.1", - "@esbuild/sunos-x64": "0.23.1", - "@esbuild/win32-arm64": "0.23.1", - "@esbuild/win32-ia32": "0.23.1", - "@esbuild/win32-x64": "0.23.1" + "engines": { + "node": "*" } }, - "node_modules/get-tsconfig": { - "version": "4.8.1", + "node_modules/@eslint/core": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.6.0.tgz", + "integrity": "sha512-8I2Q8ykA4J0x0o7cg67FPVnehcqWTBehu/lmY+bolPFHGjh49YzGBMXTvpqVgEbBdvNCSxj6iFgiIyHzf03lzg==", + "dev": true, + "license": "Apache-2.0", + "peer": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.1.0.tgz", + "integrity": "sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { - "resolve-pkg-maps": "^1.0.0" + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^10.0.1", + "globals": "^14.0.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { - "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" + "url": "https://opencollective.com/eslint" } }, - "node_modules/resolve-pkg-maps": { - "version": "1.0.0", + "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@eslint/eslintrc/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@eslint/js": { + "version": "9.11.1", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.11.1.tgz", + "integrity": "sha512-/qu+TWz8WwPWc7/HcIJKi+c+MOm46GdVaSlTTQcaqaL53+GsoA6MxWp5PtTx48qbSP7ylM1Kn7nhvkugfJvRSA==", "dev": true, "license": "MIT", + "peer": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/object-schema": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.4.tgz", + "integrity": "sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==", + "dev": true, + "license": "Apache-2.0", + "peer": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/plugin-kit": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.0.tgz", + "integrity": "sha512-vH9PiIMMwvhCx31Af3HiGzsVNULDbyVkHXwlemn/B0TFj/00ho3y55efXrUZTfQipxoHC5u4xq6zblww1zm1Ig==", + "dev": true, + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "levn": "^0.4.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "license": "Apache-2.0", + "peer": true, + "engines": { + "node": ">=12.22" + }, "funding": { - "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" + "type": "github", + "url": "https://github.com/sponsors/nzakas" } }, - "node_modules/telnyx": { - "resolved": "../..", - "link": true + "node_modules/@humanwhocodes/retry": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.0.tgz", + "integrity": "sha512-d2CGZR2o7fS6sWB7DG/3a95bGKQyHMACZ5aW8qGkkqQpUoZV6C0X7Pc7l4ZNMZkfNBf4VWNe9E1jRsf0G146Ew==", + "dev": true, + "license": "Apache-2.0", + "peer": true, + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } }, - "node_modules/tsx": { - "version": "4.19.1", + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", "dev": true, "license": "MIT", "dependencies": { - "esbuild": "~0.23.0", - "get-tsconfig": "^4.7.5" + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" }, - "bin": { - "tsx": "dist/cli.mjs" + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" }, "engines": { - "node": ">=18.0.0" + "node": ">= 8" + } + }, + "node_modules/@types/estree": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", + "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/@types/node": { + "version": "22.7.4", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~6.19.2" + } + }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.8.0.tgz", + "integrity": "sha512-wORFWjU30B2WJ/aXBfOm1LX9v9nyt9D3jsSOxC3cCaTQGCW5k4jNpmjFv3U7p/7s4yvdjHzwtv2Sd2dOyhjS0A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/regexpp": "^4.10.0", + "@typescript-eslint/scope-manager": "8.8.0", + "@typescript-eslint/type-utils": "8.8.0", + "@typescript-eslint/utils": "8.8.0", + "@typescript-eslint/visitor-keys": "8.8.0", + "graphemer": "^1.4.0", + "ignore": "^5.3.1", + "natural-compare": "^1.4.0", + "ts-api-utils": "^1.3.0" }, - "optionalDependencies": { - "fsevents": "~2.3.3" + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^8.0.0 || ^8.0.0-alpha.0", + "eslint": "^8.57.0 || ^9.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, - "node_modules/typescript": { - "version": "5.6.2", + "node_modules/@typescript-eslint/parser": { + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.8.0.tgz", + "integrity": "sha512-uEFUsgR+tl8GmzmLjRqz+VrDv4eoaMqMXW7ruXfgThaAShO9JTciKpEsB+TvnfFfbg5IpujgMXVV36gOJRLtZg==", "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" + "license": "BSD-2-Clause", + "dependencies": { + "@typescript-eslint/scope-manager": "8.8.0", + "@typescript-eslint/types": "8.8.0", + "@typescript-eslint/typescript-estree": "8.8.0", + "@typescript-eslint/visitor-keys": "8.8.0", + "debug": "^4.3.4" }, "engines": { - "node": ">=14.17" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, - "node_modules/undici-types": { - "version": "6.19.8", + "node_modules/@typescript-eslint/scope-manager": { + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.8.0.tgz", + "integrity": "sha512-EL8eaGC6gx3jDd8GwEFEV091210U97J0jeEHrAYvIYosmEGet4wJ+g0SYmLu+oRiAwbSA5AVrt6DxLHfdd+bUg==", "dev": true, - "license": "MIT" + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.8.0", + "@typescript-eslint/visitor-keys": "8.8.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.8.0.tgz", + "integrity": "sha512-IKwJSS7bCqyCeG4NVGxnOP6lLT9Okc3Zj8hLO96bpMkJab+10HIfJbMouLrlpyOr3yrQ1cA413YPFiGd1mW9/Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/typescript-estree": "8.8.0", + "@typescript-eslint/utils": "8.8.0", + "debug": "^4.3.4", + "ts-api-utils": "^1.3.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/types": { + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.8.0.tgz", + "integrity": "sha512-QJwc50hRCgBd/k12sTykOJbESe1RrzmX6COk8Y525C9l7oweZ+1lw9JiU56im7Amm8swlz00DRIlxMYLizr2Vw==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.8.0.tgz", + "integrity": "sha512-ZaMJwc/0ckLz5DaAZ+pNLmHv8AMVGtfWxZe/x2JVEkD5LnmhWiQMMcYT7IY7gkdJuzJ9P14fRy28lUrlDSWYdw==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@typescript-eslint/types": "8.8.0", + "@typescript-eslint/visitor-keys": "8.8.0", + "debug": "^4.3.4", + "fast-glob": "^3.3.2", + "is-glob": "^4.0.3", + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^1.3.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.8.0.tgz", + "integrity": "sha512-QE2MgfOTem00qrlPgyByaCHay9yb1+9BjnMFnSFkUKQfu7adBXDTnCAivURnuPPAG/qiB+kzKkZKmKfaMT0zVg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "@typescript-eslint/scope-manager": "8.8.0", + "@typescript-eslint/types": "8.8.0", + "@typescript-eslint/typescript-estree": "8.8.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.8.0.tgz", + "integrity": "sha512-8mq51Lx6Hpmd7HnA2fcHQo3YgfX1qbccxQOgZcb4tvasu//zXRaA1j5ZRFeCw/VRAdFi4mRM9DnZw0Nu0Q2d1g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.8.0", + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/acorn": { + "version": "8.12.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", + "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", + "dev": true, + "license": "MIT", + "peer": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "license": "MIT", + "peer": true, + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "license": "Python-2.0", + "peer": true + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/esbuild": { + "version": "0.23.1", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.23.1", + "@esbuild/android-arm": "0.23.1", + "@esbuild/android-arm64": "0.23.1", + "@esbuild/android-x64": "0.23.1", + "@esbuild/darwin-arm64": "0.23.1", + "@esbuild/darwin-x64": "0.23.1", + "@esbuild/freebsd-arm64": "0.23.1", + "@esbuild/freebsd-x64": "0.23.1", + "@esbuild/linux-arm": "0.23.1", + "@esbuild/linux-arm64": "0.23.1", + "@esbuild/linux-ia32": "0.23.1", + "@esbuild/linux-loong64": "0.23.1", + "@esbuild/linux-mips64el": "0.23.1", + "@esbuild/linux-ppc64": "0.23.1", + "@esbuild/linux-riscv64": "0.23.1", + "@esbuild/linux-s390x": "0.23.1", + "@esbuild/linux-x64": "0.23.1", + "@esbuild/netbsd-x64": "0.23.1", + "@esbuild/openbsd-arm64": "0.23.1", + "@esbuild/openbsd-x64": "0.23.1", + "@esbuild/sunos-x64": "0.23.1", + "@esbuild/win32-arm64": "0.23.1", + "@esbuild/win32-ia32": "0.23.1", + "@esbuild/win32-x64": "0.23.1" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "9.11.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.11.1.tgz", + "integrity": "sha512-MobhYKIoAO1s1e4VUrgx1l1Sk2JBR/Gqjjgw8+mfgoLE2xwsHur4gdfTxyTgShrhvdVFTaJSgMiQBl1jv/AWxg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.11.0", + "@eslint/config-array": "^0.18.0", + "@eslint/core": "^0.6.0", + "@eslint/eslintrc": "^3.1.0", + "@eslint/js": "9.11.1", + "@eslint/plugin-kit": "^0.2.0", + "@humanwhocodes/module-importer": "^1.0.1", + "@humanwhocodes/retry": "^0.3.0", + "@nodelib/fs.walk": "^1.2.8", + "@types/estree": "^1.0.6", + "@types/json-schema": "^7.0.15", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^8.0.2", + "eslint-visitor-keys": "^4.0.0", + "espree": "^10.1.0", + "esquery": "^1.5.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^8.0.0", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "json-stable-stringify-without-jsonify": "^1.0.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "jiti": "*" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + } + } + }, + "node_modules/eslint-scope": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.1.0.tgz", + "integrity": "sha512-14dSvlhaVhKKsa9Fx1l8A17s7ah7Ef7wCakJ10LYk6+GYmP9yDti2oq2SEwcyndt6knfcZyhyxwY3i9yL78EQw==", + "dev": true, + "license": "BSD-2-Clause", + "peer": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/eslint/node_modules/eslint-visitor-keys": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.1.0.tgz", + "integrity": "sha512-Q7lok0mqMUSf5a/AdAZkA5a/gHcO6snwQClVNNvFKCAVlxXucdU8pKydU5ZVZjBx5xr37vGbFFWtLQYreLzrZg==", + "dev": true, + "license": "Apache-2.0", + "peer": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/espree": { + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.2.0.tgz", + "integrity": "sha512-upbkBJbckcCNBDBDXEbuhjbP68n+scUd3k/U2EkyM9nw+I/jPiL4cLF/Al06CF96wRltFda16sxDFrxsI1v0/g==", + "dev": true, + "license": "BSD-2-Clause", + "peer": true, + "dependencies": { + "acorn": "^8.12.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^4.1.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/espree/node_modules/eslint-visitor-keys": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.1.0.tgz", + "integrity": "sha512-Q7lok0mqMUSf5a/AdAZkA5a/gHcO6snwQClVNNvFKCAVlxXucdU8pKydU5ZVZjBx5xr37vGbFFWtLQYreLzrZg==", + "dev": true, + "license": "Apache-2.0", + "peer": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esquery": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", + "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", + "dev": true, + "license": "BSD-3-Clause", + "peer": true, + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "license": "BSD-2-Clause", + "peer": true, + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "license": "BSD-2-Clause", + "peer": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "license": "BSD-2-Clause", + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/fast-glob": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/fastq": { + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", + "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", + "dev": true, + "license": "ISC", + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/file-entry-cache": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "flat-cache": "^4.0.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat-cache": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.4" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/flatted": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", + "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", + "dev": true, + "license": "ISC", + "peer": true + }, + "node_modules/get-tsconfig": { + "version": "4.8.1", + "dev": true, + "license": "MIT", + "dependencies": { + "resolve-pkg-maps": "^1.0.0" + }, + "funding": { + "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/globals": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", + "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true, + "license": "MIT" + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC", + "peer": true + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dev": true, + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true, + "license": "MIT" + }, + "node_modules/optionator": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/resolve-pkg-maps": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/telnyx": { + "resolved": "../..", + "link": true + }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/ts-api-utils": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz", + "integrity": "sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "typescript": ">=4.2.0" + } + }, + "node_modules/tsx": { + "version": "4.19.1", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "~0.23.0", + "get-tsconfig": "^4.7.5" + }, + "bin": { + "tsx": "dist/cli.mjs" + }, + "engines": { + "node": ">=18.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + } + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/typescript": { + "version": "5.6.2", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/typescript-eslint": { + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.8.0.tgz", + "integrity": "sha512-BjIT/VwJ8+0rVO01ZQ2ZVnjE1svFBiRczcpr1t1Yxt7sT25VSbPfrJtDsQ8uQTy2pilX5nI9gwxhUyLULNentw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/eslint-plugin": "8.8.0", + "@typescript-eslint/parser": "8.8.0", + "@typescript-eslint/utils": "8.8.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/undici-types": { + "version": "6.19.8", + "dev": true, + "license": "MIT" + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "license": "BSD-2-Clause", + "peer": true, + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } } } } diff --git a/examples/call-control/package.json b/examples/call-control/package.json index 04bd919..387c0f8 100644 --- a/examples/call-control/package.json +++ b/examples/call-control/package.json @@ -19,6 +19,7 @@ "devDependencies": { "@types/node": "^22.7.3", "tsx": "^4.19.1", - "typescript": "^5.6.2" + "typescript": "^5.6.2", + "typescript-eslint": "^8.8.0" } } diff --git a/examples/messaging/package-lock.json b/examples/messaging/package-lock.json index bbcb891..fd651f2 100644 --- a/examples/messaging/package-lock.json +++ b/examples/messaging/package-lock.json @@ -14,7 +14,8 @@ "devDependencies": { "@types/node": "^22.7.3", "tsx": "^4.19.1", - "typescript": "^5.6.2" + "typescript": "^5.6.2", + "typescript-eslint": "^8.8.0" }, "engines": { "node": "^18 || >=20" @@ -46,7 +47,7 @@ "ts-node": "^10.9.2", "tweetnacl": "^1.0.3", "typescript": "^5.6.2", - "typescript-eslint": "^8.5.0", + "typescript-eslint": "^8.8.0", "uuid": "^9.0.1" }, "engines": { @@ -8378,109 +8379,1799 @@ "node": ">=18" } }, - "node_modules/@types/node": { - "version": "22.7.4", + "node_modules/@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", "dev": true, "license": "MIT", "dependencies": { - "undici-types": "~6.19.2" + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" } }, - "node_modules/esbuild": { - "version": "0.23.1", + "node_modules/@eslint-community/regexpp": { + "version": "4.11.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.11.1.tgz", + "integrity": "sha512-m4DVN9ZqskZoLU5GlWZadwDnYo3vAEydiUayB9widCl9ffWx2IvPnp6n3on5rJmziJSw9Bv+Z3ChDVdMwXCY8Q==", "dev": true, - "hasInstallScript": true, "license": "MIT", - "bin": { - "esbuild": "bin/esbuild" + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/config-array": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.18.0.tgz", + "integrity": "sha512-fTxvnS1sRMu3+JjXwJG0j/i4RT9u4qJ+lqS/yCGap4lH4zZGzQ7tu+xZqQmcMZq5OBZDL4QRxQzRjkWcGt8IVw==", + "dev": true, + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@eslint/object-schema": "^2.1.4", + "debug": "^4.3.1", + "minimatch": "^3.1.2" }, "engines": { - "node": ">=18" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/config-array/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@eslint/config-array/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "brace-expansion": "^1.1.7" }, - "optionalDependencies": { - "@esbuild/aix-ppc64": "0.23.1", - "@esbuild/android-arm": "0.23.1", - "@esbuild/android-arm64": "0.23.1", - "@esbuild/android-x64": "0.23.1", - "@esbuild/darwin-arm64": "0.23.1", - "@esbuild/darwin-x64": "0.23.1", - "@esbuild/freebsd-arm64": "0.23.1", - "@esbuild/freebsd-x64": "0.23.1", - "@esbuild/linux-arm": "0.23.1", - "@esbuild/linux-arm64": "0.23.1", - "@esbuild/linux-ia32": "0.23.1", - "@esbuild/linux-loong64": "0.23.1", - "@esbuild/linux-mips64el": "0.23.1", - "@esbuild/linux-ppc64": "0.23.1", - "@esbuild/linux-riscv64": "0.23.1", - "@esbuild/linux-s390x": "0.23.1", - "@esbuild/linux-x64": "0.23.1", - "@esbuild/netbsd-x64": "0.23.1", - "@esbuild/openbsd-arm64": "0.23.1", - "@esbuild/openbsd-x64": "0.23.1", - "@esbuild/sunos-x64": "0.23.1", - "@esbuild/win32-arm64": "0.23.1", - "@esbuild/win32-ia32": "0.23.1", - "@esbuild/win32-x64": "0.23.1" + "engines": { + "node": "*" } }, - "node_modules/get-tsconfig": { - "version": "4.8.1", + "node_modules/@eslint/core": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.6.0.tgz", + "integrity": "sha512-8I2Q8ykA4J0x0o7cg67FPVnehcqWTBehu/lmY+bolPFHGjh49YzGBMXTvpqVgEbBdvNCSxj6iFgiIyHzf03lzg==", + "dev": true, + "license": "Apache-2.0", + "peer": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.1.0.tgz", + "integrity": "sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { - "resolve-pkg-maps": "^1.0.0" + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^10.0.1", + "globals": "^14.0.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { - "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" + "url": "https://opencollective.com/eslint" } }, - "node_modules/resolve-pkg-maps": { - "version": "1.0.0", + "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@eslint/eslintrc/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@eslint/js": { + "version": "9.11.1", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.11.1.tgz", + "integrity": "sha512-/qu+TWz8WwPWc7/HcIJKi+c+MOm46GdVaSlTTQcaqaL53+GsoA6MxWp5PtTx48qbSP7ylM1Kn7nhvkugfJvRSA==", "dev": true, "license": "MIT", + "peer": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/object-schema": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.4.tgz", + "integrity": "sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==", + "dev": true, + "license": "Apache-2.0", + "peer": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/plugin-kit": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.0.tgz", + "integrity": "sha512-vH9PiIMMwvhCx31Af3HiGzsVNULDbyVkHXwlemn/B0TFj/00ho3y55efXrUZTfQipxoHC5u4xq6zblww1zm1Ig==", + "dev": true, + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "levn": "^0.4.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "license": "Apache-2.0", + "peer": true, + "engines": { + "node": ">=12.22" + }, "funding": { - "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" + "type": "github", + "url": "https://github.com/sponsors/nzakas" } }, - "node_modules/telnyx": { - "resolved": "../..", - "link": true + "node_modules/@humanwhocodes/retry": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.0.tgz", + "integrity": "sha512-d2CGZR2o7fS6sWB7DG/3a95bGKQyHMACZ5aW8qGkkqQpUoZV6C0X7Pc7l4ZNMZkfNBf4VWNe9E1jRsf0G146Ew==", + "dev": true, + "license": "Apache-2.0", + "peer": true, + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } }, - "node_modules/tsx": { - "version": "4.19.1", + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", "dev": true, "license": "MIT", "dependencies": { - "esbuild": "~0.23.0", - "get-tsconfig": "^4.7.5" + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" }, - "bin": { - "tsx": "dist/cli.mjs" + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" }, "engines": { - "node": ">=18.0.0" + "node": ">= 8" + } + }, + "node_modules/@types/estree": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", + "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/@types/node": { + "version": "22.7.4", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~6.19.2" + } + }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.8.0.tgz", + "integrity": "sha512-wORFWjU30B2WJ/aXBfOm1LX9v9nyt9D3jsSOxC3cCaTQGCW5k4jNpmjFv3U7p/7s4yvdjHzwtv2Sd2dOyhjS0A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/regexpp": "^4.10.0", + "@typescript-eslint/scope-manager": "8.8.0", + "@typescript-eslint/type-utils": "8.8.0", + "@typescript-eslint/utils": "8.8.0", + "@typescript-eslint/visitor-keys": "8.8.0", + "graphemer": "^1.4.0", + "ignore": "^5.3.1", + "natural-compare": "^1.4.0", + "ts-api-utils": "^1.3.0" }, - "optionalDependencies": { - "fsevents": "~2.3.3" + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^8.0.0 || ^8.0.0-alpha.0", + "eslint": "^8.57.0 || ^9.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, - "node_modules/typescript": { - "version": "5.6.2", + "node_modules/@typescript-eslint/parser": { + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.8.0.tgz", + "integrity": "sha512-uEFUsgR+tl8GmzmLjRqz+VrDv4eoaMqMXW7ruXfgThaAShO9JTciKpEsB+TvnfFfbg5IpujgMXVV36gOJRLtZg==", "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" + "license": "BSD-2-Clause", + "dependencies": { + "@typescript-eslint/scope-manager": "8.8.0", + "@typescript-eslint/types": "8.8.0", + "@typescript-eslint/typescript-estree": "8.8.0", + "@typescript-eslint/visitor-keys": "8.8.0", + "debug": "^4.3.4" }, "engines": { - "node": ">=14.17" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, - "node_modules/undici-types": { - "version": "6.19.8", + "node_modules/@typescript-eslint/scope-manager": { + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.8.0.tgz", + "integrity": "sha512-EL8eaGC6gx3jDd8GwEFEV091210U97J0jeEHrAYvIYosmEGet4wJ+g0SYmLu+oRiAwbSA5AVrt6DxLHfdd+bUg==", "dev": true, - "license": "MIT" + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.8.0", + "@typescript-eslint/visitor-keys": "8.8.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.8.0.tgz", + "integrity": "sha512-IKwJSS7bCqyCeG4NVGxnOP6lLT9Okc3Zj8hLO96bpMkJab+10HIfJbMouLrlpyOr3yrQ1cA413YPFiGd1mW9/Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/typescript-estree": "8.8.0", + "@typescript-eslint/utils": "8.8.0", + "debug": "^4.3.4", + "ts-api-utils": "^1.3.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/types": { + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.8.0.tgz", + "integrity": "sha512-QJwc50hRCgBd/k12sTykOJbESe1RrzmX6COk8Y525C9l7oweZ+1lw9JiU56im7Amm8swlz00DRIlxMYLizr2Vw==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.8.0.tgz", + "integrity": "sha512-ZaMJwc/0ckLz5DaAZ+pNLmHv8AMVGtfWxZe/x2JVEkD5LnmhWiQMMcYT7IY7gkdJuzJ9P14fRy28lUrlDSWYdw==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@typescript-eslint/types": "8.8.0", + "@typescript-eslint/visitor-keys": "8.8.0", + "debug": "^4.3.4", + "fast-glob": "^3.3.2", + "is-glob": "^4.0.3", + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^1.3.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.8.0.tgz", + "integrity": "sha512-QE2MgfOTem00qrlPgyByaCHay9yb1+9BjnMFnSFkUKQfu7adBXDTnCAivURnuPPAG/qiB+kzKkZKmKfaMT0zVg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "@typescript-eslint/scope-manager": "8.8.0", + "@typescript-eslint/types": "8.8.0", + "@typescript-eslint/typescript-estree": "8.8.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.8.0.tgz", + "integrity": "sha512-8mq51Lx6Hpmd7HnA2fcHQo3YgfX1qbccxQOgZcb4tvasu//zXRaA1j5ZRFeCw/VRAdFi4mRM9DnZw0Nu0Q2d1g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.8.0", + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/acorn": { + "version": "8.12.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", + "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", + "dev": true, + "license": "MIT", + "peer": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "license": "MIT", + "peer": true, + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "license": "Python-2.0", + "peer": true + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/esbuild": { + "version": "0.23.1", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.23.1", + "@esbuild/android-arm": "0.23.1", + "@esbuild/android-arm64": "0.23.1", + "@esbuild/android-x64": "0.23.1", + "@esbuild/darwin-arm64": "0.23.1", + "@esbuild/darwin-x64": "0.23.1", + "@esbuild/freebsd-arm64": "0.23.1", + "@esbuild/freebsd-x64": "0.23.1", + "@esbuild/linux-arm": "0.23.1", + "@esbuild/linux-arm64": "0.23.1", + "@esbuild/linux-ia32": "0.23.1", + "@esbuild/linux-loong64": "0.23.1", + "@esbuild/linux-mips64el": "0.23.1", + "@esbuild/linux-ppc64": "0.23.1", + "@esbuild/linux-riscv64": "0.23.1", + "@esbuild/linux-s390x": "0.23.1", + "@esbuild/linux-x64": "0.23.1", + "@esbuild/netbsd-x64": "0.23.1", + "@esbuild/openbsd-arm64": "0.23.1", + "@esbuild/openbsd-x64": "0.23.1", + "@esbuild/sunos-x64": "0.23.1", + "@esbuild/win32-arm64": "0.23.1", + "@esbuild/win32-ia32": "0.23.1", + "@esbuild/win32-x64": "0.23.1" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "9.11.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.11.1.tgz", + "integrity": "sha512-MobhYKIoAO1s1e4VUrgx1l1Sk2JBR/Gqjjgw8+mfgoLE2xwsHur4gdfTxyTgShrhvdVFTaJSgMiQBl1jv/AWxg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.11.0", + "@eslint/config-array": "^0.18.0", + "@eslint/core": "^0.6.0", + "@eslint/eslintrc": "^3.1.0", + "@eslint/js": "9.11.1", + "@eslint/plugin-kit": "^0.2.0", + "@humanwhocodes/module-importer": "^1.0.1", + "@humanwhocodes/retry": "^0.3.0", + "@nodelib/fs.walk": "^1.2.8", + "@types/estree": "^1.0.6", + "@types/json-schema": "^7.0.15", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^8.0.2", + "eslint-visitor-keys": "^4.0.0", + "espree": "^10.1.0", + "esquery": "^1.5.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^8.0.0", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "json-stable-stringify-without-jsonify": "^1.0.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "jiti": "*" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + } + } + }, + "node_modules/eslint-scope": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.1.0.tgz", + "integrity": "sha512-14dSvlhaVhKKsa9Fx1l8A17s7ah7Ef7wCakJ10LYk6+GYmP9yDti2oq2SEwcyndt6knfcZyhyxwY3i9yL78EQw==", + "dev": true, + "license": "BSD-2-Clause", + "peer": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/eslint/node_modules/eslint-visitor-keys": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.1.0.tgz", + "integrity": "sha512-Q7lok0mqMUSf5a/AdAZkA5a/gHcO6snwQClVNNvFKCAVlxXucdU8pKydU5ZVZjBx5xr37vGbFFWtLQYreLzrZg==", + "dev": true, + "license": "Apache-2.0", + "peer": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/espree": { + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.2.0.tgz", + "integrity": "sha512-upbkBJbckcCNBDBDXEbuhjbP68n+scUd3k/U2EkyM9nw+I/jPiL4cLF/Al06CF96wRltFda16sxDFrxsI1v0/g==", + "dev": true, + "license": "BSD-2-Clause", + "peer": true, + "dependencies": { + "acorn": "^8.12.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^4.1.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/espree/node_modules/eslint-visitor-keys": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.1.0.tgz", + "integrity": "sha512-Q7lok0mqMUSf5a/AdAZkA5a/gHcO6snwQClVNNvFKCAVlxXucdU8pKydU5ZVZjBx5xr37vGbFFWtLQYreLzrZg==", + "dev": true, + "license": "Apache-2.0", + "peer": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esquery": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", + "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", + "dev": true, + "license": "BSD-3-Clause", + "peer": true, + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "license": "BSD-2-Clause", + "peer": true, + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "license": "BSD-2-Clause", + "peer": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "license": "BSD-2-Clause", + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/fast-glob": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/fastq": { + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", + "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", + "dev": true, + "license": "ISC", + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/file-entry-cache": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "flat-cache": "^4.0.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat-cache": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.4" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/flatted": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", + "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", + "dev": true, + "license": "ISC", + "peer": true + }, + "node_modules/get-tsconfig": { + "version": "4.8.1", + "dev": true, + "license": "MIT", + "dependencies": { + "resolve-pkg-maps": "^1.0.0" + }, + "funding": { + "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/globals": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", + "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true, + "license": "MIT" + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC", + "peer": true + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dev": true, + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true, + "license": "MIT" + }, + "node_modules/optionator": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/resolve-pkg-maps": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/telnyx": { + "resolved": "../..", + "link": true + }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/ts-api-utils": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz", + "integrity": "sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "typescript": ">=4.2.0" + } + }, + "node_modules/tsx": { + "version": "4.19.1", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "~0.23.0", + "get-tsconfig": "^4.7.5" + }, + "bin": { + "tsx": "dist/cli.mjs" + }, + "engines": { + "node": ">=18.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + } + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/typescript": { + "version": "5.6.2", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/typescript-eslint": { + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.8.0.tgz", + "integrity": "sha512-BjIT/VwJ8+0rVO01ZQ2ZVnjE1svFBiRczcpr1t1Yxt7sT25VSbPfrJtDsQ8uQTy2pilX5nI9gwxhUyLULNentw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/eslint-plugin": "8.8.0", + "@typescript-eslint/parser": "8.8.0", + "@typescript-eslint/utils": "8.8.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/undici-types": { + "version": "6.19.8", + "dev": true, + "license": "MIT" + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "license": "BSD-2-Clause", + "peer": true, + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } } } } diff --git a/examples/messaging/package.json b/examples/messaging/package.json index d42c63c..7ab244d 100644 --- a/examples/messaging/package.json +++ b/examples/messaging/package.json @@ -19,6 +19,7 @@ "devDependencies": { "@types/node": "^22.7.3", "tsx": "^4.19.1", - "typescript": "^5.6.2" + "typescript": "^5.6.2", + "typescript-eslint": "^8.8.0" } } diff --git a/package-lock.json b/package-lock.json index 34d1dc9..4a58d47 100644 --- a/package-lock.json +++ b/package-lock.json @@ -30,7 +30,7 @@ "ts-node": "^10.9.2", "tweetnacl": "^1.0.3", "typescript": "^5.6.2", - "typescript-eslint": "^8.5.0", + "typescript-eslint": "^8.8.0", "uuid": "^9.0.1" }, "engines": { @@ -1917,16 +1917,17 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.5.0.tgz", - "integrity": "sha512-lHS5hvz33iUFQKuPFGheAB84LwcJ60G8vKnEhnfcK1l8kGVLro2SFYW6K0/tj8FUhRJ0VHyg1oAfg50QGbPPHw==", + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.8.0.tgz", + "integrity": "sha512-wORFWjU30B2WJ/aXBfOm1LX9v9nyt9D3jsSOxC3cCaTQGCW5k4jNpmjFv3U7p/7s4yvdjHzwtv2Sd2dOyhjS0A==", "dev": true, + "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.5.0", - "@typescript-eslint/type-utils": "8.5.0", - "@typescript-eslint/utils": "8.5.0", - "@typescript-eslint/visitor-keys": "8.5.0", + "@typescript-eslint/scope-manager": "8.8.0", + "@typescript-eslint/type-utils": "8.8.0", + "@typescript-eslint/utils": "8.8.0", + "@typescript-eslint/visitor-keys": "8.8.0", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", @@ -1950,15 +1951,16 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.5.0.tgz", - "integrity": "sha512-gF77eNv0Xz2UJg/NbpWJ0kqAm35UMsvZf1GHj8D9MRFTj/V3tAciIWXfmPLsAAF/vUlpWPvUDyH1jjsr0cMVWw==", + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.8.0.tgz", + "integrity": "sha512-uEFUsgR+tl8GmzmLjRqz+VrDv4eoaMqMXW7ruXfgThaAShO9JTciKpEsB+TvnfFfbg5IpujgMXVV36gOJRLtZg==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/scope-manager": "8.5.0", - "@typescript-eslint/types": "8.5.0", - "@typescript-eslint/typescript-estree": "8.5.0", - "@typescript-eslint/visitor-keys": "8.5.0", + "@typescript-eslint/scope-manager": "8.8.0", + "@typescript-eslint/types": "8.8.0", + "@typescript-eslint/typescript-estree": "8.8.0", + "@typescript-eslint/visitor-keys": "8.8.0", "debug": "^4.3.4" }, "engines": { @@ -1978,13 +1980,14 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.5.0.tgz", - "integrity": "sha512-06JOQ9Qgj33yvBEx6tpC8ecP9o860rsR22hWMEd12WcTRrfaFgHr2RB/CA/B+7BMhHkXT4chg2MyboGdFGawYg==", + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.8.0.tgz", + "integrity": "sha512-EL8eaGC6gx3jDd8GwEFEV091210U97J0jeEHrAYvIYosmEGet4wJ+g0SYmLu+oRiAwbSA5AVrt6DxLHfdd+bUg==", "dev": true, + "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.5.0", - "@typescript-eslint/visitor-keys": "8.5.0" + "@typescript-eslint/types": "8.8.0", + "@typescript-eslint/visitor-keys": "8.8.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1995,13 +1998,14 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.5.0.tgz", - "integrity": "sha512-N1K8Ix+lUM+cIDhL2uekVn/ZD7TZW+9/rwz8DclQpcQ9rk4sIL5CAlBC0CugWKREmDjBzI/kQqU4wkg46jWLYA==", + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.8.0.tgz", + "integrity": "sha512-IKwJSS7bCqyCeG4NVGxnOP6lLT9Okc3Zj8hLO96bpMkJab+10HIfJbMouLrlpyOr3yrQ1cA413YPFiGd1mW9/Q==", "dev": true, + "license": "MIT", "dependencies": { - "@typescript-eslint/typescript-estree": "8.5.0", - "@typescript-eslint/utils": "8.5.0", + "@typescript-eslint/typescript-estree": "8.8.0", + "@typescript-eslint/utils": "8.8.0", "debug": "^4.3.4", "ts-api-utils": "^1.3.0" }, @@ -2019,10 +2023,11 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.5.0.tgz", - "integrity": "sha512-qjkormnQS5wF9pjSi6q60bKUHH44j2APxfh9TQRXK8wbYVeDYYdYJGIROL87LGZZ2gz3Rbmjc736qyL8deVtdw==", + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.8.0.tgz", + "integrity": "sha512-QJwc50hRCgBd/k12sTykOJbESe1RrzmX6COk8Y525C9l7oweZ+1lw9JiU56im7Amm8swlz00DRIlxMYLizr2Vw==", "dev": true, + "license": "MIT", "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, @@ -2032,13 +2037,14 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.5.0.tgz", - "integrity": "sha512-vEG2Sf9P8BPQ+d0pxdfndw3xIXaoSjliG0/Ejk7UggByZPKXmJmw3GW5jV2gHNQNawBUyfahoSiCFVov0Ruf7Q==", + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.8.0.tgz", + "integrity": "sha512-ZaMJwc/0ckLz5DaAZ+pNLmHv8AMVGtfWxZe/x2JVEkD5LnmhWiQMMcYT7IY7gkdJuzJ9P14fRy28lUrlDSWYdw==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/types": "8.5.0", - "@typescript-eslint/visitor-keys": "8.5.0", + "@typescript-eslint/types": "8.8.0", + "@typescript-eslint/visitor-keys": "8.8.0", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", @@ -2064,6 +2070,7 @@ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" } @@ -2073,6 +2080,7 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -2088,6 +2096,7 @@ "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "dev": true, + "license": "ISC", "bin": { "semver": "bin/semver.js" }, @@ -2096,15 +2105,16 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.5.0.tgz", - "integrity": "sha512-6yyGYVL0e+VzGYp60wvkBHiqDWOpT63pdMV2CVG4LVDd5uR6q1qQN/7LafBZtAtNIn/mqXjsSeS5ggv/P0iECw==", + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.8.0.tgz", + "integrity": "sha512-QE2MgfOTem00qrlPgyByaCHay9yb1+9BjnMFnSFkUKQfu7adBXDTnCAivURnuPPAG/qiB+kzKkZKmKfaMT0zVg==", "dev": true, + "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.5.0", - "@typescript-eslint/types": "8.5.0", - "@typescript-eslint/typescript-estree": "8.5.0" + "@typescript-eslint/scope-manager": "8.8.0", + "@typescript-eslint/types": "8.8.0", + "@typescript-eslint/typescript-estree": "8.8.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -2118,12 +2128,13 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.5.0.tgz", - "integrity": "sha512-yTPqMnbAZJNy2Xq2XU8AdtOW9tJIr+UQb64aXB9f3B1498Zx9JorVgFJcZpEc9UBuCCrdzKID2RGAMkYcDtZOw==", + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.8.0.tgz", + "integrity": "sha512-8mq51Lx6Hpmd7HnA2fcHQo3YgfX1qbccxQOgZcb4tvasu//zXRaA1j5ZRFeCw/VRAdFi4mRM9DnZw0Nu0Q2d1g==", "dev": true, + "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.5.0", + "@typescript-eslint/types": "8.8.0", "eslint-visitor-keys": "^3.4.3" }, "engines": { @@ -8767,6 +8778,7 @@ "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz", "integrity": "sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=16" }, @@ -8974,15 +8986,15 @@ } }, "node_modules/typescript-eslint": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.5.0.tgz", - "integrity": "sha512-uD+XxEoSIvqtm4KE97etm32Tn5MfaZWgWfMMREStLxR6JzvHkc2Tkj7zhTEK5XmtpTmKHNnG8Sot6qDfhHtR1Q==", + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.8.0.tgz", + "integrity": "sha512-BjIT/VwJ8+0rVO01ZQ2ZVnjE1svFBiRczcpr1t1Yxt7sT25VSbPfrJtDsQ8uQTy2pilX5nI9gwxhUyLULNentw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/eslint-plugin": "8.5.0", - "@typescript-eslint/parser": "8.5.0", - "@typescript-eslint/utils": "8.5.0" + "@typescript-eslint/eslint-plugin": "8.8.0", + "@typescript-eslint/parser": "8.8.0", + "@typescript-eslint/utils": "8.8.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" diff --git a/package.json b/package.json index bff1f9b..72db3a6 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "ts-node": "^10.9.2", "tweetnacl": "^1.0.3", "typescript": "^5.6.2", - "typescript-eslint": "^8.5.0", + "typescript-eslint": "^8.8.0", "uuid": "^9.0.1" }, "overrides": { diff --git a/plop-templates/ResourceTypes.ts.hbs b/plop-templates/ResourceTypes.ts.hbs index 85d8f7e..2e7faf1 100644 --- a/plop-templates/ResourceTypes.ts.hbs +++ b/plop-templates/ResourceTypes.ts.hbs @@ -56,6 +56,7 @@ declare module 'telnyx' { options?: RequestOptions, ): Promise>; {{/if}} + {{#if (ifEquals . "create")}} {{.}}( params: {{pascalCase ../name}}{{pascalCase .}}Params, @@ -69,6 +70,7 @@ declare module 'telnyx' { options?: RequestOptions, ): Promise>; {{/if}} + {{#if (ifEquals . "update")}} {{.}}( id: {{pascalCase ../name}}{{pascalCase .}}Id, @@ -76,6 +78,7 @@ declare module 'telnyx' { options?: RequestOptions, ): Promise>; {{/if}} + {{#if (ifEquals . "del")}} {{.}}( id: {{pascalCase ../name}}{{pascalCase .}}Id, diff --git a/src/Types.d.ts b/src/Types.d.ts index 20f09b0..7038d06 100644 --- a/src/Types.d.ts +++ b/src/Types.d.ts @@ -200,7 +200,7 @@ export type TelnyxResourceObject = { requestRetries: number, callback: RequestCallback, ) => (error: Error) => void; - includeBasic: Array; + includeBasic: Array<'list' | 'create' | 'retrieve' | 'update' | 'del'>; nestedResources: { [key: string]: new (...args: unknown[]) => TelnyxResourceObject; }; diff --git a/src/resources/AccessTokens.ts b/src/resources/AccessTokens.ts deleted file mode 100644 index a721609..0000000 --- a/src/resources/AccessTokens.ts +++ /dev/null @@ -1,6 +0,0 @@ -import TelnyxResource from '../TelnyxResource'; - -export const AccessTokens = TelnyxResource.extend({ - path: 'access_ip_ranges', - includeBasic: ['create'], -}); diff --git a/src/resources/AdvancedOptinoptout.ts b/src/resources/AdvancedOptinoptout.ts deleted file mode 100644 index 48684d7..0000000 --- a/src/resources/AdvancedOptinoptout.ts +++ /dev/null @@ -1,18 +0,0 @@ -import TelnyxResource from '../TelnyxResource'; -const telnyxMethod = TelnyxResource.method; - -export const AdvancedOptinoptout = TelnyxResource.extend({ - path: 'advanced_optinoptout', - includeBasic: ['delete', 'list', 'retrieve'], - - DeleteAutorespConfig: telnyxMethod({ - method: 'DELETE', - path: '/messaging_profiles/{profile_id}/autoresp_configs/{autoresp_cfg_id}', - urlParams: ['profile_id', 'autoresp_cfg_id'], - }), - GetAutorespConfigs: telnyxMethod({ - method: 'GET', - path: '/messaging_profiles/{profile/id}/autoresp_configs', - urlParams: ['profile_id'], - }), -}); diff --git a/src/resources/AutorespConfigs.ts b/src/resources/AutorespConfigs.ts new file mode 100644 index 0000000..44d9b11 --- /dev/null +++ b/src/resources/AutorespConfigs.ts @@ -0,0 +1,13 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const AutorespConfigs = TelnyxResource.extend({ + path: 'messaging_profiles/{profile_id}/autoresp_configs', + includeBasic: ['del', 'list', 'create', 'retrieve'], + + update: telnyxMethod({ + method: 'PUT', + path: '/messaging_profiles/{profile_id}/autoresp_configs/{autoresp_cfg_id}', + urlParams: ['profile_id', 'autoresp_cfg_id'], + }), +}); diff --git a/src/resources/AvailablePhoneNumbers.ts b/src/resources/AvailablePhoneNumbers.ts index 28d93f7..be957da 100644 --- a/src/resources/AvailablePhoneNumbers.ts +++ b/src/resources/AvailablePhoneNumbers.ts @@ -2,5 +2,5 @@ import TelnyxResource from '../TelnyxResource'; export const AvailablePhoneNumbers = TelnyxResource.extend({ path: 'available_phone_numbers', - includeBasic: ['list', 'retrieve'], + includeBasic: ['list'], }); diff --git a/src/resources/Billing.ts b/src/resources/Billing.ts deleted file mode 100644 index 23ead26..0000000 --- a/src/resources/Billing.ts +++ /dev/null @@ -1,12 +0,0 @@ -import TelnyxResource from '../TelnyxResource'; -const telnyxMethod = TelnyxResource.method; - -export const Billing = TelnyxResource.extend({ - path: 'billing', - includeBasic: ['list', 'retrieve'], - - GetUserBalance: telnyxMethod({ - method: 'GET', - path: '/balance', - }), -}); diff --git a/src/resources/Brands.ts b/src/resources/Brands.ts index bcb24c2..6afc25a 100644 --- a/src/resources/Brands.ts +++ b/src/resources/Brands.ts @@ -4,28 +4,63 @@ const telnyxMethod = TelnyxResource.method; export const Brands = TelnyxResource.extend({ path: 'brand', basePath: '/10dlc/', - includeBasic: ['create', 'list', 'retrieve', 'update', 'delete'], + includeBasic: ['create', 'list'], - ListExternalVettings: telnyxMethod({ + retrieve: telnyxMethod({ + method: 'GET', + path: '/brand/{brandId}', + urlParams: ['brandId'], + }), + + update: telnyxMethod({ + method: 'PUT', + path: '/brand/{brandId}', + urlParams: ['brandId'], + }), + + del: telnyxMethod({ + method: 'DELETE', + path: '/brand/{brandId}', + urlParams: ['brandId'], + }), + + resend2faEmail: telnyxMethod({ + method: 'POST', + path: '/brand/{brandId}/2faEmail', + urlParams: ['brandId'], + }), + + externalVettings: telnyxMethod({ method: 'GET', path: '/brand/{brandId}/externalVetting', urlParams: ['brandId'], }), - GetBrands: telnyxMethod({ + + listExternalVettings: telnyxMethod({ method: 'GET', - path: '/brand', + path: '/brand/{brandId}/externalVetting', + urlParams: ['brandId'], }), - RevetBrand: telnyxMethod({ + + exportExternalVettings: telnyxMethod({ method: 'PUT', - path: '/brand/{brandId}/revet', + path: '/brand/{brandId}/externalVetting', urlParams: ['brandId'], }), - DeleteBrand: telnyxMethod({ - method: 'DELETE', - path: '/brand/{brandId}', + + orderExternalVettings: telnyxMethod({ + method: 'POST', + path: '/brand/{brandId}/externalVetting', + urlParams: ['brandId'], + }), + + revet: telnyxMethod({ + method: 'PUT', + path: '/brand/{brandId}/revet', urlParams: ['brandId'], }), - GetBrandFeedbackById: telnyxMethod({ + + feedback: telnyxMethod({ method: 'GET', path: '/brand/feedback/{brandId}', urlParams: ['brandId'], diff --git a/src/resources/Bucket.ts b/src/resources/Bucket.ts deleted file mode 100644 index 194851d..0000000 --- a/src/resources/Bucket.ts +++ /dev/null @@ -1,13 +0,0 @@ -import TelnyxResource from '../TelnyxResource'; -const telnyxMethod = TelnyxResource.method; - -export const Bucket = TelnyxResource.extend({ - path: 'bucket', - includeBasic: ['delete'], - - DeleteBucket: telnyxMethod({ - method: 'DELETE', - path: '/{bucketName}', - urlParams: ['bucketName'], - }), -}); diff --git a/src/resources/BucketUsage.ts b/src/resources/BucketUsage.ts deleted file mode 100644 index 8df86c4..0000000 --- a/src/resources/BucketUsage.ts +++ /dev/null @@ -1,18 +0,0 @@ -import TelnyxResource from '../TelnyxResource'; -const telnyxMethod = TelnyxResource.method; - -export const BucketUsage = TelnyxResource.extend({ - path: 'bucket_usage', - includeBasic: ['list', 'retrieve'], - - GetBucketSnapshot: telnyxMethod({ - method: 'GET', - path: '/storage/buckets/{bucketName}/snapshot', - urlParams: ['bucketName'], - }), - GetBucketUsage: telnyxMethod({ - method: 'GET', - path: '/storage/buckets/{bucketName}/usage', - urlParams: ['bucketName'], - }), -}); diff --git a/src/resources/BulkPhoneNumberCampaigns.ts b/src/resources/BulkPhoneNumberCampaigns.ts deleted file mode 100644 index fabba8c..0000000 --- a/src/resources/BulkPhoneNumberCampaigns.ts +++ /dev/null @@ -1,22 +0,0 @@ -import TelnyxResource from '../TelnyxResource'; -const telnyxMethod = TelnyxResource.method; - -export const BulkPhoneNumberCampaigns = TelnyxResource.extend({ - path: 'bulk_phone_number_campaigns', - includeBasic: ['list', 'retrieve', 'create'], - - GetPhoneNumberStatus: telnyxMethod({ - method: 'GET', - path: '/phoneNumberAssignmentByProfile/{taskId}/phoneNumbers', - urlParams: ['taskId'], - }), - GetAssignmentTaskStatus: telnyxMethod({ - method: 'GET', - path: '/phoneNumberAssignmentByProfile/{taskId}', - urlParams: ['taskId'], - }), - PostAssignMessagingProfileToCampaign: telnyxMethod({ - method: 'POST', - path: '/phoneNumberAssignmentByProfile', - }), -}); diff --git a/src/resources/BulkPhoneNumberOperations.ts b/src/resources/BulkPhoneNumberOperations.ts deleted file mode 100644 index f24dab3..0000000 --- a/src/resources/BulkPhoneNumberOperations.ts +++ /dev/null @@ -1,29 +0,0 @@ -import TelnyxResource from '../TelnyxResource'; -const telnyxMethod = TelnyxResource.method; - -export const BulkPhoneNumberOperations = TelnyxResource.extend({ - path: 'bulk_phone_number_operations', - includeBasic: ['list', 'retrieve', 'create'], - - RetrievePhoneNumbersJob: telnyxMethod({ - method: 'GET', - path: '/phone_numbers_jobs/{id}', - urlParams: ['id'], - }), - CreateUpdatePhoneNumbersJob: telnyxMethod({ - method: 'POST', - path: '/phone_numbers_jobs/update/phone_numbers', - }), - ListPhoneNumbersJobs: telnyxMethod({ - method: 'GET', - path: '/phone_numbers_jobs', - }), - CreateDeletePhoneNumbersJob: telnyxMethod({ - method: 'POST', - path: '/phone_numbers_jobs/delete/phone_numbers', - }), - CreatePhoneNumbersJobUpdateEmergencySettings: telnyxMethod({ - method: 'POST', - path: '/phone_numbers_jobs/update/emergency_settings', - }), -}); diff --git a/src/resources/MessagingProfiles.ts b/src/resources/MessagingProfiles.ts index 56b9581..cbeaf08 100644 --- a/src/resources/MessagingProfiles.ts +++ b/src/resources/MessagingProfiles.ts @@ -5,7 +5,7 @@ import * as utils from '../utils'; const telnyxMethod = TelnyxResource.method; -const ACTIONS = ['phone_numbers', 'short_codes', 'metrics']; +const ACTIONS = ['phone_numbers', 'short_codes', 'metrics', 'autoresp_configs']; function getSpec(messagingProfileId?: string) { return function (methodName: string) { @@ -95,4 +95,18 @@ export const MessagingProfiles = TelnyxResource.extend({ urlParams: ['messagingProfileId'], methodType: 'retrieve', }), + + autorespConfigs: telnyxMethod({ + method: 'GET', + path: '/{messagingProfileId}/autoresp_configs', + urlParams: ['messagingProfileId'], + methodType: 'list', + }), + + listAutorespConfigs: telnyxMethod({ + method: 'GET', + path: '/{messagingProfileId}/autoresp_configs', + urlParams: ['messagingProfileId'], + methodType: 'list', + }), }); diff --git a/src/resources/PhoneNumberAssignmentByProfile.ts b/src/resources/PhoneNumberAssignmentByProfile.ts index 28f3078..2b61471 100644 --- a/src/resources/PhoneNumberAssignmentByProfile.ts +++ b/src/resources/PhoneNumberAssignmentByProfile.ts @@ -40,6 +40,14 @@ export const PhoneNumberAssignmentByProfile = TelnyxResource.extend({ transformResponseData: transformResponseData, }), + retrieve: telnyxMethod({ + method: 'GET', + path: '/{taskId}', + urlParams: ['taskId'], + + transformResponseData: transformResponseData, + }), + retrieveTaskStatus: telnyxMethod({ method: 'GET', path: '/{taskId}', @@ -48,6 +56,14 @@ export const PhoneNumberAssignmentByProfile = TelnyxResource.extend({ transformResponseData: transformResponseData, }), + phoneNumbers: telnyxMethod({ + method: 'GET', + path: '/{taskId}/phoneNumbers', + urlParams: ['taskId'], + + transformResponseData: transformResponseData, + }), + retrievePhoneNumberStatus: telnyxMethod({ method: 'GET', path: '/{taskId}/phoneNumbers', diff --git a/src/resources/SslCertificates.ts b/src/resources/SslCertificates.ts deleted file mode 100644 index c979a7d..0000000 --- a/src/resources/SslCertificates.ts +++ /dev/null @@ -1,17 +0,0 @@ -import TelnyxResource from '../TelnyxResource'; -const telnyxMethod = TelnyxResource.method; - -export const SslCertificates = TelnyxResource.extend({ - path: 'ssl_certificates', - includeBasic: ['delete', 'list', 'retrieve'], - - RemoveStorageSSLCertificate: telnyxMethod({ - method: 'DELETE', - path: '/storage/ssl_certificates/{ssl/certificate/id}', - urlParams: ['ssl_certificate_id'], - }), - GetStorageSSLCertificates: telnyxMethod({ - method: 'GET', - path: '/storage/ssl_certificates', - }), -}); diff --git a/src/resources/StorageBuckets.ts b/src/resources/StorageBuckets.ts new file mode 100644 index 0000000..42ee49f --- /dev/null +++ b/src/resources/StorageBuckets.ts @@ -0,0 +1,36 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const StorageBuckets = TelnyxResource.extend({ + path: 'storage/buckets', + + usage: telnyxMethod({ + method: 'GET', + path: '/{bucketName}/usage/storage', + urlParams: ['bucketName'], + }), + + apiUsage: telnyxMethod({ + method: 'GET', + path: '/{bucketName}/usage/api', + urlParams: ['bucketName'], + }), + + sslCertificate: telnyxMethod({ + method: 'GET', + path: '/{bucketName}/ssl_certificate', + urlParams: ['bucketName'], + }), + + addSslCertificate: telnyxMethod({ + method: 'PUT', + path: '/{bucketName}/ssl_certificate', + urlParams: ['bucketName'], + }), + + delSslCertificate: telnyxMethod({ + method: 'DELETE', + path: '/{bucketName}/ssl_certificate', + urlParams: ['bucketName'], + }), +}); diff --git a/src/telnyx.ts b/src/telnyx.ts index b69825e..f792734 100644 --- a/src/telnyx.ts +++ b/src/telnyx.ts @@ -8,24 +8,18 @@ import * as utils from './utils'; //#region Resources import {AccessIpAddress} from './resources/AccessIpAddress'; import {AccessIpRanges} from './resources/AccessIpRanges'; -import {AccessTokens} from './resources/AccessTokens'; import {Actions} from './resources/Actions'; import {ActionsSimCards} from './resources/ActionsSimCards'; import {ActivateDeactivateBulkCredentials} from './resources/ActivateDeactivateBulkCredentials'; import {Addresses} from './resources/Addresses'; -import {AdvancedOptinoptout} from './resources/AdvancedOptinoptout'; +import {AutorespConfigs} from './resources/AutorespConfigs'; import {AI} from './resources/AI'; import {AuthenticationProviders} from './resources/AuthenticationProviders'; import {AvailablePhoneNumbers} from './resources/AvailablePhoneNumbers'; import {Balance} from './resources/Balance'; -import {Billing} from './resources/Billing'; import {BillingGroups} from './resources/BillingGroups'; import {Brands} from './resources/Brands'; -import {Bucket} from './resources/Bucket'; -import {BucketUsage} from './resources/BucketUsage'; import {BulkCredentials} from './resources/BulkCredentials'; -import {BulkPhoneNumberCampaigns} from './resources/BulkPhoneNumberCampaigns'; -import {BulkPhoneNumberOperations} from './resources/BulkPhoneNumberOperations'; import {BulkSoleProprietorCreation} from './resources/BulkSoleProprietorCreation'; import {BulkTelephonyCredentials} from './resources/BulkTelephonyCredentials'; import {BusinessIdentity} from './resources/BusinessIdentity'; @@ -140,7 +134,7 @@ import {SimCardGroupActions} from './resources/SimCardGroupActions'; import {SimCardGroups} from './resources/SimCardGroups'; import {SimCardOrders} from './resources/SimCardOrders'; import {SimCards} from './resources/SimCards'; -import {SslCertificates} from './resources/SslCertificates'; +import {StorageBuckets} from './resources/StorageBuckets'; import {TelephonyCredentials} from './resources/TelephonyCredentials'; import {TexmlApplications} from './resources/TexmlApplications'; import {UpdateClientState} from './resources/UpdateClientState'; @@ -191,24 +185,18 @@ export function createTelnyx() { const resources = { AccessIpAddress, AccessIpRanges, - AccessTokens, Actions, ActionsSimCards, ActivateDeactivateBulkCredentials, Addresses, - AdvancedOptinoptout, + AutorespConfigs, AI, AuthenticationProviders, AvailablePhoneNumbers, Balance, - Billing, BillingGroups, Brands, - Bucket, - BucketUsage, BulkCredentials, - BulkPhoneNumberCampaigns, - BulkPhoneNumberOperations, BulkSoleProprietorCreation, BulkTelephonyCredentials, BusinessIdentity, @@ -323,7 +311,7 @@ export function createTelnyx() { SimCardGroups, SimCardOrders, SimCards, - SslCertificates, + StorageBuckets, TelephonyCredentials, TexmlApplications, UpdateClientState, diff --git a/src/test/resources/MessagingProfiles.test.ts b/src/test/resources/MessagingProfiles.test.ts index 68b27f1..aeb5775 100644 --- a/src/test/resources/MessagingProfiles.test.ts +++ b/src/test/resources/MessagingProfiles.test.ts @@ -26,6 +26,12 @@ type ResponsePayloadMetrics = { }; }; +type ResponsePayloadAutorespConfig = { + data: { + id: string; + }; +}; + describe('MessagingProfiles Resource', function () { function responseFn(response: ResponsePayload) { expect(response.data).toHaveProperty('name'); @@ -302,5 +308,58 @@ describe('MessagingProfiles Resource', function () { }); }); }); + + describe('AutorespConfigs methods', function () { + function autorespConfigNestedResponseFn( + response: ResponsePayloadAutorespConfig, + ) { + expect(response.data[0]).toHaveProperty('country_code'); + expect(response.data[0]).toHaveProperty('resp_text'); + expect(response.data[0]).toHaveProperty('keywords'); + expect(response.data[0]).toHaveProperty('op'); + expect(response.data[0]).toHaveProperty('id'); + } + + describe('autorespConfigs', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.messagingProfiles + .listAutorespConfigs(TEST_UUID) + .then(autorespConfigNestedResponseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.messagingProfiles + .listAutorespConfigs(TEST_UUID, TEST_AUTH_KEY) + .then(autorespConfigNestedResponseFn); + }); + }); + + describe('nested autoresp_configs', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.messagingProfiles + .create({name: 'Summer Campaign', whitelisted_destinations: ['US']}) + .then(function (response: ResponsePayload) { + const mp = response.data; + // @ts-expect-error TODO: import .d.ts files under src/test folder + return mp.autorespConfigs().then(autorespConfigNestedResponseFn); + }); + }); + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.messagingProfiles.retrieve(TEST_UUID).then(function ( + response: ResponsePayload, + ) { + const mp = response.data; + // @ts-expect-error TODO: import .d.ts files under src/test folder + return mp + .autorespConfigs(TEST_AUTH_KEY) + .then(autorespConfigNestedResponseFn); + }); + }); + }); + }); }); }); diff --git a/types/AccessIpAddressResource.d.ts b/types/AccessIpAddressResource.d.ts new file mode 100644 index 0000000..f34045d --- /dev/null +++ b/types/AccessIpAddressResource.d.ts @@ -0,0 +1,57 @@ +import {paths} from './TelnyxAPI.js'; + +declare module 'telnyx' { + namespace Telnyx { + type AccessIpAddressRetrieveId = + paths['/access_ip_address/{access_ip_address_id}']['get']['parameters']['path']['access_ip_address_id']; + + type AccessIpAddressRetrieveParams = + paths['/access_ip_address/{access_ip_address_id}']['get']['parameters']['query']; + + type AccessIpAddressRetrieveResponse = + paths['/access_ip_address/{access_ip_address_id}']['get']['responses']['200']['content']['application/json']; + + type AccessIpAddressCreateParams = + paths['/access_ip_address']['post']['requestBody']['content']['application/json']; + + type AccessIpAddressCreateResponse = + paths['/access_ip_address']['post']['responses']['200']['content']['application/json']; + + type AccessIpAddressListParams = + paths['/access_ip_address']['get']['parameters']['query']; + + type AccessIpAddressListResponse = + paths['/access_ip_address']['get']['responses']['200']['content']['application/json']; + + type AccessIpAddressDelId = + paths['/access_ip_address/{access_ip_address_id}']['delete']['parameters']['path']['access_ip_address_id']; + + type AccessIpAddressDelParams = + paths['/access_ip_address/{access_ip_address_id}']['delete']['parameters']['query']; + + type AccessIpAddressDelResponse = + paths['/access_ip_address/{access_ip_address_id}']['delete']['responses']['200']['content']['application/json']; + + class AccessIpAddressResource { + retrieve( + id: AccessIpAddressRetrieveId, + options?: RequestOptions, + ): Promise>; + + create( + params: AccessIpAddressCreateParams, + options?: RequestOptions, + ): Promise>; + + list( + params?: AccessIpAddressListParams, + options?: RequestOptions, + ): Promise>; + + del( + id: AccessIpAddressDelId, + options?: RequestOptions, + ): Promise>; + } + } +} diff --git a/types/AccessIpRangesResource.d.ts b/types/AccessIpRangesResource.d.ts new file mode 100644 index 0000000..e984e77 --- /dev/null +++ b/types/AccessIpRangesResource.d.ts @@ -0,0 +1,43 @@ +import {paths} from './TelnyxAPI.js'; + +declare module 'telnyx' { + namespace Telnyx { + type AccessIpRangesCreateParams = + paths['/access_ip_ranges']['post']['requestBody']['content']['application/json']; + + type AccessIpRangesCreateResponse = + paths['/access_ip_ranges']['post']['responses']['200']['content']['application/json']; + + type AccessIpRangesListParams = + paths['/access_ip_ranges']['get']['parameters']['query']; + + type AccessIpRangesListResponse = + paths['/access_ip_ranges']['get']['responses']['200']['content']['application/json']['data']; + + type AccessIpRangesDelId = + paths['/access_ip_ranges/{access_ip_range_id}']['delete']['parameters']['path']['access_ip_range_id']; + + type AccessIpRangesDelParams = + paths['/access_ip_ranges/{access_ip_range_id}']['delete']['parameters']['query']; + + type AccessIpRangesDelResponse = + paths['/access_ip_ranges/{access_ip_range_id}']['delete']['responses']['200']['content']['application/json']; + + class AccessIpRangesResource { + create( + params: AccessIpRangesCreateParams, + options?: RequestOptions, + ): Promise>; + + list( + params?: AccessIpRangesListParams, + options?: RequestOptions, + ): Promise>; + + del( + id: AccessIpRangesDelId, + options?: RequestOptions, + ): Promise>; + } + } +} diff --git a/types/AddressesResource.d.ts b/types/AddressesResource.d.ts new file mode 100644 index 0000000..b2275d1 --- /dev/null +++ b/types/AddressesResource.d.ts @@ -0,0 +1,78 @@ +import {paths} from './TelnyxAPI.js'; + +declare module 'telnyx' { + namespace Telnyx { + type AddressesRetrieveId = + paths['/addresses/{id}']['get']['parameters']['path']['id']; + + type AddressesRetrieveParams = + paths['/addresses/{id}']['get']['parameters']['query']; + + type AddressesRetrieveResponse = + paths['/addresses/{id}']['get']['responses']['200']['content']['application/json']['data']; + + type AddressesCreateParams = + paths['/addresses']['post']['requestBody']['content']['application/json']; + + type AddressesCreateResponse = + paths['/addresses']['post']['responses']['200']['content']['application/json']['data']; + + type AddressesValidateParams = + paths['/addresses/actions/validate']['post']['requestBody']['content']['application/json']; + + type AddressesValidateResponse = + paths['/addresses/actions/validate']['post']['responses']['200']['content']['application/json']['data']; + + type AddressesListParams = + paths['/addresses']['get']['parameters']['query']; + + type AddressesListResponse = + paths['/addresses']['get']['responses']['200']['content']['application/json']['data']; + + type AddressesDelId = + paths['/addresses/{id}']['delete']['parameters']['path']['id']; + + type AddressesDelParams = + paths['/addresses/{id}']['delete']['parameters']['query']; + + type AddressesDelResponse = + paths['/addresses/{id}']['delete']['responses']['200']['content']['application/json']['data']; + + type AddressesNestedMethods = { + del: AddressesResource['del']; + }; + + class AddressesResource { + retrieve( + id: AddressesRetrieveId, + options?: RequestOptions, + ): Promise< + Telnyx.Response< + Telnyx.AddressesRetrieveResponse & AddressesNestedMethods + > + >; + + create( + params: AddressesCreateParams, + options?: RequestOptions, + ): Promise< + Telnyx.Response + >; + + validate( + params: AddressesValidateParams, + options?: RequestOptions, + ): Promise>; + + list( + params?: AddressesListParams, + options?: RequestOptions, + ): Promise>; + + del( + id: AddressesDelId, + options?: RequestOptions, + ): Promise>; + } + } +} diff --git a/types/AutorespConfigsResource.d.ts b/types/AutorespConfigsResource.d.ts new file mode 100644 index 0000000..4ef1142 --- /dev/null +++ b/types/AutorespConfigsResource.d.ts @@ -0,0 +1,74 @@ +import {paths} from './TelnyxAPI.js'; + +declare module 'telnyx' { + namespace Telnyx { + type AutorespConfigsRetrievePathParams = + paths['/messaging_profiles/{profile_id}/autoresp_configs/{autoresp_cfg_id}']['get']['parameters']['path']; + + type AutorespConfigsRetrieveResponse = + paths['/messaging_profiles/{profile_id}/autoresp_configs/{autoresp_cfg_id}']['get']['responses']['200']['content']['application/json']['data']; + + type AutorespConfigsCreatePathParams = + paths['/messaging_profiles/{profile_id}/autoresp_configs']['post']['parameters']['path']; + + type AutorespConfigsCreateParams = + paths['/messaging_profiles/{profile_id}/autoresp_configs']['post']['requestBody']['content']['application/json']; + + type AutorespConfigsCreateResponse = + paths['/messaging_profiles/{profile_id}/autoresp_configs']['post']['responses']['200']['content']['application/json']['data']; + + type AutorespConfigsListPathParams = + paths['/messaging_profiles/{profile_id}/autoresp_configs']['get']['parameters']['path']; + + type AutorespConfigsListParams = + paths['/messaging_profiles/{profile_id}/autoresp_configs']['get']['parameters']['query']; + + type AutorespConfigsListResponse = + paths['/messaging_profiles/{profile_id}/autoresp_configs']['get']['responses']['200']['content']['application/json']['data']; + + type AutorespConfigsDelPathParams = + paths['/messaging_profiles/{profile_id}/autoresp_configs/{autoresp_cfg_id}']['delete']['parameters']['path']; + + type AutorespConfigsDelResponse = + paths['/messaging_profiles/{profile_id}/autoresp_configs/{autoresp_cfg_id}']['delete']['responses']['200']['content']['application/json']; + + type AutorespConfigsUpdatePathParams = + paths['/messaging_profiles/{profile_id}/autoresp_configs/{autoresp_cfg_id}']['put']['parameters']['path']; + + type AutorespConfigsUpdateParams = + paths['/messaging_profiles/{profile_id}/autoresp_configs/{autoresp_cfg_id}']['put']['requestBody']['content']['application/json']; + + type AutorespConfigsUpdateResponse = + paths['/messaging_profiles/{profile_id}/autoresp_configs/{autoresp_cfg_id}']['put']['responses']['200']['content']['application/json']['data']; + + class AutorespConfigsResource { + retrieve( + params: AutorespConfigsRetrievePathParams, + options?: RequestOptions, + ): Promise>; + + create( + pathParams: AutorespConfigsCreatePathParams, + params: AutorespConfigsCreateParams, + options?: RequestOptions, + ): Promise>; + + list( + pathParams: AutorespConfigsListPathParams, + params?: AutorespConfigsListParams, + options?: RequestOptions, + ): Promise>; + + del( + params: AutorespConfigsDelPathParams, + options?: RequestOptions, + ): Promise>; + + update( + pathParams: AutorespConfigsUpdatePathParams, + params: AutorespConfigsUpdateParams, + options?: RequestOptions, + ): Promise>; + } + } +} diff --git a/types/AvailablePhoneNumbersResource.d.ts b/types/AvailablePhoneNumbersResource.d.ts new file mode 100644 index 0000000..b4dc8ab --- /dev/null +++ b/types/AvailablePhoneNumbersResource.d.ts @@ -0,0 +1,18 @@ +import {paths} from './TelnyxAPI.js'; + +declare module 'telnyx' { + namespace Telnyx { + type AvailablePhoneNumbersListParams = + paths['/available_phone_numbers']['get']['parameters']['query']; + + type AvailablePhoneNumbersListResponse = + paths['/available_phone_numbers']['get']['responses']['200']['content']['application/json']['data']; + + class AvailablePhoneNumbersResource { + list( + params?: AvailablePhoneNumbersListParams, + options?: RequestOptions, + ): Promise>; + } + } +} diff --git a/types/BillingGroupsResource.d.ts b/types/BillingGroupsResource.d.ts new file mode 100644 index 0000000..d13772c --- /dev/null +++ b/types/BillingGroupsResource.d.ts @@ -0,0 +1,72 @@ +import {paths} from './TelnyxAPI.js'; + +declare module 'telnyx' { + namespace Telnyx { + type BillingGroupsRetrieveId = + paths['/billing_groups/{id}']['get']['parameters']['path']['id']; + + type BillingGroupsRetrieveParams = + paths['/billing_groups/{id}']['get']['parameters']['query']; + + type BillingGroupsRetrieveResponse = + paths['/billing_groups/{id}']['get']['responses']['200']['content']['application/json']['data']; + + type BillingGroupsListParams = + paths['/billing_groups']['get']['parameters']['query']; + + type BillingGroupsListResponse = + paths['/billing_groups']['get']['responses']['200']['content']['application/json']['data']; + + type BillingGroupsCreateParams = + paths['/billing_groups']['post']['requestBody']['content']['application/json']; + + type BillingGroupsCreateResponse = + paths['/billing_groups']['post']['responses']['200']['content']['application/json']['data']; + + type BillingGroupsDelId = + paths['/billing_groups/{id}']['delete']['parameters']['path']['id']; + + type BillingGroupsDelParams = + paths['/billing_groups/{id}']['delete']['parameters']['query']; + + type BillingGroupsDelResponse = + paths['/billing_groups/{id}']['delete']['responses']['200']['content']['application/json']['data']; + + type BillingGroupsUpdateId = + paths['/billing_groups/{id}']['patch']['parameters']['path']['id']; + + type BillingGroupsUpdateParams = + paths['/billing_groups/{id}']['patch']['requestBody']['content']['application/json']; + + type BillingGroupsUpdateResponse = + paths['/billing_groups/{id}']['patch']['responses']['200']['content']['application/json']['data']; + + class BillingGroupsResource { + retrieve( + id: BillingGroupsRetrieveId, + options?: RequestOptions, + ): Promise>; + + list( + params?: BillingGroupsListParams, + options?: RequestOptions, + ): Promise>; + + create( + params: BillingGroupsCreateParams, + options?: RequestOptions, + ): Promise>; + + del( + id: BillingGroupsDelId, + options?: RequestOptions, + ): Promise>; + + update( + id: BillingGroupsUpdateId, + params: BillingGroupsUpdateParams, + options?: RequestOptions, + ): Promise>; + } + } +} diff --git a/types/BrandsResource.d.ts b/types/BrandsResource.d.ts new file mode 100644 index 0000000..2ca6685 --- /dev/null +++ b/types/BrandsResource.d.ts @@ -0,0 +1,142 @@ +import {paths} from './TelnyxAPI.js'; + +declare module 'telnyx' { + namespace Telnyx { + type BrandsRetrieveId = + paths['/brand/{brandId}']['get']['parameters']['path']['brandId']; + + type BrandsRetrieveParams = + paths['/brand/{brandId}']['get']['parameters']['query']; + + type BrandsRetrieveResponse = + paths['/brand/{brandId}']['get']['responses']['200']['content']['application/json']; + + type BrandsListParams = paths['/brand']['get']['parameters']['query']; + + type BrandsListResponse = + paths['/brand']['get']['responses']['200']['content']['application/json']; + + type BrandsCreateParams = + paths['/brand']['post']['requestBody']['content']['application/json']; + + type BrandsCreateResponse = + paths['/brand']['post']['responses']['200']['content']['application/json']; + + type BrandsDelId = + paths['/brand/{brandId}']['delete']['parameters']['path']['brandId']; + + type BrandsDelParams = + paths['/brand/{brandId}']['delete']['parameters']['query']; + + type BrandsDelResponse = + paths['/brand/{brandId}']['delete']['responses']['200']['content']['application/json']; + + type BrandsUpdateId = + paths['/brand/{brandId}']['put']['parameters']['path']['brandId']; + + type BrandsUpdateParams = + paths['/brand/{brandId}']['put']['requestBody']['content']['application/json']; + + type BrandsUpdateResponse = + paths['/brand/{brandId}']['put']['responses']['200']['content']['application/json']; + + type BrandsResend2faEmailPathParams = + paths['/brand/{brandId}/2faEmail']['post']['parameters']['path']; + + type BrandsResend2faEmailResponse = + paths['/brand/{brandId}/2faEmail']['post']['responses']['200']['content']; + + type BrandsListExternalVettingsPathParams = + paths['/brand/{brandId}/externalVetting']['get']['parameters']['path']; + + type BrandsListExternalVettingsResponse = + paths['/brand/{brandId}/externalVetting']['get']['responses']['200']['content']['application/json']; + + type BrandsExportExternalVettingsPathParams = + paths['/brand/{brandId}/externalVetting']['put']['parameters']['path']; + + type BrandsExportExternalVettingsResponse = + paths['/brand/{brandId}/externalVetting']['put']['responses']['200']['content']['application/json']; + + type BrandsOrderExternalVettingsPathParams = + paths['/brand/{brandId}/externalVetting']['post']['parameters']['path']; + + type BrandsOrderExternalVettingsResponse = + paths['/brand/{brandId}/externalVetting']['post']['responses']['200']['content']['application/json']; + + type BrandsRevetPathParams = + paths['/brand/{brandId}/revet']['put']['parameters']['path']; + + type BrandsRevetResponse = + paths['/brand/{brandId}/revet']['put']['responses']['200']['content']['application/json']; + + type BrandsFeedbackPathParams = + paths['/brand/feedback/{brandId}']['get']['parameters']['path']; + + type BrandsFeedbackResponse = + paths['/brand/feedback/{brandId}']['get']['responses']['200']['content']['application/json']; + + class BrandsResource { + retrieve( + id: BrandsRetrieveId, + options?: RequestOptions, + ): Promise>; + + list( + params?: BrandsListParams, + options?: RequestOptions, + ): Promise>; + + create( + params: BrandsCreateParams, + options?: RequestOptions, + ): Promise>; + + del( + id: BrandsDelId, + options?: RequestOptions, + ): Promise>; + + update( + id: BrandsUpdateId, + params: BrandsUpdateParams, + options?: RequestOptions, + ): Promise>; + + resend2faEmail( + pathParams: BrandsResend2faEmailPathParams, + options?: RequestOptions, + ): Promise>; + + externalVettings( + params?: BrandsListExternalVettingsPathParams, + options?: RequestOptions, + ): Promise>; + + listExternalVettings( + pathParams: BrandsListExternalVettingsPathParams, + options?: RequestOptions, + ): Promise>; + + exportExternalVettings( + pathParams: BrandsExportExternalVettingsPathParams, + options?: RequestOptions, + ): Promise>; + + orderExternalVettings( + pathParams: BrandsOrderExternalVettingsPathParams, + options?: RequestOptions, + ): Promise>; + + revet( + pathParams: BrandsRevetPathParams, + options?: RequestOptions, + ): Promise>; + + feedback( + pathParams: BrandsFeedbackPathParams, + options?: RequestOptions, + ): Promise>; + } + } +} diff --git a/types/PhoneNumberAssignmentByProfileResource.d.ts b/types/PhoneNumberAssignmentByProfileResource.d.ts new file mode 100644 index 0000000..ee52096 --- /dev/null +++ b/types/PhoneNumberAssignmentByProfileResource.d.ts @@ -0,0 +1,53 @@ +import {paths} from './TelnyxAPI.js'; + +declare module 'telnyx' { + namespace Telnyx { + type PhoneNumberAssignmentByProfileRetrieveId = + paths['/phoneNumberAssignmentByProfile/{taskId}']['get']['parameters']['path']['taskId']; + + type PhoneNumberAssignmentByProfileRetrieveParams = + paths['/phoneNumberAssignmentByProfile/{taskId}']['get']['parameters']['query']; + + type PhoneNumberAssignmentByProfileRetrieveResponse = + paths['/phoneNumberAssignmentByProfile/{taskId}']['get']['responses']['200']['content']['application/json']; + + type PhoneNumberAssignmentByProfileCreateParams = + paths['/phoneNumberAssignmentByProfile']['post']['requestBody']['content']['application/json']; + + type PhoneNumberAssignmentByProfileCreateResponse = + paths['/phoneNumberAssignmentByProfile']['post']['responses']['202']['content']['application/json']; + + type PhoneNumberAssignmentByProfileListPhoneNumbersId = + paths['/phoneNumberAssignmentByProfile/{taskId}/phoneNumbers']['get']['parameters']['path']['taskId']; + + type PhoneNumberAssignmentByProfileListPhoneNumbersParams = + paths['/phoneNumberAssignmentByProfile/{taskId}/phoneNumbers']['get']['parameters']['query']; + + type PhoneNumberAssignmentByProfileListPhoneNumbersResponse = + paths['/phoneNumberAssignmentByProfile/{taskId}/phoneNumbers']['get']['responses']['200']['content']['application/json']; + + class PhoneNumberAssignmentByProfileResource { + retrieve( + id: PhoneNumberAssignmentByProfileRetrieveId, + options?: RequestOptions, + ): Promise< + Telnyx.Response + >; + + phoneNumbers( + id: PhoneNumberAssignmentByProfileListPhoneNumbersId, + params: PhoneNumberAssignmentByProfileListPhoneNumbersParams, + options?: RequestOptions, + ): Promise< + Telnyx.Response + >; + + create( + params: PhoneNumberAssignmentByProfileCreateParams, + options?: RequestOptions, + ): Promise< + Telnyx.Response + >; + } + } +} diff --git a/types/StorageBucketsResource.d.ts b/types/StorageBucketsResource.d.ts new file mode 100644 index 0000000..0de4fc3 --- /dev/null +++ b/types/StorageBucketsResource.d.ts @@ -0,0 +1,74 @@ +import {paths} from './TelnyxAPI.js'; + +declare module 'telnyx' { + namespace Telnyx { + type StorageBucketsUsageName = + paths['/storage/buckets/{bucketName}/usage/storage']['get']['parameters']['path']['bucketName']; + + type StorageBucketsUsageResponse = + paths['/storage/buckets/{bucketName}/usage/storage']['get']['responses']['200']['content']['application/json']['data']; + + type StorageBucketsAPIUsageName = + paths['/storage/buckets/{bucketName}/usage/api']['get']['parameters']['path']['bucketName']; + + type StorageBucketsAPIUsageResponse = + paths['/storage/buckets/{bucketName}/usage/api']['get']['responses']['200']['content']['application/json']['data']; + + type StorageBucketsSSLCertificateName = + paths['/storage/buckets/{bucketName}/ssl_certificate']['get']['parameters']['path']['bucketName']; + + type StorageBucketsAddSSLCertificateName = + paths['/storage/buckets/{bucketName}/ssl_certificate']['put']['parameters']['path']['bucketName']; + + type StorageBucketsDelSSLCertificateName = + paths['/storage/buckets/{bucketName}/ssl_certificate']['delete']['parameters']['path']['bucketName']; + + type StorageBucketsAddSSLCertificateOptionalParam = + paths['/storage/buckets/{bucketName}/ssl_certificate']['put']['requestBody']; + + type StorageBucketsAddSSLCertificateParam< + T extends StorageBucketsAddSSLCertificateOptionalParam, + > = T extends undefined + ? undefined + : T extends {content: {'multipart/form-data': infer U}} + ? U + : never; + + type StorageBucketsSSLCertificateResponse = + paths['/storage/buckets/{bucketName}/ssl_certificate']['get']['responses']['200']['content']['application/json']['data']; + + type StorageBucketsAddSSLCertificateResponse = + paths['/storage/buckets/{bucketName}/ssl_certificate']['put']['responses']['200']['content']['application/json']['data']; + + type StorageBucketsDelSSLCertificateResponse = + paths['/storage/buckets/{bucketName}/ssl_certificate']['delete']['responses']['200']['content']['application/json']['data']; + + class StorageBucketsResource { + usage( + bucketName: StorageBucketsUsageName, + options?: RequestOptions, + ): Promise>; + + apiUsage( + bucketName: StorageBucketsAPIUsageName, + options?: RequestOptions, + ): Promise>; + + sslCertificate( + bucketName: StorageBucketsSSLCertificateName, + options?: RequestOptions, + ): Promise>; + + addSslCertificate( + bucketName: StorageBucketsSSLCertificateName, + params: StorageBucketsAddSSLCertificateParam, + options?: RequestOptions, + ): Promise>; + + delSslCertificate( + bucketName: StorageBucketsSSLCertificateName, + options?: RequestOptions, + ): Promise>; + } + } +} diff --git a/types/index.d.ts b/types/index.d.ts index c56baff..bb7d7d4 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -6,10 +6,19 @@ /// // Resources Imports +/// +/// +/// +/// +/// /// +/// +/// /// /// /// +/// +/// // declare module 'telnyx' { @@ -26,10 +35,20 @@ declare module 'telnyx' { TelnyxResource: Telnyx.TelnyxResource; // Resources + accessIpAddress: Telnyx.AccessIpAddressResource; + accessIpRanges: Telnyx.AccessIpRangesResource; + autorespConfigs: Telnyx.AutorespConfigsResource; + addresses: Telnyx.AddressesResource; + availablePhoneNumbers: Telnyx.AvailablePhoneNumbersResource; balance: Telnyx.BalanceResource; + brands: Telnyx.BrandsResource; + billingGroups: Telnyx.BillingGroupsResource; calls: Telnyx.CallsResource; messagingProfiles: Telnyx.MessagingProfilesResource; + phoneNumberAssignmentByProfileResource: Telnyx.PhoneNumberAssignmentByProfileResource; + storageBuckets: Telnyx.StorageBucketsResource; // + webhooks: Telnyx.Webhooks; /** * API Errors From 2aa2d57037c4533d58e471e63d9c58b48bec95ef Mon Sep 17 00:00:00 2001 From: Lucas Rosa Date: Wed, 2 Oct 2024 09:39:49 -0300 Subject: [PATCH 25/59] update instructions for v2 usage --- README.md | 77 ++++++++++++++++++++++--------------------------------- 1 file changed, 31 insertions(+), 46 deletions(-) diff --git a/README.md b/README.md index 3a64ea6..9f1f02e 100644 --- a/README.md +++ b/README.md @@ -26,48 +26,28 @@ The package needs to be configured with your account's API key which is available in your the [Telnyx Mission Control Portal][api-keys]. Require it with the key's value: -```js -const telnyx = require('telnyx')('KEY123456...'); +```typescript +import Telnyx from 'telnyx'; + +const telnyx = new Telnyx('KEY123456...'); const messagingProfile = await telnyx.messagingProfiles.create({ name: 'Summer Campaign', }); ``` -Or with versions of Node.js prior to v7.9: - -```js -var telnyx = require('telnyx')('KEY123456...'); - -telnyx.messagingProfiles.create( - {name: 'Summer Campaign'}, - function (err, messagingProfile) { - err; // null if no error occurred - messagingProfile; // the created messaging profile object - }, -); -``` - -Or using ES modules, this looks more like: - -```js -import Telnyx from 'telnyx'; -const telnyx = Telnyx('KEY...'); -//… -``` - ### Using Promises Every method returns a chainable promise which can be used instead of a regular callback: -```js +```typescript // Create a new messaging profile and then send a message using that profile: -telnyx.MessagingProfiles.create({ +telnyx.,essagingProfiles.create({ name: 'Summer Campaign', }) .then((messagingProfile) => { - return telnyx.MessagingPhoneNumbers.update('+18005554000', { + return telnyx.messagingPhoneNumbers.update('+18005554000', { messaging_profile_id: messagingProfile.data.id, }); }) @@ -80,7 +60,7 @@ telnyx.MessagingProfiles.create({ Request timeout is configurable (the default is Node's default of 120 seconds): -```js +```typescript telnyx.setTimeout(20000); // in ms (this is 20 seconds) ``` @@ -91,9 +71,10 @@ An [https-proxy-agent][https-proxy-agent] can be configured with To use telnyx behind a proxy you can pass to sdk: -```js +```typescript +import ProxyAgent from 'https-proxy-agent'; + if (process.env.http_proxy) { - const ProxyAgent = require('https-proxy-agent'); telnyx.setHttpAgent(new ProxyAgent(process.env.http_proxy)); } ``` @@ -104,7 +85,7 @@ Automatic network retries can be enabled with `setMaxNetworkRetries`. This will retry requests `n` times with exponential backoff if they fail due to an intermittent network problem. -```js +```typescript // Retry a request once before giving up telnyx.setMaxNetworkRetries(1); ``` @@ -114,7 +95,7 @@ telnyx.setMaxNetworkRetries(1); Some information about the response which generated a resource is available with the `lastResponse` property: -```js +```typescript messagingProfile.lastResponse.requestId; // see: https://telnyx.com/docs/api/node#request_ids messagingProfile.lastResponse.statusCode; ``` @@ -123,8 +104,10 @@ messagingProfile.lastResponse.statusCode; The Telnyx object emits `request` and `response` events. You can use them like this: -```js -const telnyx = require('telnyx')('KEY...'); +```typescript +import Telnyx from 'telnyx'; + +const telnyx = new Telnyx('KEY...'); const onRequest = (request) => { // Do something. @@ -139,7 +122,7 @@ telnyx.off('request', onRequest); #### `request` object -```js +```typescript { method: 'POST', path: '/v2/messaging_profiles' @@ -148,7 +131,7 @@ telnyx.off('request', onRequest); #### `response` object -```js +```typescript { method: 'POST', path: '/v2/messaging_profiles', @@ -172,7 +155,7 @@ You can find an example of how to use this with [Express](https://expressjs.com/ in the [`examples/webhook-signing`](examples/webhook-signing) folder, but here's what it looks like: -```js +```typescript const event = telnyx.webhooks.constructEvent( webhookRawBody, webhookTelnyxSignatureHeader, @@ -187,7 +170,7 @@ TeXML sends webhooks as form-encoded payloads instead of JSON. To validate the s You can find an example of how to use this with [Express](https://expressjs.com/) in the [`examples/webhook-signing`](examples/webhook-signing) folder. -```js +```typescript const timeToleranceInSeconds = 300; // Will validate signatures of webhooks up to 5 minutes after Telnyx sent the request try { telnyx.webhooks.signature.verifySignature( @@ -207,7 +190,7 @@ try { If you're writing a plugin that uses the library, we'd appreciate it if you identified using `telnyx.setAppInfo()`: -```js +```typescript telnyx.setAppInfo({ name: 'MyAwesomePlugin', version: '1.2.34', // Optional @@ -228,7 +211,7 @@ If you are in a Node environment that has support for [async iteration](https:// such as Node 10+ or [babel](https://babeljs.io/docs/en/babel-plugin-transform-async-generator-functions), the following will auto-paginate: -```js +```typescript for await (const messagingProfile of telnyx.messagingProfiles.list()) { doSomething(messagingProfile); if (shouldStop()) { @@ -242,7 +225,7 @@ for await (const messagingProfile of telnyx.messagingProfiles.list()) { If you are in a Node environment that has support for `await`, such as Node 7.9 and greater, you may pass an async function to `.autoPagingEach`: -```js +```typescript await telnyx.messagingProfiles .list() .autoPagingEach(async (messagingProfile) => { @@ -256,7 +239,7 @@ console.log('Done iterating.'); Equivalently, without `await`, you may return a Promise, which can resolve to `false` to break: -```js +```typescript telnyx.messagingProfiles .list() .autoPagingEach((messagingProfile) => { @@ -274,7 +257,7 @@ telnyx.messagingProfiles If you prefer callbacks to promises, you may also use a `next` callback and a second `onDone` callback: -```js +```typescript telnyx.messagingProfiles.list().autoPagingEach( function onItem(messagingProfile, next) { doSomething(messagingProfile, function (err, result) { @@ -306,7 +289,7 @@ to prevent runaway list growth from consuming too much memory. Returns a promise of an array of all items across pages for a list request. -```js +```typescript const allMessagingProfiles = await telnyx.messagingProfiles .list() .autoPagingToArray({limit: 10000}); @@ -392,8 +375,10 @@ $ npm test To inspect values in tests first import debug: -```js -const debug = require('debug')('foo'); +```typescript +import Debug from 'debug'; + +const debug = Debug('foo'); //... debug(result); ``` From 89594e2e8b01161b65ff69fc15825b0c84992b1f Mon Sep 17 00:00:00 2001 From: Lucas Rosa Date: Wed, 2 Oct 2024 10:05:01 -0300 Subject: [PATCH 26/59] fix npm publish flow --- .github/workflows/node.js.yml | 4 +- .github/workflows/npm-publish.yml | 12 +- .npmignore | 3 +- CHANGELOG.md | 2 + README.md | 1 - examples/call-control/package-lock.json | 8584 +---------------------- examples/call-control/package.json | 2 +- examples/messaging/package-lock.json | 8584 +---------------------- examples/messaging/package.json | 2 +- 9 files changed, 681 insertions(+), 16513 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index fb46545..7c31a23 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -20,9 +20,9 @@ jobs: node-version: [18.x, 20.x, 22.x] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} - name: setup-telnyx-prism-mock diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 08b19da..6f6d9d4 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -11,8 +11,8 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: 20 test: @@ -23,9 +23,9 @@ jobs: matrix: node-version: [18.x, 20.x, 22.x] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} - name: setup-telnyx-prism-mock @@ -39,8 +39,8 @@ jobs: needs: [build, test] runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: 20 registry-url: https://registry.npmjs.org/ diff --git a/.npmignore b/.npmignore index b54abc5..edf36af 100644 --- a/.npmignore +++ b/.npmignore @@ -9,8 +9,7 @@ !/README.md !/VERSION !/package.json -!/src/**/* -!/types/**/* +!/dist/**/* # Omit test files /src/test/**/* \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index f1e2034..d047290 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -37,6 +37,8 @@ - Move `BucketUsage` resource to `StorageBuckets` - Remove duplicated `BulkPhoneNumberCampaigns` resource - Remove duplicated `BulkPhoneNumberOperations` resource +- Update actions workflow versions to v4 and `.npmignore` to v2 +- Update examples dependencies ## v1 diff --git a/README.md b/README.md index 9f1f02e..3f769a2 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,6 @@ [![Version](https://img.shields.io/npm/v/telnyx.svg)](https://www.npmjs.org/package/telnyx) [![Build Status](https://github.com/team-telnyx/telnyx-node/workflows/CI/badge.svg)](https://github.com/team-telnyx/telnyx-node/actions) -Coverage Status: Pending [![Downloads](https://img.shields.io/npm/dm/telnyx.svg)](https://www.npmjs.com/package/telnyx) [![Try on RunKit](https://badge.runkitcdn.com/telnyx.svg)](https://runkit.com/npm/telnyx) [![Join Slack](https://img.shields.io/badge/join-slack-infomational)](https://joinslack.telnyx.com/) diff --git a/examples/call-control/package-lock.json b/examples/call-control/package-lock.json index e7be923..45708de 100644 --- a/examples/call-control/package-lock.json +++ b/examples/call-control/package-lock.json @@ -12,7 +12,7 @@ "telnyx": "2.0.0-alpha.0" }, "devDependencies": { - "@types/node": "^22.7.3", + "@types/node": "^22.7.4", "tsx": "^4.19.1", "typescript": "^5.6.2", "typescript-eslint": "^8.8.0" @@ -21,8359 +21,409 @@ "node": "^18 || >=20" } }, - "../..": { - "name": "telnyx", - "version": "2.0.0-alpha.0", - "license": "MIT", - "devDependencies": { - "@eslint/js": "^9.10.0", - "@stoplight/prism-cli": "^5.10.0", - "@types/eslint__js": "^8.42.3", - "@types/jest": "^29.5.13", - "@types/node": "^22.7.3", - "@types/qs": "^6.9.15", - "debug": "^4.3.4", - "eslint": "^8.57.0", - "eslint-config-prettier": "^9.1.0", - "eslint-plugin-chai-friendly": "^0.7.4", - "eslint-plugin-prettier": "^5.2.1", - "jest": "^29.7.0", - "nock": "^13.5.4", - "nyc": "^15.1.0", - "plop": "^4.0.1", - "prettier": "^3.0.0", - "qs": "^6.11.2", - "ts-jest": "^29.2.5", - "ts-node": "^10.9.2", - "tweetnacl": "^1.0.3", - "typescript": "^5.6.2", - "typescript-eslint": "^8.8.0", - "uuid": "^9.0.1" - }, - "engines": { - "node": "^18 || >=20" - } - }, - "../../node_modules/@ampproject/remapping": { - "version": "2.3.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../../node_modules/@babel/code-frame": { - "version": "7.24.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/highlight": "^7.24.7", - "picocolors": "^1.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../node_modules/@babel/compat-data": { - "version": "7.25.4", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../../node_modules/@babel/core": { - "version": "7.25.2", - "dev": true, - "license": "MIT", - "dependencies": { - "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.24.7", - "@babel/generator": "^7.25.0", - "@babel/helper-compilation-targets": "^7.25.2", - "@babel/helper-module-transforms": "^7.25.2", - "@babel/helpers": "^7.25.0", - "@babel/parser": "^7.25.0", - "@babel/template": "^7.25.0", - "@babel/traverse": "^7.25.2", - "@babel/types": "^7.25.2", - "convert-source-map": "^2.0.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.2.3", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/babel" - } - }, - "../../node_modules/@babel/core/node_modules/convert-source-map": { - "version": "2.0.0", - "dev": true, - "license": "MIT" - }, - "../../node_modules/@babel/generator": { - "version": "7.25.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.25.6", - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.25", - "jsesc": "^2.5.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../node_modules/@babel/helper-compilation-targets": { - "version": "7.25.2", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/compat-data": "^7.25.2", - "@babel/helper-validator-option": "^7.24.8", - "browserslist": "^4.23.1", - "lru-cache": "^5.1.1", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../node_modules/@babel/helper-module-imports": { - "version": "7.24.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/traverse": "^7.24.7", - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../node_modules/@babel/helper-module-transforms": { - "version": "7.25.2", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-module-imports": "^7.24.7", - "@babel/helper-simple-access": "^7.24.7", - "@babel/helper-validator-identifier": "^7.24.7", - "@babel/traverse": "^7.25.2" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "../../node_modules/@babel/helper-plugin-utils": { - "version": "7.24.8", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../../node_modules/@babel/helper-simple-access": { - "version": "7.24.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/traverse": "^7.24.7", - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../node_modules/@babel/helper-string-parser": { - "version": "7.24.8", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../../node_modules/@babel/helper-validator-identifier": { - "version": "7.24.7", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../../node_modules/@babel/helper-validator-option": { - "version": "7.24.8", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../../node_modules/@babel/helpers": { - "version": "7.25.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/template": "^7.25.0", - "@babel/types": "^7.25.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../node_modules/@babel/highlight": { - "version": "7.24.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.24.7", - "chalk": "^2.4.2", - "js-tokens": "^4.0.0", - "picocolors": "^1.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../node_modules/@babel/highlight/node_modules/ansi-styles": { - "version": "3.2.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "../../node_modules/@babel/highlight/node_modules/chalk": { - "version": "2.4.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "../../node_modules/@babel/highlight/node_modules/color-convert": { - "version": "1.9.3", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "1.1.3" - } - }, - "../../node_modules/@babel/highlight/node_modules/color-name": { - "version": "1.1.3", - "dev": true, - "license": "MIT" - }, - "../../node_modules/@babel/highlight/node_modules/escape-string-regexp": { - "version": "1.0.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.0" - } - }, - "../../node_modules/@babel/highlight/node_modules/has-flag": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../../node_modules/@babel/highlight/node_modules/supports-color": { - "version": "5.5.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "../../node_modules/@babel/parser": { - "version": "7.25.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.25.6" - }, - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../../node_modules/@babel/plugin-syntax-async-generators": { - "version": "7.8.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "../../node_modules/@babel/plugin-syntax-bigint": { - "version": "7.8.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "../../node_modules/@babel/plugin-syntax-class-properties": { - "version": "7.12.13", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.12.13" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "../../node_modules/@babel/plugin-syntax-class-static-block": { - "version": "7.14.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "../../node_modules/@babel/plugin-syntax-import-attributes": { - "version": "7.25.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.8" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "../../node_modules/@babel/plugin-syntax-import-meta": { - "version": "7.10.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "../../node_modules/@babel/plugin-syntax-json-strings": { - "version": "7.8.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "../../node_modules/@babel/plugin-syntax-jsx": { - "version": "7.24.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "../../node_modules/@babel/plugin-syntax-logical-assignment-operators": { - "version": "7.10.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "../../node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { - "version": "7.8.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "../../node_modules/@babel/plugin-syntax-numeric-separator": { - "version": "7.10.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "../../node_modules/@babel/plugin-syntax-object-rest-spread": { - "version": "7.8.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "../../node_modules/@babel/plugin-syntax-optional-catch-binding": { - "version": "7.8.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "../../node_modules/@babel/plugin-syntax-optional-chaining": { - "version": "7.8.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "../../node_modules/@babel/plugin-syntax-private-property-in-object": { - "version": "7.14.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "../../node_modules/@babel/plugin-syntax-top-level-await": { - "version": "7.14.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "../../node_modules/@babel/plugin-syntax-typescript": { - "version": "7.25.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.8" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "../../node_modules/@babel/template": { - "version": "7.25.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.24.7", - "@babel/parser": "^7.25.0", - "@babel/types": "^7.25.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../node_modules/@babel/traverse": { - "version": "7.25.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.24.7", - "@babel/generator": "^7.25.6", - "@babel/parser": "^7.25.6", - "@babel/template": "^7.25.0", - "@babel/types": "^7.25.6", - "debug": "^4.3.1", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../node_modules/@babel/traverse/node_modules/globals": { - "version": "11.12.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../../node_modules/@babel/types": { - "version": "7.25.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.24.8", - "@babel/helper-validator-identifier": "^7.24.7", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../node_modules/@bcoe/v8-coverage": { - "version": "0.2.3", - "dev": true, - "license": "MIT" - }, - "../../node_modules/@cspotcode/source-map-support": { - "version": "0.8.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/trace-mapping": "0.3.9" - }, - "engines": { - "node": ">=12" - } - }, - "../../node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": { - "version": "0.3.9", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" - } - }, - "../../node_modules/@eslint-community/eslint-utils": { - "version": "4.4.0", - "dev": true, - "license": "MIT", - "dependencies": { - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" - } - }, - "../../node_modules/@eslint-community/regexpp": { - "version": "4.11.0", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.0.0 || ^14.0.0 || >=16.0.0" - } - }, - "../../node_modules/@eslint/eslintrc": { - "version": "2.1.4", - "dev": true, - "license": "MIT", - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "../../node_modules/@eslint/eslintrc/node_modules/argparse": { - "version": "2.0.1", - "dev": true, - "license": "Python-2.0" - }, - "../../node_modules/@eslint/eslintrc/node_modules/js-yaml": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "../../node_modules/@eslint/js": { - "version": "9.10.0", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "../../node_modules/@faker-js/faker": { - "version": "6.3.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=14.0.0", - "npm": ">=6.0.0" - } - }, - "../../node_modules/@humanwhocodes/config-array": { - "version": "0.11.14", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@humanwhocodes/object-schema": "^2.0.2", - "debug": "^4.3.1", - "minimatch": "^3.0.5" - }, - "engines": { - "node": ">=10.10.0" - } - }, - "../../node_modules/@humanwhocodes/module-importer": { - "version": "1.0.1", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=12.22" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "../../node_modules/@humanwhocodes/object-schema": { - "version": "2.0.3", - "dev": true, - "license": "BSD-3-Clause" - }, - "../../node_modules/@inquirer/figures": { - "version": "1.0.6", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - } - }, - "../../node_modules/@istanbuljs/load-nyc-config": { - "version": "1.1.0", - "dev": true, - "license": "ISC", - "dependencies": { - "camelcase": "^5.3.1", - "find-up": "^4.1.0", - "get-package-type": "^0.1.0", - "js-yaml": "^3.13.1", - "resolve-from": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/@istanbuljs/load-nyc-config/node_modules/find-up": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/@istanbuljs/load-nyc-config/node_modules/locate-path": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/@istanbuljs/load-nyc-config/node_modules/p-limit": { - "version": "2.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/@istanbuljs/load-nyc-config/node_modules/p-locate": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/@istanbuljs/load-nyc-config/node_modules/resolve-from": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../node_modules/@istanbuljs/schema": { - "version": "0.1.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../node_modules/@jest/console": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "jest-message-util": "^29.7.0", - "jest-util": "^29.7.0", - "slash": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/@jest/core": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/console": "^29.7.0", - "@jest/reporters": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "exit": "^0.1.2", - "graceful-fs": "^4.2.9", - "jest-changed-files": "^29.7.0", - "jest-config": "^29.7.0", - "jest-haste-map": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-regex-util": "^29.6.3", - "jest-resolve": "^29.7.0", - "jest-resolve-dependencies": "^29.7.0", - "jest-runner": "^29.7.0", - "jest-runtime": "^29.7.0", - "jest-snapshot": "^29.7.0", - "jest-util": "^29.7.0", - "jest-validate": "^29.7.0", - "jest-watcher": "^29.7.0", - "micromatch": "^4.0.4", - "pretty-format": "^29.7.0", - "slash": "^3.0.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "../../node_modules/@jest/environment": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/fake-timers": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "jest-mock": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/@jest/expect": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "expect": "^29.7.0", - "jest-snapshot": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/@jest/expect-utils": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "jest-get-type": "^29.6.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/@jest/fake-timers": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^29.6.3", - "@sinonjs/fake-timers": "^10.0.2", - "@types/node": "*", - "jest-message-util": "^29.7.0", - "jest-mock": "^29.7.0", - "jest-util": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/@jest/globals": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/environment": "^29.7.0", - "@jest/expect": "^29.7.0", - "@jest/types": "^29.6.3", - "jest-mock": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/@jest/reporters": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", - "@jridgewell/trace-mapping": "^0.3.18", - "@types/node": "*", - "chalk": "^4.0.0", - "collect-v8-coverage": "^1.0.0", - "exit": "^0.1.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-instrument": "^6.0.0", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.0", - "istanbul-reports": "^3.1.3", - "jest-message-util": "^29.7.0", - "jest-util": "^29.7.0", - "jest-worker": "^29.7.0", - "slash": "^3.0.0", - "string-length": "^4.0.1", - "strip-ansi": "^6.0.0", - "v8-to-istanbul": "^9.0.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "../../node_modules/@jest/reporters/node_modules/glob": { - "version": "7.2.3", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../../node_modules/@jest/reporters/node_modules/istanbul-lib-instrument": { - "version": "6.0.3", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@babel/core": "^7.23.9", - "@babel/parser": "^7.23.9", - "@istanbuljs/schema": "^0.1.3", - "istanbul-lib-coverage": "^3.2.0", - "semver": "^7.5.4" - }, - "engines": { - "node": ">=10" - } - }, - "../../node_modules/@jest/reporters/node_modules/semver": { - "version": "7.6.3", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "../../node_modules/@jest/schemas": { - "version": "29.6.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@sinclair/typebox": "^0.27.8" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/@jest/source-map": { - "version": "29.6.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.18", - "callsites": "^3.0.0", - "graceful-fs": "^4.2.9" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/@jest/test-result": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/console": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "collect-v8-coverage": "^1.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/@jest/test-sequencer": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/test-result": "^29.7.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.7.0", - "slash": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/@jest/transform": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/core": "^7.11.6", - "@jest/types": "^29.6.3", - "@jridgewell/trace-mapping": "^0.3.18", - "babel-plugin-istanbul": "^6.1.1", - "chalk": "^4.0.0", - "convert-source-map": "^2.0.0", - "fast-json-stable-stringify": "^2.1.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.7.0", - "jest-regex-util": "^29.6.3", - "jest-util": "^29.7.0", - "micromatch": "^4.0.4", - "pirates": "^4.0.4", - "slash": "^3.0.0", - "write-file-atomic": "^4.0.2" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/@jest/transform/node_modules/convert-source-map": { - "version": "2.0.0", - "dev": true, - "license": "MIT" - }, - "../../node_modules/@jest/transform/node_modules/write-file-atomic": { - "version": "4.0.2", - "dev": true, - "license": "ISC", - "dependencies": { - "imurmurhash": "^0.1.4", - "signal-exit": "^3.0.7" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "../../node_modules/@jest/types": { - "version": "29.6.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/schemas": "^29.6.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/@jridgewell/gen-mapping": { - "version": "0.3.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/set-array": "^1.2.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../../node_modules/@jridgewell/resolve-uri": { - "version": "3.1.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "../../node_modules/@jridgewell/set-array": { - "version": "1.2.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "../../node_modules/@jridgewell/sourcemap-codec": { - "version": "1.5.0", - "dev": true, - "license": "MIT" - }, - "../../node_modules/@jridgewell/trace-mapping": { - "version": "0.3.25", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } - }, - "../../node_modules/@jsdevtools/ono": { - "version": "7.1.3", - "dev": true, - "license": "MIT" - }, - "../../node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "../../node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "../../node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, - "../../node_modules/@pkgr/core": { - "version": "0.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.20.0 || ^14.18.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/unts" - } - }, - "../../node_modules/@sinclair/typebox": { - "version": "0.27.8", - "dev": true, - "license": "MIT" - }, - "../../node_modules/@sinonjs/commons": { - "version": "3.0.1", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "type-detect": "4.0.8" - } - }, - "../../node_modules/@sinonjs/commons/node_modules/type-detect": { - "version": "4.0.8", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../../node_modules/@sinonjs/fake-timers": { - "version": "10.3.0", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@sinonjs/commons": "^3.0.0" - } - }, - "../../node_modules/@stoplight/http-spec": { - "version": "7.1.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@stoplight/json": "^3.18.1", - "@stoplight/json-schema-generator": "1.0.2", - "@stoplight/types": "14.1.0", - "@types/json-schema": "7.0.11", - "@types/swagger-schema-official": "~2.0.22", - "@types/type-is": "^1.6.3", - "fnv-plus": "^1.3.1", - "lodash": "^4.17.21", - "openapi3-ts": "^2.0.2", - "postman-collection": "^4.1.3", - "tslib": "^2.6.2", - "type-is": "^1.6.18" - }, - "engines": { - "node": ">=14.13" - } - }, - "../../node_modules/@stoplight/http-spec/node_modules/@stoplight/types": { - "version": "14.1.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@types/json-schema": "^7.0.4", - "utility-types": "^3.10.0" - }, - "engines": { - "node": "^12.20 || >=14.13" - } - }, - "../../node_modules/@stoplight/http-spec/node_modules/@types/json-schema": { - "version": "7.0.11", - "dev": true, - "license": "MIT" - }, - "../../node_modules/@stoplight/json": { - "version": "3.21.7", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@stoplight/ordered-object-literal": "^1.0.3", - "@stoplight/path": "^1.3.2", - "@stoplight/types": "^13.6.0", - "jsonc-parser": "~2.2.1", - "lodash": "^4.17.21", - "safe-stable-stringify": "^1.1" - }, - "engines": { - "node": ">=8.3.0" - } - }, - "../../node_modules/@stoplight/json-schema-generator": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "cross-fetch": "^3.1.5", - "json-promise": "1.1.x", - "minimist": "1.2.6", - "mkdirp": "0.5.x", - "pretty-data": "0.40.x" - }, - "bin": { - "json-schema-generator": "bin/cli.js" - } - }, - "../../node_modules/@stoplight/json-schema-merge-allof": { - "version": "0.7.8", - "dev": true, - "license": "MIT", - "dependencies": { - "compute-lcm": "^1.1.0", - "json-schema-compare": "^0.2.2", - "lodash": "^4.17.4" - } - }, - "../../node_modules/@stoplight/json-schema-ref-parser": { - "version": "9.2.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@jsdevtools/ono": "^7.1.3", - "@stoplight/path": "^1.3.2", - "@stoplight/yaml": "^4.0.2", - "call-me-maybe": "^1.0.1", - "fastestsmallesttextencoderdecoder": "^1.0.22", - "isomorphic-fetch": "^3.0.0", - "node-abort-controller": "^3.0.1" - } - }, - "../../node_modules/@stoplight/json-schema-sampler": { - "version": "0.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/json-schema": "^7.0.7", - "json-pointer": "^0.6.1" - } - }, - "../../node_modules/@stoplight/json/node_modules/@stoplight/types": { - "version": "13.20.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@types/json-schema": "^7.0.4", - "utility-types": "^3.10.0" - }, - "engines": { - "node": "^12.20 || >=14.13" - } - }, - "../../node_modules/@stoplight/ordered-object-literal": { - "version": "1.0.5", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=8" - } - }, - "../../node_modules/@stoplight/path": { - "version": "1.3.2", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=8" - } - }, - "../../node_modules/@stoplight/prism-cli": { - "version": "5.10.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@stoplight/json": "3.21.7", - "@stoplight/json-schema-ref-parser": "9.2.7", - "@stoplight/prism-core": "^5.8.0", - "@stoplight/prism-http": "5.10.0", - "@stoplight/prism-http-server": "^5.10.0", - "@stoplight/types": "^14.1.0", - "chalk": "^4.1.2", - "chokidar": "^3.5.2", - "fp-ts": "^2.11.5", - "json-schema-faker": "0.5.6", - "lodash": "^4.17.21", - "node-fetch": "^2.6.5", - "pino": "^6.13.3", - "signale": "^1.4.0", - "split2": "^3.2.2", - "tslib": "^2.3.1", - "uri-template-lite": "^22.9.0", - "urijs": "^1.19.11", - "yargs": "^16.2.0" - }, - "bin": { - "prism": "dist/index.js" - }, - "engines": { - "node": ">=18.20.1" - } - }, - "../../node_modules/@stoplight/prism-core": { - "version": "5.8.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "fp-ts": "^2.11.5", - "lodash": "^4.17.21", - "pino": "^6.13.3", - "tslib": "^2.3.1" - }, - "engines": { - "node": ">=18.20.1" - } - }, - "../../node_modules/@stoplight/prism-http": { - "version": "5.10.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@faker-js/faker": "^6.0.0", - "@stoplight/http-spec": "^7.0.3", - "@stoplight/json": "3.21.7", - "@stoplight/json-schema-merge-allof": "0.7.8", - "@stoplight/json-schema-ref-parser": "9.2.7", - "@stoplight/json-schema-sampler": "0.3.0", - "@stoplight/prism-core": "^5.8.0", - "@stoplight/types": "^14.1.0", - "@stoplight/yaml": "^4.2.3", - "abstract-logging": "^2.0.1", - "accepts": "^1.3.7", - "ajv": "^8.4.0", - "ajv-formats": "^2.1.1", - "caseless": "^0.12.0", - "chalk": "^4.1.2", - "content-type": "^1.0.4", - "fp-ts": "^2.11.5", - "http-proxy-agent": "^5.0.0", - "https-proxy-agent": "^5.0.0", - "json-schema-faker": "0.5.6", - "lodash": "^4.17.21", - "node-fetch": "^2.6.5", - "parse-multipart-data": "^1.5.0", - "pino": "^6.13.3", - "tslib": "^2.3.1", - "type-is": "^1.6.18", - "uri-template-lite": "^22.9.0", - "whatwg-mimetype": "^3.0.0" - }, - "engines": { - "node": ">=18.20.1" - } - }, - "../../node_modules/@stoplight/prism-http-server": { - "version": "5.10.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@stoplight/prism-core": "^5.8.0", - "@stoplight/prism-http": "^5.10.0", - "@stoplight/types": "^14.1.0", - "fast-xml-parser": "^4.2.0", - "fp-ts": "^2.11.5", - "io-ts": "^2.2.16", - "lodash": "^4.17.21", - "micri": "^4.3.0", - "node-fetch": "^2.6.5", - "parse-prefer-header": "1.0.0", - "tslib": "^2.3.1", - "type-is": "^1.6.18" - }, - "engines": { - "node": ">=18.20.1" - } - }, - "../../node_modules/@stoplight/prism-http/node_modules/ajv": { - "version": "8.17.1", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.3", - "fast-uri": "^3.0.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "../../node_modules/@stoplight/prism-http/node_modules/json-schema-traverse": { - "version": "1.0.0", - "dev": true, - "license": "MIT" - }, - "../../node_modules/@stoplight/types": { - "version": "14.1.1", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@types/json-schema": "^7.0.4", - "utility-types": "^3.10.0" - }, - "engines": { - "node": "^12.20 || >=14.13" - } - }, - "../../node_modules/@stoplight/yaml": { - "version": "4.3.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@stoplight/ordered-object-literal": "^1.0.5", - "@stoplight/types": "^14.1.1", - "@stoplight/yaml-ast-parser": "0.0.50", - "tslib": "^2.2.0" - }, - "engines": { - "node": ">=10.8" - } - }, - "../../node_modules/@stoplight/yaml-ast-parser": { - "version": "0.0.50", - "dev": true, - "license": "Apache-2.0" - }, - "../../node_modules/@tootallnate/once": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 10" - } - }, - "../../node_modules/@tsconfig/node10": { - "version": "1.0.11", - "dev": true, - "license": "MIT" - }, - "../../node_modules/@tsconfig/node12": { - "version": "1.0.11", - "dev": true, - "license": "MIT" - }, - "../../node_modules/@tsconfig/node14": { - "version": "1.0.3", - "dev": true, - "license": "MIT" - }, - "../../node_modules/@tsconfig/node16": { - "version": "1.0.4", - "dev": true, - "license": "MIT" - }, - "../../node_modules/@types/babel__core": { - "version": "7.20.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/parser": "^7.20.7", - "@babel/types": "^7.20.7", - "@types/babel__generator": "*", - "@types/babel__template": "*", - "@types/babel__traverse": "*" - } - }, - "../../node_modules/@types/babel__generator": { - "version": "7.6.8", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.0.0" - } - }, - "../../node_modules/@types/babel__template": { - "version": "7.4.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0" - } - }, - "../../node_modules/@types/babel__traverse": { - "version": "7.20.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.20.7" - } - }, - "../../node_modules/@types/eslint": { - "version": "9.6.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/estree": "*", - "@types/json-schema": "*" - } - }, - "../../node_modules/@types/eslint__js": { - "version": "8.42.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/eslint": "*" - } - }, - "../../node_modules/@types/estree": { - "version": "1.0.5", - "dev": true, - "license": "MIT" - }, - "../../node_modules/@types/fined": { - "version": "1.1.5", - "dev": true, - "license": "MIT" - }, - "../../node_modules/@types/graceful-fs": { - "version": "4.1.9", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "../../node_modules/@types/inquirer": { - "version": "9.0.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/through": "*", - "rxjs": "^7.2.0" - } - }, - "../../node_modules/@types/istanbul-lib-coverage": { - "version": "2.0.6", - "dev": true, - "license": "MIT" - }, - "../../node_modules/@types/istanbul-lib-report": { - "version": "3.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/istanbul-lib-coverage": "*" - } - }, - "../../node_modules/@types/istanbul-reports": { - "version": "3.0.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/istanbul-lib-report": "*" - } - }, - "../../node_modules/@types/jest": { - "version": "29.5.13", - "dev": true, - "license": "MIT", - "dependencies": { - "expect": "^29.0.0", - "pretty-format": "^29.0.0" - } - }, - "../../node_modules/@types/json-schema": { - "version": "7.0.15", - "dev": true, - "license": "MIT" - }, - "../../node_modules/@types/liftoff": { - "version": "4.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/fined": "*", - "@types/node": "*" - } - }, - "../../node_modules/@types/node": { - "version": "22.7.3", - "dev": true, - "license": "MIT", - "dependencies": { - "undici-types": "~6.19.2" - } - }, - "../../node_modules/@types/qs": { - "version": "6.9.15", - "dev": true, - "license": "MIT" - }, - "../../node_modules/@types/stack-utils": { - "version": "2.0.3", - "dev": true, - "license": "MIT" - }, - "../../node_modules/@types/swagger-schema-official": { - "version": "2.0.25", - "dev": true, - "license": "MIT" - }, - "../../node_modules/@types/through": { - "version": "0.0.33", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "../../node_modules/@types/type-is": { - "version": "1.6.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "../../node_modules/@types/yargs": { - "version": "17.0.33", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/yargs-parser": "*" - } - }, - "../../node_modules/@types/yargs-parser": { - "version": "21.0.3", - "dev": true, - "license": "MIT" - }, - "../../node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.5.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.5.0", - "@typescript-eslint/type-utils": "8.5.0", - "@typescript-eslint/utils": "8.5.0", - "@typescript-eslint/visitor-keys": "8.5.0", - "graphemer": "^1.4.0", - "ignore": "^5.3.1", - "natural-compare": "^1.4.0", - "ts-api-utils": "^1.3.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "@typescript-eslint/parser": "^8.0.0 || ^8.0.0-alpha.0", - "eslint": "^8.57.0 || ^9.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "../../node_modules/@typescript-eslint/parser": { - "version": "8.5.0", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@typescript-eslint/scope-manager": "8.5.0", - "@typescript-eslint/types": "8.5.0", - "@typescript-eslint/typescript-estree": "8.5.0", - "@typescript-eslint/visitor-keys": "8.5.0", - "debug": "^4.3.4" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "../../node_modules/@typescript-eslint/scope-manager": { - "version": "8.5.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.5.0", - "@typescript-eslint/visitor-keys": "8.5.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "../../node_modules/@typescript-eslint/type-utils": { - "version": "8.5.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/typescript-estree": "8.5.0", - "@typescript-eslint/utils": "8.5.0", - "debug": "^4.3.4", - "ts-api-utils": "^1.3.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "../../node_modules/@typescript-eslint/types": { - "version": "8.5.0", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "../../node_modules/@typescript-eslint/typescript-estree": { - "version": "8.5.0", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@typescript-eslint/types": "8.5.0", - "@typescript-eslint/visitor-keys": "8.5.0", - "debug": "^4.3.4", - "fast-glob": "^3.3.2", - "is-glob": "^4.0.3", - "minimatch": "^9.0.4", - "semver": "^7.6.0", - "ts-api-utils": "^1.3.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "../../node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "../../node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { - "version": "9.0.5", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../../node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { - "version": "7.6.3", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "../../node_modules/@typescript-eslint/utils": { - "version": "8.5.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.5.0", - "@typescript-eslint/types": "8.5.0", - "@typescript-eslint/typescript-estree": "8.5.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0" - } - }, - "../../node_modules/@typescript-eslint/visitor-keys": { - "version": "8.5.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.5.0", - "eslint-visitor-keys": "^3.4.3" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "../../node_modules/@ungap/structured-clone": { - "version": "1.2.0", - "dev": true, - "license": "ISC" - }, - "../../node_modules/abstract-logging": { - "version": "2.0.1", - "dev": true, - "license": "MIT" - }, - "../../node_modules/accepts": { - "version": "1.3.8", - "dev": true, - "license": "MIT", - "dependencies": { - "mime-types": "~2.1.34", - "negotiator": "0.6.3" - }, - "engines": { - "node": ">= 0.6" - } - }, - "../../node_modules/acorn": { - "version": "8.12.1", - "dev": true, - "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "../../node_modules/acorn-jsx": { - "version": "5.3.2", - "dev": true, - "license": "MIT", - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "../../node_modules/acorn-walk": { - "version": "8.3.4", - "dev": true, - "license": "MIT", - "dependencies": { - "acorn": "^8.11.0" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "../../node_modules/agent-base": { - "version": "6.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "4" - }, - "engines": { - "node": ">= 6.0.0" - } - }, - "../../node_modules/aggregate-error": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "clean-stack": "^2.0.0", - "indent-string": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/ajv": { - "version": "6.12.6", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "../../node_modules/ajv-formats": { - "version": "2.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "ajv": "^8.0.0" - }, - "peerDependencies": { - "ajv": "^8.0.0" - }, - "peerDependenciesMeta": { - "ajv": { - "optional": true - } - } - }, - "../../node_modules/ajv-formats/node_modules/ajv": { - "version": "8.17.1", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.3", - "fast-uri": "^3.0.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "../../node_modules/ajv-formats/node_modules/json-schema-traverse": { - "version": "1.0.0", - "dev": true, - "license": "MIT" - }, - "../../node_modules/ansi-escapes": { - "version": "4.3.2", - "dev": true, - "license": "MIT", - "dependencies": { - "type-fest": "^0.21.3" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/ansi-escapes/node_modules/type-fest": { - "version": "0.21.3", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/ansi-regex": { - "version": "5.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "../../node_modules/anymatch": { - "version": "3.1.3", - "dev": true, - "license": "ISC", - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "../../node_modules/append-transform": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "default-require-extensions": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/archy": { - "version": "1.0.0", - "dev": true, - "license": "MIT" - }, - "../../node_modules/arg": { - "version": "4.1.3", - "dev": true, - "license": "MIT" - }, - "../../node_modules/argparse": { - "version": "1.0.10", - "dev": true, - "license": "MIT", - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "../../node_modules/array-each": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/array-slice": { - "version": "1.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/async": { - "version": "3.2.6", - "dev": true, - "license": "MIT" - }, - "../../node_modules/atomic-sleep": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.0.0" - } - }, - "../../node_modules/babel-jest": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/transform": "^29.7.0", - "@types/babel__core": "^7.1.14", - "babel-plugin-istanbul": "^6.1.1", - "babel-preset-jest": "^29.6.3", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "slash": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "@babel/core": "^7.8.0" - } - }, - "../../node_modules/babel-plugin-istanbul": { - "version": "6.1.1", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@babel/helper-plugin-utils": "^7.0.0", - "@istanbuljs/load-nyc-config": "^1.0.0", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-instrument": "^5.0.4", - "test-exclude": "^6.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/babel-plugin-istanbul/node_modules/istanbul-lib-instrument": { - "version": "5.2.1", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@babel/core": "^7.12.3", - "@babel/parser": "^7.14.7", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-coverage": "^3.2.0", - "semver": "^6.3.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/babel-plugin-jest-hoist": { - "version": "29.6.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/template": "^7.3.3", - "@babel/types": "^7.3.3", - "@types/babel__core": "^7.1.14", - "@types/babel__traverse": "^7.0.6" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/babel-preset-current-node-syntax": { - "version": "1.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/plugin-syntax-async-generators": "^7.8.4", - "@babel/plugin-syntax-bigint": "^7.8.3", - "@babel/plugin-syntax-class-properties": "^7.12.13", - "@babel/plugin-syntax-class-static-block": "^7.14.5", - "@babel/plugin-syntax-import-attributes": "^7.24.7", - "@babel/plugin-syntax-import-meta": "^7.10.4", - "@babel/plugin-syntax-json-strings": "^7.8.3", - "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", - "@babel/plugin-syntax-numeric-separator": "^7.10.4", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", - "@babel/plugin-syntax-optional-chaining": "^7.8.3", - "@babel/plugin-syntax-private-property-in-object": "^7.14.5", - "@babel/plugin-syntax-top-level-await": "^7.14.5" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "../../node_modules/babel-preset-jest": { - "version": "29.6.3", - "dev": true, - "license": "MIT", - "dependencies": { - "babel-plugin-jest-hoist": "^29.6.3", - "babel-preset-current-node-syntax": "^1.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "../../node_modules/balanced-match": { - "version": "1.0.2", - "dev": true, - "license": "MIT" - }, - "../../node_modules/base64-js": { - "version": "1.5.1", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "../../node_modules/binary-extensions": { - "version": "2.3.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/bl": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - } - }, - "../../node_modules/bluebird": { - "version": "3.7.2", - "dev": true, - "license": "MIT" - }, - "../../node_modules/brace-expansion": { - "version": "1.1.11", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "../../node_modules/braces": { - "version": "3.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "fill-range": "^7.1.1" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/browserslist": { - "version": "4.23.3", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "caniuse-lite": "^1.0.30001646", - "electron-to-chromium": "^1.5.4", - "node-releases": "^2.0.18", - "update-browserslist-db": "^1.1.0" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - } - }, - "../../node_modules/bs-logger": { - "version": "0.2.6", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-json-stable-stringify": "2.x" - }, - "engines": { - "node": ">= 6" - } - }, - "../../node_modules/bser": { - "version": "2.1.1", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "node-int64": "^0.4.0" - } - }, - "../../node_modules/buffer": { - "version": "5.7.1", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, - "../../node_modules/buffer-from": { - "version": "1.1.2", - "dev": true, - "license": "MIT" - }, - "../../node_modules/caching-transform": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "hasha": "^5.0.0", - "make-dir": "^3.0.0", - "package-hash": "^4.0.0", - "write-file-atomic": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/call-bind": { - "version": "1.0.7", - "dev": true, - "license": "MIT", - "dependencies": { - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "set-function-length": "^1.2.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../../node_modules/call-me-maybe": { - "version": "1.0.2", - "dev": true, - "license": "MIT" - }, - "../../node_modules/callsites": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../../node_modules/camel-case": { - "version": "4.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "pascal-case": "^3.1.2", - "tslib": "^2.0.3" - } - }, - "../../node_modules/camelcase": { - "version": "5.3.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../../node_modules/caniuse-lite": { - "version": "1.0.30001653", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "CC-BY-4.0" - }, - "../../node_modules/capital-case": { - "version": "1.0.4", - "dev": true, - "license": "MIT", - "dependencies": { - "no-case": "^3.0.4", - "tslib": "^2.0.3", - "upper-case-first": "^2.0.2" - } - }, - "../../node_modules/caseless": { - "version": "0.12.0", - "dev": true, - "license": "Apache-2.0" - }, - "../../node_modules/chalk": { - "version": "4.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "../../node_modules/change-case": { - "version": "4.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "camel-case": "^4.1.2", - "capital-case": "^1.0.4", - "constant-case": "^3.0.4", - "dot-case": "^3.0.4", - "header-case": "^2.0.4", - "no-case": "^3.0.4", - "param-case": "^3.0.4", - "pascal-case": "^3.1.2", - "path-case": "^3.0.4", - "sentence-case": "^3.0.4", - "snake-case": "^3.0.4", - "tslib": "^2.0.3" - } - }, - "../../node_modules/char-regex": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - } - }, - "../../node_modules/chardet": { - "version": "0.7.0", - "dev": true, - "license": "MIT" - }, - "../../node_modules/charset": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4.0.0" - } - }, - "../../node_modules/chokidar": { - "version": "3.6.0", - "dev": true, - "license": "MIT", - "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "../../node_modules/chokidar/node_modules/glob-parent": { - "version": "5.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "../../node_modules/ci-info": { - "version": "3.9.0", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/sibiraj-s" - } - ], - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../node_modules/cjs-module-lexer": { - "version": "1.4.1", - "dev": true, - "license": "MIT" - }, - "../../node_modules/clean-stack": { - "version": "2.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../../node_modules/cli-cursor": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "restore-cursor": "^5.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/cli-spinners": { - "version": "2.9.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/cli-width": { - "version": "4.1.0", - "dev": true, - "license": "ISC", - "engines": { - "node": ">= 12" - } - }, - "../../node_modules/cliui": { - "version": "7.0.4", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "../../node_modules/clone": { - "version": "1.0.4", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8" - } - }, - "../../node_modules/co": { - "version": "4.6.0", - "dev": true, - "license": "MIT", - "engines": { - "iojs": ">= 1.0.0", - "node": ">= 0.12.0" - } - }, - "../../node_modules/collect-v8-coverage": { - "version": "1.0.2", - "dev": true, - "license": "MIT" - }, - "../../node_modules/color-convert": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "../../node_modules/color-name": { - "version": "1.1.4", - "dev": true, - "license": "MIT" - }, - "../../node_modules/commondir": { - "version": "1.0.1", - "dev": true, - "license": "MIT" - }, - "../../node_modules/compute-gcd": { - "version": "1.2.1", - "dev": true, - "dependencies": { - "validate.io-array": "^1.0.3", - "validate.io-function": "^1.0.2", - "validate.io-integer-array": "^1.0.0" - } - }, - "../../node_modules/compute-lcm": { - "version": "1.1.2", - "dev": true, - "dependencies": { - "compute-gcd": "^1.2.1", - "validate.io-array": "^1.0.3", - "validate.io-function": "^1.0.2", - "validate.io-integer-array": "^1.0.0" - } - }, - "../../node_modules/concat-map": { - "version": "0.0.1", - "dev": true, - "license": "MIT" - }, - "../../node_modules/constant-case": { - "version": "3.0.4", - "dev": true, - "license": "MIT", - "dependencies": { - "no-case": "^3.0.4", - "tslib": "^2.0.3", - "upper-case": "^2.0.2" - } - }, - "../../node_modules/content-type": { - "version": "1.0.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../../node_modules/convert-source-map": { - "version": "1.9.0", - "dev": true, - "license": "MIT" - }, - "../../node_modules/create-jest": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^29.6.3", - "chalk": "^4.0.0", - "exit": "^0.1.2", - "graceful-fs": "^4.2.9", - "jest-config": "^29.7.0", - "jest-util": "^29.7.0", - "prompts": "^2.0.1" - }, - "bin": { - "create-jest": "bin/create-jest.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/create-require": { - "version": "1.1.1", - "dev": true, - "license": "MIT" - }, - "../../node_modules/cross-fetch": { - "version": "3.1.8", - "dev": true, - "license": "MIT", - "dependencies": { - "node-fetch": "^2.6.12" - } - }, - "../../node_modules/cross-spawn": { - "version": "7.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "../../node_modules/debug": { - "version": "4.3.6", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "../../node_modules/decamelize": { - "version": "1.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/dedent": { - "version": "1.5.3", - "dev": true, - "license": "MIT", - "peerDependencies": { - "babel-plugin-macros": "^3.1.0" - }, - "peerDependenciesMeta": { - "babel-plugin-macros": { - "optional": true - } - } - }, - "../../node_modules/deep-is": { - "version": "0.1.4", - "dev": true, - "license": "MIT" - }, - "../../node_modules/deepmerge": { - "version": "4.3.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/default-require-extensions": { - "version": "3.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "strip-bom": "^4.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/defaults": { - "version": "1.0.4", - "dev": true, - "license": "MIT", - "dependencies": { - "clone": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/define-data-property": { - "version": "1.1.4", - "dev": true, - "license": "MIT", - "dependencies": { - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "gopd": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../../node_modules/del": { - "version": "7.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "globby": "^13.1.2", - "graceful-fs": "^4.2.10", - "is-glob": "^4.0.3", - "is-path-cwd": "^3.0.0", - "is-path-inside": "^4.0.0", - "p-map": "^5.5.0", - "rimraf": "^3.0.2", - "slash": "^4.0.0" - }, - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/del/node_modules/aggregate-error": { - "version": "4.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "clean-stack": "^4.0.0", - "indent-string": "^5.0.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/del/node_modules/clean-stack": { - "version": "4.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "escape-string-regexp": "5.0.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/del/node_modules/escape-string-regexp": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/del/node_modules/indent-string": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/del/node_modules/is-path-inside": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/del/node_modules/p-map": { - "version": "5.5.0", - "dev": true, - "license": "MIT", - "dependencies": { - "aggregate-error": "^4.0.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/del/node_modules/slash": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/detect-file": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/detect-newline": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../node_modules/diff-sequences": { - "version": "29.6.3", - "dev": true, - "license": "MIT", - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/dir-glob": { - "version": "3.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/doctrine": { - "version": "3.0.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../../node_modules/dot-case": { - "version": "3.0.4", - "dev": true, - "license": "MIT", - "dependencies": { - "no-case": "^3.0.4", - "tslib": "^2.0.3" - } - }, - "../../node_modules/ejs": { - "version": "3.1.10", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "jake": "^10.8.5" - }, - "bin": { - "ejs": "bin/cli.js" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/electron-to-chromium": { - "version": "1.5.13", - "dev": true, - "license": "ISC" - }, - "../../node_modules/emittery": { - "version": "0.13.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sindresorhus/emittery?sponsor=1" - } - }, - "../../node_modules/emoji-regex": { - "version": "8.0.0", - "dev": true, - "license": "MIT" - }, - "../../node_modules/error-ex": { - "version": "1.3.2", - "dev": true, - "license": "MIT", - "dependencies": { - "is-arrayish": "^0.2.1" - } - }, - "../../node_modules/es-define-property": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "get-intrinsic": "^1.2.4" - }, - "engines": { - "node": ">= 0.4" - } - }, - "../../node_modules/es-errors": { - "version": "1.3.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "../../node_modules/es6-error": { - "version": "4.1.1", - "dev": true, - "license": "MIT" - }, - "../../node_modules/escalade": { - "version": "3.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../../node_modules/escape-string-regexp": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/eslint": { - "version": "8.57.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.57.0", - "@humanwhocodes/config-array": "^0.11.14", - "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "@ungap/structured-clone": "^1.2.0", - "ajv": "^6.12.4", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.3", - "espree": "^9.6.1", - "esquery": "^1.4.2", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", - "ignore": "^5.2.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", - "text-table": "^0.2.0" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "../../node_modules/eslint-config-prettier": { - "version": "9.1.0", - "dev": true, - "license": "MIT", - "bin": { - "eslint-config-prettier": "bin/cli.js" - }, - "peerDependencies": { - "eslint": ">=7.0.0" - } - }, - "../../node_modules/eslint-plugin-chai-friendly": { - "version": "0.7.4", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - }, - "peerDependencies": { - "eslint": ">=3.0.0" - } - }, - "../../node_modules/eslint-plugin-prettier": { - "version": "5.2.1", - "dev": true, - "license": "MIT", - "dependencies": { - "prettier-linter-helpers": "^1.0.0", - "synckit": "^0.9.1" - }, - "engines": { - "node": "^14.18.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint-plugin-prettier" - }, - "peerDependencies": { - "@types/eslint": ">=8.0.0", - "eslint": ">=8.0.0", - "eslint-config-prettier": "*", - "prettier": ">=3.0.0" - }, - "peerDependenciesMeta": { - "@types/eslint": { - "optional": true - }, - "eslint-config-prettier": { - "optional": true - } - } - }, - "../../node_modules/eslint-scope": { - "version": "7.2.2", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "../../node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "../../node_modules/eslint/node_modules/@eslint/js": { - "version": "8.57.0", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "../../node_modules/eslint/node_modules/argparse": { - "version": "2.0.1", - "dev": true, - "license": "Python-2.0" - }, - "../../node_modules/eslint/node_modules/js-yaml": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "../../node_modules/espree": { - "version": "9.6.1", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "acorn": "^8.9.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "../../node_modules/esprima": { - "version": "4.0.1", - "dev": true, - "license": "BSD-2-Clause", - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, - "../../node_modules/esquery": { - "version": "1.6.0", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "estraverse": "^5.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "../../node_modules/esrecurse": { - "version": "4.3.0", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "../../node_modules/estraverse": { - "version": "5.3.0", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "../../node_modules/esutils": { - "version": "2.0.3", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/execa": { - "version": "5.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "cross-spawn": "^7.0.3", - "get-stream": "^6.0.0", - "human-signals": "^2.1.0", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.1", - "onetime": "^5.1.2", - "signal-exit": "^3.0.3", - "strip-final-newline": "^2.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" - } - }, - "../../node_modules/exit": { - "version": "0.1.2", - "dev": true, - "engines": { - "node": ">= 0.8.0" - } - }, - "../../node_modules/expand-tilde": { - "version": "2.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "homedir-polyfill": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/expect": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/expect-utils": "^29.7.0", - "jest-get-type": "^29.6.3", - "jest-matcher-utils": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-util": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/extend": { - "version": "3.0.2", - "dev": true, - "license": "MIT" - }, - "../../node_modules/external-editor": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "chardet": "^0.7.0", - "iconv-lite": "^0.4.24", - "tmp": "^0.0.33" - }, - "engines": { - "node": ">=4" - } - }, - "../../node_modules/external-editor/node_modules/iconv-lite": { - "version": "0.4.24", - "dev": true, - "license": "MIT", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/fast-deep-equal": { - "version": "3.1.3", - "dev": true, - "license": "MIT" - }, - "../../node_modules/fast-diff": { - "version": "1.3.0", - "dev": true, - "license": "Apache-2.0" - }, - "../../node_modules/fast-glob": { - "version": "3.3.2", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "../../node_modules/fast-glob/node_modules/glob-parent": { - "version": "5.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "../../node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "dev": true, - "license": "MIT" - }, - "../../node_modules/fast-levenshtein": { - "version": "2.0.6", - "dev": true, - "license": "MIT" - }, - "../../node_modules/fast-redact": { - "version": "3.5.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../../node_modules/fast-safe-stringify": { - "version": "2.1.1", - "dev": true, - "license": "MIT" - }, - "../../node_modules/fast-uri": { - "version": "3.0.1", - "dev": true, - "license": "MIT" - }, - "../../node_modules/fast-xml-parser": { - "version": "4.5.0", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/NaturalIntelligence" - }, - { - "type": "paypal", - "url": "https://paypal.me/naturalintelligence" - } - ], - "license": "MIT", - "dependencies": { - "strnum": "^1.0.5" - }, - "bin": { - "fxparser": "src/cli/cli.js" - } - }, - "../../node_modules/fastestsmallesttextencoderdecoder": { - "version": "1.0.22", - "dev": true, - "license": "CC0-1.0" - }, - "../../node_modules/fastq": { - "version": "1.17.1", - "dev": true, - "license": "ISC", - "dependencies": { - "reusify": "^1.0.4" - } - }, - "../../node_modules/fb-watchman": { - "version": "2.0.2", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "bser": "2.1.1" - } - }, - "../../node_modules/figures": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "escape-string-regexp": "^1.0.5" - }, - "engines": { - "node": ">=4" - } - }, - "../../node_modules/figures/node_modules/escape-string-regexp": { - "version": "1.0.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.0" - } - }, - "../../node_modules/file-entry-cache": { - "version": "6.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "flat-cache": "^3.0.4" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "../../node_modules/file-type": { - "version": "3.9.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/filelist": { - "version": "1.0.4", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "minimatch": "^5.0.1" - } - }, - "../../node_modules/filelist/node_modules/brace-expansion": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "../../node_modules/filelist/node_modules/minimatch": { - "version": "5.1.6", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } - }, - "../../node_modules/fill-range": { - "version": "7.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/find-cache-dir": { - "version": "3.3.2", - "dev": true, - "license": "MIT", - "dependencies": { - "commondir": "^1.0.1", - "make-dir": "^3.0.2", - "pkg-dir": "^4.1.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/avajs/find-cache-dir?sponsor=1" - } - }, - "../../node_modules/find-up": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/findup-sync": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "detect-file": "^1.0.0", - "is-glob": "^4.0.3", - "micromatch": "^4.0.4", - "resolve-dir": "^1.0.1" - }, - "engines": { - "node": ">= 10.13.0" - } - }, - "../../node_modules/fined": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "expand-tilde": "^2.0.2", - "is-plain-object": "^5.0.0", - "object.defaults": "^1.1.0", - "object.pick": "^1.3.0", - "parse-filepath": "^1.0.2" - }, - "engines": { - "node": ">= 10.13.0" - } - }, - "../../node_modules/flagged-respawn": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 10.13.0" - } - }, - "../../node_modules/flat-cache": { - "version": "3.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "flatted": "^3.2.9", - "keyv": "^4.5.3", - "rimraf": "^3.0.2" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "../../node_modules/flatstr": { - "version": "1.0.12", - "dev": true, - "license": "MIT" - }, - "../../node_modules/flatted": { - "version": "3.3.1", - "dev": true, - "license": "ISC" - }, - "../../node_modules/fnv-plus": { - "version": "1.3.1", - "dev": true, - "license": "MIT" - }, - "../../node_modules/for-in": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/for-own": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "for-in": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/foreach": { - "version": "2.0.6", - "dev": true, - "license": "MIT" - }, - "../../node_modules/foreground-child": { - "version": "2.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "cross-spawn": "^7.0.0", - "signal-exit": "^3.0.2" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "../../node_modules/format-util": { - "version": "1.0.5", - "dev": true, - "license": "MIT" - }, - "../../node_modules/fp-ts": { - "version": "2.16.9", - "dev": true, - "license": "MIT" - }, - "../../node_modules/fromentries": { - "version": "1.3.2", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "../../node_modules/fs.realpath": { - "version": "1.0.0", - "dev": true, - "license": "ISC" - }, - "../../node_modules/fsevents": { - "version": "2.3.3", - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "../../node_modules/function-bind": { - "version": "1.1.2", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../../node_modules/gensync": { - "version": "1.0.0-beta.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../../node_modules/get-caller-file": { - "version": "2.0.5", - "dev": true, - "license": "ISC", - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "../../node_modules/get-east-asian-width": { - "version": "1.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/get-intrinsic": { - "version": "1.2.4", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3", - "hasown": "^2.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../../node_modules/get-package-type": { - "version": "0.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.0.0" - } - }, - "../../node_modules/get-stream": { - "version": "6.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/glob-parent": { - "version": "6.0.2", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "../../node_modules/global-modules": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "global-prefix": "^1.0.1", - "is-windows": "^1.0.1", - "resolve-dir": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/global-prefix": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "expand-tilde": "^2.0.2", - "homedir-polyfill": "^1.0.1", - "ini": "^1.3.4", - "is-windows": "^1.0.1", - "which": "^1.2.14" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/global-prefix/node_modules/which": { - "version": "1.3.1", - "dev": true, - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "which": "bin/which" - } - }, - "../../node_modules/globals": { - "version": "13.24.0", - "dev": true, - "license": "MIT", - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/globby": { - "version": "13.2.2", - "dev": true, - "license": "MIT", - "dependencies": { - "dir-glob": "^3.0.1", - "fast-glob": "^3.3.0", - "ignore": "^5.2.4", - "merge2": "^1.4.1", - "slash": "^4.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/globby/node_modules/slash": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/gopd": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "get-intrinsic": "^1.1.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../../node_modules/graceful-fs": { - "version": "4.2.11", - "dev": true, - "license": "ISC" - }, - "../../node_modules/graphemer": { - "version": "1.4.0", - "dev": true, - "license": "MIT" - }, - "../../node_modules/handlebars": { - "version": "4.7.8", - "dev": true, - "license": "MIT", - "dependencies": { - "minimist": "^1.2.5", - "neo-async": "^2.6.2", - "source-map": "^0.6.1", - "wordwrap": "^1.0.0" - }, - "bin": { - "handlebars": "bin/handlebars" - }, - "engines": { - "node": ">=0.4.7" - }, - "optionalDependencies": { - "uglify-js": "^3.1.4" - } - }, - "../../node_modules/handler-agent": { - "version": "0.2.0", - "dev": true, - "license": "MIT" - }, - "../../node_modules/has-flag": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../node_modules/has-property-descriptors": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "es-define-property": "^1.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../../node_modules/has-proto": { - "version": "1.0.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../../node_modules/has-symbols": { - "version": "1.0.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../../node_modules/hasha": { - "version": "5.2.2", - "dev": true, - "license": "MIT", - "dependencies": { - "is-stream": "^2.0.0", - "type-fest": "^0.8.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/hasha/node_modules/type-fest": { - "version": "0.8.1", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=8" - } - }, - "../../node_modules/hasown": { - "version": "2.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "../../node_modules/header-case": { - "version": "2.0.4", - "dev": true, - "license": "MIT", - "dependencies": { - "capital-case": "^1.0.4", - "tslib": "^2.0.3" - } - }, - "../../node_modules/homedir-polyfill": { - "version": "1.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "parse-passwd": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/html-escaper": { - "version": "2.0.2", - "dev": true, - "license": "MIT" - }, - "../../node_modules/http-proxy-agent": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@tootallnate/once": "2", - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" - } - }, - "../../node_modules/http-reasons": { - "version": "0.1.0", - "dev": true, - "license": "Apache-2.0" - }, - "../../node_modules/https-proxy-agent": { - "version": "5.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" - } - }, - "../../node_modules/human-signals": { - "version": "2.1.0", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=10.17.0" - } - }, - "../../node_modules/iconv-lite": { - "version": "0.6.3", - "dev": true, - "license": "MIT", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/ieee754": { - "version": "1.2.1", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "BSD-3-Clause" - }, - "../../node_modules/ignore": { - "version": "5.3.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "../../node_modules/import-fresh": { - "version": "3.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/import-local": { - "version": "3.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "pkg-dir": "^4.2.0", - "resolve-cwd": "^3.0.0" - }, - "bin": { - "import-local-fixture": "fixtures/cli.js" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/imurmurhash": { - "version": "0.1.4", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.19" - } - }, - "../../node_modules/indent-string": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../node_modules/inflight": { - "version": "1.0.6", - "dev": true, - "license": "ISC", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "../../node_modules/inherits": { - "version": "2.0.4", - "dev": true, - "license": "ISC" - }, - "../../node_modules/ini": { - "version": "1.3.8", - "dev": true, - "license": "ISC" - }, - "../../node_modules/inquirer": { - "version": "9.3.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@inquirer/figures": "^1.0.3", - "ansi-escapes": "^4.3.2", - "cli-width": "^4.1.0", - "external-editor": "^3.1.0", - "mute-stream": "1.0.0", - "ora": "^5.4.1", - "run-async": "^3.0.0", - "rxjs": "^7.8.1", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^6.2.0", - "yoctocolors-cjs": "^2.1.2" - }, - "engines": { - "node": ">=18" - } - }, - "../../node_modules/inquirer/node_modules/cli-cursor": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "restore-cursor": "^3.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/inquirer/node_modules/is-interactive": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../node_modules/inquirer/node_modules/is-unicode-supported": { - "version": "0.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/inquirer/node_modules/log-symbols": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/inquirer/node_modules/ora": { - "version": "5.4.1", - "dev": true, - "license": "MIT", - "dependencies": { - "bl": "^4.1.0", - "chalk": "^4.1.0", - "cli-cursor": "^3.1.0", - "cli-spinners": "^2.5.0", - "is-interactive": "^1.0.0", - "is-unicode-supported": "^0.1.0", - "log-symbols": "^4.1.0", - "strip-ansi": "^6.0.0", - "wcwidth": "^1.0.1" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/inquirer/node_modules/restore-cursor": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "onetime": "^5.1.0", - "signal-exit": "^3.0.2" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/inquirer/node_modules/wrap-ansi": { - "version": "6.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/interpret": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10.13.0" - } - }, - "../../node_modules/io-ts": { - "version": "2.2.21", - "dev": true, - "license": "MIT", - "peerDependencies": { - "fp-ts": "^2.5.0" - } - }, - "../../node_modules/is-absolute": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "is-relative": "^1.0.0", - "is-windows": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/is-arrayish": { - "version": "0.2.1", - "dev": true, - "license": "MIT" - }, - "../../node_modules/is-binary-path": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/is-core-module": { - "version": "2.15.1", - "dev": true, - "license": "MIT", - "dependencies": { - "hasown": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../../node_modules/is-extglob": { - "version": "2.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../node_modules/is-generator-fn": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../../node_modules/is-glob": { - "version": "4.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/is-interactive": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/is-number": { - "version": "7.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, - "../../node_modules/is-path-cwd": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/is-path-inside": { - "version": "3.0.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../node_modules/is-plain-object": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/is-relative": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "is-unc-path": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/is-stream": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/is-typedarray": { - "version": "1.0.0", - "dev": true, - "license": "MIT" - }, - "../../node_modules/is-unc-path": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "unc-path-regex": "^0.1.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/is-unicode-supported": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/is-windows": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/isbinaryfile": { - "version": "5.0.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 18.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/gjtorikian/" - } - }, - "../../node_modules/isexe": { - "version": "2.0.0", - "dev": true, - "license": "ISC" - }, - "../../node_modules/isobject": { - "version": "3.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/isomorphic-fetch": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "node-fetch": "^2.6.1", - "whatwg-fetch": "^3.4.1" - } - }, - "../../node_modules/istanbul-lib-coverage": { - "version": "3.2.2", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=8" - } - }, - "../../node_modules/istanbul-lib-hook": { - "version": "3.0.0", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "append-transform": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/istanbul-lib-instrument": { - "version": "4.0.3", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@babel/core": "^7.7.5", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-coverage": "^3.0.0", - "semver": "^6.3.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/istanbul-lib-processinfo": { - "version": "2.0.3", - "dev": true, - "license": "ISC", - "dependencies": { - "archy": "^1.0.0", - "cross-spawn": "^7.0.3", - "istanbul-lib-coverage": "^3.2.0", - "p-map": "^3.0.0", - "rimraf": "^3.0.0", - "uuid": "^8.3.2" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/istanbul-lib-processinfo/node_modules/uuid": { - "version": "8.3.2", - "dev": true, - "license": "MIT", - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "../../node_modules/istanbul-lib-report": { - "version": "3.0.1", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^4.0.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - } - }, - "../../node_modules/istanbul-lib-report/node_modules/make-dir": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "semver": "^7.5.3" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/istanbul-lib-report/node_modules/semver": { - "version": "7.6.3", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "../../node_modules/istanbul-lib-source-maps": { - "version": "4.0.1", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "debug": "^4.1.1", - "istanbul-lib-coverage": "^3.0.0", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=10" - } - }, - "../../node_modules/istanbul-reports": { - "version": "3.1.7", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "html-escaper": "^2.0.0", - "istanbul-lib-report": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/jake": { - "version": "10.9.2", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "async": "^3.2.3", - "chalk": "^4.0.2", - "filelist": "^1.0.4", - "minimatch": "^3.1.2" - }, - "bin": { - "jake": "bin/cli.js" - }, - "engines": { - "node": ">=10" - } - }, - "../../node_modules/jest": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/core": "^29.7.0", - "@jest/types": "^29.6.3", - "import-local": "^3.0.2", - "jest-cli": "^29.7.0" - }, - "bin": { - "jest": "bin/jest.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "../../node_modules/jest-changed-files": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "execa": "^5.0.0", - "jest-util": "^29.7.0", - "p-limit": "^3.1.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/jest-circus": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/environment": "^29.7.0", - "@jest/expect": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "co": "^4.6.0", - "dedent": "^1.0.0", - "is-generator-fn": "^2.0.0", - "jest-each": "^29.7.0", - "jest-matcher-utils": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-runtime": "^29.7.0", - "jest-snapshot": "^29.7.0", - "jest-util": "^29.7.0", - "p-limit": "^3.1.0", - "pretty-format": "^29.7.0", - "pure-rand": "^6.0.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/jest-cli": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/core": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/types": "^29.6.3", - "chalk": "^4.0.0", - "create-jest": "^29.7.0", - "exit": "^0.1.2", - "import-local": "^3.0.2", - "jest-config": "^29.7.0", - "jest-util": "^29.7.0", - "jest-validate": "^29.7.0", - "yargs": "^17.3.1" - }, - "bin": { - "jest": "bin/jest.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "../../node_modules/jest-cli/node_modules/cliui": { - "version": "8.0.1", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "../../node_modules/jest-cli/node_modules/yargs": { - "version": "17.7.2", - "dev": true, - "license": "MIT", - "dependencies": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - }, - "engines": { - "node": ">=12" - } - }, - "../../node_modules/jest-cli/node_modules/yargs-parser": { - "version": "21.1.1", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=12" - } - }, - "../../node_modules/jest-config": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/core": "^7.11.6", - "@jest/test-sequencer": "^29.7.0", - "@jest/types": "^29.6.3", - "babel-jest": "^29.7.0", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "deepmerge": "^4.2.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-circus": "^29.7.0", - "jest-environment-node": "^29.7.0", - "jest-get-type": "^29.6.3", - "jest-regex-util": "^29.6.3", - "jest-resolve": "^29.7.0", - "jest-runner": "^29.7.0", - "jest-util": "^29.7.0", - "jest-validate": "^29.7.0", - "micromatch": "^4.0.4", - "parse-json": "^5.2.0", - "pretty-format": "^29.7.0", - "slash": "^3.0.0", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "@types/node": "*", - "ts-node": ">=9.0.0" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - }, - "ts-node": { - "optional": true - } - } - }, - "../../node_modules/jest-config/node_modules/glob": { - "version": "7.2.3", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../../node_modules/jest-diff": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.0.0", - "diff-sequences": "^29.6.3", - "jest-get-type": "^29.6.3", - "pretty-format": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/jest-docblock": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "detect-newline": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/jest-each": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^29.6.3", - "chalk": "^4.0.0", - "jest-get-type": "^29.6.3", - "jest-util": "^29.7.0", - "pretty-format": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/jest-environment-node": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/environment": "^29.7.0", - "@jest/fake-timers": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "jest-mock": "^29.7.0", - "jest-util": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/jest-get-type": { - "version": "29.6.3", - "dev": true, - "license": "MIT", - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/jest-haste-map": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^29.6.3", - "@types/graceful-fs": "^4.1.3", - "@types/node": "*", - "anymatch": "^3.0.3", - "fb-watchman": "^2.0.0", - "graceful-fs": "^4.2.9", - "jest-regex-util": "^29.6.3", - "jest-util": "^29.7.0", - "jest-worker": "^29.7.0", - "micromatch": "^4.0.4", - "walker": "^1.0.8" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "optionalDependencies": { - "fsevents": "^2.3.2" - } - }, - "../../node_modules/jest-leak-detector": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "jest-get-type": "^29.6.3", - "pretty-format": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/jest-matcher-utils": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.0.0", - "jest-diff": "^29.7.0", - "jest-get-type": "^29.6.3", - "pretty-format": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/jest-message-util": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^29.6.3", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "micromatch": "^4.0.4", - "pretty-format": "^29.7.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/jest-mock": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^29.6.3", - "@types/node": "*", - "jest-util": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/jest-pnp-resolver": { - "version": "1.2.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - }, - "peerDependencies": { - "jest-resolve": "*" - }, - "peerDependenciesMeta": { - "jest-resolve": { - "optional": true - } - } - }, - "../../node_modules/jest-regex-util": { - "version": "29.6.3", - "dev": true, - "license": "MIT", - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/jest-resolve": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.7.0", - "jest-pnp-resolver": "^1.2.2", - "jest-util": "^29.7.0", - "jest-validate": "^29.7.0", - "resolve": "^1.20.0", - "resolve.exports": "^2.0.0", - "slash": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/jest-resolve-dependencies": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "jest-regex-util": "^29.6.3", - "jest-snapshot": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/jest-runner": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/console": "^29.7.0", - "@jest/environment": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "emittery": "^0.13.1", - "graceful-fs": "^4.2.9", - "jest-docblock": "^29.7.0", - "jest-environment-node": "^29.7.0", - "jest-haste-map": "^29.7.0", - "jest-leak-detector": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-resolve": "^29.7.0", - "jest-runtime": "^29.7.0", - "jest-util": "^29.7.0", - "jest-watcher": "^29.7.0", - "jest-worker": "^29.7.0", - "p-limit": "^3.1.0", - "source-map-support": "0.5.13" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/jest-runtime": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/environment": "^29.7.0", - "@jest/fake-timers": "^29.7.0", - "@jest/globals": "^29.7.0", - "@jest/source-map": "^29.6.3", - "@jest/test-result": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "cjs-module-lexer": "^1.0.0", - "collect-v8-coverage": "^1.0.0", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-mock": "^29.7.0", - "jest-regex-util": "^29.6.3", - "jest-resolve": "^29.7.0", - "jest-snapshot": "^29.7.0", - "jest-util": "^29.7.0", - "slash": "^3.0.0", - "strip-bom": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/jest-runtime/node_modules/glob": { - "version": "7.2.3", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../../node_modules/jest-snapshot": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/core": "^7.11.6", - "@babel/generator": "^7.7.2", - "@babel/plugin-syntax-jsx": "^7.7.2", - "@babel/plugin-syntax-typescript": "^7.7.2", - "@babel/types": "^7.3.3", - "@jest/expect-utils": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", - "babel-preset-current-node-syntax": "^1.0.0", - "chalk": "^4.0.0", - "expect": "^29.7.0", - "graceful-fs": "^4.2.9", - "jest-diff": "^29.7.0", - "jest-get-type": "^29.6.3", - "jest-matcher-utils": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-util": "^29.7.0", - "natural-compare": "^1.4.0", - "pretty-format": "^29.7.0", - "semver": "^7.5.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/jest-snapshot/node_modules/semver": { - "version": "7.6.3", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "../../node_modules/jest-util": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/jest-validate": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^29.6.3", - "camelcase": "^6.2.0", - "chalk": "^4.0.0", - "jest-get-type": "^29.6.3", - "leven": "^3.1.0", - "pretty-format": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/jest-validate/node_modules/camelcase": { - "version": "6.3.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/jest-watcher": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/test-result": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "emittery": "^0.13.1", - "jest-util": "^29.7.0", - "string-length": "^4.0.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/jest-worker": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*", - "jest-util": "^29.7.0", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/jest-worker/node_modules/supports-color": { - "version": "8.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "../../node_modules/js-tokens": { - "version": "4.0.0", - "dev": true, - "license": "MIT" - }, - "../../node_modules/js-yaml": { - "version": "3.14.1", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "../../node_modules/jsesc": { - "version": "2.5.2", - "dev": true, - "license": "MIT", - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=4" - } - }, - "../../node_modules/json-buffer": { - "version": "3.0.1", - "dev": true, - "license": "MIT" - }, - "../../node_modules/json-parse-better-errors": { - "version": "1.0.2", - "dev": true, - "license": "MIT" - }, - "../../node_modules/json-parse-even-better-errors": { - "version": "2.3.1", - "dev": true, - "license": "MIT" - }, - "../../node_modules/json-pointer": { - "version": "0.6.2", - "dev": true, - "license": "MIT", - "dependencies": { - "foreach": "^2.0.4" - } - }, - "../../node_modules/json-promise": { - "version": "1.1.8", - "dev": true, - "license": "MIT", - "dependencies": { - "bluebird": "*" - } - }, - "../../node_modules/json-schema-compare": { - "version": "0.2.2", - "dev": true, - "license": "MIT", - "dependencies": { - "lodash": "^4.17.4" - } - }, - "../../node_modules/json-schema-faker": { - "version": "0.5.6", - "dev": true, - "license": "MIT", - "dependencies": { - "json-schema-ref-parser": "^6.1.0", - "jsonpath-plus": "^7.2.0" - }, - "bin": { - "jsf": "bin/gen.cjs" - } - }, - "../../node_modules/json-schema-ref-parser": { - "version": "6.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "call-me-maybe": "^1.0.1", - "js-yaml": "^3.12.1", - "ono": "^4.0.11" - } - }, - "../../node_modules/json-schema-traverse": { - "version": "0.4.1", - "dev": true, - "license": "MIT" - }, - "../../node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "dev": true, - "license": "MIT" - }, - "../../node_modules/json-stringify-safe": { - "version": "5.0.1", - "dev": true, - "license": "ISC" - }, - "../../node_modules/json5": { - "version": "2.2.3", - "dev": true, - "license": "MIT", - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, - "../../node_modules/jsonc-parser": { - "version": "2.2.1", - "dev": true, - "license": "MIT" - }, - "../../node_modules/jsonpath-plus": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12.0.0" - } - }, - "../../node_modules/keyv": { - "version": "4.5.4", - "dev": true, - "license": "MIT", - "dependencies": { - "json-buffer": "3.0.1" - } - }, - "../../node_modules/kind-of": { - "version": "6.0.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/kleur": { - "version": "3.0.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../../node_modules/leven": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../../node_modules/levn": { - "version": "0.4.1", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "../../node_modules/liftoff": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "extend": "^3.0.2", - "findup-sync": "^5.0.0", - "fined": "^2.0.0", - "flagged-respawn": "^2.0.0", - "is-plain-object": "^5.0.0", - "object.map": "^1.0.1", - "rechoir": "^0.8.0", - "resolve": "^1.20.0" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "../../node_modules/lines-and-columns": { - "version": "1.2.4", - "dev": true, - "license": "MIT" - }, - "../../node_modules/liquid-json": { - "version": "0.3.1", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=4" - } - }, - "../../node_modules/load-json-file": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.1.2", - "parse-json": "^4.0.0", - "pify": "^3.0.0", - "strip-bom": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "../../node_modules/load-json-file/node_modules/parse-json": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - }, - "engines": { - "node": ">=4" - } - }, - "../../node_modules/load-json-file/node_modules/strip-bom": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../../node_modules/locate-path": { - "version": "6.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/lodash": { - "version": "4.17.21", - "dev": true, - "license": "MIT" - }, - "../../node_modules/lodash.camelcase": { - "version": "4.3.0", - "dev": true, - "license": "MIT" - }, - "../../node_modules/lodash.flattendeep": { - "version": "4.4.0", - "dev": true, - "license": "MIT" - }, - "../../node_modules/lodash.get": { - "version": "4.4.2", - "dev": true, - "license": "MIT" - }, - "../../node_modules/lodash.memoize": { - "version": "4.1.2", - "dev": true, - "license": "MIT" - }, - "../../node_modules/lodash.merge": { - "version": "4.6.2", - "dev": true, - "license": "MIT" - }, - "../../node_modules/log-symbols": { - "version": "6.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^5.3.0", - "is-unicode-supported": "^1.3.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/log-symbols/node_modules/chalk": { - "version": "5.3.0", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.17.0 || ^14.13 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "../../node_modules/log-symbols/node_modules/is-unicode-supported": { - "version": "1.3.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/lower-case": { - "version": "2.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "tslib": "^2.0.3" - } - }, - "../../node_modules/lru-cache": { - "version": "5.1.1", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^3.0.2" - } - }, - "../../node_modules/make-dir": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "semver": "^6.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/make-error": { - "version": "1.3.6", - "dev": true, - "license": "ISC" - }, - "../../node_modules/make-iterator": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "kind-of": "^6.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/makeerror": { - "version": "1.0.12", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "tmpl": "1.0.5" - } - }, - "../../node_modules/map-cache": { - "version": "0.2.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/media-typer": { - "version": "0.3.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../../node_modules/merge-stream": { - "version": "2.0.0", - "dev": true, - "license": "MIT" - }, - "../../node_modules/merge2": { - "version": "1.4.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "../../node_modules/micri": { - "version": "4.5.1", - "dev": true, - "license": "MIT", - "dependencies": { - "handler-agent": "0.2.0" - }, - "engines": { - "node": ">= 12.0.0" - } - }, - "../../node_modules/micromatch": { - "version": "4.0.8", - "dev": true, - "license": "MIT", - "dependencies": { - "braces": "^3.0.3", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "../../node_modules/mime-db": { - "version": "1.52.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../../node_modules/mime-format": { - "version": "2.0.1", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "charset": "^1.0.0" - } - }, - "../../node_modules/mime-types": { - "version": "2.1.35", - "dev": true, - "license": "MIT", - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "../../node_modules/mimic-fn": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../../node_modules/mimic-function": { - "version": "5.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/minimatch": { - "version": "3.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "../../node_modules/minimist": { - "version": "1.2.6", - "dev": true, - "license": "MIT" - }, - "../../node_modules/mkdirp": { - "version": "0.5.6", - "dev": true, - "license": "MIT", - "dependencies": { - "minimist": "^1.2.6" - }, - "bin": { - "mkdirp": "bin/cmd.js" - } - }, - "../../node_modules/ms": { - "version": "2.1.2", - "dev": true, - "license": "MIT" - }, - "../../node_modules/mute-stream": { - "version": "1.0.0", - "dev": true, - "license": "ISC", - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "../../node_modules/natural-compare": { - "version": "1.4.0", - "dev": true, - "license": "MIT" - }, - "../../node_modules/negotiator": { - "version": "0.6.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../../node_modules/neo-async": { - "version": "2.6.2", - "dev": true, - "license": "MIT" - }, - "../../node_modules/no-case": { - "version": "3.0.4", - "dev": true, - "license": "MIT", - "dependencies": { - "lower-case": "^2.0.2", - "tslib": "^2.0.3" - } - }, - "../../node_modules/nock": { - "version": "13.5.5", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "^4.1.0", - "json-stringify-safe": "^5.0.1", - "propagate": "^2.0.0" - }, - "engines": { - "node": ">= 10.13" - } - }, - "../../node_modules/node-abort-controller": { - "version": "3.1.1", - "dev": true, - "license": "MIT" - }, - "../../node_modules/node-fetch": { - "version": "2.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, - "../../node_modules/node-int64": { - "version": "0.4.0", - "dev": true, - "license": "MIT" - }, - "../../node_modules/node-plop": { - "version": "0.32.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/inquirer": "^9.0.3", - "change-case": "^4.1.2", - "del": "^7.1.0", - "globby": "^13.2.2", - "handlebars": "^4.7.8", - "inquirer": "^9.2.10", - "isbinaryfile": "^5.0.0", - "lodash.get": "^4.4.2", - "lower-case": "^2.0.2", - "mkdirp": "^3.0.1", - "resolve": "^1.22.4", - "title-case": "^3.0.3", - "upper-case": "^2.0.2" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - } - }, - "../../node_modules/node-plop/node_modules/mkdirp": { - "version": "3.0.1", - "dev": true, - "license": "MIT", - "bin": { - "mkdirp": "dist/cjs/src/bin.js" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../../node_modules/node-preload": { - "version": "0.2.1", - "dev": true, - "license": "MIT", - "dependencies": { - "process-on-spawn": "^1.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/node-releases": { - "version": "2.0.18", - "dev": true, - "license": "MIT" - }, - "../../node_modules/normalize-path": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/npm-run-path": { - "version": "4.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "path-key": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/nyc": { - "version": "15.1.0", - "dev": true, - "license": "ISC", - "dependencies": { - "@istanbuljs/load-nyc-config": "^1.0.0", - "@istanbuljs/schema": "^0.1.2", - "caching-transform": "^4.0.0", - "convert-source-map": "^1.7.0", - "decamelize": "^1.2.0", - "find-cache-dir": "^3.2.0", - "find-up": "^4.1.0", - "foreground-child": "^2.0.0", - "get-package-type": "^0.1.0", - "glob": "^7.1.6", - "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-hook": "^3.0.0", - "istanbul-lib-instrument": "^4.0.0", - "istanbul-lib-processinfo": "^2.0.2", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.0", - "istanbul-reports": "^3.0.2", - "make-dir": "^3.0.0", - "node-preload": "^0.2.1", - "p-map": "^3.0.0", - "process-on-spawn": "^1.0.0", - "resolve-from": "^5.0.0", - "rimraf": "^3.0.0", - "signal-exit": "^3.0.2", - "spawn-wrap": "^2.0.0", - "test-exclude": "^6.0.0", - "yargs": "^15.0.2" - }, - "bin": { - "nyc": "bin/nyc.js" - }, - "engines": { - "node": ">=8.9" - } - }, - "../../node_modules/nyc/node_modules/cliui": { - "version": "6.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^6.2.0" - } - }, - "../../node_modules/nyc/node_modules/find-up": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/nyc/node_modules/glob": { - "version": "7.2.3", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../../node_modules/nyc/node_modules/locate-path": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/nyc/node_modules/p-limit": { - "version": "2.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/nyc/node_modules/p-locate": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/nyc/node_modules/resolve-from": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../node_modules/nyc/node_modules/wrap-ansi": { - "version": "6.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/nyc/node_modules/y18n": { - "version": "4.0.3", - "dev": true, - "license": "ISC" - }, - "../../node_modules/nyc/node_modules/yargs": { - "version": "15.4.1", - "dev": true, - "license": "MIT", - "dependencies": { - "cliui": "^6.0.0", - "decamelize": "^1.2.0", - "find-up": "^4.1.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^4.2.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^18.1.2" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/nyc/node_modules/yargs-parser": { - "version": "18.1.3", - "dev": true, - "license": "ISC", - "dependencies": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - }, - "engines": { - "node": ">=6" - } - }, - "../../node_modules/object-inspect": { - "version": "1.13.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../../node_modules/object.defaults": { - "version": "1.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "array-each": "^1.0.1", - "array-slice": "^1.0.0", - "for-own": "^1.0.0", - "isobject": "^3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/object.map": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "for-own": "^1.0.0", - "make-iterator": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/object.pick": { - "version": "1.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/once": { - "version": "1.4.0", - "dev": true, - "license": "ISC", - "dependencies": { - "wrappy": "1" - } - }, - "../../node_modules/onetime": { - "version": "5.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "mimic-fn": "^2.1.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/ono": { - "version": "4.0.11", - "dev": true, - "license": "MIT", - "dependencies": { - "format-util": "^1.0.3" - } - }, - "../../node_modules/openapi3-ts": { - "version": "2.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "yaml": "^1.10.2" - } - }, - "../../node_modules/optionator": { - "version": "0.9.4", - "dev": true, - "license": "MIT", - "dependencies": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.5" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "../../node_modules/ora": { - "version": "8.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^5.3.0", - "cli-cursor": "^5.0.0", - "cli-spinners": "^2.9.2", - "is-interactive": "^2.0.0", - "is-unicode-supported": "^2.0.0", - "log-symbols": "^6.0.0", - "stdin-discarder": "^0.2.2", - "string-width": "^7.2.0", - "strip-ansi": "^7.1.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/ora/node_modules/ansi-regex": { - "version": "6.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "../../node_modules/ora/node_modules/chalk": { - "version": "5.3.0", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.17.0 || ^14.13 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "../../node_modules/ora/node_modules/emoji-regex": { - "version": "10.4.0", - "dev": true, - "license": "MIT" - }, - "../../node_modules/ora/node_modules/string-width": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^10.3.0", - "get-east-asian-width": "^1.0.0", - "strip-ansi": "^7.1.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/ora/node_modules/strip-ansi": { - "version": "7.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "../../node_modules/os-tmpdir": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/p-limit": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/p-locate": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/p-map": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "aggregate-error": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/p-try": { - "version": "2.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../../node_modules/package-hash": { - "version": "4.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "graceful-fs": "^4.1.15", - "hasha": "^5.0.0", - "lodash.flattendeep": "^4.4.0", - "release-zalgo": "^1.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/param-case": { - "version": "3.0.4", - "dev": true, - "license": "MIT", - "dependencies": { - "dot-case": "^3.0.4", - "tslib": "^2.0.3" - } - }, - "../../node_modules/parent-module": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "callsites": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "../../node_modules/parse-filepath": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "is-absolute": "^1.0.0", - "map-cache": "^0.2.0", - "path-root": "^0.1.1" - }, - "engines": { - "node": ">=0.8" - } - }, - "../../node_modules/parse-json": { - "version": "5.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-even-better-errors": "^2.3.0", - "lines-and-columns": "^1.1.6" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/parse-multipart-data": { - "version": "1.5.0", - "dev": true, - "license": "MIT" - }, - "../../node_modules/parse-passwd": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/parse-prefer-header": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "lodash.camelcase": "^4.3.0" - } - }, - "../../node_modules/pascal-case": { - "version": "3.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "no-case": "^3.0.4", - "tslib": "^2.0.3" - } - }, - "../../node_modules/path-case": { - "version": "3.0.4", - "dev": true, - "license": "MIT", - "dependencies": { - "dot-case": "^3.0.4", - "tslib": "^2.0.3" - } - }, - "../../node_modules/path-exists": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../node_modules/path-is-absolute": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/path-key": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../node_modules/path-parse": { - "version": "1.0.7", - "dev": true, - "license": "MIT" - }, - "../../node_modules/path-root": { - "version": "0.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "path-root-regex": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/path-root-regex": { - "version": "0.1.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/path-type": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../node_modules/picocolors": { - "version": "1.0.1", - "dev": true, - "license": "ISC" - }, - "../../node_modules/picomatch": { - "version": "2.3.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "../../node_modules/pify": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../../node_modules/pino": { - "version": "6.14.0", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-redact": "^3.0.0", - "fast-safe-stringify": "^2.0.8", - "flatstr": "^1.0.12", - "pino-std-serializers": "^3.1.0", - "process-warning": "^1.0.0", - "quick-format-unescaped": "^4.0.3", - "sonic-boom": "^1.0.2" - }, - "bin": { - "pino": "bin.js" - } - }, - "../../node_modules/pino-std-serializers": { - "version": "3.2.0", - "dev": true, - "license": "MIT" - }, - "../../node_modules/pirates": { - "version": "4.0.6", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 6" - } - }, - "../../node_modules/pkg-conf": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "find-up": "^2.0.0", - "load-json-file": "^4.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "../../node_modules/pkg-conf/node_modules/find-up": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "../../node_modules/pkg-conf/node_modules/locate-path": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "../../node_modules/pkg-conf/node_modules/p-limit": { - "version": "1.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-try": "^1.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "../../node_modules/pkg-conf/node_modules/p-locate": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^1.1.0" - }, - "engines": { - "node": ">=4" - } - }, - "../../node_modules/pkg-conf/node_modules/p-try": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../../node_modules/pkg-conf/node_modules/path-exists": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../../node_modules/pkg-dir": { - "version": "4.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "find-up": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/pkg-dir/node_modules/find-up": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/pkg-dir/node_modules/locate-path": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/pkg-dir/node_modules/p-limit": { - "version": "2.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/pkg-dir/node_modules/p-locate": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/plop": { - "version": "4.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/liftoff": "^4.0.3", - "chalk": "^5.3.0", - "interpret": "^3.1.1", - "liftoff": "^4.0.0", - "minimist": "^1.2.8", - "node-plop": "^0.32.0", - "ora": "^8.0.0", - "v8flags": "^4.0.1" - }, - "bin": { - "plop": "bin/plop.js" - }, - "engines": { - "node": ">=18" - } - }, - "../../node_modules/plop/node_modules/chalk": { - "version": "5.3.0", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.17.0 || ^14.13 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "../../node_modules/plop/node_modules/minimist": { - "version": "1.2.8", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../../node_modules/postman-collection": { - "version": "4.5.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@faker-js/faker": "5.5.3", - "file-type": "3.9.0", - "http-reasons": "0.1.0", - "iconv-lite": "0.6.3", - "liquid-json": "0.3.1", - "lodash": "4.17.21", - "mime-format": "2.0.1", - "mime-types": "2.1.35", - "postman-url-encoder": "3.0.5", - "semver": "7.6.3", - "uuid": "8.3.2" - }, - "engines": { - "node": ">=10" - } - }, - "../../node_modules/postman-collection/node_modules/@faker-js/faker": { - "version": "5.5.3", - "dev": true, - "license": "MIT" - }, - "../../node_modules/postman-collection/node_modules/semver": { - "version": "7.6.3", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "../../node_modules/postman-collection/node_modules/uuid": { - "version": "8.3.2", - "dev": true, - "license": "MIT", - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "../../node_modules/postman-url-encoder": { - "version": "3.0.5", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "punycode": "^2.1.1" - }, - "engines": { - "node": ">=10" - } - }, - "../../node_modules/prelude-ls": { - "version": "1.2.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8.0" - } - }, - "../../node_modules/prettier": { - "version": "3.3.3", - "dev": true, - "license": "MIT", - "bin": { - "prettier": "bin/prettier.cjs" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } - }, - "../../node_modules/prettier-linter-helpers": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-diff": "^1.1.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../../node_modules/pretty-data": { - "version": "0.40.0", - "dev": true, - "license": "MIT" - }, - "../../node_modules/pretty-format": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/schemas": "^29.6.3", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/pretty-format/node_modules/ansi-styles": { - "version": "5.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "../../node_modules/process-on-spawn": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "fromentries": "^1.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/process-warning": { - "version": "1.0.0", - "dev": true, - "license": "MIT" - }, - "../../node_modules/prompts": { - "version": "2.4.2", - "dev": true, - "license": "MIT", - "dependencies": { - "kleur": "^3.0.3", - "sisteransi": "^1.0.5" - }, - "engines": { - "node": ">= 6" - } - }, - "../../node_modules/propagate": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "../../node_modules/punycode": { - "version": "2.3.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../../node_modules/pure-rand": { - "version": "6.1.0", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/dubzzz" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/fast-check" - } - ], - "license": "MIT" - }, - "../../node_modules/qs": { - "version": "6.13.0", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "side-channel": "^1.0.6" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../../node_modules/queue-microtask": { - "version": "1.2.3", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "../../node_modules/quick-format-unescaped": { - "version": "4.0.4", - "dev": true, - "license": "MIT" - }, - "../../node_modules/react-is": { - "version": "18.3.1", - "dev": true, - "license": "MIT" - }, - "../../node_modules/readable-stream": { - "version": "3.6.2", - "dev": true, - "license": "MIT", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "../../node_modules/readdirp": { - "version": "3.6.0", - "dev": true, - "license": "MIT", - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "../../node_modules/rechoir": { - "version": "0.8.0", - "dev": true, - "license": "MIT", - "dependencies": { - "resolve": "^1.20.0" - }, - "engines": { - "node": ">= 10.13.0" - } - }, - "../../node_modules/release-zalgo": { - "version": "1.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "es6-error": "^4.0.1" - }, - "engines": { - "node": ">=4" - } - }, - "../../node_modules/require-directory": { - "version": "2.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/require-from-string": { - "version": "2.0.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/require-main-filename": { - "version": "2.0.0", - "dev": true, - "license": "ISC" - }, - "../../node_modules/resolve": { - "version": "1.22.8", - "dev": true, - "license": "MIT", - "dependencies": { - "is-core-module": "^2.13.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../../node_modules/resolve-cwd": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "resolve-from": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/resolve-cwd/node_modules/resolve-from": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../node_modules/resolve-dir": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "expand-tilde": "^2.0.0", - "global-modules": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/resolve-from": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../../node_modules/resolve.exports": { - "version": "2.0.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - } - }, - "../../node_modules/restore-cursor": { - "version": "5.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "onetime": "^7.0.0", - "signal-exit": "^4.1.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/restore-cursor/node_modules/onetime": { - "version": "7.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "mimic-function": "^5.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/restore-cursor/node_modules/signal-exit": { - "version": "4.1.0", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../../node_modules/reusify": { - "version": "1.0.4", - "dev": true, - "license": "MIT", - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "../../node_modules/rimraf": { - "version": "3.0.2", - "dev": true, - "license": "ISC", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../../node_modules/rimraf/node_modules/glob": { - "version": "7.2.3", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../../node_modules/run-async": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, - "../../node_modules/run-parallel": { - "version": "1.2.0", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, - "../../node_modules/rxjs": { - "version": "7.8.1", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.1.0" - } - }, - "../../node_modules/safe-buffer": { - "version": "5.2.1", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "../../node_modules/safe-stable-stringify": { - "version": "1.1.1", - "dev": true, - "license": "MIT" - }, - "../../node_modules/safer-buffer": { - "version": "2.1.2", - "dev": true, - "license": "MIT" - }, - "../../node_modules/semver": { - "version": "6.3.1", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, - "../../node_modules/sentence-case": { - "version": "3.0.4", - "dev": true, - "license": "MIT", - "dependencies": { - "no-case": "^3.0.4", - "tslib": "^2.0.3", - "upper-case-first": "^2.0.2" - } - }, - "../../node_modules/set-blocking": { - "version": "2.0.0", - "dev": true, - "license": "ISC" - }, - "../../node_modules/set-function-length": { - "version": "1.2.2", - "dev": true, - "license": "MIT", - "dependencies": { - "define-data-property": "^1.1.4", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "../../node_modules/shebang-command": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/shebang-regex": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../node_modules/side-channel": { - "version": "1.0.6", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4", - "object-inspect": "^1.13.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../../node_modules/signal-exit": { - "version": "3.0.7", - "dev": true, - "license": "ISC" - }, - "../../node_modules/signale": { - "version": "1.4.0", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^2.3.2", - "figures": "^2.0.0", - "pkg-conf": "^2.1.0" - }, - "engines": { - "node": ">=6" - } - }, - "../../node_modules/signale/node_modules/ansi-styles": { - "version": "3.2.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "../../node_modules/signale/node_modules/chalk": { - "version": "2.4.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "../../node_modules/signale/node_modules/color-convert": { - "version": "1.9.3", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "1.1.3" - } - }, - "../../node_modules/signale/node_modules/color-name": { - "version": "1.1.3", - "dev": true, - "license": "MIT" - }, - "../../node_modules/signale/node_modules/escape-string-regexp": { - "version": "1.0.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.0" - } - }, - "../../node_modules/signale/node_modules/has-flag": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../../node_modules/signale/node_modules/supports-color": { - "version": "5.5.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "../../node_modules/sisteransi": { - "version": "1.0.5", - "dev": true, - "license": "MIT" - }, - "../../node_modules/slash": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../node_modules/snake-case": { - "version": "3.0.4", - "dev": true, - "license": "MIT", - "dependencies": { - "dot-case": "^3.0.4", - "tslib": "^2.0.3" - } - }, - "../../node_modules/sonic-boom": { - "version": "1.4.1", - "dev": true, - "license": "MIT", - "dependencies": { - "atomic-sleep": "^1.0.0", - "flatstr": "^1.0.12" - } - }, - "../../node_modules/source-map": { - "version": "0.6.1", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/source-map-support": { - "version": "0.5.13", - "dev": true, - "license": "MIT", - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "../../node_modules/spawn-wrap": { - "version": "2.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "foreground-child": "^2.0.0", - "is-windows": "^1.0.2", - "make-dir": "^3.0.0", - "rimraf": "^3.0.0", - "signal-exit": "^3.0.2", - "which": "^2.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/split2": { - "version": "3.2.2", - "dev": true, - "license": "ISC", - "dependencies": { - "readable-stream": "^3.0.0" - } - }, - "../../node_modules/sprintf-js": { - "version": "1.0.3", - "dev": true, - "license": "BSD-3-Clause" - }, - "../../node_modules/stack-utils": { - "version": "2.0.6", - "dev": true, - "license": "MIT", - "dependencies": { - "escape-string-regexp": "^2.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "../../node_modules/stack-utils/node_modules/escape-string-regexp": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../node_modules/stdin-discarder": { - "version": "0.2.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/string_decoder": { - "version": "1.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.2.0" - } - }, - "../../node_modules/string-length": { - "version": "4.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "char-regex": "^1.0.2", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "../../node_modules/string-width": { - "version": "4.2.3", - "dev": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/strip-ansi": { - "version": "6.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/strip-bom": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../node_modules/strip-final-newline": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../../node_modules/strip-json-comments": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/strnum": { - "version": "1.0.5", - "dev": true, - "license": "MIT" - }, - "../../node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../../node_modules/synckit": { - "version": "0.9.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@pkgr/core": "^0.1.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": "^14.18.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/unts" - } - }, - "../../node_modules/test-exclude": { - "version": "6.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "@istanbuljs/schema": "^0.1.2", - "glob": "^7.1.4", - "minimatch": "^3.0.4" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/test-exclude/node_modules/glob": { - "version": "7.2.3", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../../node_modules/text-table": { - "version": "0.2.0", - "dev": true, - "license": "MIT" - }, - "../../node_modules/title-case": { - "version": "3.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "tslib": "^2.0.3" - } - }, - "../../node_modules/tmp": { - "version": "0.0.33", - "dev": true, - "license": "MIT", - "dependencies": { - "os-tmpdir": "~1.0.2" - }, - "engines": { - "node": ">=0.6.0" - } - }, - "../../node_modules/tmpl": { - "version": "1.0.5", - "dev": true, - "license": "BSD-3-Clause" - }, - "../../node_modules/to-fast-properties": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../../node_modules/to-regex-range": { - "version": "5.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "../../node_modules/tr46": { - "version": "0.0.3", - "dev": true, - "license": "MIT" - }, - "../../node_modules/ts-api-utils": { - "version": "1.3.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=16" - }, - "peerDependencies": { - "typescript": ">=4.2.0" - } - }, - "../../node_modules/ts-jest": { - "version": "29.2.5", - "dev": true, - "license": "MIT", - "dependencies": { - "bs-logger": "^0.2.6", - "ejs": "^3.1.10", - "fast-json-stable-stringify": "^2.1.0", - "jest-util": "^29.0.0", - "json5": "^2.2.3", - "lodash.memoize": "^4.1.2", - "make-error": "^1.3.6", - "semver": "^7.6.3", - "yargs-parser": "^21.1.1" - }, - "bin": { - "ts-jest": "cli.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" - }, - "peerDependencies": { - "@babel/core": ">=7.0.0-beta.0 <8", - "@jest/transform": "^29.0.0", - "@jest/types": "^29.0.0", - "babel-jest": "^29.0.0", - "jest": "^29.0.0", - "typescript": ">=4.3 <6" - }, - "peerDependenciesMeta": { - "@babel/core": { - "optional": true - }, - "@jest/transform": { - "optional": true - }, - "@jest/types": { - "optional": true - }, - "babel-jest": { - "optional": true - }, - "esbuild": { - "optional": true - } - } - }, - "../../node_modules/ts-jest/node_modules/semver": { - "version": "7.6.3", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "../../node_modules/ts-jest/node_modules/yargs-parser": { - "version": "21.1.1", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=12" - } - }, - "../../node_modules/ts-node": { - "version": "10.9.2", - "dev": true, - "license": "MIT", - "dependencies": { - "@cspotcode/source-map-support": "^0.8.0", - "@tsconfig/node10": "^1.0.7", - "@tsconfig/node12": "^1.0.7", - "@tsconfig/node14": "^1.0.0", - "@tsconfig/node16": "^1.0.2", - "acorn": "^8.4.1", - "acorn-walk": "^8.1.1", - "arg": "^4.1.0", - "create-require": "^1.1.0", - "diff": "^4.0.1", - "make-error": "^1.1.1", - "v8-compile-cache-lib": "^3.0.1", - "yn": "3.1.1" - }, - "bin": { - "ts-node": "dist/bin.js", - "ts-node-cwd": "dist/bin-cwd.js", - "ts-node-esm": "dist/bin-esm.js", - "ts-node-script": "dist/bin-script.js", - "ts-node-transpile-only": "dist/bin-transpile.js", - "ts-script": "dist/bin-script-deprecated.js" - }, - "peerDependencies": { - "@swc/core": ">=1.2.50", - "@swc/wasm": ">=1.2.50", - "@types/node": "*", - "typescript": ">=2.7" - }, - "peerDependenciesMeta": { - "@swc/core": { - "optional": true - }, - "@swc/wasm": { - "optional": true - } - } - }, - "../../node_modules/ts-node/node_modules/diff": { - "version": "4.0.2", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.3.1" - } - }, - "../../node_modules/tslib": { - "version": "2.7.0", - "dev": true, - "license": "0BSD" - }, - "../../node_modules/tweetnacl": { - "version": "1.0.3", - "dev": true, - "license": "Unlicense" - }, - "../../node_modules/type-check": { - "version": "0.4.0", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "../../node_modules/type-fest": { - "version": "0.20.2", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/type-is": { - "version": "1.6.18", - "dev": true, - "license": "MIT", - "dependencies": { - "media-typer": "0.3.0", - "mime-types": "~2.1.24" - }, - "engines": { - "node": ">= 0.6" - } - }, - "../../node_modules/typedarray-to-buffer": { - "version": "3.1.5", - "dev": true, - "license": "MIT", - "dependencies": { - "is-typedarray": "^1.0.0" - } - }, - "../../node_modules/typescript": { - "version": "5.6.2", - "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "../../node_modules/typescript-eslint": { - "version": "8.5.0", + "node_modules/@esbuild/aix-ppc64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.23.1.tgz", + "integrity": "sha512-6VhYk1diRqrhBAqpJEdjASR/+WVRtfjpqKuNw11cLiaWpAT/Uu+nokB+UJnevzy/P9C/ty6AOe0dwueMrGh/iQ==", + "cpu": [ + "ppc64" + ], "dev": true, "license": "MIT", - "dependencies": { - "@typescript-eslint/eslint-plugin": "8.5.0", - "@typescript-eslint/parser": "8.5.0", - "@typescript-eslint/utils": "8.5.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "../../node_modules/uglify-js": { - "version": "3.19.3", - "dev": true, - "license": "BSD-2-Clause", "optional": true, - "bin": { - "uglifyjs": "bin/uglifyjs" - }, + "os": [ + "aix" + ], "engines": { - "node": ">=0.8.0" + "node": ">=18" } }, - "../../node_modules/unc-path-regex": { - "version": "0.1.2", + "node_modules/@esbuild/android-arm": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.23.1.tgz", + "integrity": "sha512-uz6/tEy2IFm9RYOyvKl88zdzZfwEfKZmnX9Cj1BHjeSGNuGLuMD1kR8y5bteYmwqKm1tj8m4cb/aKEorr6fHWQ==", + "cpu": [ + "arm" + ], "dev": true, "license": "MIT", + "optional": true, + "os": [ + "android" + ], "engines": { - "node": ">=0.10.0" + "node": ">=18" } }, - "../../node_modules/undici-types": { - "version": "6.19.8", - "dev": true, - "license": "MIT" - }, - "../../node_modules/update-browserslist-db": { - "version": "1.1.0", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } + "node_modules/@esbuild/android-arm64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.23.1.tgz", + "integrity": "sha512-xw50ipykXcLstLeWH7WRdQuysJqejuAGPd30vd1i5zSyKK3WE+ijzHmLKxdiCMtH1pHz78rOg0BKSYOSB/2Khw==", + "cpu": [ + "arm64" ], - "license": "MIT", - "dependencies": { - "escalade": "^3.1.2", - "picocolors": "^1.0.1" - }, - "bin": { - "update-browserslist-db": "cli.js" - }, - "peerDependencies": { - "browserslist": ">= 4.21.0" - } - }, - "../../node_modules/upper-case": { - "version": "2.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "tslib": "^2.0.3" - } - }, - "../../node_modules/upper-case-first": { - "version": "2.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "tslib": "^2.0.3" - } - }, - "../../node_modules/uri-js": { - "version": "4.4.1", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "punycode": "^2.1.0" - } - }, - "../../node_modules/uri-template-lite": { - "version": "22.9.0", - "dev": true, - "license": "MIT" - }, - "../../node_modules/urijs": { - "version": "1.19.11", - "dev": true, - "license": "MIT" - }, - "../../node_modules/util-deprecate": { - "version": "1.0.2", - "dev": true, - "license": "MIT" - }, - "../../node_modules/utility-types": { - "version": "3.11.0", "dev": true, "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "../../node_modules/uuid": { - "version": "9.0.1", - "dev": true, - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" + "optional": true, + "os": [ + "android" ], - "license": "MIT", - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "../../node_modules/v8-compile-cache-lib": { - "version": "3.0.1", - "dev": true, - "license": "MIT" - }, - "../../node_modules/v8-to-istanbul": { - "version": "9.3.0", - "dev": true, - "license": "ISC", - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.12", - "@types/istanbul-lib-coverage": "^2.0.1", - "convert-source-map": "^2.0.0" - }, "engines": { - "node": ">=10.12.0" + "node": ">=18" } }, - "../../node_modules/v8-to-istanbul/node_modules/convert-source-map": { - "version": "2.0.0", - "dev": true, - "license": "MIT" - }, - "../../node_modules/v8flags": { - "version": "4.0.1", + "node_modules/@esbuild/android-x64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.23.1.tgz", + "integrity": "sha512-nlN9B69St9BwUoB+jkyU090bru8L0NA3yFvAd7k8dNsVH8bi9a8cUAUSEcEEgTp2z3dbEDGJGfP6VUnkQnlReg==", + "cpu": [ + "x64" + ], "dev": true, "license": "MIT", + "optional": true, + "os": [ + "android" + ], "engines": { - "node": ">= 10.13.0" + "node": ">=18" } }, - "../../node_modules/validate.io-array": { - "version": "1.0.6", - "dev": true, - "license": "MIT" - }, - "../../node_modules/validate.io-function": { - "version": "1.0.2", - "dev": true - }, - "../../node_modules/validate.io-integer": { - "version": "1.0.5", + "node_modules/@esbuild/darwin-arm64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.23.1.tgz", + "integrity": "sha512-YsS2e3Wtgnw7Wq53XXBLcV6JhRsEq8hkfg91ESVadIrzr9wO6jJDMZnCQbHm1Guc5t/CdDiFSSfWP58FNuvT3Q==", + "cpu": [ + "arm64" + ], "dev": true, - "dependencies": { - "validate.io-number": "^1.0.3" + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" } }, - "../../node_modules/validate.io-integer-array": { - "version": "1.0.0", + "node_modules/@esbuild/darwin-x64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.23.1.tgz", + "integrity": "sha512-aClqdgTDVPSEGgoCS8QDG37Gu8yc9lTHNAQlsztQ6ENetKEO//b8y31MMu2ZaPbn4kVsIABzVLXYLhCGekGDqw==", + "cpu": [ + "x64" + ], "dev": true, - "dependencies": { - "validate.io-array": "^1.0.3", - "validate.io-integer": "^1.0.4" + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" } }, - "../../node_modules/validate.io-number": { - "version": "1.0.3", - "dev": true - }, - "../../node_modules/walker": { - "version": "1.0.8", + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.23.1.tgz", + "integrity": "sha512-h1k6yS8/pN/NHlMl5+v4XPfikhJulk4G+tKGFIOwURBSFzE8bixw1ebjluLOjfwtLqY0kewfjLSrO6tN2MgIhA==", + "cpu": [ + "arm64" + ], "dev": true, - "license": "Apache-2.0", - "dependencies": { - "makeerror": "1.0.12" + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" } }, - "../../node_modules/wcwidth": { - "version": "1.0.1", + "node_modules/@esbuild/freebsd-x64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.23.1.tgz", + "integrity": "sha512-lK1eJeyk1ZX8UklqFd/3A60UuZ/6UVfGT2LuGo3Wp4/z7eRTRYY+0xOu2kpClP+vMTi9wKOfXi2vjUpO1Ro76g==", + "cpu": [ + "x64" + ], "dev": true, "license": "MIT", - "dependencies": { - "defaults": "^1.0.3" + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" } }, - "../../node_modules/webidl-conversions": { - "version": "3.0.1", - "dev": true, - "license": "BSD-2-Clause" - }, - "../../node_modules/whatwg-fetch": { - "version": "3.6.20", - "dev": true, - "license": "MIT" - }, - "../../node_modules/whatwg-mimetype": { - "version": "3.0.0", + "node_modules/@esbuild/linux-arm": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.23.1.tgz", + "integrity": "sha512-CXXkzgn+dXAPs3WBwE+Kvnrf4WECwBdfjfeYHpMeVxWE0EceB6vhWGShs6wi0IYEqMSIzdOF1XjQ/Mkm5d7ZdQ==", + "cpu": [ + "arm" + ], "dev": true, "license": "MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=12" + "node": ">=18" } }, - "../../node_modules/whatwg-url": { - "version": "5.0.0", + "node_modules/@esbuild/linux-arm64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.23.1.tgz", + "integrity": "sha512-/93bf2yxencYDnItMYV/v116zff6UyTjo4EtEQjUBeGiVpMmffDNUyD9UN2zV+V3LRV3/on4xdZ26NKzn6754g==", + "cpu": [ + "arm64" + ], "dev": true, "license": "MIT", - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" } }, - "../../node_modules/which": { - "version": "2.0.2", + "node_modules/@esbuild/linux-ia32": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.23.1.tgz", + "integrity": "sha512-VTN4EuOHwXEkXzX5nTvVY4s7E/Krz7COC8xkftbbKRYAl96vPiUssGkeMELQMOnLOJ8k3BY1+ZY52tttZnHcXQ==", + "cpu": [ + "ia32" + ], "dev": true, - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">= 8" + "node": ">=18" } }, - "../../node_modules/which-module": { - "version": "2.0.1", - "dev": true, - "license": "ISC" - }, - "../../node_modules/word-wrap": { - "version": "1.2.5", + "node_modules/@esbuild/linux-loong64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.23.1.tgz", + "integrity": "sha512-Vx09LzEoBa5zDnieH8LSMRToj7ir/Jeq0Gu6qJ/1GcBq9GkfoEAoXvLiW1U9J1qE/Y/Oyaq33w5p2ZWrNNHNEw==", + "cpu": [ + "loong64" + ], "dev": true, "license": "MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=0.10.0" + "node": ">=18" } }, - "../../node_modules/wordwrap": { - "version": "1.0.0", - "dev": true, - "license": "MIT" - }, - "../../node_modules/wrap-ansi": { - "version": "7.0.0", + "node_modules/@esbuild/linux-mips64el": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.23.1.tgz", + "integrity": "sha512-nrFzzMQ7W4WRLNUOU5dlWAqa6yVeI0P78WKGUo7lg2HShq/yx+UYkeNSE0SSfSure0SqgnsxPvmAUu/vu0E+3Q==", + "cpu": [ + "mips64el" + ], "dev": true, "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + "node": ">=18" } }, - "../../node_modules/wrappy": { - "version": "1.0.2", + "node_modules/@esbuild/linux-ppc64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.23.1.tgz", + "integrity": "sha512-dKN8fgVqd0vUIjxuJI6P/9SSSe/mB9rvA98CSH2sJnlZ/OCZWO1DJvxj8jvKTfYUdGfcq2dDxoKaC6bHuTlgcw==", + "cpu": [ + "ppc64" + ], "dev": true, - "license": "ISC" + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } }, - "../../node_modules/write-file-atomic": { - "version": "3.0.3", + "node_modules/@esbuild/linux-riscv64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.23.1.tgz", + "integrity": "sha512-5AV4Pzp80fhHL83JM6LoA6pTQVWgB1HovMBsLQ9OZWLDqVY8MVobBXNSmAJi//Csh6tcY7e7Lny2Hg1tElMjIA==", + "cpu": [ + "riscv64" + ], "dev": true, - "license": "ISC", - "dependencies": { - "imurmurhash": "^0.1.4", - "is-typedarray": "^1.0.0", - "signal-exit": "^3.0.2", - "typedarray-to-buffer": "^3.1.5" + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" } }, - "../../node_modules/y18n": { - "version": "5.0.8", + "node_modules/@esbuild/linux-s390x": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.23.1.tgz", + "integrity": "sha512-9ygs73tuFCe6f6m/Tb+9LtYxWR4c9yg7zjt2cYkjDbDpV/xVn+68cQxMXCjUpYwEkze2RcU/rMnfIXNRFmSoDw==", + "cpu": [ + "s390x" + ], "dev": true, - "license": "ISC", + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=10" + "node": ">=18" } }, - "../../node_modules/yallist": { - "version": "3.1.1", + "node_modules/@esbuild/linux-x64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.23.1.tgz", + "integrity": "sha512-EV6+ovTsEXCPAp58g2dD68LxoP/wK5pRvgy0J/HxPGB009omFPv3Yet0HiaqvrIrgPTBuC6wCH1LTOY91EO5hQ==", + "cpu": [ + "x64" + ], "dev": true, - "license": "ISC" + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } }, - "../../node_modules/yaml": { - "version": "1.10.2", + "node_modules/@esbuild/netbsd-x64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.23.1.tgz", + "integrity": "sha512-aevEkCNu7KlPRpYLjwmdcuNz6bDFiE7Z8XC4CPqExjTvrHugh28QzUXVOZtiYghciKUacNktqxdpymplil1beA==", + "cpu": [ + "x64" + ], "dev": true, - "license": "ISC", + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], "engines": { - "node": ">= 6" + "node": ">=18" } }, - "../../node_modules/yargs": { - "version": "16.2.0", + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.23.1.tgz", + "integrity": "sha512-3x37szhLexNA4bXhLrCC/LImN/YtWis6WXr1VESlfVtVeoFJBRINPJ3f0a/6LV8zpikqoUg4hyXw0sFBt5Cr+Q==", + "cpu": [ + "arm64" + ], "dev": true, "license": "MIT", - "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - }, + "optional": true, + "os": [ + "openbsd" + ], "engines": { - "node": ">=10" + "node": ">=18" } }, - "../../node_modules/yargs-parser": { - "version": "20.2.9", + "node_modules/@esbuild/openbsd-x64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.23.1.tgz", + "integrity": "sha512-aY2gMmKmPhxfU+0EdnN+XNtGbjfQgwZj43k8G3fyrDM/UdZww6xrWxmDkuz2eCZchqVeABjV5BpildOrUbBTqA==", + "cpu": [ + "x64" + ], "dev": true, - "license": "ISC", + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], "engines": { - "node": ">=10" + "node": ">=18" } }, - "../../node_modules/yn": { - "version": "3.1.1", + "node_modules/@esbuild/sunos-x64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.23.1.tgz", + "integrity": "sha512-RBRT2gqEl0IKQABT4XTj78tpk9v7ehp+mazn2HbUeZl1YMdaGAQqhapjGTCe7uw7y0frDi4gS0uHzhvpFuI1sA==", + "cpu": [ + "x64" + ], "dev": true, "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], "engines": { - "node": ">=6" + "node": ">=18" } }, - "../../node_modules/yocto-queue": { - "version": "0.1.0", + "node_modules/@esbuild/win32-arm64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.23.1.tgz", + "integrity": "sha512-4O+gPR5rEBe2FpKOVyiJ7wNDPA8nGzDuJ6gN4okSA1gEOYZ67N8JPk58tkWtdtPeLz7lBnY6I5L3jdsr3S+A6A==", + "cpu": [ + "arm64" + ], "dev": true, "license": "MIT", + "optional": true, + "os": [ + "win32" + ], "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=18" } }, - "../../node_modules/yoctocolors-cjs": { - "version": "2.1.2", + "node_modules/@esbuild/win32-ia32": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.23.1.tgz", + "integrity": "sha512-BcaL0Vn6QwCwre3Y717nVHZbAa4UBEigzFm6VdsVdT/MbZ38xoj1X9HPkZhbmaBGUD1W8vxAfffbDe8bA6AKnQ==", + "cpu": [ + "ia32" + ], "dev": true, "license": "MIT", + "optional": true, + "os": [ + "win32" + ], "engines": { "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@esbuild/darwin-arm64": { + "node_modules/@esbuild/win32-x64": { "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.23.1.tgz", + "integrity": "sha512-BHpFFeslkWrXWyUPnbKm+xYYVYruCinGcftSBaa8zoF9hZO4BcSCFUvHVTtzpIY6YzUnYtuEhZ+C9iEXjxnasg==", "cpu": [ - "arm64" + "x64" ], "dev": true, "license": "MIT", "optional": true, "os": [ - "darwin" + "win32" ], "engines": { "node": ">=18" @@ -8631,6 +681,8 @@ }, "node_modules/@types/node": { "version": "22.7.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.7.4.tgz", + "integrity": "sha512-y+NPi1rFzDs1NdQHHToqeiX2TIS79SWEAw9GYhkkx8bD0ChpfqC+n2j5OXOCpzfojBEBt6DnEnnG9MY0zk1XLg==", "dev": true, "license": "MIT", "dependencies": { @@ -9039,6 +1091,8 @@ }, "node_modules/esbuild": { "version": "0.23.1", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.23.1.tgz", + "integrity": "sha512-VVNz/9Sa0bs5SELtn3f7qhJCDPCF5oMEl5cO9/SSinpE9hbPVvxbd572HH5AKiP7WD8INO53GgfDDhRjkylHEg==", "dev": true, "hasInstallScript": true, "license": "MIT", @@ -9439,8 +1493,25 @@ "license": "ISC", "peer": true }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, "node_modules/get-tsconfig": { "version": "4.8.1", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.8.1.tgz", + "integrity": "sha512-k9PN+cFBmaLWtVz29SkUoqU5O0slLuHJXt/2P+tMVFT+phsSGXGkp9t3rQIqdz0e+06EHNGs3oM6ZX1s2zHxRg==", "dev": true, "license": "MIT", "dependencies": { @@ -9888,6 +1959,8 @@ }, "node_modules/resolve-pkg-maps": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", + "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", "dev": true, "license": "MIT", "funding": { @@ -10010,8 +2083,13 @@ } }, "node_modules/telnyx": { - "resolved": "../..", - "link": true + "version": "2.0.0-alpha.0", + "resolved": "https://registry.npmjs.org/telnyx/-/telnyx-2.0.0-alpha.0.tgz", + "integrity": "sha512-UJ5TEOb9PTKeY1YobGQeOiOxOdnfO0P/eFAVhBl1HWK5wbWmElMcYSePFlGzbfgxftzKVEyWrf+O0ya3iMW18g==", + "license": "MIT", + "engines": { + "node": "^18 || >=20" + } }, "node_modules/text-table": { "version": "0.2.0", @@ -10049,6 +2127,8 @@ }, "node_modules/tsx": { "version": "4.19.1", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.19.1.tgz", + "integrity": "sha512-0flMz1lh74BR4wOvBjuh9olbnwqCPc35OOlfyzHba0Dc+QNUeWX/Gq2YTbnwcWPO3BMd8fkzRVrHcsR+a7z7rA==", "dev": true, "license": "MIT", "dependencies": { @@ -10081,6 +2161,8 @@ }, "node_modules/typescript": { "version": "5.6.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.2.tgz", + "integrity": "sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==", "dev": true, "license": "Apache-2.0", "bin": { @@ -10117,6 +2199,8 @@ }, "node_modules/undici-types": { "version": "6.19.8", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", + "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", "dev": true, "license": "MIT" }, diff --git a/examples/call-control/package.json b/examples/call-control/package.json index 387c0f8..f8f6782 100644 --- a/examples/call-control/package.json +++ b/examples/call-control/package.json @@ -17,7 +17,7 @@ "telnyx": "2.0.0-alpha.0" }, "devDependencies": { - "@types/node": "^22.7.3", + "@types/node": "^22.7.4", "tsx": "^4.19.1", "typescript": "^5.6.2", "typescript-eslint": "^8.8.0" diff --git a/examples/messaging/package-lock.json b/examples/messaging/package-lock.json index fd651f2..eebd2f0 100644 --- a/examples/messaging/package-lock.json +++ b/examples/messaging/package-lock.json @@ -12,7 +12,7 @@ "telnyx": "2.0.0-alpha.0" }, "devDependencies": { - "@types/node": "^22.7.3", + "@types/node": "^22.7.4", "tsx": "^4.19.1", "typescript": "^5.6.2", "typescript-eslint": "^8.8.0" @@ -21,8359 +21,409 @@ "node": "^18 || >=20" } }, - "../..": { - "name": "telnyx", - "version": "2.0.0-alpha.0", - "license": "MIT", - "devDependencies": { - "@eslint/js": "^9.10.0", - "@stoplight/prism-cli": "^5.10.0", - "@types/eslint__js": "^8.42.3", - "@types/jest": "^29.5.13", - "@types/node": "^22.7.3", - "@types/qs": "^6.9.15", - "debug": "^4.3.4", - "eslint": "^8.57.0", - "eslint-config-prettier": "^9.1.0", - "eslint-plugin-chai-friendly": "^0.7.4", - "eslint-plugin-prettier": "^5.2.1", - "jest": "^29.7.0", - "nock": "^13.5.4", - "nyc": "^15.1.0", - "plop": "^4.0.1", - "prettier": "^3.0.0", - "qs": "^6.11.2", - "ts-jest": "^29.2.5", - "ts-node": "^10.9.2", - "tweetnacl": "^1.0.3", - "typescript": "^5.6.2", - "typescript-eslint": "^8.8.0", - "uuid": "^9.0.1" - }, - "engines": { - "node": "^18 || >=20" - } - }, - "../../node_modules/@ampproject/remapping": { - "version": "2.3.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../../node_modules/@babel/code-frame": { - "version": "7.24.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/highlight": "^7.24.7", - "picocolors": "^1.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../node_modules/@babel/compat-data": { - "version": "7.25.4", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../../node_modules/@babel/core": { - "version": "7.25.2", - "dev": true, - "license": "MIT", - "dependencies": { - "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.24.7", - "@babel/generator": "^7.25.0", - "@babel/helper-compilation-targets": "^7.25.2", - "@babel/helper-module-transforms": "^7.25.2", - "@babel/helpers": "^7.25.0", - "@babel/parser": "^7.25.0", - "@babel/template": "^7.25.0", - "@babel/traverse": "^7.25.2", - "@babel/types": "^7.25.2", - "convert-source-map": "^2.0.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.2.3", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/babel" - } - }, - "../../node_modules/@babel/core/node_modules/convert-source-map": { - "version": "2.0.0", - "dev": true, - "license": "MIT" - }, - "../../node_modules/@babel/generator": { - "version": "7.25.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.25.6", - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.25", - "jsesc": "^2.5.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../node_modules/@babel/helper-compilation-targets": { - "version": "7.25.2", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/compat-data": "^7.25.2", - "@babel/helper-validator-option": "^7.24.8", - "browserslist": "^4.23.1", - "lru-cache": "^5.1.1", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../node_modules/@babel/helper-module-imports": { - "version": "7.24.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/traverse": "^7.24.7", - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../node_modules/@babel/helper-module-transforms": { - "version": "7.25.2", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-module-imports": "^7.24.7", - "@babel/helper-simple-access": "^7.24.7", - "@babel/helper-validator-identifier": "^7.24.7", - "@babel/traverse": "^7.25.2" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "../../node_modules/@babel/helper-plugin-utils": { - "version": "7.24.8", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../../node_modules/@babel/helper-simple-access": { - "version": "7.24.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/traverse": "^7.24.7", - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../node_modules/@babel/helper-string-parser": { - "version": "7.24.8", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../../node_modules/@babel/helper-validator-identifier": { - "version": "7.24.7", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../../node_modules/@babel/helper-validator-option": { - "version": "7.24.8", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../../node_modules/@babel/helpers": { - "version": "7.25.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/template": "^7.25.0", - "@babel/types": "^7.25.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../node_modules/@babel/highlight": { - "version": "7.24.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.24.7", - "chalk": "^2.4.2", - "js-tokens": "^4.0.0", - "picocolors": "^1.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../node_modules/@babel/highlight/node_modules/ansi-styles": { - "version": "3.2.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "../../node_modules/@babel/highlight/node_modules/chalk": { - "version": "2.4.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "../../node_modules/@babel/highlight/node_modules/color-convert": { - "version": "1.9.3", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "1.1.3" - } - }, - "../../node_modules/@babel/highlight/node_modules/color-name": { - "version": "1.1.3", - "dev": true, - "license": "MIT" - }, - "../../node_modules/@babel/highlight/node_modules/escape-string-regexp": { - "version": "1.0.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.0" - } - }, - "../../node_modules/@babel/highlight/node_modules/has-flag": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../../node_modules/@babel/highlight/node_modules/supports-color": { - "version": "5.5.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "../../node_modules/@babel/parser": { - "version": "7.25.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.25.6" - }, - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../../node_modules/@babel/plugin-syntax-async-generators": { - "version": "7.8.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "../../node_modules/@babel/plugin-syntax-bigint": { - "version": "7.8.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "../../node_modules/@babel/plugin-syntax-class-properties": { - "version": "7.12.13", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.12.13" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "../../node_modules/@babel/plugin-syntax-class-static-block": { - "version": "7.14.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "../../node_modules/@babel/plugin-syntax-import-attributes": { - "version": "7.25.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.8" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "../../node_modules/@babel/plugin-syntax-import-meta": { - "version": "7.10.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "../../node_modules/@babel/plugin-syntax-json-strings": { - "version": "7.8.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "../../node_modules/@babel/plugin-syntax-jsx": { - "version": "7.24.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "../../node_modules/@babel/plugin-syntax-logical-assignment-operators": { - "version": "7.10.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "../../node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { - "version": "7.8.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "../../node_modules/@babel/plugin-syntax-numeric-separator": { - "version": "7.10.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "../../node_modules/@babel/plugin-syntax-object-rest-spread": { - "version": "7.8.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "../../node_modules/@babel/plugin-syntax-optional-catch-binding": { - "version": "7.8.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "../../node_modules/@babel/plugin-syntax-optional-chaining": { - "version": "7.8.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "../../node_modules/@babel/plugin-syntax-private-property-in-object": { - "version": "7.14.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "../../node_modules/@babel/plugin-syntax-top-level-await": { - "version": "7.14.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "../../node_modules/@babel/plugin-syntax-typescript": { - "version": "7.25.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.8" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "../../node_modules/@babel/template": { - "version": "7.25.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.24.7", - "@babel/parser": "^7.25.0", - "@babel/types": "^7.25.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../node_modules/@babel/traverse": { - "version": "7.25.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.24.7", - "@babel/generator": "^7.25.6", - "@babel/parser": "^7.25.6", - "@babel/template": "^7.25.0", - "@babel/types": "^7.25.6", - "debug": "^4.3.1", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../node_modules/@babel/traverse/node_modules/globals": { - "version": "11.12.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../../node_modules/@babel/types": { - "version": "7.25.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.24.8", - "@babel/helper-validator-identifier": "^7.24.7", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../node_modules/@bcoe/v8-coverage": { - "version": "0.2.3", - "dev": true, - "license": "MIT" - }, - "../../node_modules/@cspotcode/source-map-support": { - "version": "0.8.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/trace-mapping": "0.3.9" - }, - "engines": { - "node": ">=12" - } - }, - "../../node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": { - "version": "0.3.9", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" - } - }, - "../../node_modules/@eslint-community/eslint-utils": { - "version": "4.4.0", - "dev": true, - "license": "MIT", - "dependencies": { - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" - } - }, - "../../node_modules/@eslint-community/regexpp": { - "version": "4.11.0", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.0.0 || ^14.0.0 || >=16.0.0" - } - }, - "../../node_modules/@eslint/eslintrc": { - "version": "2.1.4", - "dev": true, - "license": "MIT", - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "../../node_modules/@eslint/eslintrc/node_modules/argparse": { - "version": "2.0.1", - "dev": true, - "license": "Python-2.0" - }, - "../../node_modules/@eslint/eslintrc/node_modules/js-yaml": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "../../node_modules/@eslint/js": { - "version": "9.10.0", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "../../node_modules/@faker-js/faker": { - "version": "6.3.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=14.0.0", - "npm": ">=6.0.0" - } - }, - "../../node_modules/@humanwhocodes/config-array": { - "version": "0.11.14", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@humanwhocodes/object-schema": "^2.0.2", - "debug": "^4.3.1", - "minimatch": "^3.0.5" - }, - "engines": { - "node": ">=10.10.0" - } - }, - "../../node_modules/@humanwhocodes/module-importer": { - "version": "1.0.1", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=12.22" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "../../node_modules/@humanwhocodes/object-schema": { - "version": "2.0.3", - "dev": true, - "license": "BSD-3-Clause" - }, - "../../node_modules/@inquirer/figures": { - "version": "1.0.6", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - } - }, - "../../node_modules/@istanbuljs/load-nyc-config": { - "version": "1.1.0", - "dev": true, - "license": "ISC", - "dependencies": { - "camelcase": "^5.3.1", - "find-up": "^4.1.0", - "get-package-type": "^0.1.0", - "js-yaml": "^3.13.1", - "resolve-from": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/@istanbuljs/load-nyc-config/node_modules/find-up": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/@istanbuljs/load-nyc-config/node_modules/locate-path": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/@istanbuljs/load-nyc-config/node_modules/p-limit": { - "version": "2.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/@istanbuljs/load-nyc-config/node_modules/p-locate": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/@istanbuljs/load-nyc-config/node_modules/resolve-from": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../node_modules/@istanbuljs/schema": { - "version": "0.1.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../node_modules/@jest/console": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "jest-message-util": "^29.7.0", - "jest-util": "^29.7.0", - "slash": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/@jest/core": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/console": "^29.7.0", - "@jest/reporters": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "exit": "^0.1.2", - "graceful-fs": "^4.2.9", - "jest-changed-files": "^29.7.0", - "jest-config": "^29.7.0", - "jest-haste-map": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-regex-util": "^29.6.3", - "jest-resolve": "^29.7.0", - "jest-resolve-dependencies": "^29.7.0", - "jest-runner": "^29.7.0", - "jest-runtime": "^29.7.0", - "jest-snapshot": "^29.7.0", - "jest-util": "^29.7.0", - "jest-validate": "^29.7.0", - "jest-watcher": "^29.7.0", - "micromatch": "^4.0.4", - "pretty-format": "^29.7.0", - "slash": "^3.0.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "../../node_modules/@jest/environment": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/fake-timers": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "jest-mock": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/@jest/expect": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "expect": "^29.7.0", - "jest-snapshot": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/@jest/expect-utils": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "jest-get-type": "^29.6.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/@jest/fake-timers": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^29.6.3", - "@sinonjs/fake-timers": "^10.0.2", - "@types/node": "*", - "jest-message-util": "^29.7.0", - "jest-mock": "^29.7.0", - "jest-util": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/@jest/globals": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/environment": "^29.7.0", - "@jest/expect": "^29.7.0", - "@jest/types": "^29.6.3", - "jest-mock": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/@jest/reporters": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", - "@jridgewell/trace-mapping": "^0.3.18", - "@types/node": "*", - "chalk": "^4.0.0", - "collect-v8-coverage": "^1.0.0", - "exit": "^0.1.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-instrument": "^6.0.0", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.0", - "istanbul-reports": "^3.1.3", - "jest-message-util": "^29.7.0", - "jest-util": "^29.7.0", - "jest-worker": "^29.7.0", - "slash": "^3.0.0", - "string-length": "^4.0.1", - "strip-ansi": "^6.0.0", - "v8-to-istanbul": "^9.0.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "../../node_modules/@jest/reporters/node_modules/glob": { - "version": "7.2.3", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../../node_modules/@jest/reporters/node_modules/istanbul-lib-instrument": { - "version": "6.0.3", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@babel/core": "^7.23.9", - "@babel/parser": "^7.23.9", - "@istanbuljs/schema": "^0.1.3", - "istanbul-lib-coverage": "^3.2.0", - "semver": "^7.5.4" - }, - "engines": { - "node": ">=10" - } - }, - "../../node_modules/@jest/reporters/node_modules/semver": { - "version": "7.6.3", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "../../node_modules/@jest/schemas": { - "version": "29.6.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@sinclair/typebox": "^0.27.8" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/@jest/source-map": { - "version": "29.6.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.18", - "callsites": "^3.0.0", - "graceful-fs": "^4.2.9" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/@jest/test-result": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/console": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "collect-v8-coverage": "^1.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/@jest/test-sequencer": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/test-result": "^29.7.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.7.0", - "slash": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/@jest/transform": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/core": "^7.11.6", - "@jest/types": "^29.6.3", - "@jridgewell/trace-mapping": "^0.3.18", - "babel-plugin-istanbul": "^6.1.1", - "chalk": "^4.0.0", - "convert-source-map": "^2.0.0", - "fast-json-stable-stringify": "^2.1.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.7.0", - "jest-regex-util": "^29.6.3", - "jest-util": "^29.7.0", - "micromatch": "^4.0.4", - "pirates": "^4.0.4", - "slash": "^3.0.0", - "write-file-atomic": "^4.0.2" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/@jest/transform/node_modules/convert-source-map": { - "version": "2.0.0", - "dev": true, - "license": "MIT" - }, - "../../node_modules/@jest/transform/node_modules/write-file-atomic": { - "version": "4.0.2", - "dev": true, - "license": "ISC", - "dependencies": { - "imurmurhash": "^0.1.4", - "signal-exit": "^3.0.7" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "../../node_modules/@jest/types": { - "version": "29.6.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/schemas": "^29.6.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/@jridgewell/gen-mapping": { - "version": "0.3.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/set-array": "^1.2.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../../node_modules/@jridgewell/resolve-uri": { - "version": "3.1.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "../../node_modules/@jridgewell/set-array": { - "version": "1.2.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "../../node_modules/@jridgewell/sourcemap-codec": { - "version": "1.5.0", - "dev": true, - "license": "MIT" - }, - "../../node_modules/@jridgewell/trace-mapping": { - "version": "0.3.25", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } - }, - "../../node_modules/@jsdevtools/ono": { - "version": "7.1.3", - "dev": true, - "license": "MIT" - }, - "../../node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "../../node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "../../node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, - "../../node_modules/@pkgr/core": { - "version": "0.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.20.0 || ^14.18.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/unts" - } - }, - "../../node_modules/@sinclair/typebox": { - "version": "0.27.8", - "dev": true, - "license": "MIT" - }, - "../../node_modules/@sinonjs/commons": { - "version": "3.0.1", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "type-detect": "4.0.8" - } - }, - "../../node_modules/@sinonjs/commons/node_modules/type-detect": { - "version": "4.0.8", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../../node_modules/@sinonjs/fake-timers": { - "version": "10.3.0", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@sinonjs/commons": "^3.0.0" - } - }, - "../../node_modules/@stoplight/http-spec": { - "version": "7.1.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@stoplight/json": "^3.18.1", - "@stoplight/json-schema-generator": "1.0.2", - "@stoplight/types": "14.1.0", - "@types/json-schema": "7.0.11", - "@types/swagger-schema-official": "~2.0.22", - "@types/type-is": "^1.6.3", - "fnv-plus": "^1.3.1", - "lodash": "^4.17.21", - "openapi3-ts": "^2.0.2", - "postman-collection": "^4.1.3", - "tslib": "^2.6.2", - "type-is": "^1.6.18" - }, - "engines": { - "node": ">=14.13" - } - }, - "../../node_modules/@stoplight/http-spec/node_modules/@stoplight/types": { - "version": "14.1.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@types/json-schema": "^7.0.4", - "utility-types": "^3.10.0" - }, - "engines": { - "node": "^12.20 || >=14.13" - } - }, - "../../node_modules/@stoplight/http-spec/node_modules/@types/json-schema": { - "version": "7.0.11", - "dev": true, - "license": "MIT" - }, - "../../node_modules/@stoplight/json": { - "version": "3.21.7", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@stoplight/ordered-object-literal": "^1.0.3", - "@stoplight/path": "^1.3.2", - "@stoplight/types": "^13.6.0", - "jsonc-parser": "~2.2.1", - "lodash": "^4.17.21", - "safe-stable-stringify": "^1.1" - }, - "engines": { - "node": ">=8.3.0" - } - }, - "../../node_modules/@stoplight/json-schema-generator": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "cross-fetch": "^3.1.5", - "json-promise": "1.1.x", - "minimist": "1.2.6", - "mkdirp": "0.5.x", - "pretty-data": "0.40.x" - }, - "bin": { - "json-schema-generator": "bin/cli.js" - } - }, - "../../node_modules/@stoplight/json-schema-merge-allof": { - "version": "0.7.8", - "dev": true, - "license": "MIT", - "dependencies": { - "compute-lcm": "^1.1.0", - "json-schema-compare": "^0.2.2", - "lodash": "^4.17.4" - } - }, - "../../node_modules/@stoplight/json-schema-ref-parser": { - "version": "9.2.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@jsdevtools/ono": "^7.1.3", - "@stoplight/path": "^1.3.2", - "@stoplight/yaml": "^4.0.2", - "call-me-maybe": "^1.0.1", - "fastestsmallesttextencoderdecoder": "^1.0.22", - "isomorphic-fetch": "^3.0.0", - "node-abort-controller": "^3.0.1" - } - }, - "../../node_modules/@stoplight/json-schema-sampler": { - "version": "0.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/json-schema": "^7.0.7", - "json-pointer": "^0.6.1" - } - }, - "../../node_modules/@stoplight/json/node_modules/@stoplight/types": { - "version": "13.20.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@types/json-schema": "^7.0.4", - "utility-types": "^3.10.0" - }, - "engines": { - "node": "^12.20 || >=14.13" - } - }, - "../../node_modules/@stoplight/ordered-object-literal": { - "version": "1.0.5", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=8" - } - }, - "../../node_modules/@stoplight/path": { - "version": "1.3.2", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=8" - } - }, - "../../node_modules/@stoplight/prism-cli": { - "version": "5.10.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@stoplight/json": "3.21.7", - "@stoplight/json-schema-ref-parser": "9.2.7", - "@stoplight/prism-core": "^5.8.0", - "@stoplight/prism-http": "5.10.0", - "@stoplight/prism-http-server": "^5.10.0", - "@stoplight/types": "^14.1.0", - "chalk": "^4.1.2", - "chokidar": "^3.5.2", - "fp-ts": "^2.11.5", - "json-schema-faker": "0.5.6", - "lodash": "^4.17.21", - "node-fetch": "^2.6.5", - "pino": "^6.13.3", - "signale": "^1.4.0", - "split2": "^3.2.2", - "tslib": "^2.3.1", - "uri-template-lite": "^22.9.0", - "urijs": "^1.19.11", - "yargs": "^16.2.0" - }, - "bin": { - "prism": "dist/index.js" - }, - "engines": { - "node": ">=18.20.1" - } - }, - "../../node_modules/@stoplight/prism-core": { - "version": "5.8.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "fp-ts": "^2.11.5", - "lodash": "^4.17.21", - "pino": "^6.13.3", - "tslib": "^2.3.1" - }, - "engines": { - "node": ">=18.20.1" - } - }, - "../../node_modules/@stoplight/prism-http": { - "version": "5.10.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@faker-js/faker": "^6.0.0", - "@stoplight/http-spec": "^7.0.3", - "@stoplight/json": "3.21.7", - "@stoplight/json-schema-merge-allof": "0.7.8", - "@stoplight/json-schema-ref-parser": "9.2.7", - "@stoplight/json-schema-sampler": "0.3.0", - "@stoplight/prism-core": "^5.8.0", - "@stoplight/types": "^14.1.0", - "@stoplight/yaml": "^4.2.3", - "abstract-logging": "^2.0.1", - "accepts": "^1.3.7", - "ajv": "^8.4.0", - "ajv-formats": "^2.1.1", - "caseless": "^0.12.0", - "chalk": "^4.1.2", - "content-type": "^1.0.4", - "fp-ts": "^2.11.5", - "http-proxy-agent": "^5.0.0", - "https-proxy-agent": "^5.0.0", - "json-schema-faker": "0.5.6", - "lodash": "^4.17.21", - "node-fetch": "^2.6.5", - "parse-multipart-data": "^1.5.0", - "pino": "^6.13.3", - "tslib": "^2.3.1", - "type-is": "^1.6.18", - "uri-template-lite": "^22.9.0", - "whatwg-mimetype": "^3.0.0" - }, - "engines": { - "node": ">=18.20.1" - } - }, - "../../node_modules/@stoplight/prism-http-server": { - "version": "5.10.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@stoplight/prism-core": "^5.8.0", - "@stoplight/prism-http": "^5.10.0", - "@stoplight/types": "^14.1.0", - "fast-xml-parser": "^4.2.0", - "fp-ts": "^2.11.5", - "io-ts": "^2.2.16", - "lodash": "^4.17.21", - "micri": "^4.3.0", - "node-fetch": "^2.6.5", - "parse-prefer-header": "1.0.0", - "tslib": "^2.3.1", - "type-is": "^1.6.18" - }, - "engines": { - "node": ">=18.20.1" - } - }, - "../../node_modules/@stoplight/prism-http/node_modules/ajv": { - "version": "8.17.1", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.3", - "fast-uri": "^3.0.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "../../node_modules/@stoplight/prism-http/node_modules/json-schema-traverse": { - "version": "1.0.0", - "dev": true, - "license": "MIT" - }, - "../../node_modules/@stoplight/types": { - "version": "14.1.1", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@types/json-schema": "^7.0.4", - "utility-types": "^3.10.0" - }, - "engines": { - "node": "^12.20 || >=14.13" - } - }, - "../../node_modules/@stoplight/yaml": { - "version": "4.3.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@stoplight/ordered-object-literal": "^1.0.5", - "@stoplight/types": "^14.1.1", - "@stoplight/yaml-ast-parser": "0.0.50", - "tslib": "^2.2.0" - }, - "engines": { - "node": ">=10.8" - } - }, - "../../node_modules/@stoplight/yaml-ast-parser": { - "version": "0.0.50", - "dev": true, - "license": "Apache-2.0" - }, - "../../node_modules/@tootallnate/once": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 10" - } - }, - "../../node_modules/@tsconfig/node10": { - "version": "1.0.11", - "dev": true, - "license": "MIT" - }, - "../../node_modules/@tsconfig/node12": { - "version": "1.0.11", - "dev": true, - "license": "MIT" - }, - "../../node_modules/@tsconfig/node14": { - "version": "1.0.3", - "dev": true, - "license": "MIT" - }, - "../../node_modules/@tsconfig/node16": { - "version": "1.0.4", - "dev": true, - "license": "MIT" - }, - "../../node_modules/@types/babel__core": { - "version": "7.20.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/parser": "^7.20.7", - "@babel/types": "^7.20.7", - "@types/babel__generator": "*", - "@types/babel__template": "*", - "@types/babel__traverse": "*" - } - }, - "../../node_modules/@types/babel__generator": { - "version": "7.6.8", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.0.0" - } - }, - "../../node_modules/@types/babel__template": { - "version": "7.4.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0" - } - }, - "../../node_modules/@types/babel__traverse": { - "version": "7.20.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.20.7" - } - }, - "../../node_modules/@types/eslint": { - "version": "9.6.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/estree": "*", - "@types/json-schema": "*" - } - }, - "../../node_modules/@types/eslint__js": { - "version": "8.42.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/eslint": "*" - } - }, - "../../node_modules/@types/estree": { - "version": "1.0.5", - "dev": true, - "license": "MIT" - }, - "../../node_modules/@types/fined": { - "version": "1.1.5", - "dev": true, - "license": "MIT" - }, - "../../node_modules/@types/graceful-fs": { - "version": "4.1.9", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "../../node_modules/@types/inquirer": { - "version": "9.0.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/through": "*", - "rxjs": "^7.2.0" - } - }, - "../../node_modules/@types/istanbul-lib-coverage": { - "version": "2.0.6", - "dev": true, - "license": "MIT" - }, - "../../node_modules/@types/istanbul-lib-report": { - "version": "3.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/istanbul-lib-coverage": "*" - } - }, - "../../node_modules/@types/istanbul-reports": { - "version": "3.0.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/istanbul-lib-report": "*" - } - }, - "../../node_modules/@types/jest": { - "version": "29.5.13", - "dev": true, - "license": "MIT", - "dependencies": { - "expect": "^29.0.0", - "pretty-format": "^29.0.0" - } - }, - "../../node_modules/@types/json-schema": { - "version": "7.0.15", - "dev": true, - "license": "MIT" - }, - "../../node_modules/@types/liftoff": { - "version": "4.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/fined": "*", - "@types/node": "*" - } - }, - "../../node_modules/@types/node": { - "version": "22.7.3", - "dev": true, - "license": "MIT", - "dependencies": { - "undici-types": "~6.19.2" - } - }, - "../../node_modules/@types/qs": { - "version": "6.9.15", - "dev": true, - "license": "MIT" - }, - "../../node_modules/@types/stack-utils": { - "version": "2.0.3", - "dev": true, - "license": "MIT" - }, - "../../node_modules/@types/swagger-schema-official": { - "version": "2.0.25", - "dev": true, - "license": "MIT" - }, - "../../node_modules/@types/through": { - "version": "0.0.33", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "../../node_modules/@types/type-is": { - "version": "1.6.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "../../node_modules/@types/yargs": { - "version": "17.0.33", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/yargs-parser": "*" - } - }, - "../../node_modules/@types/yargs-parser": { - "version": "21.0.3", - "dev": true, - "license": "MIT" - }, - "../../node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.5.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.5.0", - "@typescript-eslint/type-utils": "8.5.0", - "@typescript-eslint/utils": "8.5.0", - "@typescript-eslint/visitor-keys": "8.5.0", - "graphemer": "^1.4.0", - "ignore": "^5.3.1", - "natural-compare": "^1.4.0", - "ts-api-utils": "^1.3.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "@typescript-eslint/parser": "^8.0.0 || ^8.0.0-alpha.0", - "eslint": "^8.57.0 || ^9.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "../../node_modules/@typescript-eslint/parser": { - "version": "8.5.0", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@typescript-eslint/scope-manager": "8.5.0", - "@typescript-eslint/types": "8.5.0", - "@typescript-eslint/typescript-estree": "8.5.0", - "@typescript-eslint/visitor-keys": "8.5.0", - "debug": "^4.3.4" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "../../node_modules/@typescript-eslint/scope-manager": { - "version": "8.5.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.5.0", - "@typescript-eslint/visitor-keys": "8.5.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "../../node_modules/@typescript-eslint/type-utils": { - "version": "8.5.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/typescript-estree": "8.5.0", - "@typescript-eslint/utils": "8.5.0", - "debug": "^4.3.4", - "ts-api-utils": "^1.3.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "../../node_modules/@typescript-eslint/types": { - "version": "8.5.0", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "../../node_modules/@typescript-eslint/typescript-estree": { - "version": "8.5.0", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@typescript-eslint/types": "8.5.0", - "@typescript-eslint/visitor-keys": "8.5.0", - "debug": "^4.3.4", - "fast-glob": "^3.3.2", - "is-glob": "^4.0.3", - "minimatch": "^9.0.4", - "semver": "^7.6.0", - "ts-api-utils": "^1.3.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "../../node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "../../node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { - "version": "9.0.5", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../../node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { - "version": "7.6.3", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "../../node_modules/@typescript-eslint/utils": { - "version": "8.5.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.5.0", - "@typescript-eslint/types": "8.5.0", - "@typescript-eslint/typescript-estree": "8.5.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0" - } - }, - "../../node_modules/@typescript-eslint/visitor-keys": { - "version": "8.5.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.5.0", - "eslint-visitor-keys": "^3.4.3" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "../../node_modules/@ungap/structured-clone": { - "version": "1.2.0", - "dev": true, - "license": "ISC" - }, - "../../node_modules/abstract-logging": { - "version": "2.0.1", - "dev": true, - "license": "MIT" - }, - "../../node_modules/accepts": { - "version": "1.3.8", - "dev": true, - "license": "MIT", - "dependencies": { - "mime-types": "~2.1.34", - "negotiator": "0.6.3" - }, - "engines": { - "node": ">= 0.6" - } - }, - "../../node_modules/acorn": { - "version": "8.12.1", - "dev": true, - "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "../../node_modules/acorn-jsx": { - "version": "5.3.2", - "dev": true, - "license": "MIT", - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "../../node_modules/acorn-walk": { - "version": "8.3.4", - "dev": true, - "license": "MIT", - "dependencies": { - "acorn": "^8.11.0" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "../../node_modules/agent-base": { - "version": "6.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "4" - }, - "engines": { - "node": ">= 6.0.0" - } - }, - "../../node_modules/aggregate-error": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "clean-stack": "^2.0.0", - "indent-string": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/ajv": { - "version": "6.12.6", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "../../node_modules/ajv-formats": { - "version": "2.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "ajv": "^8.0.0" - }, - "peerDependencies": { - "ajv": "^8.0.0" - }, - "peerDependenciesMeta": { - "ajv": { - "optional": true - } - } - }, - "../../node_modules/ajv-formats/node_modules/ajv": { - "version": "8.17.1", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.3", - "fast-uri": "^3.0.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "../../node_modules/ajv-formats/node_modules/json-schema-traverse": { - "version": "1.0.0", - "dev": true, - "license": "MIT" - }, - "../../node_modules/ansi-escapes": { - "version": "4.3.2", - "dev": true, - "license": "MIT", - "dependencies": { - "type-fest": "^0.21.3" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/ansi-escapes/node_modules/type-fest": { - "version": "0.21.3", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/ansi-regex": { - "version": "5.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "../../node_modules/anymatch": { - "version": "3.1.3", - "dev": true, - "license": "ISC", - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "../../node_modules/append-transform": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "default-require-extensions": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/archy": { - "version": "1.0.0", - "dev": true, - "license": "MIT" - }, - "../../node_modules/arg": { - "version": "4.1.3", - "dev": true, - "license": "MIT" - }, - "../../node_modules/argparse": { - "version": "1.0.10", - "dev": true, - "license": "MIT", - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "../../node_modules/array-each": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/array-slice": { - "version": "1.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/async": { - "version": "3.2.6", - "dev": true, - "license": "MIT" - }, - "../../node_modules/atomic-sleep": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.0.0" - } - }, - "../../node_modules/babel-jest": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/transform": "^29.7.0", - "@types/babel__core": "^7.1.14", - "babel-plugin-istanbul": "^6.1.1", - "babel-preset-jest": "^29.6.3", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "slash": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "@babel/core": "^7.8.0" - } - }, - "../../node_modules/babel-plugin-istanbul": { - "version": "6.1.1", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@babel/helper-plugin-utils": "^7.0.0", - "@istanbuljs/load-nyc-config": "^1.0.0", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-instrument": "^5.0.4", - "test-exclude": "^6.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/babel-plugin-istanbul/node_modules/istanbul-lib-instrument": { - "version": "5.2.1", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@babel/core": "^7.12.3", - "@babel/parser": "^7.14.7", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-coverage": "^3.2.0", - "semver": "^6.3.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/babel-plugin-jest-hoist": { - "version": "29.6.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/template": "^7.3.3", - "@babel/types": "^7.3.3", - "@types/babel__core": "^7.1.14", - "@types/babel__traverse": "^7.0.6" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/babel-preset-current-node-syntax": { - "version": "1.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/plugin-syntax-async-generators": "^7.8.4", - "@babel/plugin-syntax-bigint": "^7.8.3", - "@babel/plugin-syntax-class-properties": "^7.12.13", - "@babel/plugin-syntax-class-static-block": "^7.14.5", - "@babel/plugin-syntax-import-attributes": "^7.24.7", - "@babel/plugin-syntax-import-meta": "^7.10.4", - "@babel/plugin-syntax-json-strings": "^7.8.3", - "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", - "@babel/plugin-syntax-numeric-separator": "^7.10.4", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", - "@babel/plugin-syntax-optional-chaining": "^7.8.3", - "@babel/plugin-syntax-private-property-in-object": "^7.14.5", - "@babel/plugin-syntax-top-level-await": "^7.14.5" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "../../node_modules/babel-preset-jest": { - "version": "29.6.3", - "dev": true, - "license": "MIT", - "dependencies": { - "babel-plugin-jest-hoist": "^29.6.3", - "babel-preset-current-node-syntax": "^1.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "../../node_modules/balanced-match": { - "version": "1.0.2", - "dev": true, - "license": "MIT" - }, - "../../node_modules/base64-js": { - "version": "1.5.1", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "../../node_modules/binary-extensions": { - "version": "2.3.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/bl": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - } - }, - "../../node_modules/bluebird": { - "version": "3.7.2", - "dev": true, - "license": "MIT" - }, - "../../node_modules/brace-expansion": { - "version": "1.1.11", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "../../node_modules/braces": { - "version": "3.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "fill-range": "^7.1.1" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/browserslist": { - "version": "4.23.3", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "caniuse-lite": "^1.0.30001646", - "electron-to-chromium": "^1.5.4", - "node-releases": "^2.0.18", - "update-browserslist-db": "^1.1.0" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - } - }, - "../../node_modules/bs-logger": { - "version": "0.2.6", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-json-stable-stringify": "2.x" - }, - "engines": { - "node": ">= 6" - } - }, - "../../node_modules/bser": { - "version": "2.1.1", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "node-int64": "^0.4.0" - } - }, - "../../node_modules/buffer": { - "version": "5.7.1", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, - "../../node_modules/buffer-from": { - "version": "1.1.2", - "dev": true, - "license": "MIT" - }, - "../../node_modules/caching-transform": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "hasha": "^5.0.0", - "make-dir": "^3.0.0", - "package-hash": "^4.0.0", - "write-file-atomic": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/call-bind": { - "version": "1.0.7", - "dev": true, - "license": "MIT", - "dependencies": { - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "set-function-length": "^1.2.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../../node_modules/call-me-maybe": { - "version": "1.0.2", - "dev": true, - "license": "MIT" - }, - "../../node_modules/callsites": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../../node_modules/camel-case": { - "version": "4.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "pascal-case": "^3.1.2", - "tslib": "^2.0.3" - } - }, - "../../node_modules/camelcase": { - "version": "5.3.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../../node_modules/caniuse-lite": { - "version": "1.0.30001653", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "CC-BY-4.0" - }, - "../../node_modules/capital-case": { - "version": "1.0.4", - "dev": true, - "license": "MIT", - "dependencies": { - "no-case": "^3.0.4", - "tslib": "^2.0.3", - "upper-case-first": "^2.0.2" - } - }, - "../../node_modules/caseless": { - "version": "0.12.0", - "dev": true, - "license": "Apache-2.0" - }, - "../../node_modules/chalk": { - "version": "4.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "../../node_modules/change-case": { - "version": "4.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "camel-case": "^4.1.2", - "capital-case": "^1.0.4", - "constant-case": "^3.0.4", - "dot-case": "^3.0.4", - "header-case": "^2.0.4", - "no-case": "^3.0.4", - "param-case": "^3.0.4", - "pascal-case": "^3.1.2", - "path-case": "^3.0.4", - "sentence-case": "^3.0.4", - "snake-case": "^3.0.4", - "tslib": "^2.0.3" - } - }, - "../../node_modules/char-regex": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - } - }, - "../../node_modules/chardet": { - "version": "0.7.0", - "dev": true, - "license": "MIT" - }, - "../../node_modules/charset": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4.0.0" - } - }, - "../../node_modules/chokidar": { - "version": "3.6.0", - "dev": true, - "license": "MIT", - "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "../../node_modules/chokidar/node_modules/glob-parent": { - "version": "5.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "../../node_modules/ci-info": { - "version": "3.9.0", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/sibiraj-s" - } - ], - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../node_modules/cjs-module-lexer": { - "version": "1.4.1", - "dev": true, - "license": "MIT" - }, - "../../node_modules/clean-stack": { - "version": "2.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../../node_modules/cli-cursor": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "restore-cursor": "^5.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/cli-spinners": { - "version": "2.9.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/cli-width": { - "version": "4.1.0", - "dev": true, - "license": "ISC", - "engines": { - "node": ">= 12" - } - }, - "../../node_modules/cliui": { - "version": "7.0.4", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "../../node_modules/clone": { - "version": "1.0.4", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8" - } - }, - "../../node_modules/co": { - "version": "4.6.0", - "dev": true, - "license": "MIT", - "engines": { - "iojs": ">= 1.0.0", - "node": ">= 0.12.0" - } - }, - "../../node_modules/collect-v8-coverage": { - "version": "1.0.2", - "dev": true, - "license": "MIT" - }, - "../../node_modules/color-convert": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "../../node_modules/color-name": { - "version": "1.1.4", - "dev": true, - "license": "MIT" - }, - "../../node_modules/commondir": { - "version": "1.0.1", - "dev": true, - "license": "MIT" - }, - "../../node_modules/compute-gcd": { - "version": "1.2.1", - "dev": true, - "dependencies": { - "validate.io-array": "^1.0.3", - "validate.io-function": "^1.0.2", - "validate.io-integer-array": "^1.0.0" - } - }, - "../../node_modules/compute-lcm": { - "version": "1.1.2", - "dev": true, - "dependencies": { - "compute-gcd": "^1.2.1", - "validate.io-array": "^1.0.3", - "validate.io-function": "^1.0.2", - "validate.io-integer-array": "^1.0.0" - } - }, - "../../node_modules/concat-map": { - "version": "0.0.1", - "dev": true, - "license": "MIT" - }, - "../../node_modules/constant-case": { - "version": "3.0.4", - "dev": true, - "license": "MIT", - "dependencies": { - "no-case": "^3.0.4", - "tslib": "^2.0.3", - "upper-case": "^2.0.2" - } - }, - "../../node_modules/content-type": { - "version": "1.0.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../../node_modules/convert-source-map": { - "version": "1.9.0", - "dev": true, - "license": "MIT" - }, - "../../node_modules/create-jest": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^29.6.3", - "chalk": "^4.0.0", - "exit": "^0.1.2", - "graceful-fs": "^4.2.9", - "jest-config": "^29.7.0", - "jest-util": "^29.7.0", - "prompts": "^2.0.1" - }, - "bin": { - "create-jest": "bin/create-jest.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/create-require": { - "version": "1.1.1", - "dev": true, - "license": "MIT" - }, - "../../node_modules/cross-fetch": { - "version": "3.1.8", - "dev": true, - "license": "MIT", - "dependencies": { - "node-fetch": "^2.6.12" - } - }, - "../../node_modules/cross-spawn": { - "version": "7.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "../../node_modules/debug": { - "version": "4.3.6", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "../../node_modules/decamelize": { - "version": "1.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/dedent": { - "version": "1.5.3", - "dev": true, - "license": "MIT", - "peerDependencies": { - "babel-plugin-macros": "^3.1.0" - }, - "peerDependenciesMeta": { - "babel-plugin-macros": { - "optional": true - } - } - }, - "../../node_modules/deep-is": { - "version": "0.1.4", - "dev": true, - "license": "MIT" - }, - "../../node_modules/deepmerge": { - "version": "4.3.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/default-require-extensions": { - "version": "3.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "strip-bom": "^4.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/defaults": { - "version": "1.0.4", - "dev": true, - "license": "MIT", - "dependencies": { - "clone": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/define-data-property": { - "version": "1.1.4", - "dev": true, - "license": "MIT", - "dependencies": { - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "gopd": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../../node_modules/del": { - "version": "7.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "globby": "^13.1.2", - "graceful-fs": "^4.2.10", - "is-glob": "^4.0.3", - "is-path-cwd": "^3.0.0", - "is-path-inside": "^4.0.0", - "p-map": "^5.5.0", - "rimraf": "^3.0.2", - "slash": "^4.0.0" - }, - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/del/node_modules/aggregate-error": { - "version": "4.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "clean-stack": "^4.0.0", - "indent-string": "^5.0.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/del/node_modules/clean-stack": { - "version": "4.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "escape-string-regexp": "5.0.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/del/node_modules/escape-string-regexp": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/del/node_modules/indent-string": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/del/node_modules/is-path-inside": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/del/node_modules/p-map": { - "version": "5.5.0", - "dev": true, - "license": "MIT", - "dependencies": { - "aggregate-error": "^4.0.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/del/node_modules/slash": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/detect-file": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/detect-newline": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../node_modules/diff-sequences": { - "version": "29.6.3", - "dev": true, - "license": "MIT", - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/dir-glob": { - "version": "3.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/doctrine": { - "version": "3.0.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../../node_modules/dot-case": { - "version": "3.0.4", - "dev": true, - "license": "MIT", - "dependencies": { - "no-case": "^3.0.4", - "tslib": "^2.0.3" - } - }, - "../../node_modules/ejs": { - "version": "3.1.10", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "jake": "^10.8.5" - }, - "bin": { - "ejs": "bin/cli.js" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/electron-to-chromium": { - "version": "1.5.13", - "dev": true, - "license": "ISC" - }, - "../../node_modules/emittery": { - "version": "0.13.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sindresorhus/emittery?sponsor=1" - } - }, - "../../node_modules/emoji-regex": { - "version": "8.0.0", - "dev": true, - "license": "MIT" - }, - "../../node_modules/error-ex": { - "version": "1.3.2", - "dev": true, - "license": "MIT", - "dependencies": { - "is-arrayish": "^0.2.1" - } - }, - "../../node_modules/es-define-property": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "get-intrinsic": "^1.2.4" - }, - "engines": { - "node": ">= 0.4" - } - }, - "../../node_modules/es-errors": { - "version": "1.3.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "../../node_modules/es6-error": { - "version": "4.1.1", - "dev": true, - "license": "MIT" - }, - "../../node_modules/escalade": { - "version": "3.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../../node_modules/escape-string-regexp": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/eslint": { - "version": "8.57.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.57.0", - "@humanwhocodes/config-array": "^0.11.14", - "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "@ungap/structured-clone": "^1.2.0", - "ajv": "^6.12.4", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.3", - "espree": "^9.6.1", - "esquery": "^1.4.2", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", - "ignore": "^5.2.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", - "text-table": "^0.2.0" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "../../node_modules/eslint-config-prettier": { - "version": "9.1.0", - "dev": true, - "license": "MIT", - "bin": { - "eslint-config-prettier": "bin/cli.js" - }, - "peerDependencies": { - "eslint": ">=7.0.0" - } - }, - "../../node_modules/eslint-plugin-chai-friendly": { - "version": "0.7.4", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - }, - "peerDependencies": { - "eslint": ">=3.0.0" - } - }, - "../../node_modules/eslint-plugin-prettier": { - "version": "5.2.1", - "dev": true, - "license": "MIT", - "dependencies": { - "prettier-linter-helpers": "^1.0.0", - "synckit": "^0.9.1" - }, - "engines": { - "node": "^14.18.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint-plugin-prettier" - }, - "peerDependencies": { - "@types/eslint": ">=8.0.0", - "eslint": ">=8.0.0", - "eslint-config-prettier": "*", - "prettier": ">=3.0.0" - }, - "peerDependenciesMeta": { - "@types/eslint": { - "optional": true - }, - "eslint-config-prettier": { - "optional": true - } - } - }, - "../../node_modules/eslint-scope": { - "version": "7.2.2", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "../../node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "../../node_modules/eslint/node_modules/@eslint/js": { - "version": "8.57.0", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "../../node_modules/eslint/node_modules/argparse": { - "version": "2.0.1", - "dev": true, - "license": "Python-2.0" - }, - "../../node_modules/eslint/node_modules/js-yaml": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "../../node_modules/espree": { - "version": "9.6.1", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "acorn": "^8.9.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "../../node_modules/esprima": { - "version": "4.0.1", - "dev": true, - "license": "BSD-2-Clause", - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, - "../../node_modules/esquery": { - "version": "1.6.0", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "estraverse": "^5.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "../../node_modules/esrecurse": { - "version": "4.3.0", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "../../node_modules/estraverse": { - "version": "5.3.0", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "../../node_modules/esutils": { - "version": "2.0.3", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/execa": { - "version": "5.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "cross-spawn": "^7.0.3", - "get-stream": "^6.0.0", - "human-signals": "^2.1.0", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.1", - "onetime": "^5.1.2", - "signal-exit": "^3.0.3", - "strip-final-newline": "^2.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" - } - }, - "../../node_modules/exit": { - "version": "0.1.2", - "dev": true, - "engines": { - "node": ">= 0.8.0" - } - }, - "../../node_modules/expand-tilde": { - "version": "2.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "homedir-polyfill": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/expect": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/expect-utils": "^29.7.0", - "jest-get-type": "^29.6.3", - "jest-matcher-utils": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-util": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/extend": { - "version": "3.0.2", - "dev": true, - "license": "MIT" - }, - "../../node_modules/external-editor": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "chardet": "^0.7.0", - "iconv-lite": "^0.4.24", - "tmp": "^0.0.33" - }, - "engines": { - "node": ">=4" - } - }, - "../../node_modules/external-editor/node_modules/iconv-lite": { - "version": "0.4.24", - "dev": true, - "license": "MIT", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/fast-deep-equal": { - "version": "3.1.3", - "dev": true, - "license": "MIT" - }, - "../../node_modules/fast-diff": { - "version": "1.3.0", - "dev": true, - "license": "Apache-2.0" - }, - "../../node_modules/fast-glob": { - "version": "3.3.2", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "../../node_modules/fast-glob/node_modules/glob-parent": { - "version": "5.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "../../node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "dev": true, - "license": "MIT" - }, - "../../node_modules/fast-levenshtein": { - "version": "2.0.6", - "dev": true, - "license": "MIT" - }, - "../../node_modules/fast-redact": { - "version": "3.5.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../../node_modules/fast-safe-stringify": { - "version": "2.1.1", - "dev": true, - "license": "MIT" - }, - "../../node_modules/fast-uri": { - "version": "3.0.1", - "dev": true, - "license": "MIT" - }, - "../../node_modules/fast-xml-parser": { - "version": "4.5.0", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/NaturalIntelligence" - }, - { - "type": "paypal", - "url": "https://paypal.me/naturalintelligence" - } - ], - "license": "MIT", - "dependencies": { - "strnum": "^1.0.5" - }, - "bin": { - "fxparser": "src/cli/cli.js" - } - }, - "../../node_modules/fastestsmallesttextencoderdecoder": { - "version": "1.0.22", - "dev": true, - "license": "CC0-1.0" - }, - "../../node_modules/fastq": { - "version": "1.17.1", - "dev": true, - "license": "ISC", - "dependencies": { - "reusify": "^1.0.4" - } - }, - "../../node_modules/fb-watchman": { - "version": "2.0.2", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "bser": "2.1.1" - } - }, - "../../node_modules/figures": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "escape-string-regexp": "^1.0.5" - }, - "engines": { - "node": ">=4" - } - }, - "../../node_modules/figures/node_modules/escape-string-regexp": { - "version": "1.0.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.0" - } - }, - "../../node_modules/file-entry-cache": { - "version": "6.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "flat-cache": "^3.0.4" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "../../node_modules/file-type": { - "version": "3.9.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/filelist": { - "version": "1.0.4", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "minimatch": "^5.0.1" - } - }, - "../../node_modules/filelist/node_modules/brace-expansion": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "../../node_modules/filelist/node_modules/minimatch": { - "version": "5.1.6", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } - }, - "../../node_modules/fill-range": { - "version": "7.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/find-cache-dir": { - "version": "3.3.2", - "dev": true, - "license": "MIT", - "dependencies": { - "commondir": "^1.0.1", - "make-dir": "^3.0.2", - "pkg-dir": "^4.1.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/avajs/find-cache-dir?sponsor=1" - } - }, - "../../node_modules/find-up": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/findup-sync": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "detect-file": "^1.0.0", - "is-glob": "^4.0.3", - "micromatch": "^4.0.4", - "resolve-dir": "^1.0.1" - }, - "engines": { - "node": ">= 10.13.0" - } - }, - "../../node_modules/fined": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "expand-tilde": "^2.0.2", - "is-plain-object": "^5.0.0", - "object.defaults": "^1.1.0", - "object.pick": "^1.3.0", - "parse-filepath": "^1.0.2" - }, - "engines": { - "node": ">= 10.13.0" - } - }, - "../../node_modules/flagged-respawn": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 10.13.0" - } - }, - "../../node_modules/flat-cache": { - "version": "3.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "flatted": "^3.2.9", - "keyv": "^4.5.3", - "rimraf": "^3.0.2" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "../../node_modules/flatstr": { - "version": "1.0.12", - "dev": true, - "license": "MIT" - }, - "../../node_modules/flatted": { - "version": "3.3.1", - "dev": true, - "license": "ISC" - }, - "../../node_modules/fnv-plus": { - "version": "1.3.1", - "dev": true, - "license": "MIT" - }, - "../../node_modules/for-in": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/for-own": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "for-in": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/foreach": { - "version": "2.0.6", - "dev": true, - "license": "MIT" - }, - "../../node_modules/foreground-child": { - "version": "2.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "cross-spawn": "^7.0.0", - "signal-exit": "^3.0.2" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "../../node_modules/format-util": { - "version": "1.0.5", - "dev": true, - "license": "MIT" - }, - "../../node_modules/fp-ts": { - "version": "2.16.9", - "dev": true, - "license": "MIT" - }, - "../../node_modules/fromentries": { - "version": "1.3.2", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "../../node_modules/fs.realpath": { - "version": "1.0.0", - "dev": true, - "license": "ISC" - }, - "../../node_modules/fsevents": { - "version": "2.3.3", - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "../../node_modules/function-bind": { - "version": "1.1.2", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../../node_modules/gensync": { - "version": "1.0.0-beta.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../../node_modules/get-caller-file": { - "version": "2.0.5", - "dev": true, - "license": "ISC", - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "../../node_modules/get-east-asian-width": { - "version": "1.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/get-intrinsic": { - "version": "1.2.4", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3", - "hasown": "^2.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../../node_modules/get-package-type": { - "version": "0.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.0.0" - } - }, - "../../node_modules/get-stream": { - "version": "6.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/glob-parent": { - "version": "6.0.2", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "../../node_modules/global-modules": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "global-prefix": "^1.0.1", - "is-windows": "^1.0.1", - "resolve-dir": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/global-prefix": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "expand-tilde": "^2.0.2", - "homedir-polyfill": "^1.0.1", - "ini": "^1.3.4", - "is-windows": "^1.0.1", - "which": "^1.2.14" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/global-prefix/node_modules/which": { - "version": "1.3.1", - "dev": true, - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "which": "bin/which" - } - }, - "../../node_modules/globals": { - "version": "13.24.0", - "dev": true, - "license": "MIT", - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/globby": { - "version": "13.2.2", - "dev": true, - "license": "MIT", - "dependencies": { - "dir-glob": "^3.0.1", - "fast-glob": "^3.3.0", - "ignore": "^5.2.4", - "merge2": "^1.4.1", - "slash": "^4.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/globby/node_modules/slash": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/gopd": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "get-intrinsic": "^1.1.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../../node_modules/graceful-fs": { - "version": "4.2.11", - "dev": true, - "license": "ISC" - }, - "../../node_modules/graphemer": { - "version": "1.4.0", - "dev": true, - "license": "MIT" - }, - "../../node_modules/handlebars": { - "version": "4.7.8", - "dev": true, - "license": "MIT", - "dependencies": { - "minimist": "^1.2.5", - "neo-async": "^2.6.2", - "source-map": "^0.6.1", - "wordwrap": "^1.0.0" - }, - "bin": { - "handlebars": "bin/handlebars" - }, - "engines": { - "node": ">=0.4.7" - }, - "optionalDependencies": { - "uglify-js": "^3.1.4" - } - }, - "../../node_modules/handler-agent": { - "version": "0.2.0", - "dev": true, - "license": "MIT" - }, - "../../node_modules/has-flag": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../node_modules/has-property-descriptors": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "es-define-property": "^1.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../../node_modules/has-proto": { - "version": "1.0.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../../node_modules/has-symbols": { - "version": "1.0.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../../node_modules/hasha": { - "version": "5.2.2", - "dev": true, - "license": "MIT", - "dependencies": { - "is-stream": "^2.0.0", - "type-fest": "^0.8.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/hasha/node_modules/type-fest": { - "version": "0.8.1", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=8" - } - }, - "../../node_modules/hasown": { - "version": "2.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "../../node_modules/header-case": { - "version": "2.0.4", - "dev": true, - "license": "MIT", - "dependencies": { - "capital-case": "^1.0.4", - "tslib": "^2.0.3" - } - }, - "../../node_modules/homedir-polyfill": { - "version": "1.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "parse-passwd": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/html-escaper": { - "version": "2.0.2", - "dev": true, - "license": "MIT" - }, - "../../node_modules/http-proxy-agent": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@tootallnate/once": "2", - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" - } - }, - "../../node_modules/http-reasons": { - "version": "0.1.0", - "dev": true, - "license": "Apache-2.0" - }, - "../../node_modules/https-proxy-agent": { - "version": "5.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" - } - }, - "../../node_modules/human-signals": { - "version": "2.1.0", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=10.17.0" - } - }, - "../../node_modules/iconv-lite": { - "version": "0.6.3", - "dev": true, - "license": "MIT", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/ieee754": { - "version": "1.2.1", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "BSD-3-Clause" - }, - "../../node_modules/ignore": { - "version": "5.3.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "../../node_modules/import-fresh": { - "version": "3.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/import-local": { - "version": "3.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "pkg-dir": "^4.2.0", - "resolve-cwd": "^3.0.0" - }, - "bin": { - "import-local-fixture": "fixtures/cli.js" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/imurmurhash": { - "version": "0.1.4", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.19" - } - }, - "../../node_modules/indent-string": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../node_modules/inflight": { - "version": "1.0.6", - "dev": true, - "license": "ISC", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "../../node_modules/inherits": { - "version": "2.0.4", - "dev": true, - "license": "ISC" - }, - "../../node_modules/ini": { - "version": "1.3.8", - "dev": true, - "license": "ISC" - }, - "../../node_modules/inquirer": { - "version": "9.3.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@inquirer/figures": "^1.0.3", - "ansi-escapes": "^4.3.2", - "cli-width": "^4.1.0", - "external-editor": "^3.1.0", - "mute-stream": "1.0.0", - "ora": "^5.4.1", - "run-async": "^3.0.0", - "rxjs": "^7.8.1", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^6.2.0", - "yoctocolors-cjs": "^2.1.2" - }, - "engines": { - "node": ">=18" - } - }, - "../../node_modules/inquirer/node_modules/cli-cursor": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "restore-cursor": "^3.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/inquirer/node_modules/is-interactive": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../node_modules/inquirer/node_modules/is-unicode-supported": { - "version": "0.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/inquirer/node_modules/log-symbols": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/inquirer/node_modules/ora": { - "version": "5.4.1", - "dev": true, - "license": "MIT", - "dependencies": { - "bl": "^4.1.0", - "chalk": "^4.1.0", - "cli-cursor": "^3.1.0", - "cli-spinners": "^2.5.0", - "is-interactive": "^1.0.0", - "is-unicode-supported": "^0.1.0", - "log-symbols": "^4.1.0", - "strip-ansi": "^6.0.0", - "wcwidth": "^1.0.1" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/inquirer/node_modules/restore-cursor": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "onetime": "^5.1.0", - "signal-exit": "^3.0.2" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/inquirer/node_modules/wrap-ansi": { - "version": "6.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/interpret": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10.13.0" - } - }, - "../../node_modules/io-ts": { - "version": "2.2.21", - "dev": true, - "license": "MIT", - "peerDependencies": { - "fp-ts": "^2.5.0" - } - }, - "../../node_modules/is-absolute": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "is-relative": "^1.0.0", - "is-windows": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/is-arrayish": { - "version": "0.2.1", - "dev": true, - "license": "MIT" - }, - "../../node_modules/is-binary-path": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/is-core-module": { - "version": "2.15.1", - "dev": true, - "license": "MIT", - "dependencies": { - "hasown": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../../node_modules/is-extglob": { - "version": "2.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../node_modules/is-generator-fn": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../../node_modules/is-glob": { - "version": "4.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/is-interactive": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/is-number": { - "version": "7.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, - "../../node_modules/is-path-cwd": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/is-path-inside": { - "version": "3.0.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../node_modules/is-plain-object": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/is-relative": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "is-unc-path": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/is-stream": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/is-typedarray": { - "version": "1.0.0", - "dev": true, - "license": "MIT" - }, - "../../node_modules/is-unc-path": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "unc-path-regex": "^0.1.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/is-unicode-supported": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/is-windows": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/isbinaryfile": { - "version": "5.0.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 18.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/gjtorikian/" - } - }, - "../../node_modules/isexe": { - "version": "2.0.0", - "dev": true, - "license": "ISC" - }, - "../../node_modules/isobject": { - "version": "3.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/isomorphic-fetch": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "node-fetch": "^2.6.1", - "whatwg-fetch": "^3.4.1" - } - }, - "../../node_modules/istanbul-lib-coverage": { - "version": "3.2.2", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=8" - } - }, - "../../node_modules/istanbul-lib-hook": { - "version": "3.0.0", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "append-transform": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/istanbul-lib-instrument": { - "version": "4.0.3", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@babel/core": "^7.7.5", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-coverage": "^3.0.0", - "semver": "^6.3.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/istanbul-lib-processinfo": { - "version": "2.0.3", - "dev": true, - "license": "ISC", - "dependencies": { - "archy": "^1.0.0", - "cross-spawn": "^7.0.3", - "istanbul-lib-coverage": "^3.2.0", - "p-map": "^3.0.0", - "rimraf": "^3.0.0", - "uuid": "^8.3.2" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/istanbul-lib-processinfo/node_modules/uuid": { - "version": "8.3.2", - "dev": true, - "license": "MIT", - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "../../node_modules/istanbul-lib-report": { - "version": "3.0.1", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^4.0.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - } - }, - "../../node_modules/istanbul-lib-report/node_modules/make-dir": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "semver": "^7.5.3" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/istanbul-lib-report/node_modules/semver": { - "version": "7.6.3", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "../../node_modules/istanbul-lib-source-maps": { - "version": "4.0.1", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "debug": "^4.1.1", - "istanbul-lib-coverage": "^3.0.0", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=10" - } - }, - "../../node_modules/istanbul-reports": { - "version": "3.1.7", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "html-escaper": "^2.0.0", - "istanbul-lib-report": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/jake": { - "version": "10.9.2", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "async": "^3.2.3", - "chalk": "^4.0.2", - "filelist": "^1.0.4", - "minimatch": "^3.1.2" - }, - "bin": { - "jake": "bin/cli.js" - }, - "engines": { - "node": ">=10" - } - }, - "../../node_modules/jest": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/core": "^29.7.0", - "@jest/types": "^29.6.3", - "import-local": "^3.0.2", - "jest-cli": "^29.7.0" - }, - "bin": { - "jest": "bin/jest.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "../../node_modules/jest-changed-files": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "execa": "^5.0.0", - "jest-util": "^29.7.0", - "p-limit": "^3.1.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/jest-circus": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/environment": "^29.7.0", - "@jest/expect": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "co": "^4.6.0", - "dedent": "^1.0.0", - "is-generator-fn": "^2.0.0", - "jest-each": "^29.7.0", - "jest-matcher-utils": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-runtime": "^29.7.0", - "jest-snapshot": "^29.7.0", - "jest-util": "^29.7.0", - "p-limit": "^3.1.0", - "pretty-format": "^29.7.0", - "pure-rand": "^6.0.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/jest-cli": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/core": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/types": "^29.6.3", - "chalk": "^4.0.0", - "create-jest": "^29.7.0", - "exit": "^0.1.2", - "import-local": "^3.0.2", - "jest-config": "^29.7.0", - "jest-util": "^29.7.0", - "jest-validate": "^29.7.0", - "yargs": "^17.3.1" - }, - "bin": { - "jest": "bin/jest.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "../../node_modules/jest-cli/node_modules/cliui": { - "version": "8.0.1", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "../../node_modules/jest-cli/node_modules/yargs": { - "version": "17.7.2", - "dev": true, - "license": "MIT", - "dependencies": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - }, - "engines": { - "node": ">=12" - } - }, - "../../node_modules/jest-cli/node_modules/yargs-parser": { - "version": "21.1.1", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=12" - } - }, - "../../node_modules/jest-config": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/core": "^7.11.6", - "@jest/test-sequencer": "^29.7.0", - "@jest/types": "^29.6.3", - "babel-jest": "^29.7.0", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "deepmerge": "^4.2.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-circus": "^29.7.0", - "jest-environment-node": "^29.7.0", - "jest-get-type": "^29.6.3", - "jest-regex-util": "^29.6.3", - "jest-resolve": "^29.7.0", - "jest-runner": "^29.7.0", - "jest-util": "^29.7.0", - "jest-validate": "^29.7.0", - "micromatch": "^4.0.4", - "parse-json": "^5.2.0", - "pretty-format": "^29.7.0", - "slash": "^3.0.0", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "@types/node": "*", - "ts-node": ">=9.0.0" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - }, - "ts-node": { - "optional": true - } - } - }, - "../../node_modules/jest-config/node_modules/glob": { - "version": "7.2.3", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../../node_modules/jest-diff": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.0.0", - "diff-sequences": "^29.6.3", - "jest-get-type": "^29.6.3", - "pretty-format": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/jest-docblock": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "detect-newline": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/jest-each": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^29.6.3", - "chalk": "^4.0.0", - "jest-get-type": "^29.6.3", - "jest-util": "^29.7.0", - "pretty-format": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/jest-environment-node": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/environment": "^29.7.0", - "@jest/fake-timers": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "jest-mock": "^29.7.0", - "jest-util": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/jest-get-type": { - "version": "29.6.3", - "dev": true, - "license": "MIT", - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/jest-haste-map": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^29.6.3", - "@types/graceful-fs": "^4.1.3", - "@types/node": "*", - "anymatch": "^3.0.3", - "fb-watchman": "^2.0.0", - "graceful-fs": "^4.2.9", - "jest-regex-util": "^29.6.3", - "jest-util": "^29.7.0", - "jest-worker": "^29.7.0", - "micromatch": "^4.0.4", - "walker": "^1.0.8" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "optionalDependencies": { - "fsevents": "^2.3.2" - } - }, - "../../node_modules/jest-leak-detector": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "jest-get-type": "^29.6.3", - "pretty-format": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/jest-matcher-utils": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.0.0", - "jest-diff": "^29.7.0", - "jest-get-type": "^29.6.3", - "pretty-format": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/jest-message-util": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^29.6.3", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "micromatch": "^4.0.4", - "pretty-format": "^29.7.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/jest-mock": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^29.6.3", - "@types/node": "*", - "jest-util": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/jest-pnp-resolver": { - "version": "1.2.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - }, - "peerDependencies": { - "jest-resolve": "*" - }, - "peerDependenciesMeta": { - "jest-resolve": { - "optional": true - } - } - }, - "../../node_modules/jest-regex-util": { - "version": "29.6.3", - "dev": true, - "license": "MIT", - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/jest-resolve": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.7.0", - "jest-pnp-resolver": "^1.2.2", - "jest-util": "^29.7.0", - "jest-validate": "^29.7.0", - "resolve": "^1.20.0", - "resolve.exports": "^2.0.0", - "slash": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/jest-resolve-dependencies": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "jest-regex-util": "^29.6.3", - "jest-snapshot": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/jest-runner": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/console": "^29.7.0", - "@jest/environment": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "emittery": "^0.13.1", - "graceful-fs": "^4.2.9", - "jest-docblock": "^29.7.0", - "jest-environment-node": "^29.7.0", - "jest-haste-map": "^29.7.0", - "jest-leak-detector": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-resolve": "^29.7.0", - "jest-runtime": "^29.7.0", - "jest-util": "^29.7.0", - "jest-watcher": "^29.7.0", - "jest-worker": "^29.7.0", - "p-limit": "^3.1.0", - "source-map-support": "0.5.13" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/jest-runtime": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/environment": "^29.7.0", - "@jest/fake-timers": "^29.7.0", - "@jest/globals": "^29.7.0", - "@jest/source-map": "^29.6.3", - "@jest/test-result": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "cjs-module-lexer": "^1.0.0", - "collect-v8-coverage": "^1.0.0", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-mock": "^29.7.0", - "jest-regex-util": "^29.6.3", - "jest-resolve": "^29.7.0", - "jest-snapshot": "^29.7.0", - "jest-util": "^29.7.0", - "slash": "^3.0.0", - "strip-bom": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/jest-runtime/node_modules/glob": { - "version": "7.2.3", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../../node_modules/jest-snapshot": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/core": "^7.11.6", - "@babel/generator": "^7.7.2", - "@babel/plugin-syntax-jsx": "^7.7.2", - "@babel/plugin-syntax-typescript": "^7.7.2", - "@babel/types": "^7.3.3", - "@jest/expect-utils": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", - "babel-preset-current-node-syntax": "^1.0.0", - "chalk": "^4.0.0", - "expect": "^29.7.0", - "graceful-fs": "^4.2.9", - "jest-diff": "^29.7.0", - "jest-get-type": "^29.6.3", - "jest-matcher-utils": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-util": "^29.7.0", - "natural-compare": "^1.4.0", - "pretty-format": "^29.7.0", - "semver": "^7.5.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/jest-snapshot/node_modules/semver": { - "version": "7.6.3", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "../../node_modules/jest-util": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/jest-validate": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^29.6.3", - "camelcase": "^6.2.0", - "chalk": "^4.0.0", - "jest-get-type": "^29.6.3", - "leven": "^3.1.0", - "pretty-format": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/jest-validate/node_modules/camelcase": { - "version": "6.3.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/jest-watcher": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/test-result": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "emittery": "^0.13.1", - "jest-util": "^29.7.0", - "string-length": "^4.0.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/jest-worker": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*", - "jest-util": "^29.7.0", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/jest-worker/node_modules/supports-color": { - "version": "8.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "../../node_modules/js-tokens": { - "version": "4.0.0", - "dev": true, - "license": "MIT" - }, - "../../node_modules/js-yaml": { - "version": "3.14.1", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "../../node_modules/jsesc": { - "version": "2.5.2", - "dev": true, - "license": "MIT", - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=4" - } - }, - "../../node_modules/json-buffer": { - "version": "3.0.1", - "dev": true, - "license": "MIT" - }, - "../../node_modules/json-parse-better-errors": { - "version": "1.0.2", - "dev": true, - "license": "MIT" - }, - "../../node_modules/json-parse-even-better-errors": { - "version": "2.3.1", - "dev": true, - "license": "MIT" - }, - "../../node_modules/json-pointer": { - "version": "0.6.2", - "dev": true, - "license": "MIT", - "dependencies": { - "foreach": "^2.0.4" - } - }, - "../../node_modules/json-promise": { - "version": "1.1.8", - "dev": true, - "license": "MIT", - "dependencies": { - "bluebird": "*" - } - }, - "../../node_modules/json-schema-compare": { - "version": "0.2.2", - "dev": true, - "license": "MIT", - "dependencies": { - "lodash": "^4.17.4" - } - }, - "../../node_modules/json-schema-faker": { - "version": "0.5.6", - "dev": true, - "license": "MIT", - "dependencies": { - "json-schema-ref-parser": "^6.1.0", - "jsonpath-plus": "^7.2.0" - }, - "bin": { - "jsf": "bin/gen.cjs" - } - }, - "../../node_modules/json-schema-ref-parser": { - "version": "6.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "call-me-maybe": "^1.0.1", - "js-yaml": "^3.12.1", - "ono": "^4.0.11" - } - }, - "../../node_modules/json-schema-traverse": { - "version": "0.4.1", - "dev": true, - "license": "MIT" - }, - "../../node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "dev": true, - "license": "MIT" - }, - "../../node_modules/json-stringify-safe": { - "version": "5.0.1", - "dev": true, - "license": "ISC" - }, - "../../node_modules/json5": { - "version": "2.2.3", - "dev": true, - "license": "MIT", - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, - "../../node_modules/jsonc-parser": { - "version": "2.2.1", - "dev": true, - "license": "MIT" - }, - "../../node_modules/jsonpath-plus": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12.0.0" - } - }, - "../../node_modules/keyv": { - "version": "4.5.4", - "dev": true, - "license": "MIT", - "dependencies": { - "json-buffer": "3.0.1" - } - }, - "../../node_modules/kind-of": { - "version": "6.0.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/kleur": { - "version": "3.0.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../../node_modules/leven": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../../node_modules/levn": { - "version": "0.4.1", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "../../node_modules/liftoff": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "extend": "^3.0.2", - "findup-sync": "^5.0.0", - "fined": "^2.0.0", - "flagged-respawn": "^2.0.0", - "is-plain-object": "^5.0.0", - "object.map": "^1.0.1", - "rechoir": "^0.8.0", - "resolve": "^1.20.0" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "../../node_modules/lines-and-columns": { - "version": "1.2.4", - "dev": true, - "license": "MIT" - }, - "../../node_modules/liquid-json": { - "version": "0.3.1", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=4" - } - }, - "../../node_modules/load-json-file": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.1.2", - "parse-json": "^4.0.0", - "pify": "^3.0.0", - "strip-bom": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "../../node_modules/load-json-file/node_modules/parse-json": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - }, - "engines": { - "node": ">=4" - } - }, - "../../node_modules/load-json-file/node_modules/strip-bom": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../../node_modules/locate-path": { - "version": "6.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/lodash": { - "version": "4.17.21", - "dev": true, - "license": "MIT" - }, - "../../node_modules/lodash.camelcase": { - "version": "4.3.0", - "dev": true, - "license": "MIT" - }, - "../../node_modules/lodash.flattendeep": { - "version": "4.4.0", - "dev": true, - "license": "MIT" - }, - "../../node_modules/lodash.get": { - "version": "4.4.2", - "dev": true, - "license": "MIT" - }, - "../../node_modules/lodash.memoize": { - "version": "4.1.2", - "dev": true, - "license": "MIT" - }, - "../../node_modules/lodash.merge": { - "version": "4.6.2", - "dev": true, - "license": "MIT" - }, - "../../node_modules/log-symbols": { - "version": "6.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^5.3.0", - "is-unicode-supported": "^1.3.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/log-symbols/node_modules/chalk": { - "version": "5.3.0", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.17.0 || ^14.13 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "../../node_modules/log-symbols/node_modules/is-unicode-supported": { - "version": "1.3.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/lower-case": { - "version": "2.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "tslib": "^2.0.3" - } - }, - "../../node_modules/lru-cache": { - "version": "5.1.1", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^3.0.2" - } - }, - "../../node_modules/make-dir": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "semver": "^6.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/make-error": { - "version": "1.3.6", - "dev": true, - "license": "ISC" - }, - "../../node_modules/make-iterator": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "kind-of": "^6.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/makeerror": { - "version": "1.0.12", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "tmpl": "1.0.5" - } - }, - "../../node_modules/map-cache": { - "version": "0.2.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/media-typer": { - "version": "0.3.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../../node_modules/merge-stream": { - "version": "2.0.0", - "dev": true, - "license": "MIT" - }, - "../../node_modules/merge2": { - "version": "1.4.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "../../node_modules/micri": { - "version": "4.5.1", - "dev": true, - "license": "MIT", - "dependencies": { - "handler-agent": "0.2.0" - }, - "engines": { - "node": ">= 12.0.0" - } - }, - "../../node_modules/micromatch": { - "version": "4.0.8", - "dev": true, - "license": "MIT", - "dependencies": { - "braces": "^3.0.3", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "../../node_modules/mime-db": { - "version": "1.52.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../../node_modules/mime-format": { - "version": "2.0.1", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "charset": "^1.0.0" - } - }, - "../../node_modules/mime-types": { - "version": "2.1.35", - "dev": true, - "license": "MIT", - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "../../node_modules/mimic-fn": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../../node_modules/mimic-function": { - "version": "5.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/minimatch": { - "version": "3.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "../../node_modules/minimist": { - "version": "1.2.6", - "dev": true, - "license": "MIT" - }, - "../../node_modules/mkdirp": { - "version": "0.5.6", - "dev": true, - "license": "MIT", - "dependencies": { - "minimist": "^1.2.6" - }, - "bin": { - "mkdirp": "bin/cmd.js" - } - }, - "../../node_modules/ms": { - "version": "2.1.2", - "dev": true, - "license": "MIT" - }, - "../../node_modules/mute-stream": { - "version": "1.0.0", - "dev": true, - "license": "ISC", - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "../../node_modules/natural-compare": { - "version": "1.4.0", - "dev": true, - "license": "MIT" - }, - "../../node_modules/negotiator": { - "version": "0.6.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../../node_modules/neo-async": { - "version": "2.6.2", - "dev": true, - "license": "MIT" - }, - "../../node_modules/no-case": { - "version": "3.0.4", - "dev": true, - "license": "MIT", - "dependencies": { - "lower-case": "^2.0.2", - "tslib": "^2.0.3" - } - }, - "../../node_modules/nock": { - "version": "13.5.5", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "^4.1.0", - "json-stringify-safe": "^5.0.1", - "propagate": "^2.0.0" - }, - "engines": { - "node": ">= 10.13" - } - }, - "../../node_modules/node-abort-controller": { - "version": "3.1.1", - "dev": true, - "license": "MIT" - }, - "../../node_modules/node-fetch": { - "version": "2.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, - "../../node_modules/node-int64": { - "version": "0.4.0", - "dev": true, - "license": "MIT" - }, - "../../node_modules/node-plop": { - "version": "0.32.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/inquirer": "^9.0.3", - "change-case": "^4.1.2", - "del": "^7.1.0", - "globby": "^13.2.2", - "handlebars": "^4.7.8", - "inquirer": "^9.2.10", - "isbinaryfile": "^5.0.0", - "lodash.get": "^4.4.2", - "lower-case": "^2.0.2", - "mkdirp": "^3.0.1", - "resolve": "^1.22.4", - "title-case": "^3.0.3", - "upper-case": "^2.0.2" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - } - }, - "../../node_modules/node-plop/node_modules/mkdirp": { - "version": "3.0.1", - "dev": true, - "license": "MIT", - "bin": { - "mkdirp": "dist/cjs/src/bin.js" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../../node_modules/node-preload": { - "version": "0.2.1", - "dev": true, - "license": "MIT", - "dependencies": { - "process-on-spawn": "^1.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/node-releases": { - "version": "2.0.18", - "dev": true, - "license": "MIT" - }, - "../../node_modules/normalize-path": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/npm-run-path": { - "version": "4.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "path-key": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/nyc": { - "version": "15.1.0", - "dev": true, - "license": "ISC", - "dependencies": { - "@istanbuljs/load-nyc-config": "^1.0.0", - "@istanbuljs/schema": "^0.1.2", - "caching-transform": "^4.0.0", - "convert-source-map": "^1.7.0", - "decamelize": "^1.2.0", - "find-cache-dir": "^3.2.0", - "find-up": "^4.1.0", - "foreground-child": "^2.0.0", - "get-package-type": "^0.1.0", - "glob": "^7.1.6", - "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-hook": "^3.0.0", - "istanbul-lib-instrument": "^4.0.0", - "istanbul-lib-processinfo": "^2.0.2", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.0", - "istanbul-reports": "^3.0.2", - "make-dir": "^3.0.0", - "node-preload": "^0.2.1", - "p-map": "^3.0.0", - "process-on-spawn": "^1.0.0", - "resolve-from": "^5.0.0", - "rimraf": "^3.0.0", - "signal-exit": "^3.0.2", - "spawn-wrap": "^2.0.0", - "test-exclude": "^6.0.0", - "yargs": "^15.0.2" - }, - "bin": { - "nyc": "bin/nyc.js" - }, - "engines": { - "node": ">=8.9" - } - }, - "../../node_modules/nyc/node_modules/cliui": { - "version": "6.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^6.2.0" - } - }, - "../../node_modules/nyc/node_modules/find-up": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/nyc/node_modules/glob": { - "version": "7.2.3", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../../node_modules/nyc/node_modules/locate-path": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/nyc/node_modules/p-limit": { - "version": "2.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/nyc/node_modules/p-locate": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/nyc/node_modules/resolve-from": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../node_modules/nyc/node_modules/wrap-ansi": { - "version": "6.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/nyc/node_modules/y18n": { - "version": "4.0.3", - "dev": true, - "license": "ISC" - }, - "../../node_modules/nyc/node_modules/yargs": { - "version": "15.4.1", - "dev": true, - "license": "MIT", - "dependencies": { - "cliui": "^6.0.0", - "decamelize": "^1.2.0", - "find-up": "^4.1.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^4.2.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^18.1.2" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/nyc/node_modules/yargs-parser": { - "version": "18.1.3", - "dev": true, - "license": "ISC", - "dependencies": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - }, - "engines": { - "node": ">=6" - } - }, - "../../node_modules/object-inspect": { - "version": "1.13.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../../node_modules/object.defaults": { - "version": "1.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "array-each": "^1.0.1", - "array-slice": "^1.0.0", - "for-own": "^1.0.0", - "isobject": "^3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/object.map": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "for-own": "^1.0.0", - "make-iterator": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/object.pick": { - "version": "1.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/once": { - "version": "1.4.0", - "dev": true, - "license": "ISC", - "dependencies": { - "wrappy": "1" - } - }, - "../../node_modules/onetime": { - "version": "5.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "mimic-fn": "^2.1.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/ono": { - "version": "4.0.11", - "dev": true, - "license": "MIT", - "dependencies": { - "format-util": "^1.0.3" - } - }, - "../../node_modules/openapi3-ts": { - "version": "2.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "yaml": "^1.10.2" - } - }, - "../../node_modules/optionator": { - "version": "0.9.4", - "dev": true, - "license": "MIT", - "dependencies": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.5" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "../../node_modules/ora": { - "version": "8.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^5.3.0", - "cli-cursor": "^5.0.0", - "cli-spinners": "^2.9.2", - "is-interactive": "^2.0.0", - "is-unicode-supported": "^2.0.0", - "log-symbols": "^6.0.0", - "stdin-discarder": "^0.2.2", - "string-width": "^7.2.0", - "strip-ansi": "^7.1.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/ora/node_modules/ansi-regex": { - "version": "6.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "../../node_modules/ora/node_modules/chalk": { - "version": "5.3.0", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.17.0 || ^14.13 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "../../node_modules/ora/node_modules/emoji-regex": { - "version": "10.4.0", - "dev": true, - "license": "MIT" - }, - "../../node_modules/ora/node_modules/string-width": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^10.3.0", - "get-east-asian-width": "^1.0.0", - "strip-ansi": "^7.1.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/ora/node_modules/strip-ansi": { - "version": "7.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "../../node_modules/os-tmpdir": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/p-limit": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/p-locate": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/p-map": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "aggregate-error": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/p-try": { - "version": "2.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../../node_modules/package-hash": { - "version": "4.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "graceful-fs": "^4.1.15", - "hasha": "^5.0.0", - "lodash.flattendeep": "^4.4.0", - "release-zalgo": "^1.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/param-case": { - "version": "3.0.4", - "dev": true, - "license": "MIT", - "dependencies": { - "dot-case": "^3.0.4", - "tslib": "^2.0.3" - } - }, - "../../node_modules/parent-module": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "callsites": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "../../node_modules/parse-filepath": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "is-absolute": "^1.0.0", - "map-cache": "^0.2.0", - "path-root": "^0.1.1" - }, - "engines": { - "node": ">=0.8" - } - }, - "../../node_modules/parse-json": { - "version": "5.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-even-better-errors": "^2.3.0", - "lines-and-columns": "^1.1.6" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/parse-multipart-data": { - "version": "1.5.0", - "dev": true, - "license": "MIT" - }, - "../../node_modules/parse-passwd": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/parse-prefer-header": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "lodash.camelcase": "^4.3.0" - } - }, - "../../node_modules/pascal-case": { - "version": "3.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "no-case": "^3.0.4", - "tslib": "^2.0.3" - } - }, - "../../node_modules/path-case": { - "version": "3.0.4", - "dev": true, - "license": "MIT", - "dependencies": { - "dot-case": "^3.0.4", - "tslib": "^2.0.3" - } - }, - "../../node_modules/path-exists": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../node_modules/path-is-absolute": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/path-key": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../node_modules/path-parse": { - "version": "1.0.7", - "dev": true, - "license": "MIT" - }, - "../../node_modules/path-root": { - "version": "0.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "path-root-regex": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/path-root-regex": { - "version": "0.1.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/path-type": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../node_modules/picocolors": { - "version": "1.0.1", - "dev": true, - "license": "ISC" - }, - "../../node_modules/picomatch": { - "version": "2.3.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "../../node_modules/pify": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../../node_modules/pino": { - "version": "6.14.0", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-redact": "^3.0.0", - "fast-safe-stringify": "^2.0.8", - "flatstr": "^1.0.12", - "pino-std-serializers": "^3.1.0", - "process-warning": "^1.0.0", - "quick-format-unescaped": "^4.0.3", - "sonic-boom": "^1.0.2" - }, - "bin": { - "pino": "bin.js" - } - }, - "../../node_modules/pino-std-serializers": { - "version": "3.2.0", - "dev": true, - "license": "MIT" - }, - "../../node_modules/pirates": { - "version": "4.0.6", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 6" - } - }, - "../../node_modules/pkg-conf": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "find-up": "^2.0.0", - "load-json-file": "^4.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "../../node_modules/pkg-conf/node_modules/find-up": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "../../node_modules/pkg-conf/node_modules/locate-path": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "../../node_modules/pkg-conf/node_modules/p-limit": { - "version": "1.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-try": "^1.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "../../node_modules/pkg-conf/node_modules/p-locate": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^1.1.0" - }, - "engines": { - "node": ">=4" - } - }, - "../../node_modules/pkg-conf/node_modules/p-try": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../../node_modules/pkg-conf/node_modules/path-exists": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../../node_modules/pkg-dir": { - "version": "4.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "find-up": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/pkg-dir/node_modules/find-up": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/pkg-dir/node_modules/locate-path": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/pkg-dir/node_modules/p-limit": { - "version": "2.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/pkg-dir/node_modules/p-locate": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/plop": { - "version": "4.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/liftoff": "^4.0.3", - "chalk": "^5.3.0", - "interpret": "^3.1.1", - "liftoff": "^4.0.0", - "minimist": "^1.2.8", - "node-plop": "^0.32.0", - "ora": "^8.0.0", - "v8flags": "^4.0.1" - }, - "bin": { - "plop": "bin/plop.js" - }, - "engines": { - "node": ">=18" - } - }, - "../../node_modules/plop/node_modules/chalk": { - "version": "5.3.0", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.17.0 || ^14.13 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "../../node_modules/plop/node_modules/minimist": { - "version": "1.2.8", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../../node_modules/postman-collection": { - "version": "4.5.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@faker-js/faker": "5.5.3", - "file-type": "3.9.0", - "http-reasons": "0.1.0", - "iconv-lite": "0.6.3", - "liquid-json": "0.3.1", - "lodash": "4.17.21", - "mime-format": "2.0.1", - "mime-types": "2.1.35", - "postman-url-encoder": "3.0.5", - "semver": "7.6.3", - "uuid": "8.3.2" - }, - "engines": { - "node": ">=10" - } - }, - "../../node_modules/postman-collection/node_modules/@faker-js/faker": { - "version": "5.5.3", - "dev": true, - "license": "MIT" - }, - "../../node_modules/postman-collection/node_modules/semver": { - "version": "7.6.3", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "../../node_modules/postman-collection/node_modules/uuid": { - "version": "8.3.2", - "dev": true, - "license": "MIT", - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "../../node_modules/postman-url-encoder": { - "version": "3.0.5", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "punycode": "^2.1.1" - }, - "engines": { - "node": ">=10" - } - }, - "../../node_modules/prelude-ls": { - "version": "1.2.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8.0" - } - }, - "../../node_modules/prettier": { - "version": "3.3.3", - "dev": true, - "license": "MIT", - "bin": { - "prettier": "bin/prettier.cjs" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } - }, - "../../node_modules/prettier-linter-helpers": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-diff": "^1.1.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../../node_modules/pretty-data": { - "version": "0.40.0", - "dev": true, - "license": "MIT" - }, - "../../node_modules/pretty-format": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/schemas": "^29.6.3", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "../../node_modules/pretty-format/node_modules/ansi-styles": { - "version": "5.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "../../node_modules/process-on-spawn": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "fromentries": "^1.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/process-warning": { - "version": "1.0.0", - "dev": true, - "license": "MIT" - }, - "../../node_modules/prompts": { - "version": "2.4.2", - "dev": true, - "license": "MIT", - "dependencies": { - "kleur": "^3.0.3", - "sisteransi": "^1.0.5" - }, - "engines": { - "node": ">= 6" - } - }, - "../../node_modules/propagate": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "../../node_modules/punycode": { - "version": "2.3.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../../node_modules/pure-rand": { - "version": "6.1.0", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/dubzzz" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/fast-check" - } - ], - "license": "MIT" - }, - "../../node_modules/qs": { - "version": "6.13.0", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "side-channel": "^1.0.6" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../../node_modules/queue-microtask": { - "version": "1.2.3", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "../../node_modules/quick-format-unescaped": { - "version": "4.0.4", - "dev": true, - "license": "MIT" - }, - "../../node_modules/react-is": { - "version": "18.3.1", - "dev": true, - "license": "MIT" - }, - "../../node_modules/readable-stream": { - "version": "3.6.2", - "dev": true, - "license": "MIT", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "../../node_modules/readdirp": { - "version": "3.6.0", - "dev": true, - "license": "MIT", - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "../../node_modules/rechoir": { - "version": "0.8.0", - "dev": true, - "license": "MIT", - "dependencies": { - "resolve": "^1.20.0" - }, - "engines": { - "node": ">= 10.13.0" - } - }, - "../../node_modules/release-zalgo": { - "version": "1.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "es6-error": "^4.0.1" - }, - "engines": { - "node": ">=4" - } - }, - "../../node_modules/require-directory": { - "version": "2.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/require-from-string": { - "version": "2.0.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/require-main-filename": { - "version": "2.0.0", - "dev": true, - "license": "ISC" - }, - "../../node_modules/resolve": { - "version": "1.22.8", - "dev": true, - "license": "MIT", - "dependencies": { - "is-core-module": "^2.13.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../../node_modules/resolve-cwd": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "resolve-from": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/resolve-cwd/node_modules/resolve-from": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../node_modules/resolve-dir": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "expand-tilde": "^2.0.0", - "global-modules": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/resolve-from": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../../node_modules/resolve.exports": { - "version": "2.0.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - } - }, - "../../node_modules/restore-cursor": { - "version": "5.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "onetime": "^7.0.0", - "signal-exit": "^4.1.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/restore-cursor/node_modules/onetime": { - "version": "7.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "mimic-function": "^5.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/restore-cursor/node_modules/signal-exit": { - "version": "4.1.0", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../../node_modules/reusify": { - "version": "1.0.4", - "dev": true, - "license": "MIT", - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "../../node_modules/rimraf": { - "version": "3.0.2", - "dev": true, - "license": "ISC", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../../node_modules/rimraf/node_modules/glob": { - "version": "7.2.3", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../../node_modules/run-async": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, - "../../node_modules/run-parallel": { - "version": "1.2.0", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, - "../../node_modules/rxjs": { - "version": "7.8.1", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.1.0" - } - }, - "../../node_modules/safe-buffer": { - "version": "5.2.1", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "../../node_modules/safe-stable-stringify": { - "version": "1.1.1", - "dev": true, - "license": "MIT" - }, - "../../node_modules/safer-buffer": { - "version": "2.1.2", - "dev": true, - "license": "MIT" - }, - "../../node_modules/semver": { - "version": "6.3.1", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, - "../../node_modules/sentence-case": { - "version": "3.0.4", - "dev": true, - "license": "MIT", - "dependencies": { - "no-case": "^3.0.4", - "tslib": "^2.0.3", - "upper-case-first": "^2.0.2" - } - }, - "../../node_modules/set-blocking": { - "version": "2.0.0", - "dev": true, - "license": "ISC" - }, - "../../node_modules/set-function-length": { - "version": "1.2.2", - "dev": true, - "license": "MIT", - "dependencies": { - "define-data-property": "^1.1.4", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "../../node_modules/shebang-command": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/shebang-regex": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../node_modules/side-channel": { - "version": "1.0.6", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4", - "object-inspect": "^1.13.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../../node_modules/signal-exit": { - "version": "3.0.7", - "dev": true, - "license": "ISC" - }, - "../../node_modules/signale": { - "version": "1.4.0", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^2.3.2", - "figures": "^2.0.0", - "pkg-conf": "^2.1.0" - }, - "engines": { - "node": ">=6" - } - }, - "../../node_modules/signale/node_modules/ansi-styles": { - "version": "3.2.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "../../node_modules/signale/node_modules/chalk": { - "version": "2.4.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "../../node_modules/signale/node_modules/color-convert": { - "version": "1.9.3", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "1.1.3" - } - }, - "../../node_modules/signale/node_modules/color-name": { - "version": "1.1.3", - "dev": true, - "license": "MIT" - }, - "../../node_modules/signale/node_modules/escape-string-regexp": { - "version": "1.0.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.0" - } - }, - "../../node_modules/signale/node_modules/has-flag": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../../node_modules/signale/node_modules/supports-color": { - "version": "5.5.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "../../node_modules/sisteransi": { - "version": "1.0.5", - "dev": true, - "license": "MIT" - }, - "../../node_modules/slash": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../node_modules/snake-case": { - "version": "3.0.4", - "dev": true, - "license": "MIT", - "dependencies": { - "dot-case": "^3.0.4", - "tslib": "^2.0.3" - } - }, - "../../node_modules/sonic-boom": { - "version": "1.4.1", - "dev": true, - "license": "MIT", - "dependencies": { - "atomic-sleep": "^1.0.0", - "flatstr": "^1.0.12" - } - }, - "../../node_modules/source-map": { - "version": "0.6.1", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "../../node_modules/source-map-support": { - "version": "0.5.13", - "dev": true, - "license": "MIT", - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "../../node_modules/spawn-wrap": { - "version": "2.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "foreground-child": "^2.0.0", - "is-windows": "^1.0.2", - "make-dir": "^3.0.0", - "rimraf": "^3.0.0", - "signal-exit": "^3.0.2", - "which": "^2.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/split2": { - "version": "3.2.2", - "dev": true, - "license": "ISC", - "dependencies": { - "readable-stream": "^3.0.0" - } - }, - "../../node_modules/sprintf-js": { - "version": "1.0.3", - "dev": true, - "license": "BSD-3-Clause" - }, - "../../node_modules/stack-utils": { - "version": "2.0.6", - "dev": true, - "license": "MIT", - "dependencies": { - "escape-string-regexp": "^2.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "../../node_modules/stack-utils/node_modules/escape-string-regexp": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../node_modules/stdin-discarder": { - "version": "0.2.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/string_decoder": { - "version": "1.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.2.0" - } - }, - "../../node_modules/string-length": { - "version": "4.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "char-regex": "^1.0.2", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "../../node_modules/string-width": { - "version": "4.2.3", - "dev": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/strip-ansi": { - "version": "6.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/strip-bom": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../node_modules/strip-final-newline": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../../node_modules/strip-json-comments": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/strnum": { - "version": "1.0.5", - "dev": true, - "license": "MIT" - }, - "../../node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../../node_modules/synckit": { - "version": "0.9.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@pkgr/core": "^0.1.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": "^14.18.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/unts" - } - }, - "../../node_modules/test-exclude": { - "version": "6.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "@istanbuljs/schema": "^0.1.2", - "glob": "^7.1.4", - "minimatch": "^3.0.4" - }, - "engines": { - "node": ">=8" - } - }, - "../../node_modules/test-exclude/node_modules/glob": { - "version": "7.2.3", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../../node_modules/text-table": { - "version": "0.2.0", - "dev": true, - "license": "MIT" - }, - "../../node_modules/title-case": { - "version": "3.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "tslib": "^2.0.3" - } - }, - "../../node_modules/tmp": { - "version": "0.0.33", - "dev": true, - "license": "MIT", - "dependencies": { - "os-tmpdir": "~1.0.2" - }, - "engines": { - "node": ">=0.6.0" - } - }, - "../../node_modules/tmpl": { - "version": "1.0.5", - "dev": true, - "license": "BSD-3-Clause" - }, - "../../node_modules/to-fast-properties": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../../node_modules/to-regex-range": { - "version": "5.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "../../node_modules/tr46": { - "version": "0.0.3", - "dev": true, - "license": "MIT" - }, - "../../node_modules/ts-api-utils": { - "version": "1.3.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=16" - }, - "peerDependencies": { - "typescript": ">=4.2.0" - } - }, - "../../node_modules/ts-jest": { - "version": "29.2.5", - "dev": true, - "license": "MIT", - "dependencies": { - "bs-logger": "^0.2.6", - "ejs": "^3.1.10", - "fast-json-stable-stringify": "^2.1.0", - "jest-util": "^29.0.0", - "json5": "^2.2.3", - "lodash.memoize": "^4.1.2", - "make-error": "^1.3.6", - "semver": "^7.6.3", - "yargs-parser": "^21.1.1" - }, - "bin": { - "ts-jest": "cli.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" - }, - "peerDependencies": { - "@babel/core": ">=7.0.0-beta.0 <8", - "@jest/transform": "^29.0.0", - "@jest/types": "^29.0.0", - "babel-jest": "^29.0.0", - "jest": "^29.0.0", - "typescript": ">=4.3 <6" - }, - "peerDependenciesMeta": { - "@babel/core": { - "optional": true - }, - "@jest/transform": { - "optional": true - }, - "@jest/types": { - "optional": true - }, - "babel-jest": { - "optional": true - }, - "esbuild": { - "optional": true - } - } - }, - "../../node_modules/ts-jest/node_modules/semver": { - "version": "7.6.3", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "../../node_modules/ts-jest/node_modules/yargs-parser": { - "version": "21.1.1", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=12" - } - }, - "../../node_modules/ts-node": { - "version": "10.9.2", - "dev": true, - "license": "MIT", - "dependencies": { - "@cspotcode/source-map-support": "^0.8.0", - "@tsconfig/node10": "^1.0.7", - "@tsconfig/node12": "^1.0.7", - "@tsconfig/node14": "^1.0.0", - "@tsconfig/node16": "^1.0.2", - "acorn": "^8.4.1", - "acorn-walk": "^8.1.1", - "arg": "^4.1.0", - "create-require": "^1.1.0", - "diff": "^4.0.1", - "make-error": "^1.1.1", - "v8-compile-cache-lib": "^3.0.1", - "yn": "3.1.1" - }, - "bin": { - "ts-node": "dist/bin.js", - "ts-node-cwd": "dist/bin-cwd.js", - "ts-node-esm": "dist/bin-esm.js", - "ts-node-script": "dist/bin-script.js", - "ts-node-transpile-only": "dist/bin-transpile.js", - "ts-script": "dist/bin-script-deprecated.js" - }, - "peerDependencies": { - "@swc/core": ">=1.2.50", - "@swc/wasm": ">=1.2.50", - "@types/node": "*", - "typescript": ">=2.7" - }, - "peerDependenciesMeta": { - "@swc/core": { - "optional": true - }, - "@swc/wasm": { - "optional": true - } - } - }, - "../../node_modules/ts-node/node_modules/diff": { - "version": "4.0.2", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.3.1" - } - }, - "../../node_modules/tslib": { - "version": "2.7.0", - "dev": true, - "license": "0BSD" - }, - "../../node_modules/tweetnacl": { - "version": "1.0.3", - "dev": true, - "license": "Unlicense" - }, - "../../node_modules/type-check": { - "version": "0.4.0", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "../../node_modules/type-fest": { - "version": "0.20.2", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../node_modules/type-is": { - "version": "1.6.18", - "dev": true, - "license": "MIT", - "dependencies": { - "media-typer": "0.3.0", - "mime-types": "~2.1.24" - }, - "engines": { - "node": ">= 0.6" - } - }, - "../../node_modules/typedarray-to-buffer": { - "version": "3.1.5", - "dev": true, - "license": "MIT", - "dependencies": { - "is-typedarray": "^1.0.0" - } - }, - "../../node_modules/typescript": { - "version": "5.6.2", - "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "../../node_modules/typescript-eslint": { - "version": "8.5.0", + "node_modules/@esbuild/aix-ppc64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.23.1.tgz", + "integrity": "sha512-6VhYk1diRqrhBAqpJEdjASR/+WVRtfjpqKuNw11cLiaWpAT/Uu+nokB+UJnevzy/P9C/ty6AOe0dwueMrGh/iQ==", + "cpu": [ + "ppc64" + ], "dev": true, "license": "MIT", - "dependencies": { - "@typescript-eslint/eslint-plugin": "8.5.0", - "@typescript-eslint/parser": "8.5.0", - "@typescript-eslint/utils": "8.5.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "../../node_modules/uglify-js": { - "version": "3.19.3", - "dev": true, - "license": "BSD-2-Clause", "optional": true, - "bin": { - "uglifyjs": "bin/uglifyjs" - }, + "os": [ + "aix" + ], "engines": { - "node": ">=0.8.0" + "node": ">=18" } }, - "../../node_modules/unc-path-regex": { - "version": "0.1.2", + "node_modules/@esbuild/android-arm": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.23.1.tgz", + "integrity": "sha512-uz6/tEy2IFm9RYOyvKl88zdzZfwEfKZmnX9Cj1BHjeSGNuGLuMD1kR8y5bteYmwqKm1tj8m4cb/aKEorr6fHWQ==", + "cpu": [ + "arm" + ], "dev": true, "license": "MIT", + "optional": true, + "os": [ + "android" + ], "engines": { - "node": ">=0.10.0" + "node": ">=18" } }, - "../../node_modules/undici-types": { - "version": "6.19.8", - "dev": true, - "license": "MIT" - }, - "../../node_modules/update-browserslist-db": { - "version": "1.1.0", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } + "node_modules/@esbuild/android-arm64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.23.1.tgz", + "integrity": "sha512-xw50ipykXcLstLeWH7WRdQuysJqejuAGPd30vd1i5zSyKK3WE+ijzHmLKxdiCMtH1pHz78rOg0BKSYOSB/2Khw==", + "cpu": [ + "arm64" ], - "license": "MIT", - "dependencies": { - "escalade": "^3.1.2", - "picocolors": "^1.0.1" - }, - "bin": { - "update-browserslist-db": "cli.js" - }, - "peerDependencies": { - "browserslist": ">= 4.21.0" - } - }, - "../../node_modules/upper-case": { - "version": "2.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "tslib": "^2.0.3" - } - }, - "../../node_modules/upper-case-first": { - "version": "2.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "tslib": "^2.0.3" - } - }, - "../../node_modules/uri-js": { - "version": "4.4.1", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "punycode": "^2.1.0" - } - }, - "../../node_modules/uri-template-lite": { - "version": "22.9.0", - "dev": true, - "license": "MIT" - }, - "../../node_modules/urijs": { - "version": "1.19.11", - "dev": true, - "license": "MIT" - }, - "../../node_modules/util-deprecate": { - "version": "1.0.2", - "dev": true, - "license": "MIT" - }, - "../../node_modules/utility-types": { - "version": "3.11.0", "dev": true, "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "../../node_modules/uuid": { - "version": "9.0.1", - "dev": true, - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" + "optional": true, + "os": [ + "android" ], - "license": "MIT", - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "../../node_modules/v8-compile-cache-lib": { - "version": "3.0.1", - "dev": true, - "license": "MIT" - }, - "../../node_modules/v8-to-istanbul": { - "version": "9.3.0", - "dev": true, - "license": "ISC", - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.12", - "@types/istanbul-lib-coverage": "^2.0.1", - "convert-source-map": "^2.0.0" - }, "engines": { - "node": ">=10.12.0" + "node": ">=18" } }, - "../../node_modules/v8-to-istanbul/node_modules/convert-source-map": { - "version": "2.0.0", - "dev": true, - "license": "MIT" - }, - "../../node_modules/v8flags": { - "version": "4.0.1", + "node_modules/@esbuild/android-x64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.23.1.tgz", + "integrity": "sha512-nlN9B69St9BwUoB+jkyU090bru8L0NA3yFvAd7k8dNsVH8bi9a8cUAUSEcEEgTp2z3dbEDGJGfP6VUnkQnlReg==", + "cpu": [ + "x64" + ], "dev": true, "license": "MIT", + "optional": true, + "os": [ + "android" + ], "engines": { - "node": ">= 10.13.0" + "node": ">=18" } }, - "../../node_modules/validate.io-array": { - "version": "1.0.6", - "dev": true, - "license": "MIT" - }, - "../../node_modules/validate.io-function": { - "version": "1.0.2", - "dev": true - }, - "../../node_modules/validate.io-integer": { - "version": "1.0.5", + "node_modules/@esbuild/darwin-arm64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.23.1.tgz", + "integrity": "sha512-YsS2e3Wtgnw7Wq53XXBLcV6JhRsEq8hkfg91ESVadIrzr9wO6jJDMZnCQbHm1Guc5t/CdDiFSSfWP58FNuvT3Q==", + "cpu": [ + "arm64" + ], "dev": true, - "dependencies": { - "validate.io-number": "^1.0.3" + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" } }, - "../../node_modules/validate.io-integer-array": { - "version": "1.0.0", + "node_modules/@esbuild/darwin-x64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.23.1.tgz", + "integrity": "sha512-aClqdgTDVPSEGgoCS8QDG37Gu8yc9lTHNAQlsztQ6ENetKEO//b8y31MMu2ZaPbn4kVsIABzVLXYLhCGekGDqw==", + "cpu": [ + "x64" + ], "dev": true, - "dependencies": { - "validate.io-array": "^1.0.3", - "validate.io-integer": "^1.0.4" + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" } }, - "../../node_modules/validate.io-number": { - "version": "1.0.3", - "dev": true - }, - "../../node_modules/walker": { - "version": "1.0.8", + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.23.1.tgz", + "integrity": "sha512-h1k6yS8/pN/NHlMl5+v4XPfikhJulk4G+tKGFIOwURBSFzE8bixw1ebjluLOjfwtLqY0kewfjLSrO6tN2MgIhA==", + "cpu": [ + "arm64" + ], "dev": true, - "license": "Apache-2.0", - "dependencies": { - "makeerror": "1.0.12" + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" } }, - "../../node_modules/wcwidth": { - "version": "1.0.1", + "node_modules/@esbuild/freebsd-x64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.23.1.tgz", + "integrity": "sha512-lK1eJeyk1ZX8UklqFd/3A60UuZ/6UVfGT2LuGo3Wp4/z7eRTRYY+0xOu2kpClP+vMTi9wKOfXi2vjUpO1Ro76g==", + "cpu": [ + "x64" + ], "dev": true, "license": "MIT", - "dependencies": { - "defaults": "^1.0.3" + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" } }, - "../../node_modules/webidl-conversions": { - "version": "3.0.1", - "dev": true, - "license": "BSD-2-Clause" - }, - "../../node_modules/whatwg-fetch": { - "version": "3.6.20", - "dev": true, - "license": "MIT" - }, - "../../node_modules/whatwg-mimetype": { - "version": "3.0.0", + "node_modules/@esbuild/linux-arm": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.23.1.tgz", + "integrity": "sha512-CXXkzgn+dXAPs3WBwE+Kvnrf4WECwBdfjfeYHpMeVxWE0EceB6vhWGShs6wi0IYEqMSIzdOF1XjQ/Mkm5d7ZdQ==", + "cpu": [ + "arm" + ], "dev": true, "license": "MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=12" + "node": ">=18" } }, - "../../node_modules/whatwg-url": { - "version": "5.0.0", + "node_modules/@esbuild/linux-arm64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.23.1.tgz", + "integrity": "sha512-/93bf2yxencYDnItMYV/v116zff6UyTjo4EtEQjUBeGiVpMmffDNUyD9UN2zV+V3LRV3/on4xdZ26NKzn6754g==", + "cpu": [ + "arm64" + ], "dev": true, "license": "MIT", - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" } }, - "../../node_modules/which": { - "version": "2.0.2", + "node_modules/@esbuild/linux-ia32": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.23.1.tgz", + "integrity": "sha512-VTN4EuOHwXEkXzX5nTvVY4s7E/Krz7COC8xkftbbKRYAl96vPiUssGkeMELQMOnLOJ8k3BY1+ZY52tttZnHcXQ==", + "cpu": [ + "ia32" + ], "dev": true, - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">= 8" + "node": ">=18" } }, - "../../node_modules/which-module": { - "version": "2.0.1", - "dev": true, - "license": "ISC" - }, - "../../node_modules/word-wrap": { - "version": "1.2.5", + "node_modules/@esbuild/linux-loong64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.23.1.tgz", + "integrity": "sha512-Vx09LzEoBa5zDnieH8LSMRToj7ir/Jeq0Gu6qJ/1GcBq9GkfoEAoXvLiW1U9J1qE/Y/Oyaq33w5p2ZWrNNHNEw==", + "cpu": [ + "loong64" + ], "dev": true, "license": "MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=0.10.0" + "node": ">=18" } }, - "../../node_modules/wordwrap": { - "version": "1.0.0", - "dev": true, - "license": "MIT" - }, - "../../node_modules/wrap-ansi": { - "version": "7.0.0", + "node_modules/@esbuild/linux-mips64el": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.23.1.tgz", + "integrity": "sha512-nrFzzMQ7W4WRLNUOU5dlWAqa6yVeI0P78WKGUo7lg2HShq/yx+UYkeNSE0SSfSure0SqgnsxPvmAUu/vu0E+3Q==", + "cpu": [ + "mips64el" + ], "dev": true, "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + "node": ">=18" } }, - "../../node_modules/wrappy": { - "version": "1.0.2", + "node_modules/@esbuild/linux-ppc64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.23.1.tgz", + "integrity": "sha512-dKN8fgVqd0vUIjxuJI6P/9SSSe/mB9rvA98CSH2sJnlZ/OCZWO1DJvxj8jvKTfYUdGfcq2dDxoKaC6bHuTlgcw==", + "cpu": [ + "ppc64" + ], "dev": true, - "license": "ISC" + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } }, - "../../node_modules/write-file-atomic": { - "version": "3.0.3", + "node_modules/@esbuild/linux-riscv64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.23.1.tgz", + "integrity": "sha512-5AV4Pzp80fhHL83JM6LoA6pTQVWgB1HovMBsLQ9OZWLDqVY8MVobBXNSmAJi//Csh6tcY7e7Lny2Hg1tElMjIA==", + "cpu": [ + "riscv64" + ], "dev": true, - "license": "ISC", - "dependencies": { - "imurmurhash": "^0.1.4", - "is-typedarray": "^1.0.0", - "signal-exit": "^3.0.2", - "typedarray-to-buffer": "^3.1.5" + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" } }, - "../../node_modules/y18n": { - "version": "5.0.8", + "node_modules/@esbuild/linux-s390x": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.23.1.tgz", + "integrity": "sha512-9ygs73tuFCe6f6m/Tb+9LtYxWR4c9yg7zjt2cYkjDbDpV/xVn+68cQxMXCjUpYwEkze2RcU/rMnfIXNRFmSoDw==", + "cpu": [ + "s390x" + ], "dev": true, - "license": "ISC", + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=10" + "node": ">=18" } }, - "../../node_modules/yallist": { - "version": "3.1.1", + "node_modules/@esbuild/linux-x64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.23.1.tgz", + "integrity": "sha512-EV6+ovTsEXCPAp58g2dD68LxoP/wK5pRvgy0J/HxPGB009omFPv3Yet0HiaqvrIrgPTBuC6wCH1LTOY91EO5hQ==", + "cpu": [ + "x64" + ], "dev": true, - "license": "ISC" + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } }, - "../../node_modules/yaml": { - "version": "1.10.2", + "node_modules/@esbuild/netbsd-x64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.23.1.tgz", + "integrity": "sha512-aevEkCNu7KlPRpYLjwmdcuNz6bDFiE7Z8XC4CPqExjTvrHugh28QzUXVOZtiYghciKUacNktqxdpymplil1beA==", + "cpu": [ + "x64" + ], "dev": true, - "license": "ISC", + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], "engines": { - "node": ">= 6" + "node": ">=18" } }, - "../../node_modules/yargs": { - "version": "16.2.0", + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.23.1.tgz", + "integrity": "sha512-3x37szhLexNA4bXhLrCC/LImN/YtWis6WXr1VESlfVtVeoFJBRINPJ3f0a/6LV8zpikqoUg4hyXw0sFBt5Cr+Q==", + "cpu": [ + "arm64" + ], "dev": true, "license": "MIT", - "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - }, + "optional": true, + "os": [ + "openbsd" + ], "engines": { - "node": ">=10" + "node": ">=18" } }, - "../../node_modules/yargs-parser": { - "version": "20.2.9", + "node_modules/@esbuild/openbsd-x64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.23.1.tgz", + "integrity": "sha512-aY2gMmKmPhxfU+0EdnN+XNtGbjfQgwZj43k8G3fyrDM/UdZww6xrWxmDkuz2eCZchqVeABjV5BpildOrUbBTqA==", + "cpu": [ + "x64" + ], "dev": true, - "license": "ISC", + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], "engines": { - "node": ">=10" + "node": ">=18" } }, - "../../node_modules/yn": { - "version": "3.1.1", + "node_modules/@esbuild/sunos-x64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.23.1.tgz", + "integrity": "sha512-RBRT2gqEl0IKQABT4XTj78tpk9v7ehp+mazn2HbUeZl1YMdaGAQqhapjGTCe7uw7y0frDi4gS0uHzhvpFuI1sA==", + "cpu": [ + "x64" + ], "dev": true, "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], "engines": { - "node": ">=6" + "node": ">=18" } }, - "../../node_modules/yocto-queue": { - "version": "0.1.0", + "node_modules/@esbuild/win32-arm64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.23.1.tgz", + "integrity": "sha512-4O+gPR5rEBe2FpKOVyiJ7wNDPA8nGzDuJ6gN4okSA1gEOYZ67N8JPk58tkWtdtPeLz7lBnY6I5L3jdsr3S+A6A==", + "cpu": [ + "arm64" + ], "dev": true, "license": "MIT", + "optional": true, + "os": [ + "win32" + ], "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=18" } }, - "../../node_modules/yoctocolors-cjs": { - "version": "2.1.2", + "node_modules/@esbuild/win32-ia32": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.23.1.tgz", + "integrity": "sha512-BcaL0Vn6QwCwre3Y717nVHZbAa4UBEigzFm6VdsVdT/MbZ38xoj1X9HPkZhbmaBGUD1W8vxAfffbDe8bA6AKnQ==", + "cpu": [ + "ia32" + ], "dev": true, "license": "MIT", + "optional": true, + "os": [ + "win32" + ], "engines": { "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@esbuild/darwin-arm64": { + "node_modules/@esbuild/win32-x64": { "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.23.1.tgz", + "integrity": "sha512-BHpFFeslkWrXWyUPnbKm+xYYVYruCinGcftSBaa8zoF9hZO4BcSCFUvHVTtzpIY6YzUnYtuEhZ+C9iEXjxnasg==", "cpu": [ - "arm64" + "x64" ], "dev": true, "license": "MIT", "optional": true, "os": [ - "darwin" + "win32" ], "engines": { "node": ">=18" @@ -8631,6 +681,8 @@ }, "node_modules/@types/node": { "version": "22.7.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.7.4.tgz", + "integrity": "sha512-y+NPi1rFzDs1NdQHHToqeiX2TIS79SWEAw9GYhkkx8bD0ChpfqC+n2j5OXOCpzfojBEBt6DnEnnG9MY0zk1XLg==", "dev": true, "license": "MIT", "dependencies": { @@ -9039,6 +1091,8 @@ }, "node_modules/esbuild": { "version": "0.23.1", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.23.1.tgz", + "integrity": "sha512-VVNz/9Sa0bs5SELtn3f7qhJCDPCF5oMEl5cO9/SSinpE9hbPVvxbd572HH5AKiP7WD8INO53GgfDDhRjkylHEg==", "dev": true, "hasInstallScript": true, "license": "MIT", @@ -9439,8 +1493,25 @@ "license": "ISC", "peer": true }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, "node_modules/get-tsconfig": { "version": "4.8.1", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.8.1.tgz", + "integrity": "sha512-k9PN+cFBmaLWtVz29SkUoqU5O0slLuHJXt/2P+tMVFT+phsSGXGkp9t3rQIqdz0e+06EHNGs3oM6ZX1s2zHxRg==", "dev": true, "license": "MIT", "dependencies": { @@ -9888,6 +1959,8 @@ }, "node_modules/resolve-pkg-maps": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", + "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", "dev": true, "license": "MIT", "funding": { @@ -10010,8 +2083,13 @@ } }, "node_modules/telnyx": { - "resolved": "../..", - "link": true + "version": "2.0.0-alpha.0", + "resolved": "https://registry.npmjs.org/telnyx/-/telnyx-2.0.0-alpha.0.tgz", + "integrity": "sha512-UJ5TEOb9PTKeY1YobGQeOiOxOdnfO0P/eFAVhBl1HWK5wbWmElMcYSePFlGzbfgxftzKVEyWrf+O0ya3iMW18g==", + "license": "MIT", + "engines": { + "node": "^18 || >=20" + } }, "node_modules/text-table": { "version": "0.2.0", @@ -10049,6 +2127,8 @@ }, "node_modules/tsx": { "version": "4.19.1", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.19.1.tgz", + "integrity": "sha512-0flMz1lh74BR4wOvBjuh9olbnwqCPc35OOlfyzHba0Dc+QNUeWX/Gq2YTbnwcWPO3BMd8fkzRVrHcsR+a7z7rA==", "dev": true, "license": "MIT", "dependencies": { @@ -10081,6 +2161,8 @@ }, "node_modules/typescript": { "version": "5.6.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.2.tgz", + "integrity": "sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==", "dev": true, "license": "Apache-2.0", "bin": { @@ -10117,6 +2199,8 @@ }, "node_modules/undici-types": { "version": "6.19.8", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", + "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", "dev": true, "license": "MIT" }, diff --git a/examples/messaging/package.json b/examples/messaging/package.json index 7ab244d..abec1c2 100644 --- a/examples/messaging/package.json +++ b/examples/messaging/package.json @@ -17,7 +17,7 @@ "telnyx": "2.0.0-alpha.0" }, "devDependencies": { - "@types/node": "^22.7.3", + "@types/node": "^22.7.4", "tsx": "^4.19.1", "typescript": "^5.6.2", "typescript-eslint": "^8.8.0" From e4ccc6d673f67da81af7c13b2ee65376e87fff2d Mon Sep 17 00:00:00 2001 From: Lucas Rosa Date: Wed, 2 Oct 2024 10:07:29 -0300 Subject: [PATCH 27/59] release alpha.1 --- CHANGELOG.md | 8 ++++++-- VERSION | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d047290..741a7d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ ## v2 +### v2.0.0-alpha.1 + +- Update actions workflow versions to v4 and `.npmignore` to v2 +- Update examples dependencies + ### v2.0.0-alpha.0 - Add Typescript default config, linter and dependencies @@ -37,8 +42,7 @@ - Move `BucketUsage` resource to `StorageBuckets` - Remove duplicated `BulkPhoneNumberCampaigns` resource - Remove duplicated `BulkPhoneNumberOperations` resource -- Update actions workflow versions to v4 and `.npmignore` to v2 -- Update examples dependencies + ## v1 diff --git a/VERSION b/VERSION index 6cf46a6..e05cd46 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.0.0-alpha.0 +2.0.0-alpha.1 diff --git a/package-lock.json b/package-lock.json index 4a58d47..635ce4b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "telnyx", - "version": "2.0.0-alpha.0", + "version": "2.0.0-alpha.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "telnyx", - "version": "2.0.0-alpha.0", + "version": "2.0.0-alpha.1", "license": "MIT", "devDependencies": { "@eslint/js": "^9.10.0", diff --git a/package.json b/package.json index 72db3a6..1c80cac 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "telnyx", - "version": "2.0.0-alpha.0", + "version": "2.0.0-alpha.1", "description": "Telnyx API Node SDK", "keywords": [ "telnyx", From 990cf09b945e4176281048d9c4c14b5bebdfb390 Mon Sep 17 00:00:00 2001 From: Lucas Rosa Date: Wed, 2 Oct 2024 10:18:30 -0300 Subject: [PATCH 28/59] update examples to use 2.0.0-alpha.1 --- examples/call-control/package-lock.json | 8 ++++---- examples/call-control/package.json | 2 +- examples/messaging/package-lock.json | 8 ++++---- examples/messaging/package.json | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/examples/call-control/package-lock.json b/examples/call-control/package-lock.json index 45708de..f0c6ce3 100644 --- a/examples/call-control/package-lock.json +++ b/examples/call-control/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "ISC", "dependencies": { - "telnyx": "2.0.0-alpha.0" + "telnyx": "2.0.0-alpha.1" }, "devDependencies": { "@types/node": "^22.7.4", @@ -2083,9 +2083,9 @@ } }, "node_modules/telnyx": { - "version": "2.0.0-alpha.0", - "resolved": "https://registry.npmjs.org/telnyx/-/telnyx-2.0.0-alpha.0.tgz", - "integrity": "sha512-UJ5TEOb9PTKeY1YobGQeOiOxOdnfO0P/eFAVhBl1HWK5wbWmElMcYSePFlGzbfgxftzKVEyWrf+O0ya3iMW18g==", + "version": "2.0.0-alpha.1", + "resolved": "https://registry.npmjs.org/telnyx/-/telnyx-2.0.0-alpha.1.tgz", + "integrity": "sha512-+TLOSlNCLN+JKZSkRa0MxVND1ah33g+7YV9gmzNOAEoBL6FGrz/r41/tDLoAeM7gkXmvgxL8o8bUEDNZB7ubyA==", "license": "MIT", "engines": { "node": "^18 || >=20" diff --git a/examples/call-control/package.json b/examples/call-control/package.json index f8f6782..b7658f8 100644 --- a/examples/call-control/package.json +++ b/examples/call-control/package.json @@ -14,7 +14,7 @@ "node": "^18 || >=20" }, "dependencies": { - "telnyx": "2.0.0-alpha.0" + "telnyx": "2.0.0-alpha.1" }, "devDependencies": { "@types/node": "^22.7.4", diff --git a/examples/messaging/package-lock.json b/examples/messaging/package-lock.json index eebd2f0..5e17744 100644 --- a/examples/messaging/package-lock.json +++ b/examples/messaging/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "ISC", "dependencies": { - "telnyx": "2.0.0-alpha.0" + "telnyx": "2.0.0-alpha.1" }, "devDependencies": { "@types/node": "^22.7.4", @@ -2083,9 +2083,9 @@ } }, "node_modules/telnyx": { - "version": "2.0.0-alpha.0", - "resolved": "https://registry.npmjs.org/telnyx/-/telnyx-2.0.0-alpha.0.tgz", - "integrity": "sha512-UJ5TEOb9PTKeY1YobGQeOiOxOdnfO0P/eFAVhBl1HWK5wbWmElMcYSePFlGzbfgxftzKVEyWrf+O0ya3iMW18g==", + "version": "2.0.0-alpha.1", + "resolved": "https://registry.npmjs.org/telnyx/-/telnyx-2.0.0-alpha.1.tgz", + "integrity": "sha512-+TLOSlNCLN+JKZSkRa0MxVND1ah33g+7YV9gmzNOAEoBL6FGrz/r41/tDLoAeM7gkXmvgxL8o8bUEDNZB7ubyA==", "license": "MIT", "engines": { "node": "^18 || >=20" diff --git a/examples/messaging/package.json b/examples/messaging/package.json index abec1c2..636a293 100644 --- a/examples/messaging/package.json +++ b/examples/messaging/package.json @@ -14,7 +14,7 @@ "node": "^18 || >=20" }, "dependencies": { - "telnyx": "2.0.0-alpha.0" + "telnyx": "2.0.0-alpha.1" }, "devDependencies": { "@types/node": "^22.7.4", From 3f6138cccba11b5a3e646de3293a929600e1e9fe Mon Sep 17 00:00:00 2001 From: Lucas Rosa Date: Wed, 2 Oct 2024 19:59:14 -0300 Subject: [PATCH 29/59] fix AI resource --- CHANGELOG.md | 5 +- VERSION | 2 +- package-lock.json | 4 +- package.json | 2 +- src/resources/AI.ts | 43 ------------ src/resources/AiAssistants.ts | 25 +++++++ src/resources/AiAudioTranscriptions.ts | 6 ++ src/resources/AiChatCompletions.ts | 6 ++ src/resources/AiEmbeddings.ts | 13 ++++ src/resources/AiEmbeddingsBuckets.ts | 19 +++++ src/resources/AiEmbeddingsSimilaritySearch.ts | 6 ++ src/resources/AiModels.ts | 6 ++ src/resources/AiSummarize.ts | 6 ++ src/resources/Conferences.ts | 1 - src/telnyx.ts | 18 ++++- types/AccessIpRangesResource.d.ts | 2 +- types/AddressesResource.d.ts | 10 +-- types/AiAssistantsResource.d.ts | 69 +++++++++++++++++++ types/AiAudioTranscriptionsResource.d.ts | 18 +++++ types/AiChatCompletionsResource.d.ts | 18 +++++ types/AiEmbeddingsBucketsResource.d.ts | 46 +++++++++++++ types/AiEmbeddingsResource.d.ts | 43 ++++++++++++ .../AiEmbeddingsSimilaritySearchResource.d.ts | 20 ++++++ types/AiModelsResource.d.ts | 17 +++++ types/AiSummarizeResource.d.ts | 18 +++++ types/AutorespConfigsResource.d.ts | 8 +-- types/AvailablePhoneNumbersResource.d.ts | 2 +- types/BalanceResource.d.ts | 2 +- types/BillingGroupsResource.d.ts | 10 +-- types/CallsResource.d.ts | 60 ++++++++-------- types/MessagingProfileMetricsResource.d.ts | 2 +- types/MessagingProfilesResource.d.ts | 16 ++--- types/StorageBucketsResource.d.ts | 10 +-- types/index.d.ts | 17 +++++ types/lib.d.ts | 2 +- 35 files changed, 439 insertions(+), 113 deletions(-) delete mode 100644 src/resources/AI.ts create mode 100644 src/resources/AiAssistants.ts create mode 100644 src/resources/AiAudioTranscriptions.ts create mode 100644 src/resources/AiChatCompletions.ts create mode 100644 src/resources/AiEmbeddings.ts create mode 100644 src/resources/AiEmbeddingsBuckets.ts create mode 100644 src/resources/AiEmbeddingsSimilaritySearch.ts create mode 100644 src/resources/AiModels.ts create mode 100644 src/resources/AiSummarize.ts create mode 100644 types/AiAssistantsResource.d.ts create mode 100644 types/AiAudioTranscriptionsResource.d.ts create mode 100644 types/AiChatCompletionsResource.d.ts create mode 100644 types/AiEmbeddingsBucketsResource.d.ts create mode 100644 types/AiEmbeddingsResource.d.ts create mode 100644 types/AiEmbeddingsSimilaritySearchResource.d.ts create mode 100644 types/AiModelsResource.d.ts create mode 100644 types/AiSummarizeResource.d.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 741a7d0..02a01d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## v2 +### v2.0.0-alpha.2 + +- Fix `AI` resource methods and created nested structure + ### v2.0.0-alpha.1 - Update actions workflow versions to v4 and `.npmignore` to v2 @@ -43,7 +47,6 @@ - Remove duplicated `BulkPhoneNumberCampaigns` resource - Remove duplicated `BulkPhoneNumberOperations` resource - ## v1 ### v1.26.2 diff --git a/VERSION b/VERSION index e05cd46..453787a 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.0.0-alpha.1 +2.0.0-alpha.2 diff --git a/package-lock.json b/package-lock.json index 635ce4b..31ae193 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "telnyx", - "version": "2.0.0-alpha.1", + "version": "2.0.0-alpha.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "telnyx", - "version": "2.0.0-alpha.1", + "version": "2.0.0-alpha.2", "license": "MIT", "devDependencies": { "@eslint/js": "^9.10.0", diff --git a/package.json b/package.json index 1c80cac..a6b97c8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "telnyx", - "version": "2.0.0-alpha.1", + "version": "2.0.0-alpha.2", "description": "Telnyx API Node SDK", "keywords": [ "telnyx", diff --git a/src/resources/AI.ts b/src/resources/AI.ts deleted file mode 100644 index fa22875..0000000 --- a/src/resources/AI.ts +++ /dev/null @@ -1,43 +0,0 @@ -import TelnyxResource from '../TelnyxResource'; -const telnyxMethod = TelnyxResource.method; - -export const AI = TelnyxResource.extend({ - path: 'public_endpoints', - includeBasic: ['list', 'retrieve', 'create', 'delete'], - - GetEmbeddingTask: telnyxMethod({ - method: 'GET', - path: '/ai/embeddings/{task/id}', - urlParams: ['task_id'], - }), - PostEmbedding: telnyxMethod({ - method: 'POST', - path: '/ai/embeddings', - }), - embedding_bucket_files_public_embedding_buckets__bucket_name__delete: - telnyxMethod({ - method: 'DELETE', - path: '/ai/embeddings_buckets/{bucket_name}', - urlParams: ['bucket_name'], - }), - PostInferenceStream: telnyxMethod({ - method: 'POST', - path: '/ai/generate/stream', - }), - PostInference: telnyxMethod({ - method: 'POST', - path: '/ai/generate', - }), - PostSummary: telnyxMethod({ - method: 'POST', - path: '/ai/summarize', - }), - PostEmbeddingSimilaritySearch: telnyxMethod({ - method: 'POST', - path: '/ai/embeddings/similarity-search', - }), - GetEmbeddingBuckets: telnyxMethod({ - method: 'GET', - path: '/ai/embeddings_buckets', - }), -}); diff --git a/src/resources/AiAssistants.ts b/src/resources/AiAssistants.ts new file mode 100644 index 0000000..dddfbeb --- /dev/null +++ b/src/resources/AiAssistants.ts @@ -0,0 +1,25 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const AiAssistants = TelnyxResource.extend({ + path: 'ai/assistants', + includeBasic: ['list', 'create'], + + retrieve: telnyxMethod({ + method: 'GET', + path: '/{assistant_id}', + urlParams: ['assistant_id'], + }), + + update: telnyxMethod({ + method: 'POST', + path: '/{assistant_id}', + urlParams: ['assistant_id'], + }), + + del: telnyxMethod({ + method: 'DELETE', + path: '/{assistant_id}', + urlParams: ['assistant_id'], + }), +}); diff --git a/src/resources/AiAudioTranscriptions.ts b/src/resources/AiAudioTranscriptions.ts new file mode 100644 index 0000000..c9efdad --- /dev/null +++ b/src/resources/AiAudioTranscriptions.ts @@ -0,0 +1,6 @@ +import TelnyxResource from '../TelnyxResource'; + +export const AiAudioTranscriptions = TelnyxResource.extend({ + path: 'ai/audio/transcriptions', + includeBasic: ['create'], +}); diff --git a/src/resources/AiChatCompletions.ts b/src/resources/AiChatCompletions.ts new file mode 100644 index 0000000..662a12f --- /dev/null +++ b/src/resources/AiChatCompletions.ts @@ -0,0 +1,6 @@ +import TelnyxResource from '../TelnyxResource'; + +export const AiChatCompletions = TelnyxResource.extend({ + path: 'ai/chat/completions', + includeBasic: ['create'], +}); diff --git a/src/resources/AiEmbeddings.ts b/src/resources/AiEmbeddings.ts new file mode 100644 index 0000000..3e1845b --- /dev/null +++ b/src/resources/AiEmbeddings.ts @@ -0,0 +1,13 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const AiEmbeddings = TelnyxResource.extend({ + path: 'ai/embeddings', + includeBasic: ['list', 'create'], + + retrieve: telnyxMethod({ + method: 'GET', + path: '/{task_id}', + urlParams: ['task_id'], + }), +}); diff --git a/src/resources/AiEmbeddingsBuckets.ts b/src/resources/AiEmbeddingsBuckets.ts new file mode 100644 index 0000000..399644b --- /dev/null +++ b/src/resources/AiEmbeddingsBuckets.ts @@ -0,0 +1,19 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const AiEmbeddingsBuckets = TelnyxResource.extend({ + path: 'ai/embeddings/buckets', + includeBasic: ['list'], + + retrieve: telnyxMethod({ + method: 'GET', + path: '/{bucket_name}', + urlParams: ['bucket_name'], + }), + + del: telnyxMethod({ + method: 'DELETE', + path: '/{bucket_name}', + urlParams: ['bucket_name'], + }), +}); diff --git a/src/resources/AiEmbeddingsSimilaritySearch.ts b/src/resources/AiEmbeddingsSimilaritySearch.ts new file mode 100644 index 0000000..6010005 --- /dev/null +++ b/src/resources/AiEmbeddingsSimilaritySearch.ts @@ -0,0 +1,6 @@ +import TelnyxResource from '../TelnyxResource'; + +export const AiEmbeddingsSimilaritySearch = TelnyxResource.extend({ + path: 'ai/embeddings/similarity-search', + includeBasic: ['create'], +}); diff --git a/src/resources/AiModels.ts b/src/resources/AiModels.ts new file mode 100644 index 0000000..53e65f9 --- /dev/null +++ b/src/resources/AiModels.ts @@ -0,0 +1,6 @@ +import TelnyxResource from '../TelnyxResource'; + +export const AiModels = TelnyxResource.extend({ + path: 'ai/models', + includeBasic: ['list'], +}); diff --git a/src/resources/AiSummarize.ts b/src/resources/AiSummarize.ts new file mode 100644 index 0000000..65f78d6 --- /dev/null +++ b/src/resources/AiSummarize.ts @@ -0,0 +1,6 @@ +import TelnyxResource from '../TelnyxResource'; + +export const AiSummarize = TelnyxResource.extend({ + path: 'ai/summarize', + includeBasic: ['create'], +}); diff --git a/src/resources/Conferences.ts b/src/resources/Conferences.ts index e0b7ea2..ace7f66 100644 --- a/src/resources/Conferences.ts +++ b/src/resources/Conferences.ts @@ -54,7 +54,6 @@ export const Conferences = TelnyxResource.extend({ participants: telnyxMethod({ method: 'GET', - path: '/{conferenceId}/participants', urlParams: ['conferenceId'], }), diff --git a/src/telnyx.ts b/src/telnyx.ts index f792734..64ee5c7 100644 --- a/src/telnyx.ts +++ b/src/telnyx.ts @@ -13,7 +13,14 @@ import {ActionsSimCards} from './resources/ActionsSimCards'; import {ActivateDeactivateBulkCredentials} from './resources/ActivateDeactivateBulkCredentials'; import {Addresses} from './resources/Addresses'; import {AutorespConfigs} from './resources/AutorespConfigs'; -import {AI} from './resources/AI'; +import {AiAssistants} from './resources/AiAssistants'; +import {AiAudioTranscriptions} from './resources/AiAudioTranscriptions'; +import {AiChatCompletions} from './resources/AiChatCompletions'; +import {AiEmbeddings} from './resources/AiEmbeddings'; +import {AiEmbeddingsBuckets} from './resources/AiEmbeddingsBuckets'; +import {AiEmbeddingsSimilaritySearch} from './resources/AiEmbeddingsSimilaritySearch'; +import {AiModels} from './resources/AiModels'; +import {AiSummarize} from './resources/AiSummarize'; import {AuthenticationProviders} from './resources/AuthenticationProviders'; import {AvailablePhoneNumbers} from './resources/AvailablePhoneNumbers'; import {Balance} from './resources/Balance'; @@ -190,7 +197,14 @@ export function createTelnyx() { ActivateDeactivateBulkCredentials, Addresses, AutorespConfigs, - AI, + AiAssistants, + AiAudioTranscriptions, + AiChatCompletions, + AiEmbeddings, + AiEmbeddingsBuckets, + AiEmbeddingsSimilaritySearch, + AiModels, + AiSummarize, AuthenticationProviders, AvailablePhoneNumbers, Balance, diff --git a/types/AccessIpRangesResource.d.ts b/types/AccessIpRangesResource.d.ts index e984e77..5002f92 100644 --- a/types/AccessIpRangesResource.d.ts +++ b/types/AccessIpRangesResource.d.ts @@ -12,7 +12,7 @@ declare module 'telnyx' { paths['/access_ip_ranges']['get']['parameters']['query']; type AccessIpRangesListResponse = - paths['/access_ip_ranges']['get']['responses']['200']['content']['application/json']['data']; + paths['/access_ip_ranges']['get']['responses']['200']['content']['application/json']; type AccessIpRangesDelId = paths['/access_ip_ranges/{access_ip_range_id}']['delete']['parameters']['path']['access_ip_range_id']; diff --git a/types/AddressesResource.d.ts b/types/AddressesResource.d.ts index b2275d1..afb5f2b 100644 --- a/types/AddressesResource.d.ts +++ b/types/AddressesResource.d.ts @@ -9,25 +9,25 @@ declare module 'telnyx' { paths['/addresses/{id}']['get']['parameters']['query']; type AddressesRetrieveResponse = - paths['/addresses/{id}']['get']['responses']['200']['content']['application/json']['data']; + paths['/addresses/{id}']['get']['responses']['200']['content']['application/json']; type AddressesCreateParams = paths['/addresses']['post']['requestBody']['content']['application/json']; type AddressesCreateResponse = - paths['/addresses']['post']['responses']['200']['content']['application/json']['data']; + paths['/addresses']['post']['responses']['200']['content']['application/json']; type AddressesValidateParams = paths['/addresses/actions/validate']['post']['requestBody']['content']['application/json']; type AddressesValidateResponse = - paths['/addresses/actions/validate']['post']['responses']['200']['content']['application/json']['data']; + paths['/addresses/actions/validate']['post']['responses']['200']['content']['application/json']; type AddressesListParams = paths['/addresses']['get']['parameters']['query']; type AddressesListResponse = - paths['/addresses']['get']['responses']['200']['content']['application/json']['data']; + paths['/addresses']['get']['responses']['200']['content']['application/json']; type AddressesDelId = paths['/addresses/{id}']['delete']['parameters']['path']['id']; @@ -36,7 +36,7 @@ declare module 'telnyx' { paths['/addresses/{id}']['delete']['parameters']['query']; type AddressesDelResponse = - paths['/addresses/{id}']['delete']['responses']['200']['content']['application/json']['data']; + paths['/addresses/{id}']['delete']['responses']['200']['content']['application/json']; type AddressesNestedMethods = { del: AddressesResource['del']; diff --git a/types/AiAssistantsResource.d.ts b/types/AiAssistantsResource.d.ts new file mode 100644 index 0000000..4b9b031 --- /dev/null +++ b/types/AiAssistantsResource.d.ts @@ -0,0 +1,69 @@ +import {paths} from './TelnyxAPI.js'; + +declare module 'telnyx' { + namespace Telnyx { + type AiAssistantsRetrieveId = + paths['/ai/assistants/{assistant_id}']['get']['parameters']['path']['assistant_id']; + + type AiAssistantsRetrieveResponse = + paths['/ai/assistants/{assistant_id}']['get']['responses']['200']['content']['application/json']; + + type AiAssistantsListParams = + paths['/ai/assistants']['get']['parameters']['query']; + + type AiAssistantsListResponse = + paths['/ai/assistants']['get']['responses']['200']['content']['application/json']; + + type AiAssistantsCreateParams = + paths['/ai/assistants']['post']['requestBody']['content']['application/json']; + + type AiAssistantsCreateResponse = + paths['/ai/assistants']['post']['responses']['200']['content']['application/json']; + + type AiAssistantsDelId = + paths['/ai/assistants/{assistant_id}']['delete']['parameters']['path']['assistant_id']; + + type AiAssistantsDelParams = + paths['/ai/assistants/{assistant_id}']['delete']['parameters']['query']; + + type AiAssistantsDelResponse = + paths['/ai/assistants/{assistant_id}']['delete']['responses']['200']['content']['application/json']; + + type AiAssistantsUpdateId = + paths['/ai/assistants/{assistant_id}']['post']['parameters']['path']['assistant_id']; + + type AiAssistantsUpdateParams = + paths['/ai/assistants/{assistant_id}']['post']['requestBody']['content']['application/json']; + + type AiAssistantsUpdateResponse = + paths['/ai/assistants/{assistant_id}']['post']['responses']['200']['content']['application/json']; + + class AiAssistantsResource { + retrieve( + id: AiAssistantsRetrieveId, + options?: RequestOptions, + ): Promise>; + + list( + params?: AiAssistantsListParams, + options?: RequestOptions, + ): Promise>; + + create( + params: AiAssistantsCreateParams, + options?: RequestOptions, + ): Promise>; + + del( + id: AiAssistantsDelId, + options?: RequestOptions, + ): Promise>; + + update( + id: AiAssistantsUpdateId, + params: AiAssistantsUpdateParams, + options?: RequestOptions, + ): Promise>; + } + } +} diff --git a/types/AiAudioTranscriptionsResource.d.ts b/types/AiAudioTranscriptionsResource.d.ts new file mode 100644 index 0000000..e133053 --- /dev/null +++ b/types/AiAudioTranscriptionsResource.d.ts @@ -0,0 +1,18 @@ +import {paths} from './TelnyxAPI.js'; + +declare module 'telnyx' { + namespace Telnyx { + type AiAudioTranscriptionsCreateParams = + paths['/ai/audio/transcriptions']['post']['requestBody']['content']['multipart/form-data']; + + type AiAudioTranscriptionsCreateResponse = + paths['/ai/audio/transcriptions']['post']['responses']['200']['content']['application/json']; + + class AiAudioTranscriptionsResource { + create( + params: AiAudioTranscriptionsCreateParams, + options?: RequestOptions, + ): Promise>; + } + } +} diff --git a/types/AiChatCompletionsResource.d.ts b/types/AiChatCompletionsResource.d.ts new file mode 100644 index 0000000..dbc72f4 --- /dev/null +++ b/types/AiChatCompletionsResource.d.ts @@ -0,0 +1,18 @@ +import {paths} from './TelnyxAPI.js'; + +declare module 'telnyx' { + namespace Telnyx { + type AiChatCompletionsCreateParams = + paths['/ai/chat/completions']['post']['requestBody']['content']['application/json']; + + type AiChatCompletionsCreateResponse = + paths['/ai/chat/completions']['post']['responses']['200']['content']['application/json']; + + class AiChatCompletionsResource { + create( + params: AiChatCompletionsCreateParams, + options?: RequestOptions, + ): Promise>; + } + } +} diff --git a/types/AiEmbeddingsBucketsResource.d.ts b/types/AiEmbeddingsBucketsResource.d.ts new file mode 100644 index 0000000..4d9cd3a --- /dev/null +++ b/types/AiEmbeddingsBucketsResource.d.ts @@ -0,0 +1,46 @@ +import {paths} from './TelnyxAPI.js'; + +declare module 'telnyx' { + namespace Telnyx { + type AiEmbeddingsBucketsListParams = + paths['/ai/embeddings/buckets']['get']['parameters']['query']; + + type AiEmbeddingsBucketsListResponse = + paths['/ai/embeddings/buckets']['get']['responses']['200']['content']['application/json']; + + type AiEmbeddingsBucketsRetrieveId = + paths['/ai/embeddings/buckets/{bucket_name}']['get']['parameters']['path']['bucket_name']; + + type AiEmbeddingsBucketsRetrieveParams = + paths['/ai/embeddings/buckets/{bucket_name}']['get']['parameters']['query']; + + type AiEmbeddingsBucketsRetrieveResponse = + paths['/ai/embeddings/buckets/{bucket_name}']['get']['responses']['200']['content']['application/json']; + + type AiEmbeddingsBucketsDelId = + paths['/ai/embeddings/buckets/{bucket_name}']['delete']['parameters']['path']['bucket_name']; + + type AiEmbeddingsBucketsDelParams = + paths['/ai/embeddings/buckets/{bucket_name}']['delete']['parameters']['query']; + + type AiEmbeddingsBucketsDelResponse = + paths['/ai/embeddings/buckets/{bucket_name}']['delete']['responses']['200']['content']; + + class AiEmbeddingsBucketsResource { + list( + params?: AiEmbeddingsBucketsListParams, + options?: RequestOptions, + ): Promise>; + + retrieve( + id: AiEmbeddingsBucketsRetrieveId, + options?: RequestOptions, + ): Promise>; + + del( + id: AiEmbeddingsBucketsDelId, + options?: RequestOptions, + ): Promise>; + } + } +} diff --git a/types/AiEmbeddingsResource.d.ts b/types/AiEmbeddingsResource.d.ts new file mode 100644 index 0000000..7403856 --- /dev/null +++ b/types/AiEmbeddingsResource.d.ts @@ -0,0 +1,43 @@ +import {paths} from './TelnyxAPI.js'; + +declare module 'telnyx' { + namespace Telnyx { + type AiEmbeddingsRetrieveId = + paths['/ai/embeddings/{task_id}']['get']['parameters']['path']['task_id']; + + type AiEmbeddingsRetrieveParams = + paths['/ai/embeddings/{task_id}']['get']['parameters']['query']; + + type AiEmbeddingsRetrieveResponse = + paths['/ai/embeddings/{task_id}']['get']['responses']['200']['content']['application/json']; + + type AiEmbeddingsListParams = + paths['/ai/embeddings']['get']['parameters']['query']; + + type AiEmbeddingsListResponse = + paths['/ai/embeddings']['get']['responses']['200']['content']['application/json']; + + type AiEmbeddingsCreateParams = + paths['/ai/embeddings']['post']['requestBody']['content']['application/json']; + + type AiEmbeddingsCreateResponse = + paths['/ai/embeddings']['post']['responses']['200']['content']['application/json']; + + class AiEmbeddingsResource { + retrieve( + id: AiEmbeddingsRetrieveId, + options?: RequestOptions, + ): Promise>; + + list( + params?: AiEmbeddingsListParams, + options?: RequestOptions, + ): Promise>; + + create( + params: AiEmbeddingsCreateParams, + options?: RequestOptions, + ): Promise>; + } + } +} diff --git a/types/AiEmbeddingsSimilaritySearchResource.d.ts b/types/AiEmbeddingsSimilaritySearchResource.d.ts new file mode 100644 index 0000000..01068cb --- /dev/null +++ b/types/AiEmbeddingsSimilaritySearchResource.d.ts @@ -0,0 +1,20 @@ +import {paths} from './TelnyxAPI.js'; + +declare module 'telnyx' { + namespace Telnyx { + type AiEmbeddingsSimilaritySearchCreateParams = + paths['/ai/embeddings/similarity-search']['post']['requestBody']['content']['application/json']; + + type AiEmbeddingsSimilaritySearchCreateResponse = + paths['/ai/embeddings/similarity-search']['post']['responses']['200']['content']['application/json']; + + class AiEmbeddingsSimilaritySearchResource { + create( + params: AiEmbeddingsSimilaritySearchCreateParams, + options?: RequestOptions, + ): Promise< + Telnyx.Response + >; + } + } +} diff --git a/types/AiModelsResource.d.ts b/types/AiModelsResource.d.ts new file mode 100644 index 0000000..c5802a8 --- /dev/null +++ b/types/AiModelsResource.d.ts @@ -0,0 +1,17 @@ +import {paths} from './TelnyxAPI.js'; + +declare module 'telnyx' { + namespace Telnyx { + type AiModelsListParams = paths['/ai/models']['get']['parameters']['query']; + + type AiModelsListResponse = + paths['/ai/models']['get']['responses']['200']['content']['application/json']; + + class AiModelsResource { + list( + params?: AiModelsListParams, + options?: RequestOptions, + ): Promise>; + } + } +} diff --git a/types/AiSummarizeResource.d.ts b/types/AiSummarizeResource.d.ts new file mode 100644 index 0000000..f9ac272 --- /dev/null +++ b/types/AiSummarizeResource.d.ts @@ -0,0 +1,18 @@ +import {paths} from './TelnyxAPI.js'; + +declare module 'telnyx' { + namespace Telnyx { + type AiSummarizeCreateParams = + paths['/ai/summarize']['post']['requestBody']['content']['application/json']; + + type AiSummarizeCreateResponse = + paths['/ai/summarize']['post']['responses']['200']['content']['application/json']; + + class AiSummarizeResource { + create( + params: AiSummarizeCreateParams, + options?: RequestOptions, + ): Promise>; + } + } +} diff --git a/types/AutorespConfigsResource.d.ts b/types/AutorespConfigsResource.d.ts index 4ef1142..6f145ee 100644 --- a/types/AutorespConfigsResource.d.ts +++ b/types/AutorespConfigsResource.d.ts @@ -6,7 +6,7 @@ declare module 'telnyx' { paths['/messaging_profiles/{profile_id}/autoresp_configs/{autoresp_cfg_id}']['get']['parameters']['path']; type AutorespConfigsRetrieveResponse = - paths['/messaging_profiles/{profile_id}/autoresp_configs/{autoresp_cfg_id}']['get']['responses']['200']['content']['application/json']['data']; + paths['/messaging_profiles/{profile_id}/autoresp_configs/{autoresp_cfg_id}']['get']['responses']['200']['content']['application/json']; type AutorespConfigsCreatePathParams = paths['/messaging_profiles/{profile_id}/autoresp_configs']['post']['parameters']['path']; @@ -15,7 +15,7 @@ declare module 'telnyx' { paths['/messaging_profiles/{profile_id}/autoresp_configs']['post']['requestBody']['content']['application/json']; type AutorespConfigsCreateResponse = - paths['/messaging_profiles/{profile_id}/autoresp_configs']['post']['responses']['200']['content']['application/json']['data']; + paths['/messaging_profiles/{profile_id}/autoresp_configs']['post']['responses']['200']['content']['application/json']; type AutorespConfigsListPathParams = paths['/messaging_profiles/{profile_id}/autoresp_configs']['get']['parameters']['path']; @@ -24,7 +24,7 @@ declare module 'telnyx' { paths['/messaging_profiles/{profile_id}/autoresp_configs']['get']['parameters']['query']; type AutorespConfigsListResponse = - paths['/messaging_profiles/{profile_id}/autoresp_configs']['get']['responses']['200']['content']['application/json']['data']; + paths['/messaging_profiles/{profile_id}/autoresp_configs']['get']['responses']['200']['content']['application/json']; type AutorespConfigsDelPathParams = paths['/messaging_profiles/{profile_id}/autoresp_configs/{autoresp_cfg_id}']['delete']['parameters']['path']; @@ -39,7 +39,7 @@ declare module 'telnyx' { paths['/messaging_profiles/{profile_id}/autoresp_configs/{autoresp_cfg_id}']['put']['requestBody']['content']['application/json']; type AutorespConfigsUpdateResponse = - paths['/messaging_profiles/{profile_id}/autoresp_configs/{autoresp_cfg_id}']['put']['responses']['200']['content']['application/json']['data']; + paths['/messaging_profiles/{profile_id}/autoresp_configs/{autoresp_cfg_id}']['put']['responses']['200']['content']['application/json']; class AutorespConfigsResource { retrieve( diff --git a/types/AvailablePhoneNumbersResource.d.ts b/types/AvailablePhoneNumbersResource.d.ts index b4dc8ab..3aeb4fc 100644 --- a/types/AvailablePhoneNumbersResource.d.ts +++ b/types/AvailablePhoneNumbersResource.d.ts @@ -6,7 +6,7 @@ declare module 'telnyx' { paths['/available_phone_numbers']['get']['parameters']['query']; type AvailablePhoneNumbersListResponse = - paths['/available_phone_numbers']['get']['responses']['200']['content']['application/json']['data']; + paths['/available_phone_numbers']['get']['responses']['200']['content']['application/json']; class AvailablePhoneNumbersResource { list( diff --git a/types/BalanceResource.d.ts b/types/BalanceResource.d.ts index 99afb8e..c9b92a9 100644 --- a/types/BalanceResource.d.ts +++ b/types/BalanceResource.d.ts @@ -6,7 +6,7 @@ declare module 'telnyx' { paths['/balance']['get']['parameters']['query']; type BalanceRetrieveResponse = - paths['/balance']['get']['responses']['200']['content']['application/json']['data']; + paths['/balance']['get']['responses']['200']['content']['application/json']; class BalanceResource { /** Get user balance details */ diff --git a/types/BillingGroupsResource.d.ts b/types/BillingGroupsResource.d.ts index d13772c..ac60679 100644 --- a/types/BillingGroupsResource.d.ts +++ b/types/BillingGroupsResource.d.ts @@ -9,19 +9,19 @@ declare module 'telnyx' { paths['/billing_groups/{id}']['get']['parameters']['query']; type BillingGroupsRetrieveResponse = - paths['/billing_groups/{id}']['get']['responses']['200']['content']['application/json']['data']; + paths['/billing_groups/{id}']['get']['responses']['200']['content']['application/json']; type BillingGroupsListParams = paths['/billing_groups']['get']['parameters']['query']; type BillingGroupsListResponse = - paths['/billing_groups']['get']['responses']['200']['content']['application/json']['data']; + paths['/billing_groups']['get']['responses']['200']['content']['application/json']; type BillingGroupsCreateParams = paths['/billing_groups']['post']['requestBody']['content']['application/json']; type BillingGroupsCreateResponse = - paths['/billing_groups']['post']['responses']['200']['content']['application/json']['data']; + paths['/billing_groups']['post']['responses']['200']['content']['application/json']; type BillingGroupsDelId = paths['/billing_groups/{id}']['delete']['parameters']['path']['id']; @@ -30,7 +30,7 @@ declare module 'telnyx' { paths['/billing_groups/{id}']['delete']['parameters']['query']; type BillingGroupsDelResponse = - paths['/billing_groups/{id}']['delete']['responses']['200']['content']['application/json']['data']; + paths['/billing_groups/{id}']['delete']['responses']['200']['content']['application/json']; type BillingGroupsUpdateId = paths['/billing_groups/{id}']['patch']['parameters']['path']['id']; @@ -39,7 +39,7 @@ declare module 'telnyx' { paths['/billing_groups/{id}']['patch']['requestBody']['content']['application/json']; type BillingGroupsUpdateResponse = - paths['/billing_groups/{id}']['patch']['responses']['200']['content']['application/json']['data']; + paths['/billing_groups/{id}']['patch']['responses']['200']['content']['application/json']; class BillingGroupsResource { retrieve( diff --git a/types/CallsResource.d.ts b/types/CallsResource.d.ts index 2115709..c0d2f73 100644 --- a/types/CallsResource.d.ts +++ b/types/CallsResource.d.ts @@ -9,13 +9,13 @@ declare module 'telnyx' { paths['/calls/{call_control_id}']['get']['parameters']['query']; type CallsRetrieveResponse = - paths['/calls/{call_control_id}']['get']['responses']['200']['content']['application/json']['data']; + paths['/calls/{call_control_id}']['get']['responses']['200']['content']['application/json']; type CallsCreateParams = paths['/calls']['post']['requestBody']['content']['application/json']; type CallsCreateResponse = - paths['/calls']['post']['responses']['200']['content']['application/json']['data']; + paths['/calls']['post']['responses']['200']['content']['application/json']; type CallsAnswerParams = paths['/calls/{call_control_id}/actions/answer']['post']['requestBody']['content']['application/json']; @@ -75,61 +75,61 @@ declare module 'telnyx' { paths['/calls/{call_control_id}/actions/leave_queue']['post']['requestBody']['content']['application/json']; type CallsAnswerResponse = - paths['/calls/{call_control_id}/actions/answer']['post']['responses']['200']['content']['application/json']['data']; + paths['/calls/{call_control_id}/actions/answer']['post']['responses']['200']['content']['application/json']; type CallsRejectResponse = - paths['/calls/{call_control_id}/actions/reject']['post']['responses']['200']['content']['application/json']['data']; + paths['/calls/{call_control_id}/actions/reject']['post']['responses']['200']['content']['application/json']; type CallsHangupResponse = - paths['/calls/{call_control_id}/actions/hangup']['post']['responses']['200']['content']['application/json']['data']; + paths['/calls/{call_control_id}/actions/hangup']['post']['responses']['200']['content']['application/json']; type CallsBridgeResponse = - paths['/calls/{call_control_id}/actions/bridge']['post']['responses']['200']['content']['application/json']['data']; + paths['/calls/{call_control_id}/actions/bridge']['post']['responses']['200']['content']['application/json']; type CallsSpeakResponse = - paths['/calls/{call_control_id}/actions/speak']['post']['responses']['200']['content']['application/json']['data']; + paths['/calls/{call_control_id}/actions/speak']['post']['responses']['200']['content']['application/json']; type CallsForkStartResponse = - paths['/calls/{call_control_id}/actions/fork_start']['post']['responses']['200']['content']['application/json']['data']; + paths['/calls/{call_control_id}/actions/fork_start']['post']['responses']['200']['content']['application/json']; type CallsForkStopResponse = - paths['/calls/{call_control_id}/actions/fork_stop']['post']['responses']['200']['content']['application/json']['data']; + paths['/calls/{call_control_id}/actions/fork_stop']['post']['responses']['200']['content']['application/json']; type CallsGatherResponse = - paths['/calls/{call_control_id}/actions/gather']['post']['responses']['200']['content']['application/json']['data']; + paths['/calls/{call_control_id}/actions/gather']['post']['responses']['200']['content']['application/json']; type CallsGatherUsingAudioResponse = - paths['/calls/{call_control_id}/actions/gather_using_audio']['post']['responses']['200']['content']['application/json']['data']; + paths['/calls/{call_control_id}/actions/gather_using_audio']['post']['responses']['200']['content']['application/json']; type CallsGatherUsingSpeakResponse = - paths['/calls/{call_control_id}/actions/gather_using_speak']['post']['responses']['200']['content']['application/json']['data']; + paths['/calls/{call_control_id}/actions/gather_using_speak']['post']['responses']['200']['content']['application/json']; type CallsGatherStopResponse = - paths['/calls/{call_control_id}/actions/gather_stop']['post']['responses']['200']['content']['application/json']['data']; + paths['/calls/{call_control_id}/actions/gather_stop']['post']['responses']['200']['content']['application/json']; type CallsPlaybackStartResponse = - paths['/calls/{call_control_id}/actions/playback_start']['post']['responses']['200']['content']['application/json']['data']; + paths['/calls/{call_control_id}/actions/playback_start']['post']['responses']['200']['content']['application/json']; type CallsPlaybackStopResponse = - paths['/calls/{call_control_id}/actions/playback_stop']['post']['responses']['200']['content']['application/json']['data']; + paths['/calls/{call_control_id}/actions/playback_stop']['post']['responses']['200']['content']['application/json']; type CallsRecordStartResponse = - paths['/calls/{call_control_id}/actions/record_start']['post']['responses']['200']['content']['application/json']['data']; + paths['/calls/{call_control_id}/actions/record_start']['post']['responses']['200']['content']['application/json']; type CallsRecordStopResponse = - paths['/calls/{call_control_id}/actions/record_stop']['post']['responses']['200']['content']['application/json']['data']; + paths['/calls/{call_control_id}/actions/record_stop']['post']['responses']['200']['content']['application/json']; type CallsRecordPauseResponse = - paths['/calls/{call_control_id}/actions/record_pause']['post']['responses']['200']['content']['application/json']['data']; + paths['/calls/{call_control_id}/actions/record_pause']['post']['responses']['200']['content']['application/json']; type CallsRecordResumeResponse = - paths['/calls/{call_control_id}/actions/record_resume']['post']['responses']['200']['content']['application/json']['data']; + paths['/calls/{call_control_id}/actions/record_resume']['post']['responses']['200']['content']['application/json']; type CallsReferResponse = - paths['/calls/{call_control_id}/actions/refer']['post']['responses']['200']['content']['application/json']['data']; + paths['/calls/{call_control_id}/actions/refer']['post']['responses']['200']['content']['application/json']; type CallsSendDtmfResponse = - paths['/calls/{call_control_id}/actions/send_dtmf']['post']['responses']['200']['content']['application/json']['data']; + paths['/calls/{call_control_id}/actions/send_dtmf']['post']['responses']['200']['content']['application/json']; type CallsStreamingStartResponse = - paths['/calls/{call_control_id}/actions/streaming_start']['post']['responses']['200']['content']['application/json']['data']; + paths['/calls/{call_control_id}/actions/streaming_start']['post']['responses']['200']['content']['application/json']; type CallsStreamingStopResponse = - paths['/calls/{call_control_id}/actions/streaming_stop']['post']['responses']['200']['content']['application/json']['data']; + paths['/calls/{call_control_id}/actions/streaming_stop']['post']['responses']['200']['content']['application/json']; type CallsSuppressionStartResponse = - paths['/calls/{call_control_id}/actions/suppression_start']['post']['responses']['200']['content']['application/json']['data']; + paths['/calls/{call_control_id}/actions/suppression_start']['post']['responses']['200']['content']['application/json']; type CallsSuppressionStopResponse = - paths['/calls/{call_control_id}/actions/suppression_stop']['post']['responses']['200']['content']['application/json']['data']; + paths['/calls/{call_control_id}/actions/suppression_stop']['post']['responses']['200']['content']['application/json']; type CallsTransferResponse = - paths['/calls/{call_control_id}/actions/transfer']['post']['responses']['200']['content']['application/json']['data']; + paths['/calls/{call_control_id}/actions/transfer']['post']['responses']['200']['content']['application/json']; type CallsTranscriptionStartResponse = - paths['/calls/{call_control_id}/actions/transcription_start']['post']['responses']['200']['content']['application/json']['data']; + paths['/calls/{call_control_id}/actions/transcription_start']['post']['responses']['200']['content']['application/json']; type CallsTranscriptionStopResponse = - paths['/calls/{call_control_id}/actions/transcription_stop']['post']['responses']['200']['content']['application/json']['data']; + paths['/calls/{call_control_id}/actions/transcription_stop']['post']['responses']['200']['content']['application/json']; type CallsEnqueueResponse = - paths['/calls/{call_control_id}/actions/enqueue']['post']['responses']['200']['content']['application/json']['data']; + paths['/calls/{call_control_id}/actions/enqueue']['post']['responses']['200']['content']['application/json']; type CallsLeaveQueueResponse = - paths['/calls/{call_control_id}/actions/leave_queue']['post']['responses']['200']['content']['application/json']['data']; + paths['/calls/{call_control_id}/actions/leave_queue']['post']['responses']['200']['content']['application/json']; type CallsNestedMethods = { answer: CallsResource['answer']; diff --git a/types/MessagingProfileMetricsResource.d.ts b/types/MessagingProfileMetricsResource.d.ts index dab0492..b39d8f4 100644 --- a/types/MessagingProfileMetricsResource.d.ts +++ b/types/MessagingProfileMetricsResource.d.ts @@ -6,7 +6,7 @@ declare module 'telnyx' { paths['/messaging_profile_metrics']['get']['parameters']['query']; type MessagingProfilesListMetricsResponse = - paths['/messaging_profile_metrics']['get']['responses']['200']['content']['application/json']['data']; + paths['/messaging_profile_metrics']['get']['responses']['200']['content']['application/json']; class MessagingProfileMetricsResource { listMetrics( diff --git a/types/MessagingProfilesResource.d.ts b/types/MessagingProfilesResource.d.ts index 0145398..119db7e 100644 --- a/types/MessagingProfilesResource.d.ts +++ b/types/MessagingProfilesResource.d.ts @@ -21,37 +21,37 @@ declare module 'telnyx' { paths['/messaging_profiles/{id}']['patch']['requestBody']['content']['application/json']; type MessagingProfilesRetrieveResponse = - paths['/messaging_profiles/{id}']['get']['responses']['200']['content']['application/json']['data']; + paths['/messaging_profiles/{id}']['get']['responses']['200']['content']['application/json']; type MessagingProfilesDelResponse = - paths['/messaging_profiles/{id}']['delete']['responses']['200']['content']['application/json']['data']; + paths['/messaging_profiles/{id}']['delete']['responses']['200']['content']['application/json']; type MessagingProfilesUpdateResponse = - paths['/messaging_profiles/{id}']['patch']['responses']['200']['content']['application/json']['data']; + paths['/messaging_profiles/{id}']['patch']['responses']['200']['content']['application/json']; type MessagingProfilesListParams = paths['/messaging_profiles']['get']['parameters']['query']; type MessagingProfilesListResponse = - paths['/messaging_profiles']['get']['responses']['200']['content']['application/json']['data']; + paths['/messaging_profiles']['get']['responses']['200']['content']['application/json']; type MessagingProfilesCreateParams = paths['/messaging_profiles']['post']['requestBody']['content']['application/json']; type MessagingProfilesCreateResponse = - paths['/messaging_profiles']['post']['responses']['200']['content']['application/json']['data']; + paths['/messaging_profiles']['post']['responses']['200']['content']['application/json']; type MessagingProfilesListPhoneNumbersParams = paths['/messaging_profiles/{id}/phone_numbers']['get']['parameters']['query']; type MessagingProfilesListPhoneNumbersResponse = - paths['/messaging_profiles/{id}/phone_numbers']['get']['responses']['200']['content']['application/json']['data']; + paths['/messaging_profiles/{id}/phone_numbers']['get']['responses']['200']['content']['application/json']; type MessagingProfilesListShortCodesParams = paths['/messaging_profiles/{id}/short_codes']['get']['parameters']['query']; type MessagingProfilesListShortCodesResponse = - paths['/messaging_profiles/{id}/short_codes']['get']['responses']['200']['content']['application/json']['data']; + paths['/messaging_profiles/{id}/short_codes']['get']['responses']['200']['content']['application/json']; type MessagingProfilesRetrieveMetricsId = paths['/messaging_profiles/{id}/metrics']['get']['parameters']['path']['id']; @@ -60,7 +60,7 @@ declare module 'telnyx' { paths['/messaging_profiles/{id}/metrics']['get']['parameters']['query']; type MessagingProfilesRetrieveMetricsResponse = - paths['/messaging_profiles/{id}/metrics']['get']['responses']['200']['content']['application/json']['data']; + paths['/messaging_profiles/{id}/metrics']['get']['responses']['200']['content']['application/json']; type MessagingProfilesNestedMethods = { del: MessagingProfilesResource['del']; diff --git a/types/StorageBucketsResource.d.ts b/types/StorageBucketsResource.d.ts index 0de4fc3..0b65968 100644 --- a/types/StorageBucketsResource.d.ts +++ b/types/StorageBucketsResource.d.ts @@ -6,13 +6,13 @@ declare module 'telnyx' { paths['/storage/buckets/{bucketName}/usage/storage']['get']['parameters']['path']['bucketName']; type StorageBucketsUsageResponse = - paths['/storage/buckets/{bucketName}/usage/storage']['get']['responses']['200']['content']['application/json']['data']; + paths['/storage/buckets/{bucketName}/usage/storage']['get']['responses']['200']['content']['application/json']; type StorageBucketsAPIUsageName = paths['/storage/buckets/{bucketName}/usage/api']['get']['parameters']['path']['bucketName']; type StorageBucketsAPIUsageResponse = - paths['/storage/buckets/{bucketName}/usage/api']['get']['responses']['200']['content']['application/json']['data']; + paths['/storage/buckets/{bucketName}/usage/api']['get']['responses']['200']['content']['application/json']; type StorageBucketsSSLCertificateName = paths['/storage/buckets/{bucketName}/ssl_certificate']['get']['parameters']['path']['bucketName']; @@ -35,13 +35,13 @@ declare module 'telnyx' { : never; type StorageBucketsSSLCertificateResponse = - paths['/storage/buckets/{bucketName}/ssl_certificate']['get']['responses']['200']['content']['application/json']['data']; + paths['/storage/buckets/{bucketName}/ssl_certificate']['get']['responses']['200']['content']['application/json']; type StorageBucketsAddSSLCertificateResponse = - paths['/storage/buckets/{bucketName}/ssl_certificate']['put']['responses']['200']['content']['application/json']['data']; + paths['/storage/buckets/{bucketName}/ssl_certificate']['put']['responses']['200']['content']['application/json']; type StorageBucketsDelSSLCertificateResponse = - paths['/storage/buckets/{bucketName}/ssl_certificate']['delete']['responses']['200']['content']['application/json']['data']; + paths['/storage/buckets/{bucketName}/ssl_certificate']['delete']['responses']['200']['content']['application/json']; class StorageBucketsResource { usage( diff --git a/types/index.d.ts b/types/index.d.ts index bb7d7d4..773884e 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -6,6 +6,15 @@ /// // Resources Imports +/// +/// +/// +/// +/// +/// +/// +/// +/// /// /// /// @@ -35,6 +44,14 @@ declare module 'telnyx' { TelnyxResource: Telnyx.TelnyxResource; // Resources + aiAssistants: Telnyx.AiAssistantsResource; + aiAudioTranscriptions: Telnyx.AiAudioTranscriptionsResource; + aiChatCompletions: Telnyx.AiChatCompletionsResource; + aiEmbeddings: Telnyx.AiEmbeddingsResource; + aiEmbeddingsBuckets: Telnyx.AiEmbeddingsBucketsResource; + aiEmbeddingsSimilaritySearch: Telnyx.AiEmbeddingsSimilaritySearchResource; + aiModels: Telnyx.AiModelsResource; + aiSummarize: Telnyx.AiSummarizeResource; accessIpAddress: Telnyx.AccessIpAddressResource; accessIpRanges: Telnyx.AccessIpRangesResource; autorespConfigs: Telnyx.AutorespConfigsResource; diff --git a/types/lib.d.ts b/types/lib.d.ts index 53a305d..0260d22 100644 --- a/types/lib.d.ts +++ b/types/lib.d.ts @@ -33,7 +33,7 @@ declare module 'telnyx' { headers?: Record; } - export type Response = {data: T} & { + export type Response = T & { lastResponse: { headers: Record; requestId: string; From 8588eba61c7a2b2a573cd1ce22f3591857253210 Mon Sep 17 00:00:00 2001 From: Lucas Rosa Date: Wed, 2 Oct 2024 20:43:27 -0300 Subject: [PATCH 30/59] update nested resources typing --- CHANGELOG.md | 4 ++++ README.md | 1 + VERSION | 2 +- package-lock.json | 4 ++-- package.json | 2 +- src/resources/Addresses.ts | 2 -- types/AddressesResource.d.ts | 14 ++++++++++++-- types/CallsResource.d.ts | 10 ++++++++-- types/MessagingProfilesResource.d.ts | 10 ++++++++-- types/lib.d.ts | 2 ++ 10 files changed, 39 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 02a01d5..77a1e84 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## v2 +### v2.0.0-alpha.3 + +- Update typing on Nested Resources + ### v2.0.0-alpha.2 - Fix `AI` resource methods and created nested structure diff --git a/README.md b/README.md index 3f769a2..897b13e 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ [![Build Status](https://github.com/team-telnyx/telnyx-node/workflows/CI/badge.svg)](https://github.com/team-telnyx/telnyx-node/actions) [![Downloads](https://img.shields.io/npm/dm/telnyx.svg)](https://www.npmjs.com/package/telnyx) [![Try on RunKit](https://badge.runkitcdn.com/telnyx.svg)](https://runkit.com/npm/telnyx) +[![Code Style](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier") [![Join Slack](https://img.shields.io/badge/join-slack-infomational)](https://joinslack.telnyx.com/) The Telnyx Node library provides convenient access to the Telnyx API from diff --git a/VERSION b/VERSION index 453787a..4640d57 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.0.0-alpha.2 +2.0.0-alpha.3 diff --git a/package-lock.json b/package-lock.json index 31ae193..0e29439 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "telnyx", - "version": "2.0.0-alpha.2", + "version": "2.0.0-alpha.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "telnyx", - "version": "2.0.0-alpha.2", + "version": "2.0.0-alpha.3", "license": "MIT", "devDependencies": { "@eslint/js": "^9.10.0", diff --git a/package.json b/package.json index a6b97c8..b6dd14f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "telnyx", - "version": "2.0.0-alpha.2", + "version": "2.0.0-alpha.3", "description": "Telnyx API Node SDK", "keywords": [ "telnyx", diff --git a/src/resources/Addresses.ts b/src/resources/Addresses.ts index 7859c20..41763f8 100644 --- a/src/resources/Addresses.ts +++ b/src/resources/Addresses.ts @@ -26,8 +26,6 @@ export const Addresses = TelnyxResource.extend({ list: telnyxMethod({ method: 'GET', methodType: 'list', - - transformResponseData: transformResponseData, }), create: telnyxMethod({ diff --git a/types/AddressesResource.d.ts b/types/AddressesResource.d.ts index afb5f2b..ec1a9bd 100644 --- a/types/AddressesResource.d.ts +++ b/types/AddressesResource.d.ts @@ -48,7 +48,11 @@ declare module 'telnyx' { options?: RequestOptions, ): Promise< Telnyx.Response< - Telnyx.AddressesRetrieveResponse & AddressesNestedMethods + Telnyx.AddressesRetrieveResponse & + NestedResponseData< + AddressesRetrieveResponse['data'], + AddressesNestedMethods + > > >; @@ -56,7 +60,13 @@ declare module 'telnyx' { params: AddressesCreateParams, options?: RequestOptions, ): Promise< - Telnyx.Response + Telnyx.Response< + Telnyx.AddressesCreateResponse & + NestedResponseData< + AddressesCreateResponse['data'], + AddressesNestedMethods + > + > >; validate( diff --git a/types/CallsResource.d.ts b/types/CallsResource.d.ts index c0d2f73..05d7b6a 100644 --- a/types/CallsResource.d.ts +++ b/types/CallsResource.d.ts @@ -172,14 +172,20 @@ declare module 'telnyx' { params: CallsCreateParams, options?: RequestOptions, ): Promise< - Telnyx.Response + Telnyx.Response< + Telnyx.CallsCreateResponse & + NestedResponseData + > >; dial( params: CallsCreateParams, options?: RequestOptions, ): Promise< - Telnyx.Response + Telnyx.Response< + Telnyx.CallsCreateResponse & + NestedResponseData + > >; answer( diff --git a/types/MessagingProfilesResource.d.ts b/types/MessagingProfilesResource.d.ts index 119db7e..e3e6aa0 100644 --- a/types/MessagingProfilesResource.d.ts +++ b/types/MessagingProfilesResource.d.ts @@ -76,7 +76,10 @@ declare module 'telnyx' { ): Promise< Telnyx.Response< Telnyx.MessagingProfilesCreateResponse & - MessagingProfilesNestedMethods + NestedResponseData< + MessagingProfilesCreateResponse['data'], + MessagingProfilesNestedMethods + > > >; @@ -97,7 +100,10 @@ declare module 'telnyx' { ): Promise< Telnyx.Response< Telnyx.MessagingProfilesRetrieveResponse & - MessagingProfilesNestedMethods + NestedResponseData< + MessagingProfilesRetrieveResponse['data'], + MessagingProfilesNestedMethods + > > >; diff --git a/types/lib.d.ts b/types/lib.d.ts index 0260d22..ea1c74e 100644 --- a/types/lib.d.ts +++ b/types/lib.d.ts @@ -33,6 +33,8 @@ declare module 'telnyx' { headers?: Record; } + export type NestedResponseData = {data?: T & N}; + export type Response = T & { lastResponse: { headers: Record; From 70160dc6bab5004dc9ddb2cc85e644ec75327514 Mon Sep 17 00:00:00 2001 From: Lucas Rosa Date: Wed, 2 Oct 2024 20:54:32 -0300 Subject: [PATCH 31/59] update examples --- examples/call-control/index.ts | 8 +++----- examples/call-control/package-lock.json | 8 ++++---- examples/call-control/package.json | 2 +- examples/messaging/index.ts | 3 +-- examples/messaging/package-lock.json | 8 ++++---- examples/messaging/package.json | 2 +- 6 files changed, 14 insertions(+), 17 deletions(-) diff --git a/examples/call-control/index.ts b/examples/call-control/index.ts index 514ba7a..525884e 100644 --- a/examples/call-control/index.ts +++ b/examples/call-control/index.ts @@ -5,9 +5,7 @@ import Telnyx from 'telnyx'; -const apiKey = String(process.env.TELNYX_API_KEY || ''); - -const telnyx = new Telnyx(apiKey); +const telnyx = new Telnyx(process.env.TELNYX_API_KEY || ''); const params: Telnyx.CallsCreateParams = { to: '+18005550100 or sip:username@sip.telnyx.com', @@ -78,7 +76,7 @@ const params: Telnyx.CallsCreateParams = { try { const {data: call} = await telnyx.calls.dial(params); - const {data: playback} = await call.playbackStart({ + const {data: playback} = await call!.playbackStart({ audio_url: 'http://www.example.com/sounds/greeting.wav', loop: 'infinity', overlay: true, @@ -90,7 +88,7 @@ const params: Telnyx.CallsCreateParams = { audio_type: 'mp3', }); - console.log(playback?.result); + console.log(playback); } catch (e: unknown) { console.error(e); diff --git a/examples/call-control/package-lock.json b/examples/call-control/package-lock.json index f0c6ce3..fdf8521 100644 --- a/examples/call-control/package-lock.json +++ b/examples/call-control/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "ISC", "dependencies": { - "telnyx": "2.0.0-alpha.1" + "telnyx": "2.0.0-alpha.3" }, "devDependencies": { "@types/node": "^22.7.4", @@ -2083,9 +2083,9 @@ } }, "node_modules/telnyx": { - "version": "2.0.0-alpha.1", - "resolved": "https://registry.npmjs.org/telnyx/-/telnyx-2.0.0-alpha.1.tgz", - "integrity": "sha512-+TLOSlNCLN+JKZSkRa0MxVND1ah33g+7YV9gmzNOAEoBL6FGrz/r41/tDLoAeM7gkXmvgxL8o8bUEDNZB7ubyA==", + "version": "2.0.0-alpha.3", + "resolved": "https://registry.npmjs.org/telnyx/-/telnyx-2.0.0-alpha.3.tgz", + "integrity": "sha512-oSwK1e5mG0AG/Dv6/E7BhXRFB34ZWfVnNJEMgM/K+QTvgV2ozVzEq0juo2GQKLpacq6nI7hpjycVC8PumTb1YA==", "license": "MIT", "engines": { "node": "^18 || >=20" diff --git a/examples/call-control/package.json b/examples/call-control/package.json index b7658f8..02a06e2 100644 --- a/examples/call-control/package.json +++ b/examples/call-control/package.json @@ -14,7 +14,7 @@ "node": "^18 || >=20" }, "dependencies": { - "telnyx": "2.0.0-alpha.1" + "telnyx": "2.0.0-alpha.3" }, "devDependencies": { "@types/node": "^22.7.4", diff --git a/examples/messaging/index.ts b/examples/messaging/index.ts index 8ea6ed8..41b3721 100644 --- a/examples/messaging/index.ts +++ b/examples/messaging/index.ts @@ -5,8 +5,7 @@ import Telnyx from 'telnyx'; -const apiKey = String(process.env.TELNYX_API_KEY || ''); -const telnyx = new Telnyx(apiKey); +const telnyx = new Telnyx(process.env.TELNYX_API_KEY || ''); const params: Telnyx.MessagingProfilesCreateParams = { name: 'Node SDK MP', diff --git a/examples/messaging/package-lock.json b/examples/messaging/package-lock.json index 5e17744..0d3dbd6 100644 --- a/examples/messaging/package-lock.json +++ b/examples/messaging/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "ISC", "dependencies": { - "telnyx": "2.0.0-alpha.1" + "telnyx": "2.0.0-alpha.3" }, "devDependencies": { "@types/node": "^22.7.4", @@ -2083,9 +2083,9 @@ } }, "node_modules/telnyx": { - "version": "2.0.0-alpha.1", - "resolved": "https://registry.npmjs.org/telnyx/-/telnyx-2.0.0-alpha.1.tgz", - "integrity": "sha512-+TLOSlNCLN+JKZSkRa0MxVND1ah33g+7YV9gmzNOAEoBL6FGrz/r41/tDLoAeM7gkXmvgxL8o8bUEDNZB7ubyA==", + "version": "2.0.0-alpha.3", + "resolved": "https://registry.npmjs.org/telnyx/-/telnyx-2.0.0-alpha.3.tgz", + "integrity": "sha512-oSwK1e5mG0AG/Dv6/E7BhXRFB34ZWfVnNJEMgM/K+QTvgV2ozVzEq0juo2GQKLpacq6nI7hpjycVC8PumTb1YA==", "license": "MIT", "engines": { "node": "^18 || >=20" diff --git a/examples/messaging/package.json b/examples/messaging/package.json index 636a293..363035b 100644 --- a/examples/messaging/package.json +++ b/examples/messaging/package.json @@ -14,7 +14,7 @@ "node": "^18 || >=20" }, "dependencies": { - "telnyx": "2.0.0-alpha.1" + "telnyx": "2.0.0-alpha.3" }, "devDependencies": { "@types/node": "^22.7.4", From 0a90d8850e87d0fbc16938e2bebb9bcd440c5819 Mon Sep 17 00:00:00 2001 From: Lucas Rosa Date: Wed, 2 Oct 2024 20:56:41 -0300 Subject: [PATCH 32/59] add Addresses example --- CHANGELOG.md | 4 + examples/addresses/.eslintrc.js | 9 + examples/addresses/.nvmrc | 1 + examples/addresses/.tool-versions | 2 + examples/addresses/README.md | 9 + examples/addresses/index.ts | 27 + examples/addresses/package-lock.json | 2261 ++++++++++++++++++++++++++ examples/addresses/package.json | 25 + examples/addresses/tsconfig.json | 18 + 9 files changed, 2356 insertions(+) create mode 100644 examples/addresses/.eslintrc.js create mode 100644 examples/addresses/.nvmrc create mode 100644 examples/addresses/.tool-versions create mode 100644 examples/addresses/README.md create mode 100644 examples/addresses/index.ts create mode 100644 examples/addresses/package-lock.json create mode 100644 examples/addresses/package.json create mode 100644 examples/addresses/tsconfig.json diff --git a/CHANGELOG.md b/CHANGELOG.md index 77a1e84..b5485b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## v2 +### v2.0.0-alpha.4 + +- Add `Addresses` example + ### v2.0.0-alpha.3 - Update typing on Nested Resources diff --git a/examples/addresses/.eslintrc.js b/examples/addresses/.eslintrc.js new file mode 100644 index 0000000..64e22f8 --- /dev/null +++ b/examples/addresses/.eslintrc.js @@ -0,0 +1,9 @@ +module.exports = { + parserOptions: { + ecmaVersion: 6, + }, + rules: { + 'new-cap': 'off', + 'no-console': 'off', + }, +}; diff --git a/examples/addresses/.nvmrc b/examples/addresses/.nvmrc new file mode 100644 index 0000000..3516580 --- /dev/null +++ b/examples/addresses/.nvmrc @@ -0,0 +1 @@ +20.17.0 diff --git a/examples/addresses/.tool-versions b/examples/addresses/.tool-versions new file mode 100644 index 0000000..6a6191a --- /dev/null +++ b/examples/addresses/.tool-versions @@ -0,0 +1,2 @@ +nodejs 20.17.0 +npm 10.8.1 diff --git a/examples/addresses/README.md b/examples/addresses/README.md new file mode 100644 index 0000000..e6af988 --- /dev/null +++ b/examples/addresses/README.md @@ -0,0 +1,9 @@ +# Node SDK Example - Addresses + +To test this run `npm install` and then run the main script in `package.json` with `ts-node`: + +```bash +npm run start +``` + +> don't forget to populate your Telnyx API Key with `export TELNYX_API_KEY=KEY...` diff --git a/examples/addresses/index.ts b/examples/addresses/index.ts new file mode 100644 index 0000000..669aad1 --- /dev/null +++ b/examples/addresses/index.ts @@ -0,0 +1,27 @@ +/** + * To run this file, just provide your Secret API Key, like so: + * TELNYX_API_KEY=KEY... node index.js + */ + +import Telnyx from 'telnyx'; + +const telnyx = new Telnyx(process.env.TELNYX_API_KEY || ''); + +const params: Telnyx.AddressesListParams = { + sort: 'created_at', +}; + +(async function addresses() { + try { + const response = await telnyx.addresses.list(params); + + console.log(response); + } catch (e: unknown) { + console.error(e); + + const rawError: Telnyx.TelnyxRawError = (e as {raw: Telnyx.TelnyxRawError}) + .raw; + + console.dir(JSON.stringify(rawError.errors)); + } +})(); diff --git a/examples/addresses/package-lock.json b/examples/addresses/package-lock.json new file mode 100644 index 0000000..86b7e70 --- /dev/null +++ b/examples/addresses/package-lock.json @@ -0,0 +1,2261 @@ +{ + "name": "telnyx-addresses-example", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "telnyx-addresses-example", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "telnyx": "2.0.0-alpha.3" + }, + "devDependencies": { + "@types/node": "^22.7.4", + "tsx": "^4.19.1", + "typescript": "^5.6.2", + "typescript-eslint": "^8.8.0" + }, + "engines": { + "node": "^18 || >=20" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.23.1.tgz", + "integrity": "sha512-6VhYk1diRqrhBAqpJEdjASR/+WVRtfjpqKuNw11cLiaWpAT/Uu+nokB+UJnevzy/P9C/ty6AOe0dwueMrGh/iQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.23.1.tgz", + "integrity": "sha512-uz6/tEy2IFm9RYOyvKl88zdzZfwEfKZmnX9Cj1BHjeSGNuGLuMD1kR8y5bteYmwqKm1tj8m4cb/aKEorr6fHWQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.23.1.tgz", + "integrity": "sha512-xw50ipykXcLstLeWH7WRdQuysJqejuAGPd30vd1i5zSyKK3WE+ijzHmLKxdiCMtH1pHz78rOg0BKSYOSB/2Khw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.23.1.tgz", + "integrity": "sha512-nlN9B69St9BwUoB+jkyU090bru8L0NA3yFvAd7k8dNsVH8bi9a8cUAUSEcEEgTp2z3dbEDGJGfP6VUnkQnlReg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.23.1.tgz", + "integrity": "sha512-YsS2e3Wtgnw7Wq53XXBLcV6JhRsEq8hkfg91ESVadIrzr9wO6jJDMZnCQbHm1Guc5t/CdDiFSSfWP58FNuvT3Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.23.1.tgz", + "integrity": "sha512-aClqdgTDVPSEGgoCS8QDG37Gu8yc9lTHNAQlsztQ6ENetKEO//b8y31MMu2ZaPbn4kVsIABzVLXYLhCGekGDqw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.23.1.tgz", + "integrity": "sha512-h1k6yS8/pN/NHlMl5+v4XPfikhJulk4G+tKGFIOwURBSFzE8bixw1ebjluLOjfwtLqY0kewfjLSrO6tN2MgIhA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.23.1.tgz", + "integrity": "sha512-lK1eJeyk1ZX8UklqFd/3A60UuZ/6UVfGT2LuGo3Wp4/z7eRTRYY+0xOu2kpClP+vMTi9wKOfXi2vjUpO1Ro76g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.23.1.tgz", + "integrity": "sha512-CXXkzgn+dXAPs3WBwE+Kvnrf4WECwBdfjfeYHpMeVxWE0EceB6vhWGShs6wi0IYEqMSIzdOF1XjQ/Mkm5d7ZdQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.23.1.tgz", + "integrity": "sha512-/93bf2yxencYDnItMYV/v116zff6UyTjo4EtEQjUBeGiVpMmffDNUyD9UN2zV+V3LRV3/on4xdZ26NKzn6754g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.23.1.tgz", + "integrity": "sha512-VTN4EuOHwXEkXzX5nTvVY4s7E/Krz7COC8xkftbbKRYAl96vPiUssGkeMELQMOnLOJ8k3BY1+ZY52tttZnHcXQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.23.1.tgz", + "integrity": "sha512-Vx09LzEoBa5zDnieH8LSMRToj7ir/Jeq0Gu6qJ/1GcBq9GkfoEAoXvLiW1U9J1qE/Y/Oyaq33w5p2ZWrNNHNEw==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.23.1.tgz", + "integrity": "sha512-nrFzzMQ7W4WRLNUOU5dlWAqa6yVeI0P78WKGUo7lg2HShq/yx+UYkeNSE0SSfSure0SqgnsxPvmAUu/vu0E+3Q==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.23.1.tgz", + "integrity": "sha512-dKN8fgVqd0vUIjxuJI6P/9SSSe/mB9rvA98CSH2sJnlZ/OCZWO1DJvxj8jvKTfYUdGfcq2dDxoKaC6bHuTlgcw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.23.1.tgz", + "integrity": "sha512-5AV4Pzp80fhHL83JM6LoA6pTQVWgB1HovMBsLQ9OZWLDqVY8MVobBXNSmAJi//Csh6tcY7e7Lny2Hg1tElMjIA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.23.1.tgz", + "integrity": "sha512-9ygs73tuFCe6f6m/Tb+9LtYxWR4c9yg7zjt2cYkjDbDpV/xVn+68cQxMXCjUpYwEkze2RcU/rMnfIXNRFmSoDw==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.23.1.tgz", + "integrity": "sha512-EV6+ovTsEXCPAp58g2dD68LxoP/wK5pRvgy0J/HxPGB009omFPv3Yet0HiaqvrIrgPTBuC6wCH1LTOY91EO5hQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.23.1.tgz", + "integrity": "sha512-aevEkCNu7KlPRpYLjwmdcuNz6bDFiE7Z8XC4CPqExjTvrHugh28QzUXVOZtiYghciKUacNktqxdpymplil1beA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.23.1.tgz", + "integrity": "sha512-3x37szhLexNA4bXhLrCC/LImN/YtWis6WXr1VESlfVtVeoFJBRINPJ3f0a/6LV8zpikqoUg4hyXw0sFBt5Cr+Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.23.1.tgz", + "integrity": "sha512-aY2gMmKmPhxfU+0EdnN+XNtGbjfQgwZj43k8G3fyrDM/UdZww6xrWxmDkuz2eCZchqVeABjV5BpildOrUbBTqA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.23.1.tgz", + "integrity": "sha512-RBRT2gqEl0IKQABT4XTj78tpk9v7ehp+mazn2HbUeZl1YMdaGAQqhapjGTCe7uw7y0frDi4gS0uHzhvpFuI1sA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.23.1.tgz", + "integrity": "sha512-4O+gPR5rEBe2FpKOVyiJ7wNDPA8nGzDuJ6gN4okSA1gEOYZ67N8JPk58tkWtdtPeLz7lBnY6I5L3jdsr3S+A6A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.23.1.tgz", + "integrity": "sha512-BcaL0Vn6QwCwre3Y717nVHZbAa4UBEigzFm6VdsVdT/MbZ38xoj1X9HPkZhbmaBGUD1W8vxAfffbDe8bA6AKnQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.23.1.tgz", + "integrity": "sha512-BHpFFeslkWrXWyUPnbKm+xYYVYruCinGcftSBaa8zoF9hZO4BcSCFUvHVTtzpIY6YzUnYtuEhZ+C9iEXjxnasg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "dev": true, + "license": "MIT", + "dependencies": { + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.11.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.11.1.tgz", + "integrity": "sha512-m4DVN9ZqskZoLU5GlWZadwDnYo3vAEydiUayB9widCl9ffWx2IvPnp6n3on5rJmziJSw9Bv+Z3ChDVdMwXCY8Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/config-array": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.18.0.tgz", + "integrity": "sha512-fTxvnS1sRMu3+JjXwJG0j/i4RT9u4qJ+lqS/yCGap4lH4zZGzQ7tu+xZqQmcMZq5OBZDL4QRxQzRjkWcGt8IVw==", + "dev": true, + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@eslint/object-schema": "^2.1.4", + "debug": "^4.3.1", + "minimatch": "^3.1.2" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/config-array/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@eslint/config-array/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@eslint/core": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.6.0.tgz", + "integrity": "sha512-8I2Q8ykA4J0x0o7cg67FPVnehcqWTBehu/lmY+bolPFHGjh49YzGBMXTvpqVgEbBdvNCSxj6iFgiIyHzf03lzg==", + "dev": true, + "license": "Apache-2.0", + "peer": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.1.0.tgz", + "integrity": "sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^10.0.1", + "globals": "^14.0.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@eslint/eslintrc/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@eslint/js": { + "version": "9.11.1", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.11.1.tgz", + "integrity": "sha512-/qu+TWz8WwPWc7/HcIJKi+c+MOm46GdVaSlTTQcaqaL53+GsoA6MxWp5PtTx48qbSP7ylM1Kn7nhvkugfJvRSA==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/object-schema": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.4.tgz", + "integrity": "sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==", + "dev": true, + "license": "Apache-2.0", + "peer": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/plugin-kit": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.0.tgz", + "integrity": "sha512-vH9PiIMMwvhCx31Af3HiGzsVNULDbyVkHXwlemn/B0TFj/00ho3y55efXrUZTfQipxoHC5u4xq6zblww1zm1Ig==", + "dev": true, + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "levn": "^0.4.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "license": "Apache-2.0", + "peer": true, + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/retry": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.0.tgz", + "integrity": "sha512-d2CGZR2o7fS6sWB7DG/3a95bGKQyHMACZ5aW8qGkkqQpUoZV6C0X7Pc7l4ZNMZkfNBf4VWNe9E1jRsf0G146Ew==", + "dev": true, + "license": "Apache-2.0", + "peer": true, + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@types/estree": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", + "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/@types/node": { + "version": "22.7.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.7.4.tgz", + "integrity": "sha512-y+NPi1rFzDs1NdQHHToqeiX2TIS79SWEAw9GYhkkx8bD0ChpfqC+n2j5OXOCpzfojBEBt6DnEnnG9MY0zk1XLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~6.19.2" + } + }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.8.0.tgz", + "integrity": "sha512-wORFWjU30B2WJ/aXBfOm1LX9v9nyt9D3jsSOxC3cCaTQGCW5k4jNpmjFv3U7p/7s4yvdjHzwtv2Sd2dOyhjS0A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/regexpp": "^4.10.0", + "@typescript-eslint/scope-manager": "8.8.0", + "@typescript-eslint/type-utils": "8.8.0", + "@typescript-eslint/utils": "8.8.0", + "@typescript-eslint/visitor-keys": "8.8.0", + "graphemer": "^1.4.0", + "ignore": "^5.3.1", + "natural-compare": "^1.4.0", + "ts-api-utils": "^1.3.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^8.0.0 || ^8.0.0-alpha.0", + "eslint": "^8.57.0 || ^9.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.8.0.tgz", + "integrity": "sha512-uEFUsgR+tl8GmzmLjRqz+VrDv4eoaMqMXW7ruXfgThaAShO9JTciKpEsB+TvnfFfbg5IpujgMXVV36gOJRLtZg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@typescript-eslint/scope-manager": "8.8.0", + "@typescript-eslint/types": "8.8.0", + "@typescript-eslint/typescript-estree": "8.8.0", + "@typescript-eslint/visitor-keys": "8.8.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.8.0.tgz", + "integrity": "sha512-EL8eaGC6gx3jDd8GwEFEV091210U97J0jeEHrAYvIYosmEGet4wJ+g0SYmLu+oRiAwbSA5AVrt6DxLHfdd+bUg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.8.0", + "@typescript-eslint/visitor-keys": "8.8.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.8.0.tgz", + "integrity": "sha512-IKwJSS7bCqyCeG4NVGxnOP6lLT9Okc3Zj8hLO96bpMkJab+10HIfJbMouLrlpyOr3yrQ1cA413YPFiGd1mW9/Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/typescript-estree": "8.8.0", + "@typescript-eslint/utils": "8.8.0", + "debug": "^4.3.4", + "ts-api-utils": "^1.3.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/types": { + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.8.0.tgz", + "integrity": "sha512-QJwc50hRCgBd/k12sTykOJbESe1RrzmX6COk8Y525C9l7oweZ+1lw9JiU56im7Amm8swlz00DRIlxMYLizr2Vw==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.8.0.tgz", + "integrity": "sha512-ZaMJwc/0ckLz5DaAZ+pNLmHv8AMVGtfWxZe/x2JVEkD5LnmhWiQMMcYT7IY7gkdJuzJ9P14fRy28lUrlDSWYdw==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@typescript-eslint/types": "8.8.0", + "@typescript-eslint/visitor-keys": "8.8.0", + "debug": "^4.3.4", + "fast-glob": "^3.3.2", + "is-glob": "^4.0.3", + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^1.3.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.8.0.tgz", + "integrity": "sha512-QE2MgfOTem00qrlPgyByaCHay9yb1+9BjnMFnSFkUKQfu7adBXDTnCAivURnuPPAG/qiB+kzKkZKmKfaMT0zVg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "@typescript-eslint/scope-manager": "8.8.0", + "@typescript-eslint/types": "8.8.0", + "@typescript-eslint/typescript-estree": "8.8.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.8.0.tgz", + "integrity": "sha512-8mq51Lx6Hpmd7HnA2fcHQo3YgfX1qbccxQOgZcb4tvasu//zXRaA1j5ZRFeCw/VRAdFi4mRM9DnZw0Nu0Q2d1g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.8.0", + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/acorn": { + "version": "8.12.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", + "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", + "dev": true, + "license": "MIT", + "peer": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "license": "MIT", + "peer": true, + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "license": "Python-2.0", + "peer": true + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/esbuild": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.23.1.tgz", + "integrity": "sha512-VVNz/9Sa0bs5SELtn3f7qhJCDPCF5oMEl5cO9/SSinpE9hbPVvxbd572HH5AKiP7WD8INO53GgfDDhRjkylHEg==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.23.1", + "@esbuild/android-arm": "0.23.1", + "@esbuild/android-arm64": "0.23.1", + "@esbuild/android-x64": "0.23.1", + "@esbuild/darwin-arm64": "0.23.1", + "@esbuild/darwin-x64": "0.23.1", + "@esbuild/freebsd-arm64": "0.23.1", + "@esbuild/freebsd-x64": "0.23.1", + "@esbuild/linux-arm": "0.23.1", + "@esbuild/linux-arm64": "0.23.1", + "@esbuild/linux-ia32": "0.23.1", + "@esbuild/linux-loong64": "0.23.1", + "@esbuild/linux-mips64el": "0.23.1", + "@esbuild/linux-ppc64": "0.23.1", + "@esbuild/linux-riscv64": "0.23.1", + "@esbuild/linux-s390x": "0.23.1", + "@esbuild/linux-x64": "0.23.1", + "@esbuild/netbsd-x64": "0.23.1", + "@esbuild/openbsd-arm64": "0.23.1", + "@esbuild/openbsd-x64": "0.23.1", + "@esbuild/sunos-x64": "0.23.1", + "@esbuild/win32-arm64": "0.23.1", + "@esbuild/win32-ia32": "0.23.1", + "@esbuild/win32-x64": "0.23.1" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "9.11.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.11.1.tgz", + "integrity": "sha512-MobhYKIoAO1s1e4VUrgx1l1Sk2JBR/Gqjjgw8+mfgoLE2xwsHur4gdfTxyTgShrhvdVFTaJSgMiQBl1jv/AWxg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.11.0", + "@eslint/config-array": "^0.18.0", + "@eslint/core": "^0.6.0", + "@eslint/eslintrc": "^3.1.0", + "@eslint/js": "9.11.1", + "@eslint/plugin-kit": "^0.2.0", + "@humanwhocodes/module-importer": "^1.0.1", + "@humanwhocodes/retry": "^0.3.0", + "@nodelib/fs.walk": "^1.2.8", + "@types/estree": "^1.0.6", + "@types/json-schema": "^7.0.15", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^8.0.2", + "eslint-visitor-keys": "^4.0.0", + "espree": "^10.1.0", + "esquery": "^1.5.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^8.0.0", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "json-stable-stringify-without-jsonify": "^1.0.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "jiti": "*" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + } + } + }, + "node_modules/eslint-scope": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.1.0.tgz", + "integrity": "sha512-14dSvlhaVhKKsa9Fx1l8A17s7ah7Ef7wCakJ10LYk6+GYmP9yDti2oq2SEwcyndt6knfcZyhyxwY3i9yL78EQw==", + "dev": true, + "license": "BSD-2-Clause", + "peer": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/eslint/node_modules/eslint-visitor-keys": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.1.0.tgz", + "integrity": "sha512-Q7lok0mqMUSf5a/AdAZkA5a/gHcO6snwQClVNNvFKCAVlxXucdU8pKydU5ZVZjBx5xr37vGbFFWtLQYreLzrZg==", + "dev": true, + "license": "Apache-2.0", + "peer": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/espree": { + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.2.0.tgz", + "integrity": "sha512-upbkBJbckcCNBDBDXEbuhjbP68n+scUd3k/U2EkyM9nw+I/jPiL4cLF/Al06CF96wRltFda16sxDFrxsI1v0/g==", + "dev": true, + "license": "BSD-2-Clause", + "peer": true, + "dependencies": { + "acorn": "^8.12.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^4.1.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/espree/node_modules/eslint-visitor-keys": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.1.0.tgz", + "integrity": "sha512-Q7lok0mqMUSf5a/AdAZkA5a/gHcO6snwQClVNNvFKCAVlxXucdU8pKydU5ZVZjBx5xr37vGbFFWtLQYreLzrZg==", + "dev": true, + "license": "Apache-2.0", + "peer": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esquery": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", + "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", + "dev": true, + "license": "BSD-3-Clause", + "peer": true, + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "license": "BSD-2-Clause", + "peer": true, + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "license": "BSD-2-Clause", + "peer": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "license": "BSD-2-Clause", + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/fast-glob": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/fastq": { + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", + "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", + "dev": true, + "license": "ISC", + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/file-entry-cache": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "flat-cache": "^4.0.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat-cache": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.4" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/flatted": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", + "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", + "dev": true, + "license": "ISC", + "peer": true + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/get-tsconfig": { + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.8.1.tgz", + "integrity": "sha512-k9PN+cFBmaLWtVz29SkUoqU5O0slLuHJXt/2P+tMVFT+phsSGXGkp9t3rQIqdz0e+06EHNGs3oM6ZX1s2zHxRg==", + "dev": true, + "license": "MIT", + "dependencies": { + "resolve-pkg-maps": "^1.0.0" + }, + "funding": { + "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/globals": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", + "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true, + "license": "MIT" + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC", + "peer": true + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dev": true, + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true, + "license": "MIT" + }, + "node_modules/optionator": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/resolve-pkg-maps": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", + "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/telnyx": { + "version": "2.0.0-alpha.3", + "resolved": "https://registry.npmjs.org/telnyx/-/telnyx-2.0.0-alpha.3.tgz", + "integrity": "sha512-oSwK1e5mG0AG/Dv6/E7BhXRFB34ZWfVnNJEMgM/K+QTvgV2ozVzEq0juo2GQKLpacq6nI7hpjycVC8PumTb1YA==", + "license": "MIT", + "engines": { + "node": "^18 || >=20" + } + }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/ts-api-utils": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz", + "integrity": "sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "typescript": ">=4.2.0" + } + }, + "node_modules/tsx": { + "version": "4.19.1", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.19.1.tgz", + "integrity": "sha512-0flMz1lh74BR4wOvBjuh9olbnwqCPc35OOlfyzHba0Dc+QNUeWX/Gq2YTbnwcWPO3BMd8fkzRVrHcsR+a7z7rA==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "~0.23.0", + "get-tsconfig": "^4.7.5" + }, + "bin": { + "tsx": "dist/cli.mjs" + }, + "engines": { + "node": ">=18.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + } + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/typescript": { + "version": "5.6.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.2.tgz", + "integrity": "sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/typescript-eslint": { + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.8.0.tgz", + "integrity": "sha512-BjIT/VwJ8+0rVO01ZQ2ZVnjE1svFBiRczcpr1t1Yxt7sT25VSbPfrJtDsQ8uQTy2pilX5nI9gwxhUyLULNentw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/eslint-plugin": "8.8.0", + "@typescript-eslint/parser": "8.8.0", + "@typescript-eslint/utils": "8.8.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/undici-types": { + "version": "6.19.8", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", + "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", + "dev": true, + "license": "MIT" + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "license": "BSD-2-Clause", + "peer": true, + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + } +} diff --git a/examples/addresses/package.json b/examples/addresses/package.json new file mode 100644 index 0000000..c5c9f11 --- /dev/null +++ b/examples/addresses/package.json @@ -0,0 +1,25 @@ +{ + "name": "telnyx-addresses-example", + "version": "1.0.0", + "description": "", + "main": "index.ts", + "scripts": { + "debug": "tsx index.ts", + "start": "tsx index.ts" + }, + "author": "Telnyx (https://telnyx.com)", + "license": "ISC", + "type": "module", + "engines": { + "node": "^18 || >=20" + }, + "dependencies": { + "telnyx": "2.0.0-alpha.3" + }, + "devDependencies": { + "@types/node": "^22.7.4", + "tsx": "^4.19.1", + "typescript": "^5.6.2", + "typescript-eslint": "^8.8.0" + } +} diff --git a/examples/addresses/tsconfig.json b/examples/addresses/tsconfig.json new file mode 100644 index 0000000..744be51 --- /dev/null +++ b/examples/addresses/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "rootDir": "./", + "lib": ["ES2023"], + "module": "EsNext", + "moduleResolution": "node", + "target": "ES2022", + "checkJs": false, + "alwaysStrict": true, + "noImplicitAny": true, + "noImplicitThis": true, + "strict": true, + "strictFunctionTypes": true, + "types": [ "node" ], + "esModuleInterop": true, + "noUncheckedIndexedAccess": true, + }, +} From e477fe956b25b29ff9ee9080feb04b9f14367bbe Mon Sep 17 00:00:00 2001 From: Lucas Rosa Date: Wed, 2 Oct 2024 23:36:05 -0300 Subject: [PATCH 33/59] update resources method names and missing d types --- CHANGELOG.md | 5 + VERSION | 2 +- package-lock.json | 4 +- package.json | 2 +- plop-templates/ResourceTypes.ts.hbs | 10 +- src/resources/Brands.ts | 7 +- src/resources/BusinessIdentity.ts | 17 - src/resources/CallControlApplications.ts | 9 +- src/resources/CallInformation.ts | 12 - src/resources/CallRecordings.ts | 20 +- src/resources/CdrUsageReports.ts | 8 +- src/resources/Channelzones.ts | 36 +- src/resources/Conferences.ts | 24 +- src/resources/Connections.ts | 6 + src/resources/Credentials.ts | 26 -- src/resources/Documents.ts | 40 +-- src/resources/TelephonyCredentials.ts | 23 +- src/telnyx.ts | 6 - src/test/resources/Conferences.test.ts | 318 +++++++++--------- src/test/resources/Documents.test.ts | 10 +- .../resources/TelephonyCredentials.test.ts | 30 +- types/AuthenticationProvidersResource.d.ts | 72 ++++ types/BrandsResource.d.ts | 17 +- types/CallControlApplicationsResource.d.ts | 93 +++++ types/CallEventsResource.d.ts | 18 + types/CallRecordingsResource.d.ts | 59 ++++ types/CdrUsageReportsResource.d.ts | 18 + types/ChannelzonesResource.d.ts | 92 +++++ types/ConferencesResource.d.ts | 202 +++++++++++ types/ConnectionsResource.d.ts | 44 +++ types/CredentialConnectionsResource.d.ts | 69 ++++ types/DocumentLinksResource.d.ts | 18 + types/DocumentsResource.d.ts | 80 +++++ types/TelephonyCredentialsResource.d.ts | 99 ++++++ types/TelnyxAPI.d.ts | 2 +- types/index.d.ts | 26 +- 36 files changed, 1177 insertions(+), 347 deletions(-) delete mode 100644 src/resources/BusinessIdentity.ts delete mode 100644 src/resources/CallInformation.ts delete mode 100644 src/resources/Credentials.ts create mode 100644 types/AuthenticationProvidersResource.d.ts create mode 100644 types/CallControlApplicationsResource.d.ts create mode 100644 types/CallEventsResource.d.ts create mode 100644 types/CallRecordingsResource.d.ts create mode 100644 types/CdrUsageReportsResource.d.ts create mode 100644 types/ChannelzonesResource.d.ts create mode 100644 types/ConferencesResource.d.ts create mode 100644 types/ConnectionsResource.d.ts create mode 100644 types/CredentialConnectionsResource.d.ts create mode 100644 types/DocumentLinksResource.d.ts create mode 100644 types/DocumentsResource.d.ts create mode 100644 types/TelephonyCredentialsResource.d.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index b5485b9..1df84c0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,11 @@ ### v2.0.0-alpha.4 - Add `Addresses` example +- Remove `BusinessIdentity` resource +- Remove `CallInformation` resource +- Remove duplicated `Credentials` resource +- Fixed `Conferences`, `Documents` and `TelephonyCredentials` method names +- Add missing resource types defs ### v2.0.0-alpha.3 diff --git a/VERSION b/VERSION index 4640d57..c4e1040 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.0.0-alpha.3 +2.0.0-alpha.4 diff --git a/package-lock.json b/package-lock.json index 0e29439..cd13a0c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "telnyx", - "version": "2.0.0-alpha.3", + "version": "2.0.0-alpha.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "telnyx", - "version": "2.0.0-alpha.3", + "version": "2.0.0-alpha.4", "license": "MIT", "devDependencies": { "@eslint/js": "^9.10.0", diff --git a/package.json b/package.json index b6dd14f..b34638f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "telnyx", - "version": "2.0.0-alpha.3", + "version": "2.0.0-alpha.4", "description": "Telnyx API Node SDK", "keywords": [ "telnyx", diff --git a/plop-templates/ResourceTypes.ts.hbs b/plop-templates/ResourceTypes.ts.hbs index 2e7faf1..9dd6fc0 100644 --- a/plop-templates/ResourceTypes.ts.hbs +++ b/plop-templates/ResourceTypes.ts.hbs @@ -31,20 +31,20 @@ declare module 'telnyx' { {{/if}} {{#if (ifEquals . "list")}} - type {{pascalCase ../name}}{{pascalCase .}}Response = paths['{{../path}}']['get']['responses']['200']['content']['application/json']['data']; + type {{pascalCase ../name}}{{pascalCase .}}Response = paths['{{../path}}']['get']['responses']['200']['content']['application/json']; {{/if}} {{#if (ifEquals . "create")}} - type {{pascalCase ../name}}{{pascalCase .}}Response = paths['{{../path}}']['post']['responses']['200']['content']['application/json']['data']; + type {{pascalCase ../name}}{{pascalCase .}}Response = paths['{{../path}}']['post']['responses']['200']['content']['application/json']; {{/if}} {{#if (ifEquals . "retrieve")}} - type {{pascalCase ../name}}{{pascalCase .}}Response = paths['{{../path}}/{{../path-param}}']['get']['responses']['200']['content']['application/json']['data']; + type {{pascalCase ../name}}{{pascalCase .}}Response = paths['{{../path}}/{{../path-param}}']['get']['responses']['200']['content']['application/json']; {{/if}} {{#if (ifEquals . "update")}} - type {{pascalCase ../name}}{{pascalCase .}}Response = paths['{{../path}}/{{../path-param}}']['patch']['responses']['200']['content']['application/json']['data']; + type {{pascalCase ../name}}{{pascalCase .}}Response = paths['{{../path}}/{{../path-param}}']['patch']['responses']['200']['content']['application/json']; {{/if}} {{#if (ifEquals . "del")}} - type {{pascalCase ../name}}{{pascalCase .}}Response = paths['{{../path}}/{{../path-param}}']['delete']['responses']['200']['content']['application/json']['data']; + type {{pascalCase ../name}}{{pascalCase .}}Response = paths['{{../path}}/{{../path-param}}']['delete']['responses']['200']['content']['application/json']; {{/if}} {{/each}} diff --git a/src/resources/Brands.ts b/src/resources/Brands.ts index 6afc25a..f1f299c 100644 --- a/src/resources/Brands.ts +++ b/src/resources/Brands.ts @@ -30,16 +30,11 @@ export const Brands = TelnyxResource.extend({ urlParams: ['brandId'], }), - externalVettings: telnyxMethod({ - method: 'GET', - path: '/brand/{brandId}/externalVetting', - urlParams: ['brandId'], - }), - listExternalVettings: telnyxMethod({ method: 'GET', path: '/brand/{brandId}/externalVetting', urlParams: ['brandId'], + methodType: 'list', }), exportExternalVettings: telnyxMethod({ diff --git a/src/resources/BusinessIdentity.ts b/src/resources/BusinessIdentity.ts deleted file mode 100644 index 3cfb084..0000000 --- a/src/resources/BusinessIdentity.ts +++ /dev/null @@ -1,17 +0,0 @@ -import TelnyxResource from '../TelnyxResource'; -const telnyxMethod = TelnyxResource.method; - -export const BusinessIdentity = TelnyxResource.extend({ - path: 'business_identity', - includeBasic: ['list', 'retrieve', 'delete'], - - ListBusinessIdentities: telnyxMethod({ - method: 'GET', - path: '/business/identities', - }), - DeleteBusinessIdentity: telnyxMethod({ - method: 'DELETE', - path: '/business/identities/{id}', - urlParams: ['id'], - }), -}); diff --git a/src/resources/CallControlApplications.ts b/src/resources/CallControlApplications.ts index 7f9ce95..abfe4d5 100644 --- a/src/resources/CallControlApplications.ts +++ b/src/resources/CallControlApplications.ts @@ -34,16 +34,11 @@ function transformResponseData( export const CallControlApplications = TelnyxResource.extend({ path: 'call_control_applications', - - list: telnyxMethod({ - method: 'GET', - methodType: 'list', - - transformResponseData: transformResponseData, - }), + includeBasic: ['list', 'update'], create: telnyxMethod({ method: 'POST', + transformResponseData: transformResponseData, }), diff --git a/src/resources/CallInformation.ts b/src/resources/CallInformation.ts deleted file mode 100644 index b3af035..0000000 --- a/src/resources/CallInformation.ts +++ /dev/null @@ -1,12 +0,0 @@ -import TelnyxResource from '../TelnyxResource'; -const telnyxMethod = TelnyxResource.method; - -export const CallInformation = TelnyxResource.extend({ - path: 'call_information', - includeBasic: ['list', 'retrieve'], - - ListConnectionActiveCalls: telnyxMethod({ - method: 'GET', - path: '/connections/{connection/id}/active_calls', - }), -}); diff --git a/src/resources/CallRecordings.ts b/src/resources/CallRecordings.ts index c8a60ae..c1dac9b 100644 --- a/src/resources/CallRecordings.ts +++ b/src/resources/CallRecordings.ts @@ -3,22 +3,22 @@ const telnyxMethod = TelnyxResource.method; export const CallRecordings = TelnyxResource.extend({ path: 'recordings', - includeBasic: ['list', 'retrieve', 'del'], + includeBasic: ['list'], - GetRecordings: telnyxMethod({ + retrieve: telnyxMethod({ method: 'GET', - path: '/recordings', + path: '/{recording_id}', + urlParams: ['recording_id'], }), - DeleteRecording: telnyxMethod({ + + del: telnyxMethod({ method: 'DELETE', - path: '/recordings/{recording/id}', + path: '/{recording_id}', + urlParams: ['recording_id'], }), - DeleteRecordings: telnyxMethod({ + + bulkDel: telnyxMethod({ method: 'DELETE', path: '/recordings/actions/delete', }), - DeleteCustomStorageCredentials: telnyxMethod({ - method: 'DELETE', - path: '/custom/storage/credentials/{connection/id}', - }), }); diff --git a/src/resources/CdrUsageReports.ts b/src/resources/CdrUsageReports.ts index b905531..7561454 100644 --- a/src/resources/CdrUsageReports.ts +++ b/src/resources/CdrUsageReports.ts @@ -2,11 +2,11 @@ import TelnyxResource from '../TelnyxResource'; const telnyxMethod = TelnyxResource.method; export const CdrUsageReports = TelnyxResource.extend({ - path: 'cdr_usage_reports', - includeBasic: ['list', 'retrieve'], + path: 'reports/cdr_usage_reports', - GetUsageReportSync: telnyxMethod({ + retrieveUsageReportSync: telnyxMethod({ + path: '/sync', method: 'GET', - path: '/reports/cdr_usage_reports/sync', + urlParams: [], }), }); diff --git a/src/resources/Channelzones.ts b/src/resources/Channelzones.ts index 4c99b70..d3e092e 100644 --- a/src/resources/Channelzones.ts +++ b/src/resources/Channelzones.ts @@ -2,23 +2,35 @@ import TelnyxResource from '../TelnyxResource'; const telnyxMethod = TelnyxResource.method; export const Channelzones = TelnyxResource.extend({ - path: 'channelzones', - includeBasic: ['list', 'retrieve', 'delete'], + path: 'channel_zones', + includeBasic: ['list'], - GetChannelZone: telnyxMethod({ + update: telnyxMethod({ + method: 'PATCH', + path: '/{channel_zone_id}', + urlParams: ['channel_zone_id'], + }), + + retrieve: telnyxMethod({ method: 'GET', - path: '/channel_zones/{channel/zone/id}', + path: '/{channel_zone_id}', + urlParams: ['channel_zone_id'], }), - UnassignPhoneNumber: telnyxMethod({ - method: 'DELETE', - path: '/channel_zones/{channel/zone/id}/channel_zone_phone_numbers/{phone_number}', + + createPhoneNumber: telnyxMethod({ + method: 'POST', + path: '/{channel_zone_id}/channel_zone_phone_numbers', + urlParams: ['channel_zone_id'], }), - GetChannelZones: telnyxMethod({ + + listPhoneNumbers: telnyxMethod({ method: 'GET', - path: '/channel/zones', + path: '/{channel_zone_id}/channel_zone_phone_numbers', }), - GetPhoneNumbers: telnyxMethod({ - method: 'GET', - path: '/channel_zones/{channel_zone_id}/channel_zone_phone_numbers', + + delPhoneNumber: telnyxMethod({ + method: 'DELETE', + path: '/{channel_zone_id}/channel_zone_phone_numbers/{phone_number}', + urlParams: ['channel_zone_id', 'phone_number'], }), }); diff --git a/src/resources/Conferences.ts b/src/resources/Conferences.ts index ace7f66..1640f17 100644 --- a/src/resources/Conferences.ts +++ b/src/resources/Conferences.ts @@ -15,7 +15,8 @@ const CONFERENCES = [ 'record_stop', 'update', 'leave', - 'resume', + 'record_resume', + 'record_pause', ]; function getSpec(conferenceId?: string) { @@ -33,7 +34,26 @@ function getSpec(conferenceId?: string) { export const Conferences = TelnyxResource.extend({ path: 'conferences', - includeBasic: ['list', 'retrieve'], + includeBasic: ['list'], + + retrieve: telnyxMethod({ + method: 'GET', + path: '/{id}', + urlParams: ['id'], + + transformResponseData: function (response, telnyx) { + return utils.addResourceToResponseData( + response, + telnyx, + 'conferences', + utils.createNestedMethods( + telnyxMethod, + CONFERENCES, + getSpec(response.data.id as string), + ), + ); + }, + }), create: telnyxMethod({ method: 'POST', diff --git a/src/resources/Connections.ts b/src/resources/Connections.ts index 6405374..f31c50f 100644 --- a/src/resources/Connections.ts +++ b/src/resources/Connections.ts @@ -1,6 +1,12 @@ import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; export const Connections = TelnyxResource.extend({ path: 'connections', includeBasic: ['list', 'retrieve'], + + listActiveCalls: telnyxMethod({ + method: 'GET', + path: '/{connection_id}/active_calls', + }), }); diff --git a/src/resources/Credentials.ts b/src/resources/Credentials.ts deleted file mode 100644 index b1837b3..0000000 --- a/src/resources/Credentials.ts +++ /dev/null @@ -1,26 +0,0 @@ -import TelnyxResource from '../TelnyxResource'; -const telnyxMethod = TelnyxResource.method; - -export const Credentials = TelnyxResource.extend({ - path: 'credentials', - includeBasic: ['create', 'list', 'retrieve', 'delete'], - - PerformCredentialAction: telnyxMethod({ - method: 'POST', - path: '/telephony_credentials/{id}/actions/{action}', - urlParams: ['id', 'action'], - }), - FindTelephonyCredentials: telnyxMethod({ - method: 'GET', - path: '/telephony_credentials', - }), - ListTags: telnyxMethod({ - method: 'GET', - path: '/telephony/credentials/tags', - }), - DeleteTelephonyCredential: telnyxMethod({ - method: 'DELETE', - path: '/telephony_credentials/{id}', - urlParams: ['id'], - }), -}); diff --git a/src/resources/Documents.ts b/src/resources/Documents.ts index 268ed4e..ef77396 100644 --- a/src/resources/Documents.ts +++ b/src/resources/Documents.ts @@ -1,53 +1,21 @@ import TelnyxResource from '../TelnyxResource'; -import * as utils from '../utils'; -const telnyxMethod = TelnyxResource.method; - -import {ResponsePayload, TelnyxObject} from '../Types'; -function transformResponseData( - response: ResponsePayload, - telnyx: TelnyxObject, -) { - return utils.addResourceToResponseData(response, telnyx, 'documents', {}); -} +const telnyxMethod = TelnyxResource.method; export const Documents = TelnyxResource.extend({ path: 'documents', - list: telnyxMethod({ - method: 'GET', - transformResponseData: transformResponseData, - }), - update: telnyxMethod({ - method: 'PATCH', - path: '/{id}', - urlParams: ['id'], - transformResponseData: transformResponseData, - }), - del: telnyxMethod({ - method: 'DELETE', - path: '{id}', - urlParams: ['id'], - transformResponseData: transformResponseData, - }), + includeBasic: ['list', 'update', 'del', 'create', 'retrieve'], + upload: telnyxMethod({ method: 'POST', - transformResponseData: transformResponseData, }), - retrieveDocumentId: telnyxMethod({ - method: 'GET', - path: '/{id}', - urlParams: ['id'], - transformResponseData: transformResponseData, - }), - retrieveDownloadDocument: telnyxMethod({ + download: telnyxMethod({ method: 'GET', path: '/{id}/download', urlParams: ['id'], headers: { 'Content-Type': '*', }, - - transformResponseData: transformResponseData, }), }); diff --git a/src/resources/TelephonyCredentials.ts b/src/resources/TelephonyCredentials.ts index 1383aa2..79acfb3 100644 --- a/src/resources/TelephonyCredentials.ts +++ b/src/resources/TelephonyCredentials.ts @@ -24,7 +24,7 @@ function transformResponseData( ); } -const telephonyCredentialResource = { +export const TelephonyCredentials = TelnyxResource.extend({ path: 'telephony_credentials', includeBasic: ['del', 'list', 'update'], @@ -36,22 +36,21 @@ const telephonyCredentialResource = { }), retrieve: telnyxMethod({ - method: 'POST', - path: '/{id}/token', + method: 'GET', + path: '/{id}', urlParams: ['id'], transformResponseData: transformResponseData, }), - retrieveCredential: telnyxMethod({ - method: 'GET', - path: '/{id}', + createToken: telnyxMethod({ + method: 'POST', + path: '/{id}/token', urlParams: ['id'], - - transformResponseData: transformResponseData, }), -}; -export const TelephonyCredentials = TelnyxResource.extend( - telephonyCredentialResource, -); + listTags: telnyxMethod({ + method: 'GET', + path: '/tags', + }), +}); diff --git a/src/telnyx.ts b/src/telnyx.ts index 64ee5c7..e4cca98 100644 --- a/src/telnyx.ts +++ b/src/telnyx.ts @@ -29,10 +29,8 @@ import {Brands} from './resources/Brands'; import {BulkCredentials} from './resources/BulkCredentials'; import {BulkSoleProprietorCreation} from './resources/BulkSoleProprietorCreation'; import {BulkTelephonyCredentials} from './resources/BulkTelephonyCredentials'; -import {BusinessIdentity} from './resources/BusinessIdentity'; import {CallControlApplications} from './resources/CallControlApplications'; import {CallEvents} from './resources/CallEvents'; -import {CallInformation} from './resources/CallInformation'; import {CallRecordings} from './resources/CallRecordings'; import {Calls} from './resources/Calls'; import {Campaign} from './resources/Campaign'; @@ -43,7 +41,6 @@ import {ClientStateUpdate} from './resources/ClientStateUpdate'; import {Conferences} from './resources/Conferences'; import {Connections} from './resources/Connections'; import {CredentialConnections} from './resources/CredentialConnections'; -import {Credentials} from './resources/Credentials'; import {CsvDownloads} from './resources/CsvDownloads'; import {CustomerServiceRecord} from './resources/CustomerServiceRecord'; import {Debugging} from './resources/Debugging'; @@ -213,10 +210,8 @@ export function createTelnyx() { BulkCredentials, BulkSoleProprietorCreation, BulkTelephonyCredentials, - BusinessIdentity, CallControlApplications, CallEvents, - CallInformation, CallRecordings, Calls, Campaign, @@ -227,7 +222,6 @@ export function createTelnyx() { Conferences, Connections, CredentialConnections, - Credentials, CsvDownloads, CustomerServiceRecord, Debugging, diff --git a/src/test/resources/Conferences.test.ts b/src/test/resources/Conferences.test.ts index 76de361..b275da2 100644 --- a/src/test/resources/Conferences.test.ts +++ b/src/test/resources/Conferences.test.ts @@ -21,200 +21,198 @@ const CONFERENCES = [ 'stop', 'record_start', 'record_stop', + 'record_resume', + 'record_pause', 'update', 'leave', ]; const CONFERENCE_ID = '41b9acd4-f4da-4ff5-a85c-e07e90b53f46'; -describe('Calls Resource', function () { - describe('Call Conferences', function () { - const conferenceCreateData = { - name: 'Business', +describe('Call Conferences', function () { + const conferenceCreateData = { + name: 'Business', + call_control_id: '891510ac-f3e4-11e8-af5b-de00688a4901', + }; + const callConferencesData = { + join: { call_control_id: '891510ac-f3e4-11e8-af5b-de00688a4901', - }; - const callConferencesData = { - join: { - call_control_id: '891510ac-f3e4-11e8-af5b-de00688a4901', - }, - unhold: { - call_control_ids: ['891510ac-f3e4-11e8-af5b-de00688a4901'], - }, - speak: { - language: 'en-US', - payload: 'Say this to participants', - voice: 'female', - }, - play: { - media_name: 'my_media_uploaded_to_media_storage_api', - }, - record_start: { - channels: 'single', - format: 'wav', - }, - update: { - call_control_id: '891510ac-f3e4-11e8-af5b-de00688a4901', - supervisor_role: 'whisper', - }, - leave: { - call_control_id: '891510ac-f3e4-11e8-af5b-de00688a4901', - }, - dial_participant: { - call_control_id: '891510ac-f3e4-11e8-af5b-de00688a4901', - from: '+15555555555', - to: '+16666666666', - }, - }; + }, + unhold: { + call_control_ids: ['891510ac-f3e4-11e8-af5b-de00688a4901'], + }, + speak: { + language: 'en-US', + payload: 'Say this to participants', + voice: 'female', + }, + play: { + media_name: 'my_media_uploaded_to_media_storage_api', + }, + record_start: { + channels: 'single', + format: 'wav', + }, + update: { + call_control_id: '891510ac-f3e4-11e8-af5b-de00688a4901', + supervisor_role: 'whisper', + }, + leave: { + call_control_id: '891510ac-f3e4-11e8-af5b-de00688a4901', + }, + dial_participant: { + call_control_id: '891510ac-f3e4-11e8-af5b-de00688a4901', + from: '+15555555555', + to: '+16666666666', + }, + }; + + function responseFn(response: ResponsePayload) { + expect(response.data).toMatchObject({result: 'ok'}); + } + + describe('list', function () { + function responseFn(response: ResponsePayloadList) { + expect(response.data[0]).toHaveProperty('id'); + expect(response.data[0]).toHaveProperty('name'); + expect(response.data[0]).toMatchObject({record_type: 'conference'}); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.conferences.list().then(responseFn); + }); + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.conferences.list(TEST_AUTH_KEY).then(responseFn); + }); + }); + describe('retrieve', function () { function responseFn(response: ResponsePayload) { - expect(response.data).toMatchObject({result: 'ok'}); + expect(response.data).toHaveProperty('id'); + expect(response.data).toHaveProperty('name'); + expect(response.data).toMatchObject({record_type: 'conference'}); } - describe('list', function () { - function responseFn(response: ResponsePayloadList) { - expect(response.data[0]).toHaveProperty('id'); - expect(response.data[0]).toHaveProperty('name'); - expect(response.data[0]).toMatchObject({record_type: 'conference'}); - } + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.conferences.retrieve(CONFERENCE_ID).then(responseFn); + }); + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.conferences + .retrieve(CONFERENCE_ID, TEST_AUTH_KEY) + .then(responseFn); + }); + }); - test('Sends the correct request', function () { - // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.conferences.list().then(responseFn); - }); - test('Sends the correct request [with specified auth]', function () { - // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.conferences.list(TEST_AUTH_KEY).then(responseFn); + describe('create', function () { + function responseFn(response: ResponsePayload) { + expect(response.data).toHaveProperty('id'); + expect(response.data).toHaveProperty('name'); + expect(response.data).toMatchObject({ + record_type: 'conference', }); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.conferences.create(conferenceCreateData).then(responseFn); }); - describe('retrieve', function () { - function responseFn(response: ResponsePayload) { - expect(response.data).toHaveProperty('id'); - expect(response.data).toHaveProperty('name'); - expect(response.data).toMatchObject({record_type: 'conference'}); - } + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.conferences + .create(conferenceCreateData, TEST_AUTH_KEY) + .then(responseFn); + }); + }); - test('Sends the correct request', function () { - // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.conferences.retrieve(CONFERENCE_ID).then(responseFn); - }); - test('Sends the correct request [with specified auth]', function () { - // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.conferences - .retrieve(CONFERENCE_ID, TEST_AUTH_KEY) - .then(responseFn); + describe('participants', function () { + function responseFn(response: ResponsePayloadList) { + expect(response.data[0]).toMatchObject({ + record_type: 'participant', }); + expect(response.data[0]).toHaveProperty('conference'); + expect(response.data[0]).toHaveProperty('call_control_id'); + expect(response.data[0]).toHaveProperty('end_conference_on_exit'); + expect(response.data[0]).toHaveProperty('muted'); + expect(response.data[0]).toHaveProperty('on_hold'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.conferences + .participants(CONFERENCE_ID, {filter: {muted: true}}) + .then(responseFn); }); - describe('create', function () { - function responseFn(response: ResponsePayload) { - expect(response.data).toHaveProperty('id'); - expect(response.data).toHaveProperty('name'); - expect(response.data).toMatchObject({ - record_type: 'conference', - }); - } + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.conferences + .participants(CONFERENCE_ID, TEST_AUTH_KEY) + .then(responseFn); + }); + }); - test('Sends the correct request', function () { - // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.conferences.create(conferenceCreateData).then(responseFn); - }); + CONFERENCES.forEach(function (action) { + describe(action, function () { + let telnyxInstance: TelnyxObject; - test('Sends the correct request [with specified auth]', function () { - // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.conferences - .create(conferenceCreateData, TEST_AUTH_KEY) - .then(responseFn); + beforeEach(() => { + // make specs independent + telnyxInstance = testUtils.getTelnyxMock(); }); - }); - - describe('participants', function () { - function responseFn(response: ResponsePayloadList) { - expect(response.data[0]).toMatchObject({ - record_type: 'participant', - }); - expect(response.data[0]).toHaveProperty('conference'); - expect(response.data[0]).toHaveProperty('call_control_id'); - expect(response.data[0]).toHaveProperty('end_conference_on_exit'); - expect(response.data[0]).toHaveProperty('muted'); - expect(response.data[0]).toHaveProperty('on_hold'); - } test('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.conferences - .participants(CONFERENCE_ID, {filter: {muted: true}}) - .then(responseFn); + return telnyxInstance.conferences + .create(conferenceCreateData) + .then(function (response: ResponsePayload) { + const conference = response.data; + // // @ts-expect-error TODO: import .d.ts files under src/test folder + return conference[action]( + callConferencesData[action] || {'': ''}, // need to pass string due to telnyx mock parse + ).then(responseFn); + }); }); - test('Sends the correct request [with specified auth]', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.conferences - .participants(CONFERENCE_ID, TEST_AUTH_KEY) - .then(responseFn); - }); - }); - - CONFERENCES.forEach(function (action) { - describe(action, function () { - let telnyxInstance: TelnyxObject; - - beforeEach(() => { - // make specs independent - telnyxInstance = testUtils.getTelnyxMock(); - }); - - test('Sends the correct request', function () { - // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyxInstance.conferences - .create(conferenceCreateData) - .then(function (response: ResponsePayload) { - const conference = response.data; + return telnyxInstance.conferences + .create(conferenceCreateData) + .then(function (response: ResponsePayload) { + const conference = response.data; + return conference[action]( // // @ts-expect-error TODO: import .d.ts files under src/test folder - return conference[action]( - callConferencesData[action] || {'': ''}, // need to pass string due to telnyx mock parse - ).then(responseFn); - }); - }); - test('Sends the correct request [with specified auth]', function () { - // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyxInstance.conferences - .create(conferenceCreateData) - .then(function (response: ResponsePayload) { - const conference = response.data; - return conference[action]( - // // @ts-expect-error TODO: import .d.ts files under src/test folder - callConferencesData[action] || {'': ''}, // need to pass string due to telnyx mock parse - TEST_AUTH_KEY, - ).then(responseFn); - }); - }); - - test('Sends the correct request [with empty resource instance]', function () { - // @ts-expect-error TODO: import .d.ts files under src/test folder - const conference = new telnyxInstance.Conference({ - id: '891510ac-f3e4-11e8-af5b-de00688a4901', + callConferencesData[action] || {'': ''}, // need to pass string due to telnyx mock parse + TEST_AUTH_KEY, + ).then(responseFn); }); + }); - return conference[action]( - callConferencesData[action] || {'': ''}, - ).then( - // need to pass string due to telnyx mock parse - responseFn, - ); + test('Sends the correct request [with empty resource instance]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + const conference = new telnyxInstance.Conference({ + id: '891510ac-f3e4-11e8-af5b-de00688a4901', }); - test('Sends the correct request [with empty resource instance and specified auth]', function () { - // @ts-expect-error TODO: import .d.ts files under src/test folder - const conference = new telnyxInstance.Conference({ - id: '891510ac-f3e4-11e8-af5b-de00688a4901', - }); - return conference[action]( - // // @ts-expect-error TODO: import .d.ts files under src/test folder - callConferencesData[action] || {'': ''}, // need to pass string due to telnyx mock parse - TEST_AUTH_KEY, - ).then(responseFn); + return conference[action](callConferencesData[action] || {'': ''}).then( + // need to pass string due to telnyx mock parse + responseFn, + ); + }); + test('Sends the correct request [with empty resource instance and specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + const conference = new telnyxInstance.Conference({ + id: '891510ac-f3e4-11e8-af5b-de00688a4901', }); + + return conference[action]( + // // @ts-expect-error TODO: import .d.ts files under src/test folder + callConferencesData[action] || {'': ''}, // need to pass string due to telnyx mock parse + TEST_AUTH_KEY, + ).then(responseFn); }); }); }); diff --git a/src/test/resources/Documents.test.ts b/src/test/resources/Documents.test.ts index e9aa698..a465275 100644 --- a/src/test/resources/Documents.test.ts +++ b/src/test/resources/Documents.test.ts @@ -77,13 +77,13 @@ describe('Documents', function () { } test('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.documents.retrieveDocumentId(TEST_UUID).then(responseFn); + return telnyx.documents.retrieve(TEST_UUID).then(responseFn); }); test('Sends the correct request [with specified auth]', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder return telnyx.documents - .retrieveDocumentId(TEST_UUID, TEST_AUTH_KEY) + .retrieve(TEST_UUID, TEST_AUTH_KEY) .then(responseFn); }); }); @@ -93,15 +93,13 @@ describe('Documents', function () { } test('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.documents - .retrieveDownloadDocument(TEST_UUID) - .then(responseFn); + return telnyx.documents.download(TEST_UUID).then(responseFn); }); test('Sends the correct request [with specified auth]', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder return telnyx.documents - .retrieveDownloadDocument(TEST_UUID, TEST_AUTH_KEY) + .download(TEST_UUID, TEST_AUTH_KEY) .then(responseFn); }); }); diff --git a/src/test/resources/TelephonyCredentials.test.ts b/src/test/resources/TelephonyCredentials.test.ts index fcc9543..7f3f7be 100644 --- a/src/test/resources/TelephonyCredentials.test.ts +++ b/src/test/resources/TelephonyCredentials.test.ts @@ -50,10 +50,6 @@ describe('TelephonyCredentials Resource', function () { }); describe('retrieve', function () { - function responseFn(response: ResponsePayload) { - expect(response.data).not.toBeNull(); - } - describe('retrieve', function () { test('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder @@ -71,25 +67,29 @@ describe('TelephonyCredentials Resource', function () { }); }); - describe('retrieveCredential', function () { + describe('createToken', function () { + function responseFn(response: ResponsePayload) { + expect(response.data).not.toBeNull(); + } + test('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder return telnyx.telephonyCredentials - .retrieveCredential(retrieveCredentialId) + .createToken(retrieveCredentialId) .then(responseFn); }); test('Sends the correct request [with specified auth]', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder return telnyx.telephonyCredentials - .retrieveCredential(retrieveCredentialId, TEST_AUTH_KEY) + .createToken(retrieveCredentialId, TEST_AUTH_KEY) .then(responseFn); }); test('Sends the correct request [with specified auth in options]', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder return telnyx.telephonyCredentials - .retrieveCredential(retrieveCredentialId, {api_key: TEST_AUTH_KEY}) + .createToken(retrieveCredentialId, {api_key: TEST_AUTH_KEY}) .then(responseFn); }); }); @@ -156,13 +156,13 @@ describe('TelephonyCredentials Resource', function () { }); test('Sends the correct request [with specified auth]', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.telephonyCredentials - .retrieveCredential('123') - .then(function (response: ResponsePayload) { - const tc = response.data; - // @ts-expect-error TODO: import .d.ts files under src/test folder - return tc.del(TEST_AUTH_KEY).then(responseFn); - }); + return telnyx.telephonyCredentials.retrieve('123').then(function ( + response: ResponsePayload, + ) { + const tc = response.data; + // @ts-expect-error TODO: import .d.ts files under src/test folder + return tc.del(TEST_AUTH_KEY).then(responseFn); + }); }); }); }); diff --git a/types/AuthenticationProvidersResource.d.ts b/types/AuthenticationProvidersResource.d.ts new file mode 100644 index 0000000..a14c1fd --- /dev/null +++ b/types/AuthenticationProvidersResource.d.ts @@ -0,0 +1,72 @@ +import {paths} from './TelnyxAPI.js'; + +declare module 'telnyx' { + namespace Telnyx { + type AuthenticationProvidersListParams = + paths['/authentication_providers']['get']['parameters']['query']; + + type AuthenticationProvidersListResponse = + paths['/authentication_providers']['get']['responses']['200']['content']['application/json']; + + type AuthenticationProvidersCreateParams = + paths['/authentication_providers']['post']['requestBody']['content']['application/json']; + + type AuthenticationProvidersCreateResponse = + paths['/authentication_providers']['post']['responses']['200']['content']['application/json']; + + type AuthenticationProvidersRetrieveId = + paths['/authentication_providers/{id}']['get']['parameters']['path']['id']; + + type AuthenticationProvidersRetrieveParams = + paths['/authentication_providers/{id}']['get']['parameters']['query']; + + type AuthenticationProvidersRetrieveResponse = + paths['/authentication_providers/{id}']['get']['responses']['200']['content']['application/json']; + type AuthenticationProvidersUpdateId = + paths['/authentication_providers/{id}']['patch']['parameters']['path']['id']; + + type AuthenticationProvidersUpdateParams = + paths['/authentication_providers/{id}']['patch']['requestBody']['content']['application/json']; + + type AuthenticationProvidersUpdateResponse = + paths['/authentication_providers/{id}']['patch']['responses']['200']['content']['application/json']; + type AuthenticationProvidersDelId = + paths['/authentication_providers/{id}']['delete']['parameters']['path']['id']; + + type AuthenticationProvidersDelParams = + paths['/authentication_providers/{id}']['delete']['parameters']['query']; + + type AuthenticationProvidersDelResponse = + paths['/authentication_providers/{id}']['delete']['responses']['200']['content']['application/json']; + + class AuthenticationProvidersResource { + list( + params?: AuthenticationProvidersListParams, + options?: RequestOptions, + ): Promise>; + + create( + params: AuthenticationProvidersCreateParams, + options?: RequestOptions, + ): Promise>; + + retrieve( + id: AuthenticationProvidersRetrieveId, + options?: RequestOptions, + ): Promise< + Telnyx.Response + >; + + update( + id: AuthenticationProvidersUpdateId, + params: AuthenticationProvidersUpdateParams, + options?: RequestOptions, + ): Promise>; + + del( + id: AuthenticationProvidersDelId, + options?: RequestOptions, + ): Promise>; + } + } +} diff --git a/types/BrandsResource.d.ts b/types/BrandsResource.d.ts index 2ca6685..5bad56c 100644 --- a/types/BrandsResource.d.ts +++ b/types/BrandsResource.d.ts @@ -55,18 +55,27 @@ declare module 'telnyx' { type BrandsExportExternalVettingsPathParams = paths['/brand/{brandId}/externalVetting']['put']['parameters']['path']; + type BrandsExportExternalVettingsParams = + paths['/brand/{brandId}/externalVetting']['put']['requestBody']['content']['application/json']; + type BrandsExportExternalVettingsResponse = paths['/brand/{brandId}/externalVetting']['put']['responses']['200']['content']['application/json']; type BrandsOrderExternalVettingsPathParams = paths['/brand/{brandId}/externalVetting']['post']['parameters']['path']; + type BrandsOrderExternalVettingsParams = + paths['/brand/{brandId}/externalVetting']['post']['requestBody']['content']['application/json']; + type BrandsOrderExternalVettingsResponse = paths['/brand/{brandId}/externalVetting']['post']['responses']['200']['content']['application/json']; type BrandsRevetPathParams = paths['/brand/{brandId}/revet']['put']['parameters']['path']; + type BrandsRevetParams = + paths['/brand/{brandId}/externalVetting']['put']['requestBody']['content']['application/json']; + type BrandsRevetResponse = paths['/brand/{brandId}/revet']['put']['responses']['200']['content']['application/json']; @@ -108,11 +117,6 @@ declare module 'telnyx' { options?: RequestOptions, ): Promise>; - externalVettings( - params?: BrandsListExternalVettingsPathParams, - options?: RequestOptions, - ): Promise>; - listExternalVettings( pathParams: BrandsListExternalVettingsPathParams, options?: RequestOptions, @@ -120,16 +124,19 @@ declare module 'telnyx' { exportExternalVettings( pathParams: BrandsExportExternalVettingsPathParams, + params: BrandsExportExternalVettingsParams, options?: RequestOptions, ): Promise>; orderExternalVettings( pathParams: BrandsOrderExternalVettingsPathParams, + params: BrandsOrderExternalVettingsParams, options?: RequestOptions, ): Promise>; revet( pathParams: BrandsRevetPathParams, + params: BrandsRevetParams, options?: RequestOptions, ): Promise>; diff --git a/types/CallControlApplicationsResource.d.ts b/types/CallControlApplicationsResource.d.ts new file mode 100644 index 0000000..31292ce --- /dev/null +++ b/types/CallControlApplicationsResource.d.ts @@ -0,0 +1,93 @@ +import {paths} from './TelnyxAPI.js'; + +declare module 'telnyx' { + namespace Telnyx { + type CallControlApplicationsListParams = + paths['/call_control_applications']['get']['parameters']['query']; + + type CallControlApplicationsListResponse = + paths['/call_control_applications']['get']['responses']['200']['content']['application/json']; + + type CallControlApplicationsCreateParams = + paths['/call_control_applications']['post']['requestBody']['content']['application/json']; + + type CallControlApplicationsCreateResponse = + paths['/call_control_applications']['post']['responses']['201']['content']['application/json']; + + type CallControlApplicationsRetrieveId = + paths['/call_control_applications/{id}']['get']['parameters']['path']['id']; + + type CallControlApplicationsRetrieveParams = + paths['/call_control_applications/{id}']['get']['parameters']['query']; + + type CallControlApplicationsRetrieveResponse = + paths['/call_control_applications/{id}']['get']['responses']['200']['content']['application/json']; + + type CallControlApplicationsUpdateId = + paths['/call_control_applications/{id}']['patch']['parameters']['path']['id']; + + type CallControlApplicationsUpdateParams = + paths['/call_control_applications/{id}']['patch']['requestBody']['content']['application/json']; + + type CallControlApplicationsUpdateResponse = + paths['/call_control_applications/{id}']['patch']['responses']['200']['content']['application/json']; + + type CallControlApplicationsDelId = + paths['/call_control_applications/{id}']['delete']['parameters']['path']['id']; + + type CallControlApplicationsDelParams = + paths['/call_control_applications/{id}']['delete']['parameters']['query']; + + type CallControlApplicationsDelResponse = + paths['/call_control_applications/{id}']['delete']['responses']['200']['content']['application/json']; + + type CallControlApplicationsNestedMethods = { + create: MessagingProfilesResource['create']; + del: MessagingProfilesResource['del']; + }; + + class CallControlApplicationsResource { + list( + params?: CallControlApplicationsListParams, + options?: RequestOptions, + ): Promise>; + + create( + params: CallControlApplicationsCreateParams, + options?: RequestOptions, + ): Promise< + Telnyx.Response< + Telnyx.CallControlApplicationsCreateResponse & + NestedResponseData< + CallControlApplicationsCreateResponse['data'], + CallControlApplicationsNestedMethods + > + > + >; + + retrieve( + id: CallControlApplicationsRetrieveId, + options?: RequestOptions, + ): Promise< + Telnyx.Response< + Telnyx.CallControlApplicationsCreateResponse & + NestedResponseData< + CallControlApplicationsCreateResponse['data'], + CallControlApplicationsNestedMethods + > + > + >; + + update( + id: CallControlApplicationsUpdateId, + params: CallControlApplicationsUpdateParams, + options?: RequestOptions, + ): Promise>; + + del( + id: CallControlApplicationsDelId, + options?: RequestOptions, + ): Promise>; + } + } +} diff --git a/types/CallEventsResource.d.ts b/types/CallEventsResource.d.ts new file mode 100644 index 0000000..30cc384 --- /dev/null +++ b/types/CallEventsResource.d.ts @@ -0,0 +1,18 @@ +import {paths} from './TelnyxAPI.js'; + +declare module 'telnyx' { + namespace Telnyx { + type CallEventsListParams = + paths['/call_events']['get']['parameters']['query']; + + type CallEventsListResponse = + paths['/call_events']['get']['responses']['200']['content']['application/json']; + + class CallEventsResource { + list( + params?: CallEventsListParams, + options?: RequestOptions, + ): Promise>; + } + } +} diff --git a/types/CallRecordingsResource.d.ts b/types/CallRecordingsResource.d.ts new file mode 100644 index 0000000..960396e --- /dev/null +++ b/types/CallRecordingsResource.d.ts @@ -0,0 +1,59 @@ +import {paths} from './TelnyxAPI.js'; + +declare module 'telnyx' { + namespace Telnyx { + type CallRecordingsListParams = + paths['/recordings']['get']['parameters']['query']; + + type CallRecordingsListResponse = + paths['/recordings']['get']['responses']['200']['content']['application/json']; + + type CallRecordingsRetrieveId = + paths['/recordings/{recording_id}']['get']['parameters']['path']['recording_id']; + + type CallRecordingsRetrieveParams = + paths['/recordings/{recording_id}']['get']['parameters']['query']; + + type CallRecordingsRetrieveResponse = + paths['/recordings/{recording_id}']['get']['responses']['200']['content']['application/json']; + + type CallRecordingsDelId = + paths['/recordings/{recording_id}']['delete']['parameters']['path']['recording_id']; + + type CallRecordingsDelResponse = + paths['/recordings/{recording_id}']['delete']['responses']['200']['content']['application/json']; + + type CallRecordingsBulkDelParams = + paths['/recordings/actions/delete']['delete']['requestBody']['content']['application/json']; + + type CallRecordingsBulkDelResponse = + paths['/recordings/actions/delete']['delete']['responses']['204']['content']; + + class CallRecordingsResource { + list( + params?: CallRecordingsListParams, + options?: RequestOptions, + ): Promise>; + + retrieve( + id: CallRecordingsRetrieveId, + options?: RequestOptions, + ): Promise>; + + del( + id: CallRecordingsDelId, + options?: RequestOptions, + ): Promise>; + + del( + id: CallRecordingsDelId, + options?: RequestOptions, + ): Promise>; + + bulkDel( + params?: CallRecordingsBulkDelParams, + options?: RequestOptions, + ): Promise>; + } + } +} diff --git a/types/CdrUsageReportsResource.d.ts b/types/CdrUsageReportsResource.d.ts new file mode 100644 index 0000000..cd4e0a2 --- /dev/null +++ b/types/CdrUsageReportsResource.d.ts @@ -0,0 +1,18 @@ +import {paths} from './TelnyxAPI.js'; + +declare module 'telnyx' { + namespace Telnyx { + type CdrUsageReportsSyncParams = + paths['/reports/cdr_usage_reports/sync']['get']['parameters']['query']; + + type CdrUsageReportsSyncResponse = + paths['/reports/cdr_usage_reports/sync']['get']['responses']['200']['content']['application/json']; + + class CdrUsageReportsResource { + retrieveUsageReportSync( + params?: CdrUsageReportsSyncParams, + options?: RequestOptions, + ): Promise>; + } + } +} diff --git a/types/ChannelzonesResource.d.ts b/types/ChannelzonesResource.d.ts new file mode 100644 index 0000000..b4e7e65 --- /dev/null +++ b/types/ChannelzonesResource.d.ts @@ -0,0 +1,92 @@ +import {paths} from './TelnyxAPI.js'; + +declare module 'telnyx' { + namespace Telnyx { + type ChannelzonesListParams = + paths['/channel_zones']['get']['parameters']['query']; + + type ChannelzonesListResponse = + paths['/channel_zones']['get']['responses']['200']['content']['application/json']; + + type ChannelzonesUpdateId = + paths['/channel_zones/{channel_zone_id}']['patch']['parameters']['path']['channel_zone_id']; + + type ChannelzonesUpdateParams = + paths['/channel_zones/{channel_zone_id}']['patch']['requestBody']['content']['application/json']; + + type ChannelzonesUpdateResponse = + paths['/channel_zones/{channel_zone_id}']['patch']['responses']['200']['content']['application/json']; + + type ChannelzonesRetrieveId = + paths['/channel_zones/{channel_zone_id}']['get']['parameters']['path']['channel_zone_id']; + + type ChannelzonesRetrieveParams = + paths['/channel_zones/{channel_zone_id}']['get']['parameters']['query']; + + type ChannelzonesRetrieveResponse = + paths['/channel_zones/{channel_zone_id}']['get']['responses']['200']['content']['application/json']; + + type ChannelzonesPhoneNumbersListId = + paths['/channel_zones/{channel_zone_id}/channel_zone_phone_numbers']['get']['parameters']['path']['channel_zone_id']; + + type ChannelzonesPhoneNumbersListParams = + paths['/channel_zones/{channel_zone_id}/channel_zone_phone_numbers']['get']['parameters']['query']; + + type ChannelzonesPhoneNumbersListResponse = + paths['/channel_zones/{channel_zone_id}/channel_zone_phone_numbers']['get']['responses']['200']['content']['application/json']; + + type ChannelzonesPhoneNumbersCreatePathParams = + paths['/channel_zones/{channel_zone_id}/channel_zone_phone_numbers']['post']['parameters']['path']; + + type ChannelzonesPhoneNumbersCreateParams = + paths['/channel_zones/{channel_zone_id}/channel_zone_phone_numbers']['post']['requestBody']['content']['application/json']; + + type ChannelzonesPhoneNumbersCreateResponse = + paths['/channel_zones/{channel_zone_id}/channel_zone_phone_numbers']['post']['responses']['200']['content']['application/json']; + + type ChannelzonesPhoneNumbersDeletePathParams = + paths['/channel_zones/{channel_zone_id}/channel_zone_phone_numbers/{phone_number}']['delete']['parameters']['path']; + + type ChannelzonesPhoneNumbersDeleteResponse = + paths['/channel_zones/{channel_zone_id}/channel_zone_phone_numbers/{phone_number}']['delete']['responses']['200']['content']; + + class ChannelzonesResource { + list( + params?: ChannelzonesListParams, + options?: RequestOptions, + ): Promise>; + + update( + id: ChannelzonesUpdateId, + params: ChannelzonesUpdateParams, + options?: RequestOptions, + ): Promise>; + + retrieve( + id: ChannelzonesRetrieveId, + options?: RequestOptions, + ): Promise>; + + listPhoneNumbers( + id: ChannelzonesPhoneNumbersListId, + params?: ChannelzonesPhoneNumbersListParams, + options?: RequestOptions, + ): Promise>; + + createPhoneNumber( + pathParams: ChannelzonesPhoneNumbersCreatePathParams, + params: ChannelzonesPhoneNumbersCreateParams, + options?: RequestOptions, + ): Promise< + Telnyx.Response + >; + + delPhoneNumber( + pathParams: ChannelzonesPhoneNumbersDeletePathParams, + options?: RequestOptions, + ): Promise< + Telnyx.Response + >; + } + } +} diff --git a/types/ConferencesResource.d.ts b/types/ConferencesResource.d.ts new file mode 100644 index 0000000..c1d6a06 --- /dev/null +++ b/types/ConferencesResource.d.ts @@ -0,0 +1,202 @@ +import {paths} from './TelnyxAPI.js'; + +declare module 'telnyx' { + namespace Telnyx { + type ConferencesListParams = + paths['/conferences']['get']['parameters']['query']; + + type ConferencesListResponse = + paths['/conferences']['get']['responses']['200']['content']['application/json']; + + type ConferencesRetrieveId = + paths['/conferences/{id}']['get']['parameters']['path']['id']; + + type ConferencesRetrieveParams = + paths['/conferences/{id}']['get']['parameters']['query']; + + type ConferencesRetrieveResponse = + paths['/conferences/{id}']['get']['responses']['200']['content']['application/json']; + + type ConferencesCreateParams = + paths['/conferences']['post']['requestBody']['content']['application/json']; + + type ConferencesCreateResponse = + paths['/conferences']['post']['responses']['200']['content']['application/json']; + + type ConferencesJoinParams = + paths['/conferences/{id}/actions/join']['post']['requestBody']['content']['application/json']; + type ConferencesMuteParams = + paths['/conferences/{id}/actions/mute']['post']['responses']['200']['content']['application/json']; + type ConferencesUnmuteParams = + paths['/conferences/{id}/actions/unmute']['post']['responses']['200']['content']['application/json']; + type ConferencesHoldParams = + paths['/conferences/{id}/actions/hold']['post']['responses']['200']['content']['application/json']; + type ConferencesUnholdParams = + paths['/conferences/{id}/actions/unhold']['post']['responses']['200']['content']['application/json']; + type ConferencesSpeakParams = + paths['/conferences/{id}/actions/speak']['post']['responses']['200']['content']['application/json']; + type ConferencesPlayParams = + paths['/conferences/{id}/actions/play']['post']['responses']['200']['content']['application/json']; + type ConferencesStopParams = + paths['/conferences/{id}/actions/stop']['post']['responses']['200']['content']['application/json']; + type ConferencesRecordStartParams = + paths['/conferences/{id}/actions/record_start']['post']['responses']['200']['content']['application/json']; + type ConferencesRecordStopParams = + paths['/conferences/{id}/actions/record_stop']['post']['responses']['200']['content']['application/json']; + type ConferencesRecordResumeParams = + paths['/conferences/{id}/actions/record_resume']['post']['responses']['200']['content']['application/json']; + type ConferencesRecordPauseParams = + paths['/conferences/{id}/actions/record_pause']['post']['responses']['200']['content']['application/json']; + type ConferencesUpdateParams = + paths['/conferences/{id}/actions/update']['post']['responses']['200']['content']['application/json']; + type ConferencesLeaveParams = + paths['/conferences/{id}/actions/leave']['post']['responses']['200']['content']['application/json']; + + type ConferencesJoinResponse = + paths['/conferences/{id}/actions/join']['post']['responses']['200']['content']['application/json']; + type ConferencesMuteResponse = + paths['/conferences/{id}/actions/mute']['post']['responses']['200']['content']['application/json']; + type ConferencesUnmuteResponse = + paths['/conferences/{id}/actions/unmute']['post']['responses']['200']['content']['application/json']; + type ConferencesHoldResponse = + paths['/conferences/{id}/actions/hold']['post']['responses']['200']['content']['application/json']; + type ConferencesUnholdResponse = + paths['/conferences/{id}/actions/unhold']['post']['responses']['200']['content']['application/json']; + type ConferencesSpeakResponse = + paths['/conferences/{id}/actions/speak']['post']['responses']['200']['content']['application/json']; + type ConferencesPlayResponse = + paths['/conferences/{id}/actions/play']['post']['responses']['200']['content']['application/json']; + type ConferencesStopResponse = + paths['/conferences/{id}/actions/stop']['post']['responses']['200']['content']['application/json']; + type ConferencesRecordStartResponse = + paths['/conferences/{id}/actions/record_start']['post']['responses']['200']['content']['application/json']; + type ConferencesRecordStopResponse = + paths['/conferences/{id}/actions/record_stop']['post']['responses']['200']['content']['application/json']; + type ConferencesUpdateResponse = + paths['/conferences/{id}/actions/update']['post']['responses']['200']['content']['application/json']; + type ConferencesLeaveResponse = + paths['/conferences/{id}/actions/leave']['post']['responses']['200']['content']['application/json']; + type ConferencesRecordResumeResponse = + paths['/conferences/{id}/actions/record_resume']['post']['responses']['200']['content']['application/json']; + type ConferencesRecordPauseResponse = + paths['/conferences/{id}/actions/record_pause']['post']['responses']['200']['content']['application/json']; + + type ConferencesParticipantsId = + paths['/conferences/{conference_id}/participants']['get']['parameters']['path']['conference_id']; + + type ConferencesParticipantsParams = + paths['/conferences/{conference_id}/participants']['get']['parameters']['query']; + + type ConferencesParticipantsResponse = + paths['/conferences/{id}']['get']['responses']['200']['content']['application/json']; + + type ConferencesNestedMethods = { + join: ConferencesResource['join']; + mute: ConferencesResource['mute']; + unmute: ConferencesResource['unmute']; + hold: ConferencesResource['hold']; + unhold: ConferencesResource['unhold']; + speak: ConferencesResource['speak']; + play: ConferencesResource['play']; + stop: ConferencesResource['stop']; + recordStart: ConferencesResource['recordStart']; + recordStop: ConferencesResource['recordStop']; + update: ConferencesResource['update']; + leave: ConferencesResource['leave']; + recordResume: ConferencesResource['recordResume']; + recordPause: ConferencesResource['recordPause']; + }; + + class ConferencesResource { + list( + params?: ConferencesListParams, + options?: RequestOptions, + ): Promise>; + + retrieve( + id: ConferencesRetrieveId, + options?: RequestOptions, + ): Promise< + Telnyx.Response & + NestedResponseData< + ConferencesRetrieveResponse['data'], + ConferencesNestedMethods + > + >; + + create( + params: ConferencesCreateParams, + options?: RequestOptions, + ): Promise< + Telnyx.Response & + NestedResponseData< + ConferencesCreateResponse['data'], + ConferencesNestedMethods + > + >; + + join( + params: ConferencesJoinParams, + options?: RequestOptions, + ): Promise>; + mute( + params: ConferencesMuteParams, + options?: RequestOptions, + ): Promise>; + unmute( + params: ConferencesUnmuteParams, + options?: RequestOptions, + ): Promise>; + hold( + params: ConferencesHoldParams, + options?: RequestOptions, + ): Promise>; + unhold( + params: ConferencesUnholdParams, + options?: RequestOptions, + ): Promise>; + speak( + params: ConferencesSpeakParams, + options?: RequestOptions, + ): Promise>; + play( + params: ConferencesPlayParams, + options?: RequestOptions, + ): Promise>; + stop( + params: ConferencesStopParams, + options?: RequestOptions, + ): Promise>; + recordStart( + params: ConferencesRecordStartParams, + options?: RequestOptions, + ): Promise>; + recordStop( + params: ConferencesRecordStopParams, + options?: RequestOptions, + ): Promise>; + update( + params: ConferencesUpdateParams, + options?: RequestOptions, + ): Promise>; + leave( + params: ConferencesLeaveParams, + options?: RequestOptions, + ): Promise>; + recordResume( + params: ConferencesRecordResumeParams, + options?: RequestOptions, + ): Promise>; + recordPause( + params: ConferencesRecordPauseParams, + options?: RequestOptions, + ): Promise>; + + participants( + id: ConferencesParticipantsId, + params: ConferencesParticipantsParams, + options?: RequestOptions, + ): Promise>; + } + } +} diff --git a/types/ConnectionsResource.d.ts b/types/ConnectionsResource.d.ts new file mode 100644 index 0000000..c18622a --- /dev/null +++ b/types/ConnectionsResource.d.ts @@ -0,0 +1,44 @@ +import {paths} from './TelnyxAPI.js'; + +declare module 'telnyx' { + namespace Telnyx { + type ConnectionsListParams = + paths['/connections']['get']['parameters']['query']; + + type ConnectionsListResponse = + paths['/connections']['get']['responses']['200']['content']['application/json']; + + type ConnectionsRetrieveId = + paths['/connections/{id}']['get']['parameters']['path']['id']; + + type ConnectionsRetrieveResponse = + paths['/connections/{id}']['get']['responses']['200']['content']['application/json']; + + type ConnectionsListActiveCallsId = + paths['/connections/{connection_id}/active_calls']['get']['parameters']['path']['connection_id']; + + type ConnectionsListActiveCallsParams = + paths['/connections/{connection_id}/active_calls']['get']['parameters']['query']; + + type ConnectionsListActiveCallsResponse = + paths['/connections/{connection_id}/active_calls']['get']['responses']['200']['content']['application/json']; + + class ConnectionsResource { + list( + params?: ConnectionsListParams, + options?: RequestOptions, + ): Promise>; + + retrieve( + id: ConnectionsRetrieveId, + options?: RequestOptions, + ): Promise>; + + listActiveCalls( + id: ConnectionsListActiveCallsId, + params?: ConnectionsListActiveCallsParams, + options?: RequestOptions, + ): Promise>; + } + } +} diff --git a/types/CredentialConnectionsResource.d.ts b/types/CredentialConnectionsResource.d.ts new file mode 100644 index 0000000..e7d2133 --- /dev/null +++ b/types/CredentialConnectionsResource.d.ts @@ -0,0 +1,69 @@ +import {paths} from './TelnyxAPI.js'; + +declare module 'telnyx' { + namespace Telnyx { + type CredentialConnectionsListParams = + paths['/credential_connections']['get']['parameters']['query']; + + type CredentialConnectionsListResponse = + paths['/credential_connections']['get']['responses']['200']['content']['application/json']; + + type CredentialConnectionsCreateParams = + paths['/credential_connections']['post']['requestBody']['content']['application/json']; + + type CredentialConnectionsCreateResponse = + paths['/credential_connections']['post']['responses']['201']['content']['application/json']; + + type CredentialConnectionsRetrieveId = + paths['/credential_connections/{id}']['get']['parameters']['path']['id']; + + type CredentialConnectionsRetrieveResponse = + paths['/credential_connections/{id}']['get']['responses']['200']['content']['application/json']; + + type CredentialConnectionsUpdateId = + paths['/credential_connections/{id}']['patch']['parameters']['path']['id']; + + type CredentialConnectionsUpdateParams = + paths['/credential_connections/{id}']['patch']['requestBody']['content']['application/json']; + + type CredentialConnectionsUpdateResponse = + paths['/credential_connections/{id}']['patch']['responses']['200']['content']['application/json']; + + type CredentialConnectionsDelId = + paths['/credential_connections/{id}']['delete']['parameters']['path']['id']; + + type CredentialConnectionsDelParams = + paths['/credential_connections/{id}']['delete']['parameters']['query']; + + type CredentialConnectionsDelResponse = + paths['/credential_connections/{id}']['delete']['responses']['200']['content']['application/json']; + + class CredentialConnectionsResource { + list( + params?: CredentialConnectionsListParams, + options?: RequestOptions, + ): Promise>; + + create( + params: CredentialConnectionsCreateParams, + options?: RequestOptions, + ): Promise>; + + retrieve( + id: CredentialConnectionsRetrieveId, + options?: RequestOptions, + ): Promise>; + + update( + id: CredentialConnectionsUpdateId, + params: CredentialConnectionsUpdateParams, + options?: RequestOptions, + ): Promise>; + + del( + id: CredentialConnectionsDelId, + options?: RequestOptions, + ): Promise>; + } + } +} diff --git a/types/DocumentLinksResource.d.ts b/types/DocumentLinksResource.d.ts new file mode 100644 index 0000000..5adf01f --- /dev/null +++ b/types/DocumentLinksResource.d.ts @@ -0,0 +1,18 @@ +import {paths} from './TelnyxAPI.js'; + +declare module 'telnyx' { + namespace Telnyx { + type DocumentLinksListParams = + paths['/document_links']['get']['parameters']['query']; + + type DocumentLinksListResponse = + paths['/document_links']['get']['responses']['200']['content']['application/json']; + + class DocumentLinksResource { + list( + params?: DocumentLinksListParams, + options?: RequestOptions, + ): Promise>; + } + } +} diff --git a/types/DocumentsResource.d.ts b/types/DocumentsResource.d.ts new file mode 100644 index 0000000..b6519e1 --- /dev/null +++ b/types/DocumentsResource.d.ts @@ -0,0 +1,80 @@ +import {paths} from './TelnyxAPI.js'; + +declare module 'telnyx' { + namespace Telnyx { + type DocumentsListParams = + paths['/documents']['get']['parameters']['query']; + + type DocumentsListResponse = + paths['/documents']['get']['responses']['200']['content']['application/json']; + + type DocumentsCreateParams = + paths['/documents']['post']['requestBody']['content']['application/json']; + + type DocumentsCreateResponse = + paths['/documents']['post']['responses']['200']['content']['application/json']; + + type DocumentsRetrieveId = + paths['/documents/{id}']['get']['parameters']['path']['id']; + + type DocumentsRetrieveResponse = + paths['/documents/{id}']['get']['responses']['200']['content']['application/json']; + + type DocumentsUpdateId = + paths['/documents/{id}']['patch']['parameters']['path']['id']; + + type DocumentsUpdateParams = + paths['/documents/{id}']['patch']['requestBody']['content']['application/json']; + + type DocumentsUpdateResponse = + paths['/documents/{id}']['patch']['responses']['200']['content']['application/json']; + + type DocumentsDelId = + paths['/documents/{id}']['delete']['parameters']['path']['id']; + + type DocumentsDelParams = + paths['/documents/{id}']['delete']['parameters']['query']; + + type DocumentsDelResponse = + paths['/documents/{id}']['delete']['responses']['200']['content']['application/json']; + + type DocumentsDownloadId = + paths['/documents/{id}/download']['get']['parameters']['path']['id']; + + type DocumentsDownloadResponse = + paths['/documents/{id}/download']['get']['responses']['200']['content']['*']; + + class DocumentsResource { + list( + params?: DocumentsListParams, + options?: RequestOptions, + ): Promise>; + + create( + params: DocumentsCreateParams, + options?: RequestOptions, + ): Promise>; + + retrieve( + id: DocumentsRetrieveId, + options?: RequestOptions, + ): Promise>; + + update( + id: DocumentsUpdateId, + params: DocumentsUpdateParams, + options?: RequestOptions, + ): Promise>; + + del( + id: DocumentsDelId, + options?: RequestOptions, + ): Promise>; + + download( + id: DocumentsDownloadId, + options?: RequestOptions, + ): Promise>; + } + } +} diff --git a/types/TelephonyCredentialsResource.d.ts b/types/TelephonyCredentialsResource.d.ts new file mode 100644 index 0000000..a839f4f --- /dev/null +++ b/types/TelephonyCredentialsResource.d.ts @@ -0,0 +1,99 @@ +import {paths} from './TelnyxAPI.js'; + +declare module 'telnyx' { + namespace Telnyx { + type TelephonyCredentialsListParams = + paths['/telephony_credentials']['get']['parameters']['query']; + + type TelephonyCredentialsListResponse = + paths['/telephony_credentials']['get']['responses']['200']['content']['application/json']; + + type TelephonyCredentialsCreateParams = + paths['/telephony_credentials']['post']['requestBody']['content']['application/json']; + + type TelephonyCredentialsCreateResponse = + paths['/telephony_credentials']['post']['responses']['201']['content']['application/json']; + + type TelephonyCredentialsRetrieveId = + paths['/telephony_credentials/{id}']['get']['parameters']['path']['id']; + + type TelephonyCredentialsRetrieveParams = + paths['/telephony_credentials/{id}']['get']['parameters']['query']; + + type TelephonyCredentialsRetrieveResponse = + paths['/telephony_credentials/{id}']['get']['responses']['200']['content']['application/json']; + + type TelephonyCredentialsUpdateId = + paths['/telephony_credentials/{id}']['patch']['parameters']['path']['id']; + + type TelephonyCredentialsUpdateParams = + paths['/telephony_credentials/{id}']['patch']['requestBody']['content']['application/json']; + + type TelephonyCredentialsUpdateResponse = + paths['/telephony_credentials/{id}']['patch']['responses']['200']['content']['application/json']; + + type TelephonyCredentialsDelId = + paths['/telephony_credentials/{id}']['delete']['parameters']['path']['id']; + + type TelephonyCredentialsDelParams = + paths['/telephony_credentials/{id}']['delete']['parameters']['query']; + + type TelephonyCredentialsDelResponse = + paths['/telephony_credentials/{id}']['delete']['responses']['200']['content']['application/json']; + + type TelephonyCredentialsCreateTokenId = + paths['/telephony_credentials/{id}/token']['post']['parameters']['path']['id']; + + type TelephonyCredentialsCreateTokenParams = + paths['/telephony_credentials/{id}/token']['post']['requestBody']; + + type TelephonyCredentialsCreateTokenResponse = + paths['/telephony_credentials/{id}/token']['post']['responses']['201']['content']['text/plain']; + + type TelephonyCredentialsListTagsParams = + paths['/telephony_credentials/tags']['get']['parameters']['query']; + + type TelephonyCredentialsListTagsResponse = + paths['/telephony_credentials/tags']['get']['responses']['200']['content']['application/json']; + + class TelephonyCredentialsResource { + list( + params?: TelephonyCredentialsListParams, + options?: RequestOptions, + ): Promise>; + + create( + params: TelephonyCredentialsCreateParams, + options?: RequestOptions, + ): Promise>; + + retrieve( + id: TelephonyCredentialsRetrieveId, + options?: RequestOptions, + ): Promise>; + + update( + id: TelephonyCredentialsUpdateId, + params: TelephonyCredentialsUpdateParams, + options?: RequestOptions, + ): Promise>; + + del( + id: TelephonyCredentialsDelId, + options?: RequestOptions, + ): Promise>; + + createToken( + id: TelephonyCredentialsCreateTokenId, + options?: RequestOptions, + ): Promise< + Telnyx.Response + >; + + listTags( + params?: TelephonyCredentialsListTagsParams, + options?: RequestOptions, + ): Promise>; + } + } +} diff --git a/types/TelnyxAPI.d.ts b/types/TelnyxAPI.d.ts index 311d6e8..46f666c 100644 --- a/types/TelnyxAPI.d.ts +++ b/types/TelnyxAPI.d.ts @@ -60827,7 +60827,7 @@ export interface operations { [name: string]: unknown; }; content: { - 'application/json': components['schemas']['MdrGetSyncUsageReportResponse']; + 'application/json': components['schemas']['CdrGetSyncUsageReportResponse']; }; }; }; diff --git a/types/index.d.ts b/types/index.d.ts index 773884e..7cf4410 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -5,7 +5,7 @@ /// /// -// Resources Imports +// Resources imports /// /// /// @@ -17,6 +17,7 @@ /// /// /// +/// /// /// /// @@ -24,9 +25,20 @@ /// /// /// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// /// /// /// +/// /// // @@ -54,6 +66,7 @@ declare module 'telnyx' { aiSummarize: Telnyx.AiSummarizeResource; accessIpAddress: Telnyx.AccessIpAddressResource; accessIpRanges: Telnyx.AccessIpRangesResource; + authenticationProviders: Telnyx.AuthenticationProvidersResource; autorespConfigs: Telnyx.AutorespConfigsResource; addresses: Telnyx.AddressesResource; availablePhoneNumbers: Telnyx.AvailablePhoneNumbersResource; @@ -61,6 +74,17 @@ declare module 'telnyx' { brands: Telnyx.BrandsResource; billingGroups: Telnyx.BillingGroupsResource; calls: Telnyx.CallsResource; + callControlApplications: Telnyx.CallControlApplicationsResource; + callEvents: Telnyx.CallEventsResource; + callRecordings: Telnyx.CallRecordingsResource; + cdrUsageReports: Telnyx.CdrUsageReportsResource; + channelzones: Telnyx.ChannelzonesResource; + conferences: Telnyx.ConferencesResource; + connections: Telnyx.ConnectionsResource; + credentialConnections: Telnyx.CredentialConnectionsResource; + documentLinks: Telnyx.DocumentLinksResource; + documents: Telnyx.DocumentsResource; + telephonyCredentials: Telnyx.TelephonyCredentialsResource; messagingProfiles: Telnyx.MessagingProfilesResource; phoneNumberAssignmentByProfileResource: Telnyx.PhoneNumberAssignmentByProfileResource; storageBuckets: Telnyx.StorageBucketsResource; From 90ce9062fca443241a7a3b421f8c56d41416ce55 Mon Sep 17 00:00:00 2001 From: Lucas Rosa Date: Thu, 3 Oct 2024 00:36:06 -0300 Subject: [PATCH 34/59] remove unused resources --- src/resources/Calls.ts | 6 + src/resources/ClientStateUpdate.ts | 6 - src/resources/FaxApplications.ts | 2 - src/resources/Faxes.ts | 2 - src/resources/FqdnConnections.ts | 2 - src/resources/Fqdns.ts | 2 - src/resources/InboundChannels.ts | 2 +- src/resources/InventoryCoverage.ts | 5 + src/resources/Messages.ts | 5 - src/resources/MessagesAlphanumericSenderId.ts | 6 - src/resources/MessagingHostedNumber.ts | 27 ---- src/resources/MessagingHostedNumbers.ts | 4 +- src/resources/MessagingPhoneNumbers.ts | 6 - src/resources/MessagingSenderIds.ts | 6 - src/resources/OutboundVoiceProfiles.ts | 13 +- src/resources/PublicKey.ts | 10 -- src/resources/RegulatoryRequirements.ts | 2 +- src/resources/UpdateClientState.ts | 25 ---- src/resources/VerifyProfiles.ts | 20 +-- src/telnyx.ts | 14 -- src/test/resources/ActionsSimCards.test.ts | 1 + .../ActivateDeactivateBulkCredentials.test.ts | 4 +- .../BulkTelephonyCredentials.test.ts | 2 +- src/test/resources/Calls.test.ts | 26 ++++ src/test/resources/ClientStateUpdate.test.ts | 36 ----- src/test/resources/InventoryCoverage.test.ts | 10 +- src/test/resources/MessagesSenderIds.test.ts | 51 ------- .../resources/MessagingHostedNumbers.test.ts | 12 +- .../resources/MessagingPhoneNumbers.test.ts | 73 ---------- src/test/resources/MessagingSenderIds.test.ts | 125 ------------------ ...PhoneNumbersRegulatoryRequirements.test.ts | 2 - src/test/resources/PortingOrders.test.ts | 1 - src/test/resources/PublicKey.test.ts | 18 --- .../resources/RegulatoryRequirements.test.ts | 59 +++------ src/test/resources/SimCardGroups.test.ts | 1 - src/test/resources/SimCards.test.ts | 2 - src/test/resources/UpdateClientState.test.ts | 30 ----- types/TelnyxAPI.d.ts | 5 +- 38 files changed, 89 insertions(+), 534 deletions(-) delete mode 100644 src/resources/ClientStateUpdate.ts delete mode 100644 src/resources/MessagesAlphanumericSenderId.ts delete mode 100644 src/resources/MessagingHostedNumber.ts delete mode 100644 src/resources/MessagingPhoneNumbers.ts delete mode 100644 src/resources/MessagingSenderIds.ts delete mode 100644 src/resources/PublicKey.ts delete mode 100644 src/resources/UpdateClientState.ts delete mode 100644 src/test/resources/ClientStateUpdate.test.ts delete mode 100644 src/test/resources/MessagesSenderIds.test.ts delete mode 100644 src/test/resources/MessagingPhoneNumbers.test.ts delete mode 100644 src/test/resources/MessagingSenderIds.test.ts delete mode 100644 src/test/resources/PublicKey.test.ts delete mode 100644 src/test/resources/UpdateClientState.test.ts diff --git a/src/resources/Calls.ts b/src/resources/Calls.ts index 1b9b656..b0f11a9 100644 --- a/src/resources/Calls.ts +++ b/src/resources/Calls.ts @@ -86,6 +86,12 @@ export const Calls = TelnyxResource.extend({ }, }), + updateClientState: telnyxMethod({ + path: '/{call_control_id}/actions/client_state_update', + urlParams: ['call_control_id'], + method: 'PUT', + }), + instanceMethods: utils.createNestedMethods( telnyxMethod, CALL_COMMANDS, diff --git a/src/resources/ClientStateUpdate.ts b/src/resources/ClientStateUpdate.ts deleted file mode 100644 index b71dda0..0000000 --- a/src/resources/ClientStateUpdate.ts +++ /dev/null @@ -1,6 +0,0 @@ -import TelnyxResource from '../TelnyxResource'; - -export const ClientStateUpdate = TelnyxResource.extend({ - path: '/actions/client_state_update', - includeBasic: ['update'], -}); diff --git a/src/resources/FaxApplications.ts b/src/resources/FaxApplications.ts index b7ffef5..730ec68 100644 --- a/src/resources/FaxApplications.ts +++ b/src/resources/FaxApplications.ts @@ -33,8 +33,6 @@ export const FaxApplications = TelnyxResource.extend({ list: telnyxMethod({ method: 'GET', methodType: 'list', - - transformResponseData: transformResponseData, }), create: telnyxMethod({ diff --git a/src/resources/Faxes.ts b/src/resources/Faxes.ts index c6c2343..2914acd 100644 --- a/src/resources/Faxes.ts +++ b/src/resources/Faxes.ts @@ -25,8 +25,6 @@ export const Faxes = TelnyxResource.extend({ list: telnyxMethod({ method: 'GET', methodType: 'list', - - transformResponseData: transformResponseData, }), create: telnyxMethod({ diff --git a/src/resources/FqdnConnections.ts b/src/resources/FqdnConnections.ts index 5f08031..2214f2d 100644 --- a/src/resources/FqdnConnections.ts +++ b/src/resources/FqdnConnections.ts @@ -33,8 +33,6 @@ export const FqdnConnections = TelnyxResource.extend({ list: telnyxMethod({ method: 'GET', methodType: 'list', - - transformResponseData: transformResponseData, }), create: telnyxMethod({ diff --git a/src/resources/Fqdns.ts b/src/resources/Fqdns.ts index 35b9e44..830e40f 100644 --- a/src/resources/Fqdns.ts +++ b/src/resources/Fqdns.ts @@ -33,8 +33,6 @@ export const Fqdns = TelnyxResource.extend({ list: telnyxMethod({ method: 'GET', methodType: 'list', - - transformResponseData: transformResponseData, }), create: telnyxMethod({ diff --git a/src/resources/InboundChannels.ts b/src/resources/InboundChannels.ts index ae91c21..59c84bc 100644 --- a/src/resources/InboundChannels.ts +++ b/src/resources/InboundChannels.ts @@ -5,7 +5,7 @@ export const InboundChannels = TelnyxResource.extend({ path: 'inbound_channels', includeBasic: ['list', 'retrieve'], - ListInboundChannels: telnyxMethod({ + listInboundChannels: telnyxMethod({ method: 'GET', path: '/phone_numbers/inbound_channels', }), diff --git a/src/resources/InventoryCoverage.ts b/src/resources/InventoryCoverage.ts index 619a12e..cedce85 100644 --- a/src/resources/InventoryCoverage.ts +++ b/src/resources/InventoryCoverage.ts @@ -4,6 +4,11 @@ const telnyxMethod = TelnyxResource.method; export const InventoryCoverage = TelnyxResource.extend({ path: 'inventory_coverage', + retrieve: telnyxMethod({ + method: 'GET', + methodType: 'list', + }), + request: telnyxMethod({ method: 'GET', methodType: 'list', diff --git a/src/resources/Messages.ts b/src/resources/Messages.ts index 94024b2..cb2036d 100644 --- a/src/resources/Messages.ts +++ b/src/resources/Messages.ts @@ -1,11 +1,6 @@ import TelnyxResource from '../TelnyxResource'; -import {MessagesAlphanumericSenderId} from './MessagesAlphanumericSenderId'; export const Messages = TelnyxResource.extend({ path: 'messages', includeBasic: ['create', 'retrieve'], - - nestedResources: { - AlphanumericSenderId: MessagesAlphanumericSenderId, - }, }); diff --git a/src/resources/MessagesAlphanumericSenderId.ts b/src/resources/MessagesAlphanumericSenderId.ts deleted file mode 100644 index b5ab906..0000000 --- a/src/resources/MessagesAlphanumericSenderId.ts +++ /dev/null @@ -1,6 +0,0 @@ -import TelnyxResource from '../TelnyxResource'; - -export const MessagesAlphanumericSenderId = TelnyxResource.extend({ - path: 'messages/alphanumeric_sender_id', - includeBasic: ['create'], -}); diff --git a/src/resources/MessagingHostedNumber.ts b/src/resources/MessagingHostedNumber.ts deleted file mode 100644 index 43307a1..0000000 --- a/src/resources/MessagingHostedNumber.ts +++ /dev/null @@ -1,27 +0,0 @@ -import TelnyxResource from '../TelnyxResource'; -const telnyxMethod = TelnyxResource.method; - -export const MessagingHostedNumber = TelnyxResource.extend({ - path: 'messaging_hosted_number', - includeBasic: ['list', 'retrieve', 'delete', 'create'], - - ListMessagingHostedNumberOrders: telnyxMethod({ - method: 'GET', - path: '/messaging_hosted_number_orders', - }), - DeleteMessagingHostedNumber: telnyxMethod({ - method: 'DELETE', - path: '/messaging_hosted_numbers/{id}', - urlParams: ['id'], - }), - GetMessagingHostedNumberOrder: telnyxMethod({ - method: 'GET', - path: '/messaging_hosted_number_orders/{id}', - urlParams: ['id'], - }), - UploadMessagingHostedNumberOrderFile: telnyxMethod({ - method: 'POST', - path: '/messaging_hosted_number_orders/{id}/actions/file_upload', - urlParams: ['id'], - }), -}); diff --git a/src/resources/MessagingHostedNumbers.ts b/src/resources/MessagingHostedNumbers.ts index 5595286..6d005c4 100644 --- a/src/resources/MessagingHostedNumbers.ts +++ b/src/resources/MessagingHostedNumbers.ts @@ -1,6 +1,6 @@ import TelnyxResource from '../TelnyxResource'; export const MessagingHostedNumbers = TelnyxResource.extend({ - path: '../id/actions/file_upload', - includeBasic: ['retrieve'], + path: 'messaging_hosted_numbers', + includeBasic: ['del'], }); diff --git a/src/resources/MessagingPhoneNumbers.ts b/src/resources/MessagingPhoneNumbers.ts deleted file mode 100644 index d74e67e..0000000 --- a/src/resources/MessagingPhoneNumbers.ts +++ /dev/null @@ -1,6 +0,0 @@ -import TelnyxResource from '../TelnyxResource'; - -export const MessagingPhoneNumbers = TelnyxResource.extend({ - path: 'messaging_phone_numbers', - includeBasic: ['list', 'retrieve', 'update'], -}); diff --git a/src/resources/MessagingSenderIds.ts b/src/resources/MessagingSenderIds.ts deleted file mode 100644 index b469e29..0000000 --- a/src/resources/MessagingSenderIds.ts +++ /dev/null @@ -1,6 +0,0 @@ -import TelnyxResource from '../TelnyxResource'; - -export const MessagingSenderIds = TelnyxResource.extend({ - path: 'alphanumeric_sender_ids', // THIS URL DOES NOT EXISTS ON DOCS - includeBasic: ['list', 'retrieve', 'create', 'del'], -}); diff --git a/src/resources/OutboundVoiceProfiles.ts b/src/resources/OutboundVoiceProfiles.ts index c7ac29e..4d3282e 100644 --- a/src/resources/OutboundVoiceProfiles.ts +++ b/src/resources/OutboundVoiceProfiles.ts @@ -34,13 +34,7 @@ function transformResponseData( export const OutboundVoiceProfiles = TelnyxResource.extend({ path: 'outbound_voice_profiles', - - list: telnyxMethod({ - method: 'GET', - methodType: 'list', - - transformResponseData: transformResponseData, - }), + includeBasic: ['list', 'update', 'del'], create: telnyxMethod({ method: 'POST', @@ -55,9 +49,4 @@ export const OutboundVoiceProfiles = TelnyxResource.extend({ transformResponseData: transformResponseData, }), - - del: telnyxMethod({ - method: 'DELETE', - path: '/{id}', - }), }); diff --git a/src/resources/PublicKey.ts b/src/resources/PublicKey.ts deleted file mode 100644 index b321322..0000000 --- a/src/resources/PublicKey.ts +++ /dev/null @@ -1,10 +0,0 @@ -import TelnyxResource from '../TelnyxResource'; -const telnyxMethod = TelnyxResource.method; - -export const PublicKey = TelnyxResource.extend({ - path: 'public_key', - - retrieve: telnyxMethod({ - method: 'GET', - }), -}); diff --git a/src/resources/RegulatoryRequirements.ts b/src/resources/RegulatoryRequirements.ts index 32f4766..a9ba86f 100644 --- a/src/resources/RegulatoryRequirements.ts +++ b/src/resources/RegulatoryRequirements.ts @@ -3,5 +3,5 @@ import TelnyxResource from '../TelnyxResource'; export const RegulatoryRequirements = TelnyxResource.extend({ path: 'regulatory_requirements', - includeBasic: ['list', 'retrieve'], + includeBasic: ['list'], }); diff --git a/src/resources/UpdateClientState.ts b/src/resources/UpdateClientState.ts deleted file mode 100644 index d7bd119..0000000 --- a/src/resources/UpdateClientState.ts +++ /dev/null @@ -1,25 +0,0 @@ -import TelnyxResource from '../TelnyxResource'; -import * as utils from '../utils'; -const telnyxMethod = TelnyxResource.method; - -import {ResponsePayload, TelnyxObject} from '../Types'; - -function transformResponseData( - response: ResponsePayload, - telnyx: TelnyxObject, -) { - return utils.addResourceToResponseData( - response, - telnyx, - 'updateClientState', - {}, - ); -} -export const UpdateClientState = TelnyxResource.extend({ - path: 'calls/{call_control_id}/actions/client_state_update', - update: telnyxMethod({ - urlParams: ['call_control_id'], - method: 'PUT', - transformResponseData: transformResponseData, - }), -}); diff --git a/src/resources/VerifyProfiles.ts b/src/resources/VerifyProfiles.ts index aaec359..034f43e 100644 --- a/src/resources/VerifyProfiles.ts +++ b/src/resources/VerifyProfiles.ts @@ -17,17 +17,8 @@ function transformResponseData( } export const VerifyProfiles = TelnyxResource.extend({ - path: 'sim_cards', - includeBasic: ['update'], - - delete: telnyxMethod({ - method: 'DELETE', - path: '/{verify_profile_id}', - urlParams: ['verify_profile_id'], - paramsNames: ['id'], - - transformResponseData: transformResponseData, - }), + path: 'verify_profiles', + includeBasic: ['list', 'update', 'del'], save: telnyxMethod({ method: 'PATCH', @@ -47,13 +38,6 @@ export const VerifyProfiles = TelnyxResource.extend({ transformResponseData: transformResponseData, }), - list: telnyxMethod({ - method: 'GET', - methodType: 'list', - - transformResponseData: transformResponseData, - }), - create: telnyxMethod({ method: 'POST', diff --git a/src/telnyx.ts b/src/telnyx.ts index e4cca98..b7e0fe4 100644 --- a/src/telnyx.ts +++ b/src/telnyx.ts @@ -37,7 +37,6 @@ import {Campaign} from './resources/Campaign'; import {CampaignBuilder} from './resources/CampaignBuilder'; import {CdrUsageReports} from './resources/CdrUsageReports'; import {Channelzones} from './resources/Channelzones'; -import {ClientStateUpdate} from './resources/ClientStateUpdate'; import {Conferences} from './resources/Conferences'; import {Connections} from './resources/Connections'; import {CredentialConnections} from './resources/CredentialConnections'; @@ -70,14 +69,10 @@ import {MdrDetailReports} from './resources/MdrDetailReports'; import {MdrUsageReports} from './resources/MdrUsageReports'; import {MediaStorageApi} from './resources/MediaStorageApi'; import {Messages} from './resources/Messages'; -import {MessagesAlphanumericSenderId} from './resources/MessagesAlphanumericSenderId'; -import {MessagingHostedNumber} from './resources/MessagingHostedNumber'; import {MessagingHostedNumberOrders} from './resources/MessagingHostedNumberOrders'; import {MessagingHostedNumbers} from './resources/MessagingHostedNumbers'; -import {MessagingPhoneNumbers} from './resources/MessagingPhoneNumbers'; import {MessagingProfileMetrics} from './resources/MessagingProfileMetrics'; import {MessagingProfiles} from './resources/MessagingProfiles'; -import {MessagingSenderIds} from './resources/MessagingSenderIds'; import {MessagingShortCodes} from './resources/MessagingShortCodes'; import {MessagingTollfreeVerification} from './resources/MessagingTollfreeVerification'; import {MessagingUrlDomains} from './resources/MessagingUrlDomains'; @@ -113,7 +108,6 @@ import {PortoutRequests} from './resources/PortoutRequests'; import {PresignedObjectUrls} from './resources/PresignedObjectUrls'; import {PrivateWirelessGateways} from './resources/PrivateWirelessGateways'; import {PublicInternetGateways} from './resources/PublicInternetGateways'; -import {PublicKey} from './resources/PublicKey'; import {PushCredentials} from './resources/PushCredentials'; import {Queues} from './resources/Queues'; import {RecordingsCommands} from './resources/RecordingsCommands'; @@ -141,7 +135,6 @@ import {SimCards} from './resources/SimCards'; import {StorageBuckets} from './resources/StorageBuckets'; import {TelephonyCredentials} from './resources/TelephonyCredentials'; import {TexmlApplications} from './resources/TexmlApplications'; -import {UpdateClientState} from './resources/UpdateClientState'; import {Verifications} from './resources/Verifications'; import {VerifiedNumbers} from './resources/VerifiedNumbers'; import {Verify} from './resources/Verify'; @@ -218,7 +211,6 @@ export function createTelnyx() { CampaignBuilder, CdrUsageReports, Channelzones, - ClientStateUpdate, Conferences, Connections, CredentialConnections, @@ -251,14 +243,10 @@ export function createTelnyx() { MdrUsageReports, MediaStorageApi, Messages, - MessagesAlphanumericSenderId, - MessagingHostedNumber, MessagingHostedNumberOrders, MessagingHostedNumbers, - MessagingPhoneNumbers, MessagingProfileMetrics, MessagingProfiles, - MessagingSenderIds, MessagingShortCodes, MessagingTollfreeVerification, MessagingUrlDomains, @@ -294,7 +282,6 @@ export function createTelnyx() { PresignedObjectUrls, PrivateWirelessGateways, PublicInternetGateways, - PublicKey, PushCredentials, Queues, RecordingsCommands, @@ -322,7 +309,6 @@ export function createTelnyx() { StorageBuckets, TelephonyCredentials, TexmlApplications, - UpdateClientState, Verifications, VerifiedNumbers, Verify, diff --git a/src/test/resources/ActionsSimCards.test.ts b/src/test/resources/ActionsSimCards.test.ts index 5a2f88f..9158689 100644 --- a/src/test/resources/ActionsSimCards.test.ts +++ b/src/test/resources/ActionsSimCards.test.ts @@ -3,6 +3,7 @@ const telnyx = testUtils.getTelnyxMock(); const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); +// not found in API Spec https://stoplight.io/prism/errors#NO_PATH_MATCHED_ERROR: Route not resolved, no path matched describe.skip('SimCards Actions Resource', function () { const registerData = { registration_codes: ['2578318790'], diff --git a/src/test/resources/ActivateDeactivateBulkCredentials.test.ts b/src/test/resources/ActivateDeactivateBulkCredentials.test.ts index 92d6fa0..6fa8a49 100644 --- a/src/test/resources/ActivateDeactivateBulkCredentials.test.ts +++ b/src/test/resources/ActivateDeactivateBulkCredentials.test.ts @@ -3,8 +3,8 @@ const telnyx = testUtils.getTelnyxMock(); const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); -// prism mock can figure this dynamic path param match -// [HTTP SERVER] post /actions/activate/telephony_credentials ✖ error Request terminated with error: https://stoplight.io/prism/errors#NO_PATH_MATCHED_ERROR: Route not resolved, no path matched +// prism mock can't figure out this dynamic path param match +// [HTTP SERVER] post /actions/activate/telephony_credentials ✖ error Request terminated with error: https://stoplight.io/prism/errors#NO_PATH_MATCHED_ERROR: Route not resolved, no path matched describe.skip('ActivateDeactivateBulkCredentials', function () { describe('create', function () { function responseFn(response: ResponsePayload) { diff --git a/src/test/resources/BulkTelephonyCredentials.test.ts b/src/test/resources/BulkTelephonyCredentials.test.ts index e8ef7a6..0daeef7 100644 --- a/src/test/resources/BulkTelephonyCredentials.test.ts +++ b/src/test/resources/BulkTelephonyCredentials.test.ts @@ -3,7 +3,7 @@ const telnyx = testUtils.getTelnyxMock(); const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); -// not found in API Spec +// not found in API Spec https://stoplight.io/prism/errors#NO_PATH_MATCHED_ERROR: Route not resolved, no path matched describe.skip('Bulk Telephony Credentials', function () { describe('create', function () { function responseFn(response: ResponsePayload) { diff --git a/src/test/resources/Calls.test.ts b/src/test/resources/Calls.test.ts index 3649142..247b964 100644 --- a/src/test/resources/Calls.test.ts +++ b/src/test/resources/Calls.test.ts @@ -189,6 +189,32 @@ describe('Calls Resource', function () { }); }); + describe('updateClientState', function () { + function responseFn(response: ResponsePayload) { + expect(response).toHaveProperty('data'); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.calls + .updateClientState('891510ac-f3e4-11e8-af5b-de00688a4901', { + client_state: 'aGF2ZSBhIG5pY2UgZGF5ID1d', + }) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.calls + .updateClientState( + '891510ac-f3e4-11e8-af5b-de00688a4901', + {client_state: 'aGF2ZSBhIG5pY2UgZGF5ID1d'}, + TEST_AUTH_KEY, + ) + .then(responseFn); + }); + }); + COMMANDS.forEach(function (command) { describe(command, function () { const camelCaseCommand = utils.snakeToCamelCase(command); diff --git a/src/test/resources/ClientStateUpdate.test.ts b/src/test/resources/ClientStateUpdate.test.ts deleted file mode 100644 index 2729504..0000000 --- a/src/test/resources/ClientStateUpdate.test.ts +++ /dev/null @@ -1,36 +0,0 @@ -import {type ResponsePayload, utils as testUtils} from '../utils'; -const telnyx = testUtils.getTelnyxMock(); - -const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); - -// resource not found in the spec -describe.skip('Client State Update', function () { - describe('update', function () { - function responseFn(response: ResponsePayload) { - expect(response).toHaveProperty('data'); - expect(response.data).toHaveProperty('result'); - } - - test('Sends the correct request', function () { - // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.clientStateUpdate - .update('35146afd-df93-4963-b1e9-1a085e2ae874', { - client_state: 'aGF2ZSBhIG5pY2UgZGF5ID1d', - }) - .then(responseFn); - }); - - test('Sends the correct request [with specified auth]', function () { - // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.clientStateUpdate - .update( - '35146afd-df93-4963-b1e9-1a085e2ae874', - { - client_state: 'aGF2ZSBhIG5pY2UgZGF5ID1d', - }, - TEST_AUTH_KEY, - ) - .then(responseFn); - }); - }); -}); diff --git a/src/test/resources/InventoryCoverage.test.ts b/src/test/resources/InventoryCoverage.test.ts index 56a3435..b9088af 100644 --- a/src/test/resources/InventoryCoverage.test.ts +++ b/src/test/resources/InventoryCoverage.test.ts @@ -5,7 +5,7 @@ const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); describe('InventoryCoverage Resource', function () { // not included in the spec - describe.skip('request', function () { + describe('request', function () { function responseFn(response: ResponsePayloadList) { expect(response.data[0]).toHaveProperty('number_type'); expect(response.data[0]).toHaveProperty('group'); @@ -22,7 +22,9 @@ describe('InventoryCoverage Resource', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder return telnyx.inventoryCoverage .request({ - filter: {npa: '318', nxx: '202', country_code: 'US', groupBy: 'nxx'}, + filter: {npa: '318', nxx: '202', country_code: 'US', groupBy: 'npa'}, + // this is due to https://github.com/stoplightio/prism/issues/2443 + 'filter%5bgroupby%5d': 'npa', }) .then(responseFn); }); @@ -36,8 +38,10 @@ describe('InventoryCoverage Resource', function () { npa: '318', nxx: '202', country_code: 'US', - groupBy: 'nxx', + groupBy: 'npa', }, + // this is due to https://github.com/stoplightio/prism/issues/2443 + 'filter%5bgroupby%5d': 'npa', }, TEST_AUTH_KEY, ) diff --git a/src/test/resources/MessagesSenderIds.test.ts b/src/test/resources/MessagesSenderIds.test.ts deleted file mode 100644 index 667e150..0000000 --- a/src/test/resources/MessagesSenderIds.test.ts +++ /dev/null @@ -1,51 +0,0 @@ -import {type ResponsePayload, utils as testUtils} from '../utils'; -const telnyx = testUtils.getTelnyxMock(); - -const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); - -type ResponsePayloadMessages = ResponsePayload & { - data: { - from: string; - to: string[]; - }; -}; - -describe.skip('Messages Alphanumeric Sender Ids Resource', function () { - const createData = { - text: 'Hello, World!', - from: '+18665552368', - to: [{address: '+18665552367'}], - messaging_profile_id: '073dd98e-0c85-496b-970f-dd3b7ae21c2se', - }; - - function responseFn(response: ResponsePayloadMessages) { - expect(response.data).toMatchObject({ - text: 'Hello, World!', - from: '+18665552368', - }); - expect(response.data.to[0]).toMatchObject({address: '+18665552367'}); - } - - describe('create', function () { - test('Sends the correct request', function () { - // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.messages.alphanumericSenderId - .create(createData) - .then(responseFn); - }); - - test('Sends the correct request [with specified auth]', function () { - // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.messages.alphanumericSenderId - .create(createData, TEST_AUTH_KEY) - .then(responseFn); - }); - - test('Sends the correct request [with specified auth in options]', function () { - // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.messages.alphanumericSenderId - .create(createData, {api_key: TEST_AUTH_KEY}) - .then(responseFn); - }); - }); -}); diff --git a/src/test/resources/MessagingHostedNumbers.test.ts b/src/test/resources/MessagingHostedNumbers.test.ts index 34fd761..eda0d0f 100644 --- a/src/test/resources/MessagingHostedNumbers.test.ts +++ b/src/test/resources/MessagingHostedNumbers.test.ts @@ -1,7 +1,9 @@ import {type ResponsePayload, utils as testUtils} from '../utils'; const telnyx = testUtils.getTelnyxMock(); +const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); -describe('retrieve', function () { +// skip while openapi spec is not updated +describe.skip('delete', function () { function responseFn(response: ResponsePayload) { if (response.data) { expect(response.data).toHaveProperty('id'); @@ -10,8 +12,14 @@ describe('retrieve', function () { }); } } + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.messagingHostedNumbers.del('123').then(responseFn); + }); test('Sends the correct request [with specified auth]', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.messagingHostedNumbers.retrieve('123').then(responseFn); + return telnyx.messagingHostedNumbers + .del('123', TEST_AUTH_KEY) + .then(responseFn); }); }); diff --git a/src/test/resources/MessagingPhoneNumbers.test.ts b/src/test/resources/MessagingPhoneNumbers.test.ts deleted file mode 100644 index a271eb6..0000000 --- a/src/test/resources/MessagingPhoneNumbers.test.ts +++ /dev/null @@ -1,73 +0,0 @@ -import { - type ResponsePayloadList, - type ResponsePayload, - utils as testUtils, -} from '../utils'; -const telnyx = testUtils.getTelnyxMock(); - -const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); - -describe.skip('MessagingPhoneNumbers Resource', function () { - describe('retrieve', function () { - function responseFn(response: ResponsePayload) { - expect(response.data).toMatchObject({ - id: '123', - record_type: 'messaging_phone_number', - }); - } - - test('Sends the correct request', function () { - // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.messagingPhoneNumbers.retrieve('123').then(function ( - response: ResponsePayload, - ) { - expect(response.data).toMatchObject(responseFn); - }); - }); - - test('Sends the correct request [with specified auth]', function () { - // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.messagingPhoneNumbers - .retrieve('123', TEST_AUTH_KEY) - .then(function (response: ResponsePayload) { - expect(response.data).toMatchObject(responseFn); - }); - }); - }); - - describe('list', function () { - function responseFn(response: ResponsePayloadList) { - expect(response.data[0]).toHaveProperty('id'); - expect(response.data[0]).toHaveProperty('phone_number'); - expect(response.data[0]).toMatchObject({ - record_type: 'messaging_phone_number', - }); - } - - test('Sends the correct request', function () { - // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.messagingPhoneNumbers.list().then(responseFn); - }); - test('Sends the correct request [with specified auth]', function () { - // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.messagingPhoneNumbers.list(TEST_AUTH_KEY).then(responseFn); - }); - }); - - describe('update', function () { - test('Sends the correct request', function () { - // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.messagingPhoneNumbers - .update('123', { - messaging_product: 'P2P', - }) - .then(function (response: ResponsePayload) { - expect(response.data).toMatchObject({ - id: '123', - messaging_product: 'P2P', - record_type: 'messaging_phone_number', - }); - }); - }); - }); -}); diff --git a/src/test/resources/MessagingSenderIds.test.ts b/src/test/resources/MessagingSenderIds.test.ts deleted file mode 100644 index 5505a7b..0000000 --- a/src/test/resources/MessagingSenderIds.test.ts +++ /dev/null @@ -1,125 +0,0 @@ -import { - type ResponsePayloadList, - type ResponsePayload, - utils as testUtils, -} from '../utils'; -const telnyx = testUtils.getTelnyxMock(); - -const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); - -describe.skip('Messaging AlphanumericSenderIds Resource', function () { - describe('retrieve', function () { - function responseFn(response: ResponsePayload) { - expect(response.data).toMatchObject({ - id: '123', - messaging_profile_id: '123', - record_type: 'alphanumeric_sender_id', - }); - } - - test('Sends the correct request', function () { - // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.messagingSenderIds.retrieve('123').then(function ( - response: ResponsePayload, - ) { - expect(response.data).toMatchObject(responseFn); - }); - }); - - test('Sends the correct request [with specified auth]', function () { - // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.messagingSenderIds - .retrieve('123', TEST_AUTH_KEY) - .then(function (response: ResponsePayload) { - expect(response.data).toMatchObject(responseFn); - }); - }); - }); - - describe('create', function () { - function responseFn(response: ResponsePayload) { - expect(response.data).toMatchObject({ - alphanumeric_sender_id: 'Summer Campaign', - record_type: 'alphanumeric_sender_id', - }); - } - - function responseFnNoBody(response: ResponsePayload) { - expect(response.data).toHaveProperty('id'); - expect(response.data).toHaveProperty('alphanumeric_sender_id'); - expect(response.data).toHaveProperty('record_type'); - } - - test('Sends the correct request', function () { - // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.messagingSenderIds - .create({alphanumeric_sender_id: 'Summer Campaign'}) - .then(responseFn); - }); - - test('Sends the correct request [with specified auth]', function () { - // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.messagingSenderIds - .create({alphanumeric_sender_id: 'Summer Campaign'}, TEST_AUTH_KEY) - .then(responseFn); - }); - - test('Sends the correct request [with specified auth and no body]', function () { - // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.messagingSenderIds - .create({}, TEST_AUTH_KEY) - .then(responseFnNoBody); - }); - - test('Sends the correct request [with specified auth in options]', function () { - // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.messagingSenderIds - .create( - {alphanumeric_sender_id: 'Summer Campaign'}, - {api_key: TEST_AUTH_KEY}, - ) - .then(responseFn); - }); - - test('Sends the correct request [with specified auth in options and no body]', function () { - // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.messagingSenderIds - .create({}, {api_key: TEST_AUTH_KEY}) - .then(responseFnNoBody); - }); - }); - - describe('del', function () { - test('Sends the correct request', function () { - // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.messagingSenderIds.del('123').then(function ( - response: ResponsePayload, - ) { - expect(response.data).toMatchObject({ - id: '123', - record_type: 'alphanumeric_sender_id', - }); - }); - }); - }); - - describe('list', function () { - function responseFn(response: ResponsePayloadList) { - expect(response.data[0]).toHaveProperty('id'); - expect(response.data[0]).toHaveProperty('alphanumeric_sender_id'); - expect(response.data[0]).toMatchObject({ - record_type: 'alphanumeric_sender_id', - }); - } - - test('Sends the correct request', function () { - // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.messagingSenderIds.list().then(responseFn); - }); - - test('Sends the correct request [with specified auth]', function () { - // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.messagingSenderIds.list(TEST_AUTH_KEY).then(responseFn); - }); - }); -}); diff --git a/src/test/resources/PhoneNumbersRegulatoryRequirements.test.ts b/src/test/resources/PhoneNumbersRegulatoryRequirements.test.ts index 25f4c54..deb2c11 100644 --- a/src/test/resources/PhoneNumbersRegulatoryRequirements.test.ts +++ b/src/test/resources/PhoneNumbersRegulatoryRequirements.test.ts @@ -9,8 +9,6 @@ type ResponsePayloadPhoneNumberRegulatoryRequirements = ResponsePayloadList & { }[]; }; -// Skip tests as path out of sync with mock for now -// describe.skip('PhoneNumberRegulatoryRequirements Resource', function () { describe('PhoneNumberRegulatoryRequirements Resource', function () { describe('list', function () { function responseFn( diff --git a/src/test/resources/PortingOrders.test.ts b/src/test/resources/PortingOrders.test.ts index 4956c38..0022c25 100644 --- a/src/test/resources/PortingOrders.test.ts +++ b/src/test/resources/PortingOrders.test.ts @@ -154,7 +154,6 @@ describe('PortingOrders Resource', function () { }); }); - // describe.skip('confirmOrder', function () { describe('confirmOrder', function () { test('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder diff --git a/src/test/resources/PublicKey.test.ts b/src/test/resources/PublicKey.test.ts deleted file mode 100644 index 8026c42..0000000 --- a/src/test/resources/PublicKey.test.ts +++ /dev/null @@ -1,18 +0,0 @@ -import {type ResponsePayload, utils as testUtils} from '../utils'; - -const telnyx = testUtils.getTelnyxMock(); - -describe.skip('PublicKey Resource', function () { - describe('retrieve', function () { - test('Sends the correct request', function () { - // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.publicKey.retrieve().then(function ( - response: ResponsePayload, - ) { - expect(response.data).toMatchObject({record_type: 'public_key'}); - expect(response.data).toHaveProperty('public'); - expect(response.data).toHaveProperty('organization_id'); - }); - }); - }); -}); diff --git a/src/test/resources/RegulatoryRequirements.test.ts b/src/test/resources/RegulatoryRequirements.test.ts index e422408..52dc8a0 100644 --- a/src/test/resources/RegulatoryRequirements.test.ts +++ b/src/test/resources/RegulatoryRequirements.test.ts @@ -1,46 +1,31 @@ -import { - type ResponsePayloadList, - type ResponsePayload, - utils as testUtils, -} from '../utils'; +import {utils as testUtils} from '../utils'; const telnyx = testUtils.getTelnyxMock(); const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); -describe.skip('RegulatoryRequirements Resource', function () { - describe('retrieve', function () { - function responseFn(response: ResponsePayload) { - expect(response.data).toHaveProperty('requirement_type'); - expect(response.data).toHaveProperty('label'); - expect(response.data).toHaveProperty('description'); - expect(response.data).toHaveProperty('field_type'); - expect(response.data).toMatchObject({ - record_type: 'regulatory_requirement', - }); - } - - test('Sends the correct request', function () { - // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.regulatoryRequirements.retrieve('123').then(responseFn); - }); - - test('Sends the correct request [with specified auth]', function () { - // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.regulatoryRequirements - .retrieve('123', TEST_AUTH_KEY) - .then(responseFn); - }); - }); +type ResponsePayloadListRegulatoryRequirement = { + data: { + regulatory_requirements: {metrics: object}[]; + }[]; +}; +describe('RegulatoryRequirements Resource', function () { describe('list', function () { - function responseFn(response: ResponsePayloadList) { - expect(response.data[0]).toHaveProperty('requirement_type'); - expect(response.data[0]).toHaveProperty('label'); - expect(response.data[0]).toHaveProperty('description'); - expect(response.data[0]).toHaveProperty('field_type'); - expect(response.data[0]).toMatchObject({ - record_type: 'regulatory_requirement', - }); + function responseFn(response: ResponsePayloadListRegulatoryRequirement) { + expect(response.data[0]).toHaveProperty('phone_number_type'); + expect(response.data[0]).toHaveProperty('action'); + expect(response.data[0]).toHaveProperty('phone_number_type'); + expect(response.data[0]).toHaveProperty('regulatory_requirements'); + expect(response.data[0]?.regulatory_requirements[0]).toHaveProperty( + 'acceptance_criteria', + ); + expect(response.data[0]?.regulatory_requirements[0]).toHaveProperty( + 'description', + ); + expect(response.data[0]?.regulatory_requirements[0]).toHaveProperty('id'); + expect(response.data[0]?.regulatory_requirements[0]).toHaveProperty( + 'name', + ); } test('Sends the correct request', function () { diff --git a/src/test/resources/SimCardGroups.test.ts b/src/test/resources/SimCardGroups.test.ts index 0d6c3ce..3e84a58 100644 --- a/src/test/resources/SimCardGroups.test.ts +++ b/src/test/resources/SimCardGroups.test.ts @@ -20,7 +20,6 @@ type ResponsePayloadSimCardGroups = ResponsePayload & { }; }; -// describe.skip('SimCardGroups Resource', function () { describe('SimCardGroups Resource', function () { describe('retrieve', function () { function responseFn(response: ResponsePayloadSimCardGroups) { diff --git a/src/test/resources/SimCards.test.ts b/src/test/resources/SimCards.test.ts index 68b779f..12032d6 100644 --- a/src/test/resources/SimCards.test.ts +++ b/src/test/resources/SimCards.test.ts @@ -122,7 +122,6 @@ describe('SimCards Resource', function () { }); }); - // describe.skip('Nested', function () { describe('Nested', function () { ['activate', 'deactivate', 'enable', 'disable', 'set_standby'].forEach( function (command) { @@ -247,7 +246,6 @@ describe('SimCards Resource', function () { }); }); - // describe.skip('PublicIP', function () { describe('PublicIP', function () { function responseFn(response: ResponsePayload) { expect(response.data.record_type).toBe('sim_card_public_ip'); diff --git a/src/test/resources/UpdateClientState.test.ts b/src/test/resources/UpdateClientState.test.ts deleted file mode 100644 index 791a6fc..0000000 --- a/src/test/resources/UpdateClientState.test.ts +++ /dev/null @@ -1,30 +0,0 @@ -import {type ResponsePayload, utils as testUtils} from '../utils'; -const telnyx = testUtils.getTelnyxMock(); - -const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); - -describe('Update Client State', function () { - describe('update', function () { - function responseFn(response: ResponsePayload) { - expect(response).toHaveProperty('data'); - } - - test('Sends the correct request', function () { - // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.updateClientState - .update('call_control_id', {client_state: 'aGF2ZSBhIG5pY2UgZGF5ID1d'}) - .then(responseFn); - }); - - test('Sends the correct request [with specified auth]', function () { - // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.updateClientState - .update( - 'call_control_id', - {client_state: 'aGF2ZSBhIG5pY2UgZGF5ID1d'}, - TEST_AUTH_KEY, - ) - .then(responseFn); - }); - }); -}); diff --git a/types/TelnyxAPI.d.ts b/types/TelnyxAPI.d.ts index 46f666c..a692abb 100644 --- a/types/TelnyxAPI.d.ts +++ b/types/TelnyxAPI.d.ts @@ -24938,14 +24938,13 @@ export interface components { */ command_id?: string; }; - /** @example [ + /** @example * { * "record_type": "messaging_hosted_number", * "id": "bf6307bd-884d-4c1f-b6ea-c62b8c495d3c", * "phone_number": "+18665550001", * "status": "successful" - * } - * ] */ + * } */ HostedNumber: { /** @example messaging_hosted_number */ record_type?: string; From c52b5f75f2add6ffd54d4fb5a00387beca8cf16a Mon Sep 17 00:00:00 2001 From: Lucas Rosa Date: Thu, 3 Oct 2024 00:38:43 -0300 Subject: [PATCH 35/59] update changelog --- CHANGELOG.md | 10 ++++++++++ VERSION | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1df84c0..9ca2241 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,16 @@ ## v2 +### v2.0.0-alpha.5 + +- Remove `ClientStateUpdate` resource +- Remove `MessagesAlphanumericSenderId` resource +- Remove `MessagingHostedNumber` resource +- Remove `MessagingPhoneNumbers` resource +- Remove `MessagingSenderIds` resource +- Remove `PublicKey` resource +- Remove `UpdateClientState` resource + ### v2.0.0-alpha.4 - Add `Addresses` example diff --git a/VERSION b/VERSION index c4e1040..fe5c16b 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.0.0-alpha.4 +2.0.0-alpha.5 diff --git a/package-lock.json b/package-lock.json index cd13a0c..8d69987 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "telnyx", - "version": "2.0.0-alpha.4", + "version": "2.0.0-alpha.5", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "telnyx", - "version": "2.0.0-alpha.4", + "version": "2.0.0-alpha.5", "license": "MIT", "devDependencies": { "@eslint/js": "^9.10.0", diff --git a/package.json b/package.json index b34638f..f2ef2d3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "telnyx", - "version": "2.0.0-alpha.4", + "version": "2.0.0-alpha.5", "description": "Telnyx API Node SDK", "keywords": [ "telnyx", From 82622c294b4558d6c44276c2e28cf80c01656d68 Mon Sep 17 00:00:00 2001 From: Lucas Rosa Date: Tue, 8 Oct 2024 20:48:30 -0300 Subject: [PATCH 36/59] update stale resources --- CHANGELOG.md | 6 + src/resources/AuditEvents.ts | 6 + src/resources/AutorespConfigs.ts | 2 +- src/resources/CsvDownloads.ts | 17 -- src/resources/CustomerServiceRecord.ts | 20 -- src/resources/CustomerServiceRecords.ts | 18 ++ src/resources/Debugging.ts | 12 - src/resources/DetailRecords.ts | 2 +- src/resources/DialogflowConnections.ts | 31 ++ src/resources/DialogflowIntegration.ts | 12 - src/resources/Events.ts | 6 - src/resources/ExternalConnections.ts | 97 +++--- src/resources/InboundChannels.ts | 12 - src/resources/InventoryCoverage.ts | 2 +- src/resources/InventoryLevel.ts | 12 - src/resources/IpAddresses.ts | 17 -- src/resources/IpRanges.ts | 17 -- src/resources/NotificationEvents.ts | 6 + src/resources/PhoneNumbersCsvDownloads.ts | 6 + src/resources/PortingEvents.ts | 14 + src/resources/PortoutEvents.ts | 14 + src/telnyx.ts | 32 +- src/test/resources/DetailRecords.test.ts | 9 +- src/test/resources/Events.test.ts | 33 -- src/test/resources/InventoryCoverage.test.ts | 44 +++ types/AuditEventsResource.d.ts | 18 ++ types/CallControlApplicationsResource.d.ts | 4 +- types/CustomerServiceRecordsResource.d.ts | 55 ++++ types/DetailRecordsResource.d.ts | 18 ++ types/DialogflowConnectionsResource.d.ts | 61 ++++ types/DynamicEmergencyAddressesResource.d.ts | 61 ++++ types/DynamicEmergencyEndpointsResource.d.ts | 58 ++++ types/DynamicEmergencyResource.d.ts | 8 + types/ExternalConnectionsResource.d.ts | 303 +++++++++++++++++++ types/FaxApplicationsResource.d.ts | 93 ++++++ types/FaxesResource.d.ts | 82 +++++ types/FqdnConnectionsResource.d.ts | 93 ++++++ types/FqdnsResource.d.ts | 94 ++++++ types/InventoryCoverageResource.d.ts | 23 ++ types/IpConnectionsResource.d.ts | 93 ++++++ types/IpsResource.d.ts | 68 +++++ types/NotificationEventsResource.d.ts | 18 ++ types/PhoneNumbersCsvDownloadsResource.d.ts | 44 +++ types/PortingEventsResource.d.ts | 43 +++ types/PortoutEventsResource.d.ts | 43 +++ types/TexmlApplicationsResource.d.ts | 72 +++++ types/index.d.ts | 32 +- 47 files changed, 1605 insertions(+), 226 deletions(-) create mode 100644 src/resources/AuditEvents.ts delete mode 100644 src/resources/CsvDownloads.ts delete mode 100644 src/resources/CustomerServiceRecord.ts create mode 100644 src/resources/CustomerServiceRecords.ts delete mode 100644 src/resources/Debugging.ts create mode 100644 src/resources/DialogflowConnections.ts delete mode 100644 src/resources/DialogflowIntegration.ts delete mode 100644 src/resources/Events.ts delete mode 100644 src/resources/InboundChannels.ts delete mode 100644 src/resources/InventoryLevel.ts delete mode 100644 src/resources/IpAddresses.ts delete mode 100644 src/resources/IpRanges.ts create mode 100644 src/resources/NotificationEvents.ts create mode 100644 src/resources/PhoneNumbersCsvDownloads.ts create mode 100644 src/resources/PortingEvents.ts create mode 100644 src/resources/PortoutEvents.ts delete mode 100644 src/test/resources/Events.test.ts create mode 100644 types/AuditEventsResource.d.ts create mode 100644 types/CustomerServiceRecordsResource.d.ts create mode 100644 types/DetailRecordsResource.d.ts create mode 100644 types/DialogflowConnectionsResource.d.ts create mode 100644 types/DynamicEmergencyAddressesResource.d.ts create mode 100644 types/DynamicEmergencyEndpointsResource.d.ts create mode 100644 types/DynamicEmergencyResource.d.ts create mode 100644 types/ExternalConnectionsResource.d.ts create mode 100644 types/FaxApplicationsResource.d.ts create mode 100644 types/FaxesResource.d.ts create mode 100644 types/FqdnConnectionsResource.d.ts create mode 100644 types/FqdnsResource.d.ts create mode 100644 types/InventoryCoverageResource.d.ts create mode 100644 types/IpConnectionsResource.d.ts create mode 100644 types/IpsResource.d.ts create mode 100644 types/NotificationEventsResource.d.ts create mode 100644 types/PhoneNumbersCsvDownloadsResource.d.ts create mode 100644 types/PortingEventsResource.d.ts create mode 100644 types/PortoutEventsResource.d.ts create mode 100644 types/TexmlApplicationsResource.d.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ca2241..876f1ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ ## v2 +### v2.0.0-alpha.6 + +- Remove `Debugging` dupe resource +- Update syntax on `Events` resources +- Update `ExternalConnections` resource + ### v2.0.0-alpha.5 - Remove `ClientStateUpdate` resource diff --git a/src/resources/AuditEvents.ts b/src/resources/AuditEvents.ts new file mode 100644 index 0000000..bf1efb7 --- /dev/null +++ b/src/resources/AuditEvents.ts @@ -0,0 +1,6 @@ +import TelnyxResource from '../TelnyxResource'; + +export const AuditEvents = TelnyxResource.extend({ + path: 'audit_events', + includeBasic: ['list'], +}); diff --git a/src/resources/AutorespConfigs.ts b/src/resources/AutorespConfigs.ts index 44d9b11..ae460c0 100644 --- a/src/resources/AutorespConfigs.ts +++ b/src/resources/AutorespConfigs.ts @@ -7,7 +7,7 @@ export const AutorespConfigs = TelnyxResource.extend({ update: telnyxMethod({ method: 'PUT', - path: '/messaging_profiles/{profile_id}/autoresp_configs/{autoresp_cfg_id}', + path: '/{autoresp_cfg_id}', urlParams: ['profile_id', 'autoresp_cfg_id'], }), }); diff --git a/src/resources/CsvDownloads.ts b/src/resources/CsvDownloads.ts deleted file mode 100644 index b372428..0000000 --- a/src/resources/CsvDownloads.ts +++ /dev/null @@ -1,17 +0,0 @@ -import TelnyxResource from '../TelnyxResource'; -const telnyxMethod = TelnyxResource.method; - -export const CsvDownloads = TelnyxResource.extend({ - path: 'csv_downloads', - includeBasic: ['list', 'retrieve'], - - GetCsvDownload: telnyxMethod({ - method: 'GET', - path: '/phone_numbers_csv_downloads/{id}', - urlParams: ['id'], - }), - ListCsvDownloads: telnyxMethod({ - method: 'GET', - path: '/phone_numbers_csv_downloads', - }), -}); diff --git a/src/resources/CustomerServiceRecord.ts b/src/resources/CustomerServiceRecord.ts deleted file mode 100644 index 0a8c591..0000000 --- a/src/resources/CustomerServiceRecord.ts +++ /dev/null @@ -1,20 +0,0 @@ -import TelnyxResource from '../TelnyxResource'; -const telnyxMethod = TelnyxResource.method; - -export const CustomerServiceRecord = TelnyxResource.extend({ - path: 'customer_service_record', - includeBasic: ['list', 'retrieve', 'create'], - - ListCustomerServiceRecords: telnyxMethod({ - method: 'GET', - path: '/customer_service_records', - }), - VerifyPhoneNumberCoverage: telnyxMethod({ - method: 'POST', - path: '/customer_service_records/phone_number-coverages', - }), - GetCustomerServiceRecord: telnyxMethod({ - method: 'GET', - path: '/customer_service_records/{customer_service_record_id}', - }), -}); diff --git a/src/resources/CustomerServiceRecords.ts b/src/resources/CustomerServiceRecords.ts new file mode 100644 index 0000000..cd605c6 --- /dev/null +++ b/src/resources/CustomerServiceRecords.ts @@ -0,0 +1,18 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const CustomerServiceRecords = TelnyxResource.extend({ + path: 'customer_service_records', + includeBasic: ['list', 'create'], + + retrieve: telnyxMethod({ + method: 'GET', + path: '/{customer_service_record_id}', + urlParams: ['customer_service_record_id'], + }), + + verifyPhoneNumbersCoverage: telnyxMethod({ + method: 'POST', + path: '/phone_number_coverages', + }), +}); diff --git a/src/resources/Debugging.ts b/src/resources/Debugging.ts deleted file mode 100644 index d1e1fff..0000000 --- a/src/resources/Debugging.ts +++ /dev/null @@ -1,12 +0,0 @@ -import TelnyxResource from '../TelnyxResource'; -const telnyxMethod = TelnyxResource.method; - -export const Debugging = TelnyxResource.extend({ - path: 'debugging', - includeBasic: ['list', 'retrieve'], - - ListCallEvents: telnyxMethod({ - method: 'GET', - path: '/call_events', - }), -}); diff --git a/src/resources/DetailRecords.ts b/src/resources/DetailRecords.ts index c5fd80c..c416bd4 100644 --- a/src/resources/DetailRecords.ts +++ b/src/resources/DetailRecords.ts @@ -4,7 +4,7 @@ const telnyxMethod = TelnyxResource.method; export const DetailRecords = TelnyxResource.extend({ path: 'detail_records', - query: telnyxMethod({ + search: telnyxMethod({ method: 'GET', methodType: 'list', }), diff --git a/src/resources/DialogflowConnections.ts b/src/resources/DialogflowConnections.ts new file mode 100644 index 0000000..cae4316 --- /dev/null +++ b/src/resources/DialogflowConnections.ts @@ -0,0 +1,31 @@ +import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + +export const DialogflowConnections = TelnyxResource.extend({ + path: 'dialogflow_connections', + + retrieve: telnyxMethod({ + method: 'GET', + path: '/{connection_id}', + urlParams: ['connection_id'], + methodType: 'retrieve', + }), + + create: telnyxMethod({ + method: 'POST', + path: '/{connection_id}', + urlParams: ['connection_id'], + }), + + update: telnyxMethod({ + method: 'PUT', + path: '/{connection_id}', + urlParams: ['connection_id'], + }), + + del: telnyxMethod({ + method: 'DELETE', + path: '/{connection_id}', + urlParams: ['connection_id'], + }), +}); diff --git a/src/resources/DialogflowIntegration.ts b/src/resources/DialogflowIntegration.ts deleted file mode 100644 index 42ca78f..0000000 --- a/src/resources/DialogflowIntegration.ts +++ /dev/null @@ -1,12 +0,0 @@ -import TelnyxResource from '../TelnyxResource'; -const telnyxMethod = TelnyxResource.method; - -export const DialogflowIntegration = TelnyxResource.extend({ - path: 'dialogflow_integration', - includeBasic: ['delete'], - - DeleteDialogflowConnection: telnyxMethod({ - method: 'DELETE', - path: '/dialogflow_connections/{connection_id}', - }), -}); diff --git a/src/resources/Events.ts b/src/resources/Events.ts deleted file mode 100644 index 73f60be..0000000 --- a/src/resources/Events.ts +++ /dev/null @@ -1,6 +0,0 @@ -import TelnyxResource from '../TelnyxResource'; - -export const Events = TelnyxResource.extend({ - path: 'events', - includeBasic: ['list', 'retrieve'], -}); diff --git a/src/resources/ExternalConnections.ts b/src/resources/ExternalConnections.ts index c96b3ed..e9359d7 100644 --- a/src/resources/ExternalConnections.ts +++ b/src/resources/ExternalConnections.ts @@ -3,71 +3,88 @@ const telnyxMethod = TelnyxResource.method; export const ExternalConnections = TelnyxResource.extend({ path: 'external_connections', - includeBasic: ['list', 'retrieve', 'create', 'delete'], + includeBasic: ['list', 'retrieve', 'create', 'update', 'del'], - GetExternalConnectionUploadsStatus: telnyxMethod({ + listLogMessages: telnyxMethod({ method: 'GET', - path: '/external_connections/{id}/uploads/status', + path: '/log/messages', }), - ListExternalConnectionReleases: telnyxMethod({ + + retrieveLogMessage: telnyxMethod({ method: 'GET', - path: '/external_connections/{id}/releases', - }), - RetryUpload: telnyxMethod({ - method: 'POST', - path: '/external_connections/{id}/uploads/{ticketIid}/retry', + path: '/log/messages/{id}', + urlParams: ['id'], }), - DeleteExternalConnection: telnyxMethod({ + + delLogMessage: telnyxMethod({ method: 'DELETE', - path: '/external_connections/{id}', - }), - updateLocation: telnyxMethod({ - method: 'PATCH', - path: '/v2/external_connections/{id}/locations/{location_id}', - urlParams: ['id', 'location_id'], + path: '/log/messages/{id}', + urlParams: ['id'], }), - DeleteExternalConnectionLogMessage: telnyxMethod({ - method: 'DELETE', - path: '/external_connections/log/messages/{id}', + + listCivicAddresses: telnyxMethod({ + method: 'GET', + path: '/{id}/civic_addresses', + urlParams: ['id'], }), - GetExternalConnectionCivicAddress: telnyxMethod({ + + retrieveCivicAddress: telnyxMethod({ method: 'GET', - path: '/external_connections/{id}/civic/addresses/{address_id}', + path: '/{id}/civic_addresses/{address_id}', + urlParams: ['id', 'address_id'], }), - ListExternalConnectionPhoneNumbers: telnyxMethod({ + + listPhoneNumbers: telnyxMethod({ method: 'GET', - path: '/external_connections/{id}/phone/numbers', + path: '/{id}/phone_numbers', + urlParams: ['id'], }), - ListExternalConnections: telnyxMethod({ + + retrievePhoneNumber: telnyxMethod({ method: 'GET', - path: '/external_connections', + path: '/{id}/phone_numbers/{phone_number_id}', + urlParams: ['id', 'phone_number_id'], }), - GetExternalConnectionPhoneNumber: telnyxMethod({ + + listReleases: telnyxMethod({ method: 'GET', - path: '/external_connections/{id}/phone/numbers/{phone_number_id}', + path: '/{id}/releases', + urlParams: ['id'], }), - ListCivicAddresses: telnyxMethod({ + + retrieveRelease: telnyxMethod({ method: 'GET', - path: '/external_connections/{id}/civic_addresses', + path: '/{id}/releases/{release_id}', + urlParams: ['id', 'release_id'], }), - ListExternalConnectionLogMessages: telnyxMethod({ + + listUploads: telnyxMethod({ method: 'GET', - path: '/external_connections/log/messages', + path: '/{id}/uploads', + urlParams: ['id'], }), - GetExternalConnectionUpload: telnyxMethod({ + + retrieveUpload: telnyxMethod({ method: 'GET', - path: '/external_connections/{id}/uploads/{ticket_id}', + path: '/{id}/uploads/{ticket_id}', + urlParams: ['id', 'ticket_id'], }), - RefreshExternalConnectionUploads: telnyxMethod({ + + refreshUploads: telnyxMethod({ method: 'POST', - path: '/external_connections/{id}/uploads/refresh', + path: '/{id}/uploads/refresh', + urlParams: ['id'], }), - GetExternalConnectionRelease: telnyxMethod({ + + retrieveUploadsStatus: telnyxMethod({ method: 'GET', - path: '/external_connections/{id}/releases/{release_id}', + path: '/{id}/uploads/status', + urlParams: ['id'], }), - ListExternalConnectionUploads: telnyxMethod({ - method: 'GET', - path: '/external_connections/{id}/uploads', + + retryUpload: telnyxMethod({ + method: 'POST', + path: '/{id}/uploads/{ticket_id}/retry', + urlParams: ['id', 'ticket_id'], }), }); diff --git a/src/resources/InboundChannels.ts b/src/resources/InboundChannels.ts deleted file mode 100644 index 59c84bc..0000000 --- a/src/resources/InboundChannels.ts +++ /dev/null @@ -1,12 +0,0 @@ -import TelnyxResource from '../TelnyxResource'; -const telnyxMethod = TelnyxResource.method; - -export const InboundChannels = TelnyxResource.extend({ - path: 'inbound_channels', - includeBasic: ['list', 'retrieve'], - - listInboundChannels: telnyxMethod({ - method: 'GET', - path: '/phone_numbers/inbound_channels', - }), -}); diff --git a/src/resources/InventoryCoverage.ts b/src/resources/InventoryCoverage.ts index cedce85..cc6ed30 100644 --- a/src/resources/InventoryCoverage.ts +++ b/src/resources/InventoryCoverage.ts @@ -4,7 +4,7 @@ const telnyxMethod = TelnyxResource.method; export const InventoryCoverage = TelnyxResource.extend({ path: 'inventory_coverage', - retrieve: telnyxMethod({ + list: telnyxMethod({ method: 'GET', methodType: 'list', }), diff --git a/src/resources/InventoryLevel.ts b/src/resources/InventoryLevel.ts deleted file mode 100644 index f3b76e7..0000000 --- a/src/resources/InventoryLevel.ts +++ /dev/null @@ -1,12 +0,0 @@ -import TelnyxResource from '../TelnyxResource'; -const telnyxMethod = TelnyxResource.method; - -export const InventoryLevel = TelnyxResource.extend({ - path: 'inventory_level', - includeBasic: ['list', 'retrieve'], - - CreateInventoryCoverage: telnyxMethod({ - method: 'GET', - path: '/inventory_coverage', - }), -}); diff --git a/src/resources/IpAddresses.ts b/src/resources/IpAddresses.ts deleted file mode 100644 index bee4e32..0000000 --- a/src/resources/IpAddresses.ts +++ /dev/null @@ -1,17 +0,0 @@ -import TelnyxResource from '../TelnyxResource'; -const telnyxMethod = TelnyxResource.method; - -export const IpAddresses = TelnyxResource.extend({ - path: 'ip_addresses', - includeBasic: ['list', 'retrieve', 'delete'], - - ListAccessIpAddresses: telnyxMethod({ - method: 'GET', - path: '/access_ip_address', - }), - DeleteAccessIpAddress: telnyxMethod({ - method: 'DELETE', - path: '/access_ip_address_{access_ip_address_id}', - urlParams: ['access_ip_address_id'], - }), -}); diff --git a/src/resources/IpRanges.ts b/src/resources/IpRanges.ts deleted file mode 100644 index 87f8ebd..0000000 --- a/src/resources/IpRanges.ts +++ /dev/null @@ -1,17 +0,0 @@ -import TelnyxResource from '../TelnyxResource'; -const telnyxMethod = TelnyxResource.method; - -export const IpRanges = TelnyxResource.extend({ - path: 'ip_ranges', - includeBasic: ['list', 'retrieve', 'delete'], - - ListAccessIpRanges: telnyxMethod({ - method: 'GET', - path: '/access_ip_ranges', - }), - undefined: telnyxMethod({ - method: 'DELETE', - path: '/access_ip_ranges/{access_ip_range_id}', - urlParams: ['access_ip_range_id'], - }), -}); diff --git a/src/resources/NotificationEvents.ts b/src/resources/NotificationEvents.ts new file mode 100644 index 0000000..53a4903 --- /dev/null +++ b/src/resources/NotificationEvents.ts @@ -0,0 +1,6 @@ +import TelnyxResource from '../TelnyxResource'; + +export const NotificationEvents = TelnyxResource.extend({ + path: 'notification_events', + includeBasic: ['list'], +}); diff --git a/src/resources/PhoneNumbersCsvDownloads.ts b/src/resources/PhoneNumbersCsvDownloads.ts new file mode 100644 index 0000000..548abe6 --- /dev/null +++ b/src/resources/PhoneNumbersCsvDownloads.ts @@ -0,0 +1,6 @@ +import TelnyxResource from '../TelnyxResource'; + +export const PhoneNumbersCsvDownloads = TelnyxResource.extend({ + path: '/phone_numbers/csv_downloads', + includeBasic: ['list', 'create', 'retrieve'], +}); diff --git a/src/resources/PortingEvents.ts b/src/resources/PortingEvents.ts new file mode 100644 index 0000000..c6a9552 --- /dev/null +++ b/src/resources/PortingEvents.ts @@ -0,0 +1,14 @@ +import TelnyxResource from '../TelnyxResource'; + +const telnyxMethod = TelnyxResource.method; + +export const PortingEvents = TelnyxResource.extend({ + path: 'porting/events', + includeBasic: ['list', 'retrieve'], + + republish: telnyxMethod({ + method: 'POST', + path: '/{id}/republish', + urlParams: ['id'], + }), +}); diff --git a/src/resources/PortoutEvents.ts b/src/resources/PortoutEvents.ts new file mode 100644 index 0000000..5773635 --- /dev/null +++ b/src/resources/PortoutEvents.ts @@ -0,0 +1,14 @@ +import TelnyxResource from '../TelnyxResource'; + +const telnyxMethod = TelnyxResource.method; + +export const PortoutEvents = TelnyxResource.extend({ + path: 'portout/events', + includeBasic: ['list', 'retrieve'], + + republish: telnyxMethod({ + method: 'POST', + path: '/{id}/republish', + urlParams: ['id'], + }), +}); diff --git a/src/telnyx.ts b/src/telnyx.ts index b7e0fe4..f1bf253 100644 --- a/src/telnyx.ts +++ b/src/telnyx.ts @@ -40,29 +40,24 @@ import {Channelzones} from './resources/Channelzones'; import {Conferences} from './resources/Conferences'; import {Connections} from './resources/Connections'; import {CredentialConnections} from './resources/CredentialConnections'; -import {CsvDownloads} from './resources/CsvDownloads'; -import {CustomerServiceRecord} from './resources/CustomerServiceRecord'; -import {Debugging} from './resources/Debugging'; +import {PhoneNumbersCsvDownloads} from './resources/PhoneNumbersCsvDownloads'; +import {CustomerServiceRecords} from './resources/CustomerServiceRecords'; import {DetailRecords} from './resources/DetailRecords'; -import {DialogflowIntegration} from './resources/DialogflowIntegration'; +import {DialogflowConnections} from './resources/DialogflowConnections'; import {DocumentLinks} from './resources/DocumentLinks'; import {Documents} from './resources/Documents'; import {DynamicEmergency} from './resources/DynamicEmergency'; import {DynamicEmergencyAddresses} from './resources/DynamicEmergencyAddresses'; import {DynamicEmergencyEndpoints} from './resources/DynamicEmergencyEndpoints'; -import {Events} from './resources/Events'; +import {AuditEvents} from './resources/AuditEvents'; import {ExternalConnections} from './resources/ExternalConnections'; import {FaxApplications} from './resources/FaxApplications'; import {Faxes} from './resources/Faxes'; import {FqdnConnections} from './resources/FqdnConnections'; import {Fqdns} from './resources/Fqdns'; import {GlobalIps} from './resources/GlobalIps'; -import {InboundChannels} from './resources/InboundChannels'; import {InventoryCoverage} from './resources/InventoryCoverage'; -import {InventoryLevel} from './resources/InventoryLevel'; -import {IpAddresses} from './resources/IpAddresses'; import {IpConnections} from './resources/IpConnections'; -import {IpRanges} from './resources/IpRanges'; import {Ips} from './resources/Ips'; import {ManagedAccounts} from './resources/ManagedAccounts'; import {MdrDetailReports} from './resources/MdrDetailReports'; @@ -79,6 +74,7 @@ import {MessagingUrlDomains} from './resources/MessagingUrlDomains'; import {MobileNetworkOperators} from './resources/MobileNetworkOperators'; import {MobileOperatorNetworks} from './resources/MobileOperatorNetworks'; import {Networks} from './resources/Networks'; +import {NotificationEvents} from './resources/NotificationEvents'; import {NumberBackgroundJobs} from './resources/NumberBackgroundJobs'; import {NumberLookup} from './resources/NumberLookup'; import {NumberOrderDocuments} from './resources/NumberOrderDocuments'; @@ -102,6 +98,8 @@ import {PhoneNumbersInboundChannels} from './resources/PhoneNumbersInboundChanne import {PhoneNumbersMessaging} from './resources/PhoneNumbersMessaging'; import {PhoneNumbersVoice} from './resources/PhoneNumbersVoice'; import {PortabilityChecks} from './resources/PortabilityChecks'; +import {PortingEvents} from './resources/PortingEvents'; +import {PortoutEvents} from './resources/PortoutEvents'; import {PortingOrders} from './resources/PortingOrders'; import {PortingPhoneNumbers} from './resources/PortingPhoneNumbers'; import {PortoutRequests} from './resources/PortoutRequests'; @@ -214,29 +212,23 @@ export function createTelnyx() { Conferences, Connections, CredentialConnections, - CsvDownloads, - CustomerServiceRecord, - Debugging, + CustomerServiceRecords, DetailRecords, - DialogflowIntegration, + DialogflowConnections, DocumentLinks, Documents, DynamicEmergency, DynamicEmergencyAddresses, DynamicEmergencyEndpoints, - Events, + AuditEvents, ExternalConnections, FaxApplications, Faxes, FqdnConnections, Fqdns, GlobalIps, - InboundChannels, InventoryCoverage, - InventoryLevel, - IpAddresses, IpConnections, - IpRanges, Ips, ManagedAccounts, MdrDetailReports, @@ -253,6 +245,7 @@ export function createTelnyx() { MobileNetworkOperators, MobileOperatorNetworks, Networks, + NotificationEvents, NumberBackgroundJobs, NumberLookup, NumberOrderDocuments, @@ -275,6 +268,9 @@ export function createTelnyx() { PhoneNumbersInboundChannels, PhoneNumbersMessaging, PhoneNumbersVoice, + PhoneNumbersCsvDownloads, + PortingEvents, + PortoutEvents, PortabilityChecks, PortingOrders, PortingPhoneNumbers, diff --git a/src/test/resources/DetailRecords.test.ts b/src/test/resources/DetailRecords.test.ts index caccbf7..39d4d6a 100644 --- a/src/test/resources/DetailRecords.test.ts +++ b/src/test/resources/DetailRecords.test.ts @@ -4,7 +4,7 @@ const telnyx = testUtils.getTelnyxMock(); describe('DetailRecords Resource', function () { function responseFn(response: ResponsePayloadList) { - expect(response.data).toHaveProperty('data'); + expect(response).toHaveProperty('data'); for (let index = 0; index < response.data.length; index++) { const row = response.data[index]; expect(row).toHaveProperty('record_type'); @@ -12,11 +12,14 @@ describe('DetailRecords Resource', function () { } } - describe.skip('query', function () { + describe('search', function () { test('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder return telnyx.detailRecords - .query({filter: {record_type: 'messaging'}}) + .search({ + // limitation on prism mock + 'filter%5brecord_type%5d': 'messaging', + }) .then(responseFn); }); }); diff --git a/src/test/resources/Events.test.ts b/src/test/resources/Events.test.ts deleted file mode 100644 index f183b27..0000000 --- a/src/test/resources/Events.test.ts +++ /dev/null @@ -1,33 +0,0 @@ -import {utils as testUtils} from '../utils'; - -const telnyx = testUtils.getSpyableTelnyx(); - -describe('Events Resource', function () { - describe('retrieve', function () { - test('Sends the correct request', function () { - // @ts-expect-error TODO: import .d.ts files under src/test folder - telnyx.events.retrieve('eventIdBaz'); - expect(telnyx.LAST_REQUEST).toStrictEqual({ - auth: null, - method: 'GET', - url: '/v2/events/eventIdBaz', - headers: {}, - data: {}, - }); - }); - }); - - describe('list', function () { - test('Sends the correct request', function () { - // @ts-expect-error TODO: import .d.ts files under src/test folder - telnyx.events.list({page: {size: 25}}); - expect(telnyx.LAST_REQUEST).toStrictEqual({ - auth: null, - method: 'GET', - url: '/v2/events', - headers: {}, - data: {page: {size: 25}}, - }); - }); - }); -}); diff --git a/src/test/resources/InventoryCoverage.test.ts b/src/test/resources/InventoryCoverage.test.ts index b9088af..8eea2d6 100644 --- a/src/test/resources/InventoryCoverage.test.ts +++ b/src/test/resources/InventoryCoverage.test.ts @@ -5,6 +5,50 @@ const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); describe('InventoryCoverage Resource', function () { // not included in the spec + describe('list', function () { + function responseFn(response: ResponsePayloadList) { + expect(response.data[0]).toHaveProperty('number_type'); + expect(response.data[0]).toHaveProperty('group'); + expect(response.data[0]).toHaveProperty('group_type'); + expect(response.data[0]).toHaveProperty('coverage_type'); + expect(response.data[0]).toHaveProperty('phone_number_type'); + expect(response.data[0]).toHaveProperty('number_range'); + expect(response.data[0]).toMatchObject({ + record_type: 'inventory_coverage_group', + }); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.inventoryCoverage + .list({ + filter: {npa: '318', nxx: '202', country_code: 'US', groupBy: 'npa'}, + // this is due to https://github.com/stoplightio/prism/issues/2443 + 'filter%5bgroupby%5d': 'npa', + }) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.inventoryCoverage + .list( + { + filter: { + npa: '318', + nxx: '202', + country_code: 'US', + groupBy: 'npa', + }, + // this is due to https://github.com/stoplightio/prism/issues/2443 + 'filter%5bgroupby%5d': 'npa', + }, + TEST_AUTH_KEY, + ) + .then(responseFn); + }); + }); + describe('request', function () { function responseFn(response: ResponsePayloadList) { expect(response.data[0]).toHaveProperty('number_type'); diff --git a/types/AuditEventsResource.d.ts b/types/AuditEventsResource.d.ts new file mode 100644 index 0000000..01aa352 --- /dev/null +++ b/types/AuditEventsResource.d.ts @@ -0,0 +1,18 @@ +import {paths} from './TelnyxAPI.js'; + +declare module 'telnyx' { + namespace Telnyx { + type AuditEventsListParams = + paths['/audit_events']['get']['parameters']['query']; + + type AuditEventsListResponse = + paths['/audit_events']['get']['responses']['200']['content']['application/json']; + + class AuditEventsResource { + list( + params?: AuditEventsListParams, + options?: RequestOptions, + ): Promise>; + } + } +} diff --git a/types/CallControlApplicationsResource.d.ts b/types/CallControlApplicationsResource.d.ts index 31292ce..61a4421 100644 --- a/types/CallControlApplicationsResource.d.ts +++ b/types/CallControlApplicationsResource.d.ts @@ -70,9 +70,9 @@ declare module 'telnyx' { options?: RequestOptions, ): Promise< Telnyx.Response< - Telnyx.CallControlApplicationsCreateResponse & + Telnyx.CallControlApplicationsRetrieveResponse & NestedResponseData< - CallControlApplicationsCreateResponse['data'], + CallControlApplicationsRetrieveResponse['data'], CallControlApplicationsNestedMethods > > diff --git a/types/CustomerServiceRecordsResource.d.ts b/types/CustomerServiceRecordsResource.d.ts new file mode 100644 index 0000000..aca0779 --- /dev/null +++ b/types/CustomerServiceRecordsResource.d.ts @@ -0,0 +1,55 @@ +import {paths} from './TelnyxAPI.js'; + +declare module 'telnyx' { + namespace Telnyx { + type CustomerServiceRecordsListParams = + paths['/customer_service_records']['get']['parameters']['query']; + + type CustomerServiceRecordsListResponse = + paths['/customer_service_records']['get']['responses']['200']['content']['application/json']; + + type CustomerServiceRecordsCreateParams = + paths['/customer_service_records']['post']['requestBody']['content']['application/json']; + + type CustomerServiceRecordsCreateResponse = + paths['/customer_service_records']['post']['responses']['201']['content']['application/json']; + + type CustomerServiceRecordsRetrieveId = + paths['/customer_service_records/{customer_service_record_id}']['get']['parameters']['path']['customer_service_record_id']; + + type CustomerServiceRecordsRetrieveResponse = + paths['/customer_service_records/{customer_service_record_id}']['get']['responses']['201']['content']['application/json']; + + type CustomerServiceRecordsPhoneNumbersCoverageCreateParams = + paths['/customer_service_records/phone_number_coverages']['post']['requestBody']['content']['application/json']; + + type CustomerServiceRecordsPhoneNumbersCoverageCreateResponse = + paths['/customer_service_records/phone_number_coverages']['post']['responses']['201']['content']['application/json']; + + class CustomerServiceRecordsResource { + list( + params?: CustomerServiceRecordsListParams, + options?: RequestOptions, + ): Promise>; + + create( + params: CustomerServiceRecordsCreateParams, + options?: RequestOptions, + ): Promise>; + + retrieve( + id: CustomerServiceRecordsRetrieveId, + options?: RequestOptions, + ): Promise< + Telnyx.Response + >; + + verifyPhoneNumbersCoverage( + params: CustomerServiceRecordsPhoneNumbersCoverageCreateParams, + options?: RequestOptions, + ): Promise< + Telnyx.Response + >; + } + } +} diff --git a/types/DetailRecordsResource.d.ts b/types/DetailRecordsResource.d.ts new file mode 100644 index 0000000..bd9d2f8 --- /dev/null +++ b/types/DetailRecordsResource.d.ts @@ -0,0 +1,18 @@ +import {paths} from './TelnyxAPI.js'; + +declare module 'telnyx' { + namespace Telnyx { + type DetailRecordsListParams = + paths['/detail_records']['get']['parameters']['query']; + + type DetailRecordsListResponse = + paths['/detail_records']['get']['responses']['200']['content']['application/json']; + + class DetailRecordsResource { + list( + params?: DetailRecordsListParams, + options?: RequestOptions, + ): Promise>; + } + } +} diff --git a/types/DialogflowConnectionsResource.d.ts b/types/DialogflowConnectionsResource.d.ts new file mode 100644 index 0000000..3c16928 --- /dev/null +++ b/types/DialogflowConnectionsResource.d.ts @@ -0,0 +1,61 @@ +import {paths} from './TelnyxAPI.js'; + +declare module 'telnyx' { + namespace Telnyx { + type DialogflowConnectionsDelId = + paths['/dialogflow_connections/{connection_id}']['delete']['parameters']['path']['connection_id']; + + type DialogflowConnectionsDelParams = + paths['/dialogflow_connections/{connection_id}']['delete']['parameters']['query']; + + type DialogflowConnectionsDelResponse = + paths['/dialogflow_connections/{connection_id}']['delete']['responses']['204']['content']; + + type DialogflowConnectionsCreateParams = + paths['/dialogflow_connections/{connection_id}']['post']['requestBody']['content']['application/json']; + + type DialogflowConnectionsCreateResponse = + paths['/dialogflow_connections/{connection_id}']['post']['responses']['201']['content']['application/json']; + + type DialogflowConnectionsRetrieveId = + paths['/dialogflow_connections/{connection_id}']['get']['parameters']['path']['connection_id']; + + type DialogflowConnectionsRetrieveParams = + paths['/dialogflow_connections/{connection_id}']['get']['parameters']['query']; + + type DialogflowConnectionsRetrieveResponse = + paths['/dialogflow_connections/{connection_id}']['get']['responses']['200']['content']['application/json']; + + type DialogflowConnectionsUpdateId = + paths['/dialogflow_connections/{connection_id}']['put']['parameters']['path']['connection_id']; + + type DialogflowConnectionsUpdateParams = + paths['/dialogflow_connections/{connection_id}']['put']['requestBody']['content']['application/json']; + + type DialogflowConnectionsUpdateResponse = + paths['/dialogflow_connections/{connection_id}']['put']['responses']['200']['content']['application/json']; + + class DialogflowConnectionsResource { + del( + id: DialogflowConnectionsDelId, + options?: RequestOptions, + ): Promise>; + + create( + params: DialogflowConnectionsCreateParams, + options?: RequestOptions, + ): Promise>; + + retrieve( + id: DialogflowConnectionsRetrieveId, + options?: RequestOptions, + ): Promise>; + + update( + id: DialogflowConnectionsUpdateId, + params: DialogflowConnectionsUpdateParams, + options?: RequestOptions, + ): Promise>; + } + } +} diff --git a/types/DynamicEmergencyAddressesResource.d.ts b/types/DynamicEmergencyAddressesResource.d.ts new file mode 100644 index 0000000..0a4cb8e --- /dev/null +++ b/types/DynamicEmergencyAddressesResource.d.ts @@ -0,0 +1,61 @@ +import {paths} from './TelnyxAPI.js'; + +declare module 'telnyx' { + namespace Telnyx { + type DynamicEmergencyAddressesDelId = + paths['/dynamic_emergency_addresses/{id}']['delete']['parameters']['path']['id']; + + type DynamicEmergencyAddressesDelParams = + paths['/dynamic_emergency_addresses/{id}']['delete']['parameters']['query']; + + type DynamicEmergencyAddressesDelResponse = + paths['/dynamic_emergency_addresses/{id}']['delete']['responses']['200']['content']['application/json']; + + type DynamicEmergencyAddressesCreateParams = + paths['/dynamic_emergency_addresses']['post']['requestBody']['content']['application/json']; + + type DynamicEmergencyAddressesCreateResponse = + paths['/dynamic_emergency_addresses']['post']['responses']['201']['content']['application/json']; + + type DynamicEmergencyAddressesRetrieveId = + paths['/dynamic_emergency_addresses/{id}']['get']['parameters']['path']['id']; + + type DynamicEmergencyAddressesRetrieveParams = + paths['/dynamic_emergency_addresses/{id}']['get']['parameters']['query']; + + type DynamicEmergencyAddressesRetrieveResponse = + paths['/dynamic_emergency_addresses/{id}']['get']['responses']['200']['content']['application/json']; + + type DynamicEmergencyAddressesListParams = + paths['/dynamic_emergency_addresses']['get']['parameters']['query']; + + type DynamicEmergencyAddressesListResponse = + paths['/dynamic_emergency_addresses']['get']['responses']['200']['content']['application/json']; + + class DynamicEmergencyAddressesResource { + del( + id: DynamicEmergencyAddressesDelId, + options?: RequestOptions, + ): Promise>; + + create( + params: DynamicEmergencyAddressesCreateParams, + options?: RequestOptions, + ): Promise< + Telnyx.Response + >; + + retrieve( + id: DynamicEmergencyAddressesRetrieveId, + options?: RequestOptions, + ): Promise< + Telnyx.Response + >; + + list( + params?: DynamicEmergencyAddressesListParams, + options?: RequestOptions, + ): Promise>; + } + } +} diff --git a/types/DynamicEmergencyEndpointsResource.d.ts b/types/DynamicEmergencyEndpointsResource.d.ts new file mode 100644 index 0000000..561fb23 --- /dev/null +++ b/types/DynamicEmergencyEndpointsResource.d.ts @@ -0,0 +1,58 @@ +import {paths} from './TelnyxAPI.js'; + +declare module 'telnyx' { + namespace Telnyx { + type DynamicEmergencyEndpointsDelId = + paths['/dynamic_emergency_endpoints/{id}']['delete']['parameters']['path']['id']; + + type DynamicEmergencyEndpointsDelResponse = + paths['/dynamic_emergency_endpoints/{id}']['delete']['responses']['200']['content']['application/json']; + + type DynamicEmergencyEndpointsCreateParams = + paths['/dynamic_emergency_endpoints']['post']['requestBody']['content']['application/json']; + + type DynamicEmergencyEndpointsCreateResponse = + paths['/dynamic_emergency_endpoints']['post']['responses']['201']['content']['application/json']; + + type DynamicEmergencyEndpointsRetrieveId = + paths['/dynamic_emergency_endpoints/{id}']['get']['parameters']['path']['id']; + + type DynamicEmergencyEndpointsRetrieveParams = + paths['/dynamic_emergency_endpoints/{id}']['get']['parameters']['query']; + + type DynamicEmergencyEndpointsRetrieveResponse = + paths['/dynamic_emergency_endpoints/{id}']['get']['responses']['200']['content']['application/json']; + + type DynamicEmergencyEndpointsListParams = + paths['/dynamic_emergency_endpoints']['get']['parameters']['query']; + + type DynamicEmergencyEndpointsListResponse = + paths['/dynamic_emergency_endpoints']['get']['responses']['200']['content']['application/json']; + + class DynamicEmergencyEndpointsResource { + del( + id: DynamicEmergencyEndpointsDelId, + options?: RequestOptions, + ): Promise>; + + create( + params: DynamicEmergencyEndpointsCreateParams, + options?: RequestOptions, + ): Promise< + Telnyx.Response + >; + + retrieve( + id: DynamicEmergencyEndpointsRetrieveId, + options?: RequestOptions, + ): Promise< + Telnyx.Response + >; + + list( + params?: DynamicEmergencyEndpointsListParams, + options?: RequestOptions, + ): Promise>; + } + } +} diff --git a/types/DynamicEmergencyResource.d.ts b/types/DynamicEmergencyResource.d.ts new file mode 100644 index 0000000..45a7967 --- /dev/null +++ b/types/DynamicEmergencyResource.d.ts @@ -0,0 +1,8 @@ +declare module 'telnyx' { + namespace Telnyx { + class DynamicEmergencyResource { + addresses: Telnyx.DynamicEmergencyAddressesResource; + endpoints: Telnyx.DynamicEmergencyEndpointsResource; + } + } +} diff --git a/types/ExternalConnectionsResource.d.ts b/types/ExternalConnectionsResource.d.ts new file mode 100644 index 0000000..02f193f --- /dev/null +++ b/types/ExternalConnectionsResource.d.ts @@ -0,0 +1,303 @@ +import {paths} from './TelnyxAPI.js'; + +declare module 'telnyx' { + namespace Telnyx { + type ExternalConnectionsDelId = + paths['/external_connections/{id}']['delete']['parameters']['path']['id']; + + type ExternalConnectionsDelParams = + paths['/external_connections/{id}']['delete']['parameters']['query']; + + type ExternalConnectionsDelResponse = + paths['/external_connections/{id}']['delete']['responses']['200']['content']['application/json']; + + type ExternalConnectionsCreateParams = + paths['/external_connections']['post']['requestBody']['content']['application/json']; + + type ExternalConnectionsCreateResponse = + paths['/external_connections']['post']['responses']['201']['content']['application/json']; + + type ExternalConnectionsRetrieveId = + paths['/external_connections/{id}']['get']['parameters']['path']['id']; + + type ExternalConnectionsRetrieveParams = + paths['/external_connections/{id}']['get']['parameters']['query']; + + type ExternalConnectionsRetrieveResponse = + paths['/external_connections/{id}']['get']['responses']['200']['content']['application/json']; + + type ExternalConnectionsListParams = + paths['/external_connections']['get']['parameters']['query']; + + type ExternalConnectionsListResponse = + paths['/external_connections']['get']['responses']['200']['content']['application/json']; + + type ExternalConnectionsUpdateId = + paths['/external_connections/{id}']['patch']['parameters']['path']['id']; + + type ExternalConnectionsUpdateParams = + paths['/external_connections/{id}']['patch']['requestBody']['content']['application/json']; + + type ExternalConnectionsUpdateResponse = + paths['/external_connections/{id}']['patch']['responses']['200']['content']['application/json']; + + type ExternalConnectionsListLogMessagesParams = + paths['/external_connections/log_messages']['get']['parameters']['query']; + + type ExternalConnectionsListLogMessagesResponse = + paths['/external_connections/log_messages']['get']['responses']['200']['content']['application/json']; + + type ExternalConnectionsLogMessageDelId = + paths['/external_connections/log_messages/{id}']['delete']['parameters']['path']['id']; + + type ExternalConnectionsLogMessageDelParams = + paths['/external_connections/log_messages/{id}']['delete']['parameters']['query']; + + type ExternalConnectionsLogMessageDelResponse = + paths['/external_connections/log_messages/{id}']['delete']['responses']['200']['content']['application/json']; + + type ExternalConnectionsLogMessageRetrieveId = + paths['/external_connections/log_messages/{id}']['get']['parameters']['path']['id']; + + type ExternalConnectionsLogMessageRetrieveParams = + paths['/external_connections/log_messages/{id}']['get']['parameters']['query']; + + type ExternalConnectionsLogMessageRetrieveResponse = + paths['/external_connections/log_messages/{id}']['get']['responses']['200']['content']['application/json']; + + type ExternalConnectionsCivicAddressListId = + paths['/external_connections/{id}/civic_addresses']['get']['parameters']['path']['id']; + + type ExternalConnectionsCivicAddressListParams = + paths['/external_connections/{id}/civic_addresses']['get']['parameters']['query']; + + type ExternalConnectionsCivicAddressListResponse = + paths['/external_connections/{id}/civic_addresses']['get']['responses']['200']['content']['application/json']; + + type ExternalConnectionsCivicAddressRetrieveId = + paths['/external_connections/{id}/civic_addresses/{address_id}']['get']['parameters']['path']['id']; + + type ExternalConnectionsCivicAddressRetrieveParams = + paths['/external_connections/{id}/civic_addresses/{address_id}']['get']['parameters']['query']; + + type ExternalConnectionsCivicAddressRetrieveResponse = + paths['/external_connections/{id}/civic_addresses/{address_id}']['get']['responses']['200']['content']['application/json']; + + type ExternalConnectionsPhoneNumbersListId = + paths['/external_connections/{id}/phone_numbers']['get']['parameters']['path']['id']; + + type ExternalConnectionsPhoneNumbersListParams = + paths['/external_connections/{id}/phone_numbers']['get']['parameters']['query']; + + type ExternalConnectionsPhoneNumbersListResponse = + paths['/external_connections/{id}/phone_numbers']['get']['responses']['200']['content']['application/json']; + + type ExternalConnectionsPhoneNumbersRetrieveId = + paths['/external_connections/{id}/phone_numbers/{phone_number_id}']['get']['parameters']['path']['id']; + + type ExternalConnectionsPhoneNumbersRetrievePhoneNumberId = + paths['/external_connections/{id}/phone_numbers/{phone_number_id}']['get']['parameters']['path']['phone_number_id']; + + type ExternalConnectionsPhoneNumbersRetrieveResponse = + paths['/external_connections/{id}/phone_numbers/{phone_number_id}']['get']['responses']['200']['content']['application/json']; + + type ExternalConnectionsReleasesListId = + paths['/external_connections/{id}/releases']['get']['parameters']['path']['id']; + + type ExternalConnectionsReleasesListParams = + paths['/external_connections/{id}/releases']['get']['parameters']['query']; + + type ExternalConnectionsReleasesListResponse = + paths['/external_connections/{id}/releases']['get']['responses']['200']['content']['application/json']; + + type ExternalConnectionsReleasesRetrieveId = + paths['/external_connections/{id}/releases/{release_id}']['get']['parameters']['path']['id']; + + type ExternalConnectionsReleasesRetrieveReleaseId = + paths['/external_connections/{id}/releases/{release_id}']['get']['parameters']['path']['release_id']; + + type ExternalConnectionsReleasesRetrieveResponse = + paths['/external_connections/{id}/releases/{release_id}']['get']['responses']['200']['content']['application/json']; + + type ExternalConnectionsUploadsListId = + paths['/external_connections/{id}/uploads']['get']['parameters']['path']['id']; + + type ExternalConnectionsUploadsListParams = + paths['/external_connections/{id}/uploads']['get']['parameters']['query']; + + type ExternalConnectionsUploadsListResponse = + paths['/external_connections/{id}/uploads']['get']['responses']['200']['content']['application/json']; + + type ExternalConnectionsUploadsRetrieveId = + paths['/external_connections/{id}/uploads/{ticket_id}']['get']['parameters']['path']['id']; + + type ExternalConnectionsUploadsRetrieveTicketId = + paths['/external_connections/{id}/uploads/{ticket_id}']['get']['parameters']['path']['ticket_id']; + + type ExternalConnectionsUploadsRetrieveResponse = + paths['/external_connections/{id}/uploads/{ticket_id}']['get']['responses']['200']['content']['application/json']; + + type ExternalConnectionsUploadsRefreshId = + paths['/external_connections/{id}/uploads/refresh']['post']['parameters']['path']['id']; + + type ExternalConnectionsUploadsRefreshParams = + paths['/external_connections/{id}/uploads/refresh']['post']['requestBody']; + + type ExternalConnectionsUploadsRefreshResponse = + paths['/external_connections/{id}/uploads/refresh']['post']['responses']['200']['content']['application/json']; + + type ExternalConnectionsUploadsStatusRetrieveId = + paths['/external_connections/{id}/uploads/status']['get']['parameters']['path']['id']; + + type ExternalConnectionsUploadsStatusRetrieveResponse = + paths['/external_connections/{id}/uploads/status']['get']['responses']['200']['content']['application/json']; + + type ExternalConnectionsUploadsRetryId = + paths['/external_connections/{id}/uploads/{ticket_id}/retry']['post']['parameters']['path']['id']; + + type ExternalConnectionsUploadsRetryTicketId = + paths['/external_connections/{id}/uploads/{ticket_id}/retry']['post']['parameters']['path']['ticket_id']; + + type ExternalConnectionsUploadsRetryParams = + paths['/external_connections/{id}/uploads/{ticket_id}/retry']['post']['requestBody']; + + type ExternalConnectionsUploadsRetryResponse = + paths['/external_connections/{id}/uploads/{ticket_id}/retry']['post']['responses']['202']['content']['application/json']; + + class ExternalConnectionsResource { + del( + id: ExternalConnectionsDelId, + options?: RequestOptions, + ): Promise>; + + create( + params: ExternalConnectionsCreateParams, + options?: RequestOptions, + ): Promise>; + + retrieve( + id: ExternalConnectionsRetrieveId, + options?: RequestOptions, + ): Promise>; + + list( + params?: ExternalConnectionsListParams, + options?: RequestOptions, + ): Promise>; + + update( + id: ExternalConnectionsUpdateId, + params: ExternalConnectionsUpdateParams, + options?: RequestOptions, + ): Promise>; + + listLogMessages( + params?: ExternalConnectionsListLogMessagesParams, + options?: RequestOptions, + ): Promise< + Telnyx.Response + >; + + retrieveLogMessage( + id: ExternalConnectionsLogMessageRetrieveId, + options?: RequestOptions, + ): Promise< + Telnyx.Response + >; + + delLogMessage( + id: ExternalConnectionsLogMessageDelId, + options?: RequestOptions, + ): Promise< + Telnyx.Response + >; + + listCivicAddresses( + id: ExternalConnectionsCivicAddressListId, + params?: ExternalConnectionsCivicAddressListParams, + options?: RequestOptions, + ): Promise< + Telnyx.Response + >; + + retrieveCivicAddress( + id: ExternalConnectionsCivicAddressRetrieveId, + options?: RequestOptions, + ): Promise< + Telnyx.Response + >; + + listPhoneNumbers( + id: ExternalConnectionsPhoneNumbersListId, + params?: ExternalConnectionsPhoneNumbersListParams, + options?: RequestOptions, + ): Promise< + Telnyx.Response + >; + + retrievePhoneNumber( + id: ExternalConnectionsPhoneNumbersRetrieveId, + phoneNumberId: ExternalConnectionsPhoneNumbersRetrievePhoneNumberId, + options?: RequestOptions, + ): Promise< + Telnyx.Response + >; + + listReleases( + id: ExternalConnectionsReleasesListId, + params?: ExternalConnectionsReleasesListParams, + options?: RequestOptions, + ): Promise< + Telnyx.Response + >; + + retrieveRelease( + id: ExternalConnectionsReleasesRetrieveId, + releaseId: ExternalConnectionsReleasesRetrieveReleaseId, + options?: RequestOptions, + ): Promise< + Telnyx.Response + >; + + listUploads( + id: ExternalConnectionsUploadsListId, + params?: ExternalConnectionsUploadsListParams, + options?: RequestOptions, + ): Promise< + Telnyx.Response + >; + + retrieveUpload( + id: ExternalConnectionsUploadsRetrieveId, + ticketId: ExternalConnectionsUploadsRetrieveTicketId, + options?: RequestOptions, + ): Promise< + Telnyx.Response + >; + + retrieveUploadsStatus( + id: ExternalConnectionsUploadsStatusRetrieveId, + options?: RequestOptions, + ): Promise< + Telnyx.Response + >; + + refreshUploads( + id: ExternalConnectionsUploadsRefreshId, + params: ExternalConnectionsUploadsRefreshParams, + options?: RequestOptions, + ): Promise< + Telnyx.Response + >; + + retryUpload( + id: ExternalConnectionsUploadsRetryId, + ticketId: ExternalConnectionsUploadsRetryTicketId, + params: ExternalConnectionsUploadsRetryParams, + options?: RequestOptions, + ): Promise< + Telnyx.Response + >; + } + } +} diff --git a/types/FaxApplicationsResource.d.ts b/types/FaxApplicationsResource.d.ts new file mode 100644 index 0000000..e861879 --- /dev/null +++ b/types/FaxApplicationsResource.d.ts @@ -0,0 +1,93 @@ +import {paths} from './TelnyxAPI.js'; + +declare module 'telnyx' { + namespace Telnyx { + type FaxApplicationsDelId = + paths['/fax_applications/{id}']['delete']['parameters']['path']['id']; + + type FaxApplicationsDelParams = + paths['/fax_applications/{id}']['delete']['parameters']['query']; + + type FaxApplicationsDelResponse = + paths['/fax_applications/{id}']['delete']['responses']['200']['content']['application/json']; + + type FaxApplicationsCreateParams = + paths['/fax_applications']['post']['requestBody']['content']['application/json']; + + type FaxApplicationsCreateResponse = + paths['/fax_applications']['post']['responses']['201']['content']['application/json']; + + type FaxApplicationsRetrieveId = + paths['/fax_applications/{id}']['get']['parameters']['path']['id']; + + type FaxApplicationsRetrieveParams = + paths['/fax_applications/{id}']['get']['parameters']['query']; + + type FaxApplicationsRetrieveResponse = + paths['/fax_applications/{id}']['get']['responses']['200']['content']['application/json']; + + type FaxApplicationsListParams = + paths['/fax_applications']['get']['parameters']['query']; + + type FaxApplicationsListResponse = + paths['/fax_applications']['get']['responses']['200']['content']['application/json']; + + type FaxApplicationsUpdateId = + paths['/fax_applications/{id}']['patch']['parameters']['path']['id']; + + type FaxApplicationsUpdateParams = + paths['/fax_applications/{id}']['patch']['requestBody']['content']['application/json']; + + type FaxApplicationsUpdateResponse = + paths['/fax_applications/{id}']['patch']['responses']['200']['content']['application/json']; + + type FaxApplicationsNestedMethods = { + create: FaxApplicationsResource['create']; + del: FaxApplicationsResource['del']; + }; + + class FaxApplicationsResource { + del( + id: FaxApplicationsDelId, + options?: RequestOptions, + ): Promise>; + + create( + params: FaxApplicationsCreateParams, + options?: RequestOptions, + ): Promise< + Telnyx.Response< + Telnyx.FaxApplicationsCreateResponse & + NestedResponseData< + FaxApplicationsCreateResponse['data'], + FaxApplicationsNestedMethods + > + > + >; + + retrieve( + id: FaxApplicationsRetrieveId, + options?: RequestOptions, + ): Promise< + Telnyx.Response< + Telnyx.FaxApplicationsRetrieveResponse & + NestedResponseData< + FaxApplicationsRetrieveResponse['data'], + FaxApplicationsNestedMethods + > + > + >; + + list( + params?: FaxApplicationsListParams, + options?: RequestOptions, + ): Promise>; + + update( + id: FaxApplicationsUpdateId, + params: FaxApplicationsUpdateParams, + options?: RequestOptions, + ): Promise>; + } + } +} diff --git a/types/FaxesResource.d.ts b/types/FaxesResource.d.ts new file mode 100644 index 0000000..c0a9c74 --- /dev/null +++ b/types/FaxesResource.d.ts @@ -0,0 +1,82 @@ +import {paths} from './TelnyxAPI.js'; + +declare module 'telnyx' { + namespace Telnyx { + type FaxesDelId = + paths['/faxes/{id}']['delete']['parameters']['path']['id']; + + type FaxesDelParams = paths['/faxes/{id}']['delete']['parameters']['query']; + + type FaxesDelResponse = + paths['/faxes/{id}']['delete']['responses']['204']['content']; + + type FaxesCreateParams = + paths['/faxes']['post']['requestBody']['content']['application/json']; + + type FaxesCreateResponse = + paths['/faxes']['post']['responses']['202']['content']['application/json']; + + type FaxesRetrieveId = + paths['/faxes/{id}']['get']['parameters']['path']['id']; + + type FaxesRetrieveParams = + paths['/faxes/{id}']['get']['parameters']['query']; + + type FaxesRetrieveResponse = + paths['/faxes/{id}']['get']['responses']['200']['content']['application/json']; + + type FaxesListParams = paths['/faxes']['get']['parameters']['query']; + + type FaxesListResponse = + paths['/faxes']['get']['responses']['200']['content']['application/json']; + + type FaxesNestedMethods = { + del: FaxApplicationsResource['del']; + }; + + class FaxesResource { + del( + id: FaxesDelId, + options?: RequestOptions, + ): Promise>; + + create( + params: FaxesCreateParams, + options?: RequestOptions, + ): Promise< + Telnyx.Response< + Telnyx.FaxesCreateResponse & + NestedResponseData + > + >; + + send( + params: FaxesCreateParams, + options?: RequestOptions, + ): Promise< + Telnyx.Response< + Telnyx.FaxesCreateResponse & + NestedResponseData + > + >; + + retrieve( + id: FaxesRetrieveId, + options?: RequestOptions, + ): Promise< + Telnyx.Response< + Telnyx.FaxesRetrieveResponse & + NestedResponseData< + FaxesRetrieveResponse['data'], + FaxesNestedMethods + > + > + >; + + list( + params?: FaxesListParams, + options?: RequestOptions, + ): Promise>; + } + } +} diff --git a/types/FqdnConnectionsResource.d.ts b/types/FqdnConnectionsResource.d.ts new file mode 100644 index 0000000..038a679 --- /dev/null +++ b/types/FqdnConnectionsResource.d.ts @@ -0,0 +1,93 @@ +import {paths} from './TelnyxAPI.js'; + +declare module 'telnyx' { + namespace Telnyx { + type FqdnConnectionsDelId = + paths['/fqdn_connections/{id}']['delete']['parameters']['path']['id']; + + type FqdnConnectionsDelParams = + paths['/fqdn_connections/{id}']['delete']['parameters']['query']; + + type FqdnConnectionsDelResponse = + paths['/fqdn_connections/{id}']['delete']['responses']['200']['content']['application/json']; + + type FqdnConnectionsCreateParams = + paths['/fqdn_connections']['post']['requestBody']['content']['application/json']; + + type FqdnConnectionsCreateResponse = + paths['/fqdn_connections']['post']['responses']['201']['content']['application/json']; + + type FqdnConnectionsRetrieveId = + paths['/fqdn_connections/{id}']['get']['parameters']['path']['id']; + + type FqdnConnectionsRetrieveParams = + paths['/fqdn_connections/{id}']['get']['parameters']['query']; + + type FqdnConnectionsRetrieveResponse = + paths['/fqdn_connections/{id}']['get']['responses']['200']['content']['application/json']; + + type FqdnConnectionsListParams = + paths['/fqdn_connections']['get']['parameters']['query']; + + type FqdnConnectionsListResponse = + paths['/fqdn_connections']['get']['responses']['200']['content']['application/json']; + + type FqdnConnectionsUpdateId = + paths['/fqdn_connections/{id}']['patch']['parameters']['path']['id']; + + type FqdnConnectionsUpdateParams = + paths['/fqdn_connections/{id}']['patch']['requestBody']['content']['application/json']; + + type FqdnConnectionsUpdateResponse = + paths['/fqdn_connections/{id}']['patch']['responses']['200']['content']['application/json']; + + type FqdnConnectionsNestedMethods = { + create: FqdnConnectionsResource['create']; + del: FqdnConnectionsResource['del']; + }; + + class FqdnConnectionsResource { + del( + id: FqdnConnectionsDelId, + options?: RequestOptions, + ): Promise>; + + create( + params: FqdnConnectionsCreateParams, + options?: RequestOptions, + ): Promise< + Telnyx.Response< + Telnyx.FqdnConnectionsCreateResponse & + NestedResponseData< + FqdnConnectionsCreateResponse['data'], + FqdnConnectionsNestedMethods + > + > + >; + + retrieve( + id: FqdnConnectionsRetrieveId, + options?: RequestOptions, + ): Promise< + Telnyx.Response< + Telnyx.FqdnConnectionsRetrieveResponse & + NestedResponseData< + FqdnConnectionsRetrieveResponse['data'], + FqdnConnectionsNestedMethods + > + > + >; + + list( + params?: FqdnConnectionsListParams, + options?: RequestOptions, + ): Promise>; + + update( + id: FqdnConnectionsUpdateId, + params: FqdnConnectionsUpdateParams, + options?: RequestOptions, + ): Promise>; + } + } +} diff --git a/types/FqdnsResource.d.ts b/types/FqdnsResource.d.ts new file mode 100644 index 0000000..63a3cd1 --- /dev/null +++ b/types/FqdnsResource.d.ts @@ -0,0 +1,94 @@ +import {paths} from './TelnyxAPI.js'; + +declare module 'telnyx' { + namespace Telnyx { + type FqdnsDelId = + paths['/fqdns/{id}']['delete']['parameters']['path']['id']; + + type FqdnsDelParams = paths['/fqdns/{id}']['delete']['parameters']['query']; + + type FqdnsDelResponse = + paths['/fqdns/{id}']['delete']['responses']['200']['content']['application/json']; + + type FqdnsCreateParams = + | NonNullable< + paths['/fqdns']['post']['requestBody'] + >['content']['application/json'] + | object; + + type FqdnsCreateResponse = + paths['/fqdns']['post']['responses']['201']['content']['application/json']; + + type FqdnsRetrieveId = + paths['/fqdns/{id}']['get']['parameters']['path']['id']; + + type FqdnsRetrieveParams = + paths['/fqdns/{id}']['get']['parameters']['query']; + + type FqdnsRetrieveResponse = + paths['/fqdns/{id}']['get']['responses']['200']['content']['application/json']; + + type FqdnsListParams = paths['/fqdns']['get']['parameters']['query']; + + type FqdnsListResponse = + paths['/fqdns']['get']['responses']['200']['content']['application/json']; + + type FqdnsUpdateId = + paths['/fqdns/{id}']['patch']['parameters']['path']['id']; + + type FqdnsUpdateParams = + | NonNullable< + paths['/fqdns/{id}']['patch']['requestBody'] + >['content']['application/json'] + | object; + + type FqdnsUpdateResponse = + paths['/fqdns/{id}']['patch']['responses']['200']['content']['application/json']; + + type FqdnsNestedMethods = { + create: FqdnsResource['create']; + del: FqdnsResource['del']; + }; + + class FqdnsResource { + del( + id: FqdnsDelId, + options?: RequestOptions, + ): Promise>; + + create( + params: FqdnsCreateParams, + options?: RequestOptions, + ): Promise< + Telnyx.Response< + Telnyx.FqdnsCreateResponse & + NestedResponseData + > + >; + + retrieve( + id: FqdnsRetrieveId, + options?: RequestOptions, + ): Promise< + Telnyx.Response< + Telnyx.FqdnsRetrieveResponse & + NestedResponseData< + FqdnsRetrieveResponse['data'], + FqdnsNestedMethods + > + > + >; + + list( + params?: FqdnsListParams, + options?: RequestOptions, + ): Promise>; + + update( + id: FqdnsUpdateId, + params: FqdnsUpdateParams, + options?: RequestOptions, + ): Promise>; + } + } +} diff --git a/types/InventoryCoverageResource.d.ts b/types/InventoryCoverageResource.d.ts new file mode 100644 index 0000000..6ddf881 --- /dev/null +++ b/types/InventoryCoverageResource.d.ts @@ -0,0 +1,23 @@ +import {paths} from './TelnyxAPI.js'; + +declare module 'telnyx' { + namespace Telnyx { + type InventoryCoverageListParams = + paths['/inventory_coverage']['get']['parameters']['query']; + + type InventoryCoverageListResponse = + paths['/inventory_coverage']['get']['responses']['200']['content']['application/json']; + + class InventoryCoverageResource { + list( + params?: InventoryCoverageListParams, + options?: RequestOptions, + ): Promise>; + + request( + params?: InventoryCoverageListParams, + options?: RequestOptions, + ): Promise>; + } + } +} diff --git a/types/IpConnectionsResource.d.ts b/types/IpConnectionsResource.d.ts new file mode 100644 index 0000000..eefb095 --- /dev/null +++ b/types/IpConnectionsResource.d.ts @@ -0,0 +1,93 @@ +import {paths} from './TelnyxAPI.js'; + +declare module 'telnyx' { + namespace Telnyx { + type IpConnectionsDelId = + paths['/ip_connections/{id}']['delete']['parameters']['path']['id']; + + type IpConnectionsDelParams = + paths['/ip_connections/{id}']['delete']['parameters']['query']; + + type IpConnectionsDelResponse = + paths['/ip_connections/{id}']['delete']['responses']['200']['content']['application/json']; + + type IpConnectionsCreateParams = + paths['/ip_connections']['post']['requestBody']['content']['application/json']; + + type IpConnectionsCreateResponse = + paths['/ip_connections']['post']['responses']['201']['content']['application/json']; + + type IpConnectionsRetrieveId = + paths['/ip_connections/{id}']['get']['parameters']['path']['id']; + + type IpConnectionsRetrieveParams = + paths['/ip_connections/{id}']['get']['parameters']['query']; + + type IpConnectionsRetrieveResponse = + paths['/ip_connections/{id}']['get']['responses']['200']['content']['application/json']; + + type IpConnectionsListParams = + paths['/ip_connections']['get']['parameters']['query']; + + type IpConnectionsListResponse = + paths['/ip_connections']['get']['responses']['200']['content']['application/json']; + + type IpConnectionsUpdateId = + paths['/ip_connections/{id}']['patch']['parameters']['path']['id']; + + type IpConnectionsUpdateParams = + paths['/ip_connections/{id}']['patch']['requestBody']['content']['application/json']; + + type IpConnectionsUpdateResponse = + paths['/ip_connections/{id}']['patch']['responses']['200']['content']['application/json']; + + type IpConnectionsNestedMethods = { + create: FqdnsResource['create']; + del: FqdnsResource['del']; + }; + + class IpConnectionsResource { + del( + id: IpConnectionsDelId, + options?: RequestOptions, + ): Promise>; + + create( + params: IpConnectionsCreateParams, + options?: RequestOptions, + ): Promise< + Telnyx.Response< + Telnyx.IpConnectionsCreateResponse & + NestedResponseData< + IpConnectionsCreateResponse['data'], + IpConnectionsNestedMethods + > + > + >; + + retrieve( + id: IpConnectionsRetrieveId, + options?: RequestOptions, + ): Promise< + Telnyx.Response< + Telnyx.IpConnectionsRetrieveResponse & + NestedResponseData< + IpConnectionsRetrieveResponse['data'], + IpConnectionsNestedMethods + > + > + >; + + list( + params?: IpConnectionsListParams, + options?: RequestOptions, + ): Promise>; + + update( + id: IpConnectionsUpdateId, + params: IpConnectionsUpdateParams, + options?: RequestOptions, + ): Promise>; + } + } +} diff --git a/types/IpsResource.d.ts b/types/IpsResource.d.ts new file mode 100644 index 0000000..1c72a99 --- /dev/null +++ b/types/IpsResource.d.ts @@ -0,0 +1,68 @@ +import {paths} from './TelnyxAPI.js'; + +declare module 'telnyx' { + namespace Telnyx { + type IpsDelId = paths['/ips/{id}']['delete']['parameters']['path']['id']; + + type IpsDelParams = paths['/ips/{id}']['delete']['parameters']['query']; + + type IpsDelResponse = + paths['/ips/{id}']['delete']['responses']['200']['content']['application/json']; + + type IpsCreateParams = NonNullable< + paths['/ips']['post']['requestBody'] + >['content']['application/json']; + + type IpsCreateResponse = + paths['/ips']['post']['responses']['201']['content']['application/json']; + + type IpsRetrieveId = paths['/ips/{id}']['get']['parameters']['path']['id']; + + type IpsRetrieveParams = paths['/ips/{id}']['get']['parameters']['query']; + + type IpsRetrieveResponse = + paths['/ips/{id}']['get']['responses']['200']['content']['application/json']; + + type IpsListParams = paths['/ips']['get']['parameters']['query']; + + type IpsListResponse = + paths['/ips']['get']['responses']['200']['content']['application/json']; + + type IpsUpdateId = paths['/ips/{id}']['patch']['parameters']['path']['id']; + + type IpsUpdateParams = NonNullable< + paths['/ips/{id}']['patch']['requestBody'] + >['content']['application/json']; + + type IpsUpdateResponse = + paths['/ips/{id}']['patch']['responses']['200']['content']['application/json']; + + class IpsResource { + del( + id: IpsDelId, + options?: RequestOptions, + ): Promise>; + + create( + params: IpsCreateParams, + options?: RequestOptions, + ): Promise>; + + retrieve( + id: IpsRetrieveId, + options?: RequestOptions, + ): Promise>; + + list( + params?: IpsListParams, + options?: RequestOptions, + ): Promise>; + + update( + id: IpsUpdateId, + params: IpsUpdateParams, + options?: RequestOptions, + ): Promise>; + } + } +} diff --git a/types/NotificationEventsResource.d.ts b/types/NotificationEventsResource.d.ts new file mode 100644 index 0000000..2bb9eed --- /dev/null +++ b/types/NotificationEventsResource.d.ts @@ -0,0 +1,18 @@ +import {paths} from './TelnyxAPI.js'; + +declare module 'telnyx' { + namespace Telnyx { + type NotificationEventsListParams = + paths['/notification_events']['get']['parameters']['query']; + + type NotificationEventsListResponse = + paths['/notification_events']['get']['responses']['200']['content']['application/json']; + + class NotificationEventsResource { + list( + params?: NotificationEventsListParams, + options?: RequestOptions, + ): Promise>; + } + } +} diff --git a/types/PhoneNumbersCsvDownloadsResource.d.ts b/types/PhoneNumbersCsvDownloadsResource.d.ts new file mode 100644 index 0000000..bead4c3 --- /dev/null +++ b/types/PhoneNumbersCsvDownloadsResource.d.ts @@ -0,0 +1,44 @@ +import {paths} from './TelnyxAPI.js'; + +declare module 'telnyx' { + namespace Telnyx { + type PhoneNumbersCsvDownloadsListParams = + paths['/phone_numbers/csv_downloads']['get']['parameters']['query']; + + type PhoneNumbersCsvDownloadsListResponse = + paths['/phone_numbers/csv_downloads']['get']['responses']['200']['content']['application/json']; + + type PhoneNumbersCsvDownloadsCreateParams = + paths['/phone_numbers/csv_downloads']['post']['requestBody']; + + type PhoneNumbersCsvDownloadsCreateResponse = + paths['/phone_numbers/csv_downloads']['post']['responses']['200']['content']['application/json']; + + type PhoneNumbersCsvDownloadsRetrieveId = + paths['/phone_numbers/csv_downloads/{id}']['get']['parameters']['path']['id']; + + type PhoneNumbersCsvDownloadsRetrieveResponse = + paths['/phone_numbers/csv_downloads/{id}']['get']['responses']['200']['content']['application/json']; + + class PhoneNumbersCsvDownloadsResource { + list( + params?: PhoneNumbersCsvDownloadsListParams, + options?: RequestOptions, + ): Promise>; + + create( + params: PhoneNumbersCsvDownloadsCreateParams, + options?: RequestOptions, + ): Promise< + Telnyx.Response + >; + + retrieve( + id: PhoneNumbersCsvDownloadsRetrieveId, + options?: RequestOptions, + ): Promise< + Telnyx.Response + >; + } + } +} diff --git a/types/PortingEventsResource.d.ts b/types/PortingEventsResource.d.ts new file mode 100644 index 0000000..651efe5 --- /dev/null +++ b/types/PortingEventsResource.d.ts @@ -0,0 +1,43 @@ +import {paths} from './TelnyxAPI.js'; + +declare module 'telnyx' { + namespace Telnyx { + type PortingEventsListParams = + paths['/porting/events']['get']['parameters']['query']; + + type PortingEventsListResponse = + paths['/porting/events']['get']['responses']['200']['content']['application/json']; + + type PortingEventsRetrieveId = + paths['/porting/events/{id}']['get']['parameters']['path']['id']; + + type PortingEventsRetrieveParams = + paths['/porting/events/{id}']['get']['parameters']['query']; + + type PortingEventsRetrieveResponse = + paths['/porting/events/{id}']['get']['responses']['200']['content']['application/json']; + + type PortingEventsRepublishId = + paths['/porting/events/{id}/republish']['post']['parameters']['path']['id']; + + type PortingEventsRepublishResponse = + paths['/porting/events/{id}/republish']['post']['responses']['204']['content']; + + class PortingEventsResource { + list( + params?: PortingEventsListParams, + options?: RequestOptions, + ): Promise>; + + retrieve( + id: PortingEventsRetrieveId, + options?: RequestOptions, + ): Promise>; + + republish( + id: PortingEventsRepublishId, + options?: RequestOptions, + ): Promise>; + } + } +} diff --git a/types/PortoutEventsResource.d.ts b/types/PortoutEventsResource.d.ts new file mode 100644 index 0000000..122d885 --- /dev/null +++ b/types/PortoutEventsResource.d.ts @@ -0,0 +1,43 @@ +import {paths} from './TelnyxAPI.js'; + +declare module 'telnyx' { + namespace Telnyx { + type PortoutEventsListParams = + paths['/portout/events']['get']['parameters']['query']; + + type PortoutEventsListResponse = + paths['/portout/events']['get']['responses']['200']['content']['application/json']; + + type PortoutEventsRetrieveId = + paths['/portout/events/{id}']['get']['parameters']['path']['id']; + + type PortoutEventsRetrieveParams = + paths['/portout/events/{id}']['get']['parameters']['query']; + + type PortoutEventsRetrieveResponse = + paths['/portout/events/{id}']['get']['responses']['200']['content']['application/json']; + + type PortoutEventsRepublishId = + paths['/porting/events/{id}/republish']['post']['parameters']['path']['id']; + + type PortoutEventsRepublishResponse = + paths['/porting/events/{id}/republish']['post']['responses']['204']['content']; + + class PortoutEventsResource { + list( + params?: PortoutEventsListParams, + options?: RequestOptions, + ): Promise>; + + retrieve( + id: PortoutEventsRetrieveId, + options?: RequestOptions, + ): Promise>; + + republish( + id: PortoutEventsRepublishId, + options?: RequestOptions, + ): Promise>; + } + } +} diff --git a/types/TexmlApplicationsResource.d.ts b/types/TexmlApplicationsResource.d.ts new file mode 100644 index 0000000..44cc4e6 --- /dev/null +++ b/types/TexmlApplicationsResource.d.ts @@ -0,0 +1,72 @@ +import {paths} from './TelnyxAPI.js'; + +declare module 'telnyx' { + namespace Telnyx { + type TexmlApplicationsDelId = + paths['/texml_applications/{id}']['delete']['parameters']['path']['id']; + + type TexmlApplicationsDelParams = + paths['/texml_applications/{id}']['delete']['parameters']['query']; + + type TexmlApplicationsDelResponse = + paths['/texml_applications/{id}']['delete']['responses']['200']['content']['application/json']; + + type TexmlApplicationsCreateParams = + paths['/texml_applications']['post']['requestBody']['content']['application/json']; + + type TexmlApplicationsCreateResponse = + paths['/texml_applications']['post']['responses']['201']['content']['application/json']; + + type TexmlApplicationsRetrieveId = + paths['/texml_applications/{id}']['get']['parameters']['path']['id']; + + type TexmlApplicationsRetrieveParams = + paths['/texml_applications/{id}']['get']['parameters']['query']; + + type TexmlApplicationsRetrieveResponse = + paths['/texml_applications/{id}']['get']['responses']['200']['content']['application/json']; + + type TexmlApplicationsListParams = + paths['/texml_applications']['get']['parameters']['query']; + + type TexmlApplicationsListResponse = + paths['/texml_applications']['get']['responses']['200']['content']['application/json']; + + type TexmlApplicationsUpdateId = + paths['/texml_applications/{id}']['patch']['parameters']['path']['id']; + + type TexmlApplicationsUpdateParams = + paths['/texml_applications/{id}']['patch']['requestBody']['content']['application/json']; + + type TexmlApplicationsUpdateResponse = + paths['/texml_applications/{id}']['patch']['responses']['200']['content']['application/json']; + + class TexmlApplicationsResource { + del( + id: TexmlApplicationsDelId, + options?: RequestOptions, + ): Promise>; + + create( + params: TexmlApplicationsCreateParams, + options?: RequestOptions, + ): Promise>; + + retrieve( + id: TexmlApplicationsRetrieveId, + options?: RequestOptions, + ): Promise>; + + list( + params?: TexmlApplicationsListParams, + options?: RequestOptions, + ): Promise>; + + update( + id: TexmlApplicationsUpdateId, + params: TexmlApplicationsUpdateParams, + options?: RequestOptions, + ): Promise>; + } + } +} diff --git a/types/index.d.ts b/types/index.d.ts index 7cf4410..1de8291 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -14,6 +14,7 @@ /// /// /// +/// /// /// /// @@ -33,12 +34,25 @@ /// /// /// +/// +/// +/// /// /// +/// +/// +/// +/// +/// /// /// +/// /// +/// +/// +/// /// +/// /// // @@ -64,6 +78,7 @@ declare module 'telnyx' { aiEmbeddingsSimilaritySearch: Telnyx.AiEmbeddingsSimilaritySearchResource; aiModels: Telnyx.AiModelsResource; aiSummarize: Telnyx.AiSummarizeResource; + auditEvents: Telnyx.AuditEventsResource; accessIpAddress: Telnyx.AccessIpAddressResource; accessIpRanges: Telnyx.AccessIpRangesResource; authenticationProviders: Telnyx.AuthenticationProvidersResource; @@ -79,14 +94,27 @@ declare module 'telnyx' { callRecordings: Telnyx.CallRecordingsResource; cdrUsageReports: Telnyx.CdrUsageReportsResource; channelzones: Telnyx.ChannelzonesResource; + customerServiceRecords: Telnyx.CustomerServiceRecordsResource; conferences: Telnyx.ConferencesResource; connections: Telnyx.ConnectionsResource; credentialConnections: Telnyx.CredentialConnectionsResource; + detailRecords: Telnyx.DetailRecordsResource; + dialogflowConnections: Telnyx.DialogflowConnectionsResource; documentLinks: Telnyx.DocumentLinksResource; documents: Telnyx.DocumentsResource; - telephonyCredentials: Telnyx.TelephonyCredentialsResource; + dynamicEmergency: Telnyx.DynamicEmergencyResource; + dynamicEmergencyAddresses: Telnyx.DynamicEmergencyAddressesResource; + dynamicEmergencyEndpoints: Telnyx.DynamicEmergencyEndpointsResource; + externalConnections: Telnyx.ExternalConnectionsResource; + faxApplications: Telnyx.FaxApplicationsResource; messagingProfiles: Telnyx.MessagingProfilesResource; - phoneNumberAssignmentByProfileResource: Telnyx.PhoneNumberAssignmentByProfileResource; + notificationEvents: Telnyx.NotificationEventsResource; + phoneNumberAssignmentByProfile: Telnyx.PhoneNumberAssignmentByProfileResource; + phoneNumbersCsvDownloads: Telnyx.PhoneNumbersCsvDownloadsResource; + portingEvents: Telnyx.PortingEventsResource; + portoutEvents: Telnyx.PortoutEventsResource; + telephonyCredentials: Telnyx.TelephonyCredentialsResource; + texmlApplications: Telnyx.TexmlApplicationsResource; storageBuckets: Telnyx.StorageBucketsResource; // From e3f8c13bd3a7137efd17728c2c50576489bedd51 Mon Sep 17 00:00:00 2001 From: Lucas Rosa Date: Wed, 9 Oct 2024 10:30:11 -0300 Subject: [PATCH 37/59] add missing Messages endpoints --- src/resources/Messages.ts | 26 +++++++++++ types/FqdnsResource.d.ts | 4 +- types/IpsResource.d.ts | 16 ++++--- types/MessagesResource.d.ts | 93 +++++++++++++++++++++++++++++++++++++ types/index.d.ts | 3 ++ 5 files changed, 134 insertions(+), 8 deletions(-) create mode 100644 types/MessagesResource.d.ts diff --git a/src/resources/Messages.ts b/src/resources/Messages.ts index cb2036d..7558efb 100644 --- a/src/resources/Messages.ts +++ b/src/resources/Messages.ts @@ -1,6 +1,32 @@ import TelnyxResource from '../TelnyxResource'; +const telnyxMethod = TelnyxResource.method; + export const Messages = TelnyxResource.extend({ path: 'messages', includeBasic: ['create', 'retrieve'], + + send: telnyxMethod({ + method: 'POST', + }), + + sendGroupMms: telnyxMethod({ + method: 'POST', + path: '/group_mms', + }), + + sendLongCode: telnyxMethod({ + method: 'POST', + path: '/long_code', + }), + + sendNumberPool: telnyxMethod({ + method: 'POST', + path: '/number_pool', + }), + + sendShortCode: telnyxMethod({ + method: 'POST', + path: '/short_code', + }), }); diff --git a/types/FqdnsResource.d.ts b/types/FqdnsResource.d.ts index 63a3cd1..2afff27 100644 --- a/types/FqdnsResource.d.ts +++ b/types/FqdnsResource.d.ts @@ -14,7 +14,7 @@ declare module 'telnyx' { | NonNullable< paths['/fqdns']['post']['requestBody'] >['content']['application/json'] - | object; + | Record; type FqdnsCreateResponse = paths['/fqdns']['post']['responses']['201']['content']['application/json']; @@ -40,7 +40,7 @@ declare module 'telnyx' { | NonNullable< paths['/fqdns/{id}']['patch']['requestBody'] >['content']['application/json'] - | object; + | Record; type FqdnsUpdateResponse = paths['/fqdns/{id}']['patch']['responses']['200']['content']['application/json']; diff --git a/types/IpsResource.d.ts b/types/IpsResource.d.ts index 1c72a99..1e562d6 100644 --- a/types/IpsResource.d.ts +++ b/types/IpsResource.d.ts @@ -9,9 +9,11 @@ declare module 'telnyx' { type IpsDelResponse = paths['/ips/{id}']['delete']['responses']['200']['content']['application/json']; - type IpsCreateParams = NonNullable< - paths['/ips']['post']['requestBody'] - >['content']['application/json']; + type IpsCreateParams = + | NonNullable< + paths['/ips']['post']['requestBody'] + >['content']['application/json'] + | Record; type IpsCreateResponse = paths['/ips']['post']['responses']['201']['content']['application/json']; @@ -30,9 +32,11 @@ declare module 'telnyx' { type IpsUpdateId = paths['/ips/{id}']['patch']['parameters']['path']['id']; - type IpsUpdateParams = NonNullable< - paths['/ips/{id}']['patch']['requestBody'] - >['content']['application/json']; + type IpsUpdateParams = + | NonNullable< + paths['/ips/{id}']['patch']['requestBody'] + >['content']['application/json'] + | Record; type IpsUpdateResponse = paths['/ips/{id}']['patch']['responses']['200']['content']['application/json']; diff --git a/types/MessagesResource.d.ts b/types/MessagesResource.d.ts new file mode 100644 index 0000000..a69df67 --- /dev/null +++ b/types/MessagesResource.d.ts @@ -0,0 +1,93 @@ +import {paths} from './TelnyxAPI.js'; + +declare module 'telnyx' { + namespace Telnyx { + type MessagesCreateParams = + | NonNullable< + paths['/messages']['post']['requestBody'] + >['content']['application/json'] + | Record; + + type MessagesCreateResponse = + paths['/messages']['post']['responses']['200']['content']['application/json']; + + type MessagesRetrieveId = + paths['/messages/{id}']['get']['parameters']['path']['id']; + + type MessagesRetrieveResponse = + paths['/messages/{id}']['get']['responses']['200']['content']['application/json']; + + type MessagesGroupMmsCreateParams = + | NonNullable< + paths['/messages/group_mms']['post']['requestBody'] + >['content']['application/json'] + | Record; + + type MessagesGroupMmsCreateResponse = + paths['/messages/group_mms']['post']['responses']['200']['content']['application/json']; + + type MessagesLongCodeCreateParams = + | NonNullable< + paths['/messages/long_code']['post']['requestBody'] + >['content']['application/json'] + | Record; + + type MessagesLongCodeCreateResponse = + paths['/messages/long_code']['post']['responses']['200']['content']['application/json']; + + type MessagesShortCodeCreateParams = + | NonNullable< + paths['/messages/short_code']['post']['requestBody'] + >['content']['application/json'] + | Record; + + type MessagesShortCodeCreateResponse = + paths['/messages/short_code']['post']['responses']['200']['content']['application/json']; + + type MessagesNumberPoolCreateParams = + | NonNullable< + paths['/messages/number_pool']['post']['requestBody'] + >['content']['application/json'] + | Record; + + type MessagesNumberPoolCreateResponse = + paths['/messages/number_pool']['post']['responses']['200']['content']['application/json']; + + class MessagesResource { + send( + params: MessagesCreateParams, + options?: RequestOptions, + ): Promise>; + + create( + params: MessagesCreateParams, + options?: RequestOptions, + ): Promise>; + + retrieve( + id: MessagesRetrieveId, + options?: RequestOptions, + ): Promise>; + + sendGroupMms( + params: MessagesGroupMmsCreateParams, + options?: RequestOptions, + ): Promise>; + + sendLongCode( + params: MessagesLongCodeCreateParams, + options?: RequestOptions, + ): Promise>; + + sendShortCode( + params: MessagesShortCodeCreateParams, + options?: RequestOptions, + ): Promise>; + + sendNumberPool( + params: MessagesNumberPoolCreateParams, + options?: RequestOptions, + ): Promise>; + } + } +} diff --git a/types/index.d.ts b/types/index.d.ts index 1de8291..86b3864 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -44,6 +44,7 @@ /// /// /// +/// /// /// /// @@ -107,6 +108,8 @@ declare module 'telnyx' { dynamicEmergencyEndpoints: Telnyx.DynamicEmergencyEndpointsResource; externalConnections: Telnyx.ExternalConnectionsResource; faxApplications: Telnyx.FaxApplicationsResource; + messages: Telnyx.MessagesResource; + messagingProfileMetrics: Telnyx.MessagingProfileMetricsResource; messagingProfiles: Telnyx.MessagingProfilesResource; notificationEvents: Telnyx.NotificationEventsResource; phoneNumberAssignmentByProfile: Telnyx.PhoneNumberAssignmentByProfileResource; From 9a0fe073e6ef3343812e4f71e145eb2665ac2604 Mon Sep 17 00:00:00 2001 From: Lucas Rosa Date: Wed, 9 Oct 2024 10:42:05 -0300 Subject: [PATCH 38/59] update type declarations --- types/index.d.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/types/index.d.ts b/types/index.d.ts index 86b3864..5336aa1 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -43,7 +43,13 @@ /// /// /// +/// /// +/// +/// +/// +/// +/// /// /// /// @@ -107,7 +113,13 @@ declare module 'telnyx' { dynamicEmergencyAddresses: Telnyx.DynamicEmergencyAddressesResource; dynamicEmergencyEndpoints: Telnyx.DynamicEmergencyEndpointsResource; externalConnections: Telnyx.ExternalConnectionsResource; + faxes: Telnyx.FaxesResource; faxApplications: Telnyx.FaxApplicationsResource; + fqdnConnections: Telnyx.FqdnConnectionsResource; + fqdns: Telnyx.FqdnsResource; + inventoryCoverage: Telnyx.InventoryCoverageResource; + ipConnections: Telnyx.IpConnectionsResource; + ips: Telnyx.IpsResource; messages: Telnyx.MessagesResource; messagingProfileMetrics: Telnyx.MessagingProfileMetricsResource; messagingProfiles: Telnyx.MessagingProfilesResource; From ef1361a33c9329539bf993a20525238abba2282e Mon Sep 17 00:00:00 2001 From: Lucas Rosa Date: Wed, 9 Oct 2024 10:45:22 -0300 Subject: [PATCH 39/59] update changelog and bump alpha version --- CHANGELOG.md | 7 ++++++- VERSION | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 876f1ed..b5b31db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,12 @@ - Remove `Debugging` dupe resource - Update syntax on `Events` resources -- Update `ExternalConnections` resource +- Update `ExternalConnections` stale resource +- Update `Messages` stale resource +- Update `Ip`s stale resources +- Update `AutorespConfigs` stale resource +- Update `DetailRecords` stale resource +- Update `InventoryCoverage` stale resource ### v2.0.0-alpha.5 diff --git a/VERSION b/VERSION index fe5c16b..e5e3d83 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.0.0-alpha.5 +2.0.0-alpha.6 diff --git a/package-lock.json b/package-lock.json index 8d69987..d6d4427 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "telnyx", - "version": "2.0.0-alpha.5", + "version": "2.0.0-alpha.6", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "telnyx", - "version": "2.0.0-alpha.5", + "version": "2.0.0-alpha.6", "license": "MIT", "devDependencies": { "@eslint/js": "^9.10.0", diff --git a/package.json b/package.json index f2ef2d3..f26cbcc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "telnyx", - "version": "2.0.0-alpha.5", + "version": "2.0.0-alpha.6", "description": "Telnyx API Node SDK", "keywords": [ "telnyx", From e4f2066ea7bf4c6a8c7c217b88d73e807560a959 Mon Sep 17 00:00:00 2001 From: Lucas Rosa Date: Wed, 9 Oct 2024 10:47:09 -0300 Subject: [PATCH 40/59] update changelog --- CHANGELOG.md | 19 ++++++++----------- VERSION | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 4 files changed, 12 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b5b31db..a5f8c84 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,17 +2,6 @@ ## v2 -### v2.0.0-alpha.6 - -- Remove `Debugging` dupe resource -- Update syntax on `Events` resources -- Update `ExternalConnections` stale resource -- Update `Messages` stale resource -- Update `Ip`s stale resources -- Update `AutorespConfigs` stale resource -- Update `DetailRecords` stale resource -- Update `InventoryCoverage` stale resource - ### v2.0.0-alpha.5 - Remove `ClientStateUpdate` resource @@ -22,6 +11,14 @@ - Remove `MessagingSenderIds` resource - Remove `PublicKey` resource - Remove `UpdateClientState` resource +- Remove `Debugging` dupe resource +- Update syntax on `Events` resources +- Update `ExternalConnections` stale resource +- Update `Messages` stale resource +- Update `Ip`s stale resources +- Update `AutorespConfigs` stale resource +- Update `DetailRecords` stale resource +- Update `InventoryCoverage` stale resource ### v2.0.0-alpha.4 diff --git a/VERSION b/VERSION index e5e3d83..fe5c16b 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.0.0-alpha.6 +2.0.0-alpha.5 diff --git a/package-lock.json b/package-lock.json index d6d4427..8d69987 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "telnyx", - "version": "2.0.0-alpha.6", + "version": "2.0.0-alpha.5", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "telnyx", - "version": "2.0.0-alpha.6", + "version": "2.0.0-alpha.5", "license": "MIT", "devDependencies": { "@eslint/js": "^9.10.0", diff --git a/package.json b/package.json index f26cbcc..f2ef2d3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "telnyx", - "version": "2.0.0-alpha.6", + "version": "2.0.0-alpha.5", "description": "Telnyx API Node SDK", "keywords": [ "telnyx", From 7bdc48efd33219394e34740e15fdca4b169763e7 Mon Sep 17 00:00:00 2001 From: Lucas Rosa Date: Wed, 9 Oct 2024 11:06:57 -0300 Subject: [PATCH 41/59] update examples --- examples/addresses/package-lock.json | 8 ++++---- examples/addresses/package.json | 2 +- examples/call-control/package-lock.json | 8 ++++---- examples/call-control/package.json | 2 +- examples/messaging/index.ts | 2 +- examples/messaging/package-lock.json | 8 ++++---- examples/messaging/package.json | 2 +- 7 files changed, 16 insertions(+), 16 deletions(-) diff --git a/examples/addresses/package-lock.json b/examples/addresses/package-lock.json index 86b7e70..d9dc9c0 100644 --- a/examples/addresses/package-lock.json +++ b/examples/addresses/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "ISC", "dependencies": { - "telnyx": "2.0.0-alpha.3" + "telnyx": "2.0.0-alpha.5" }, "devDependencies": { "@types/node": "^22.7.4", @@ -2083,9 +2083,9 @@ } }, "node_modules/telnyx": { - "version": "2.0.0-alpha.3", - "resolved": "https://registry.npmjs.org/telnyx/-/telnyx-2.0.0-alpha.3.tgz", - "integrity": "sha512-oSwK1e5mG0AG/Dv6/E7BhXRFB34ZWfVnNJEMgM/K+QTvgV2ozVzEq0juo2GQKLpacq6nI7hpjycVC8PumTb1YA==", + "version": "2.0.0-alpha.5", + "resolved": "https://registry.npmjs.org/telnyx/-/telnyx-2.0.0-alpha.5.tgz", + "integrity": "sha512-+X1WjWsvIR4N2+f7skBczmNT5rGSq4cQTUNRuKjm+gCxkjfgIj4fOUZ2+0tX1He06kekURq6d+vqIv/xj5g6tg==", "license": "MIT", "engines": { "node": "^18 || >=20" diff --git a/examples/addresses/package.json b/examples/addresses/package.json index c5c9f11..b898597 100644 --- a/examples/addresses/package.json +++ b/examples/addresses/package.json @@ -14,7 +14,7 @@ "node": "^18 || >=20" }, "dependencies": { - "telnyx": "2.0.0-alpha.3" + "telnyx": "2.0.0-alpha.5" }, "devDependencies": { "@types/node": "^22.7.4", diff --git a/examples/call-control/package-lock.json b/examples/call-control/package-lock.json index fdf8521..b929480 100644 --- a/examples/call-control/package-lock.json +++ b/examples/call-control/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "ISC", "dependencies": { - "telnyx": "2.0.0-alpha.3" + "telnyx": "2.0.0-alpha.5" }, "devDependencies": { "@types/node": "^22.7.4", @@ -2083,9 +2083,9 @@ } }, "node_modules/telnyx": { - "version": "2.0.0-alpha.3", - "resolved": "https://registry.npmjs.org/telnyx/-/telnyx-2.0.0-alpha.3.tgz", - "integrity": "sha512-oSwK1e5mG0AG/Dv6/E7BhXRFB34ZWfVnNJEMgM/K+QTvgV2ozVzEq0juo2GQKLpacq6nI7hpjycVC8PumTb1YA==", + "version": "2.0.0-alpha.5", + "resolved": "https://registry.npmjs.org/telnyx/-/telnyx-2.0.0-alpha.5.tgz", + "integrity": "sha512-+X1WjWsvIR4N2+f7skBczmNT5rGSq4cQTUNRuKjm+gCxkjfgIj4fOUZ2+0tX1He06kekURq6d+vqIv/xj5g6tg==", "license": "MIT", "engines": { "node": "^18 || >=20" diff --git a/examples/call-control/package.json b/examples/call-control/package.json index 02a06e2..01c6a67 100644 --- a/examples/call-control/package.json +++ b/examples/call-control/package.json @@ -14,7 +14,7 @@ "node": "^18 || >=20" }, "dependencies": { - "telnyx": "2.0.0-alpha.3" + "telnyx": "2.0.0-alpha.5" }, "devDependencies": { "@types/node": "^22.7.4", diff --git a/examples/messaging/index.ts b/examples/messaging/index.ts index 41b3721..5482a6c 100644 --- a/examples/messaging/index.ts +++ b/examples/messaging/index.ts @@ -16,7 +16,7 @@ const params: Telnyx.MessagingProfilesCreateParams = { webhook_api_version: '2', }; -(async function callControl() { +(async function messaging() { try { const {data: mp} = await telnyx.messagingProfiles.create(params); diff --git a/examples/messaging/package-lock.json b/examples/messaging/package-lock.json index 0d3dbd6..a5ca2ab 100644 --- a/examples/messaging/package-lock.json +++ b/examples/messaging/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "ISC", "dependencies": { - "telnyx": "2.0.0-alpha.3" + "telnyx": "2.0.0-alpha.5" }, "devDependencies": { "@types/node": "^22.7.4", @@ -2083,9 +2083,9 @@ } }, "node_modules/telnyx": { - "version": "2.0.0-alpha.3", - "resolved": "https://registry.npmjs.org/telnyx/-/telnyx-2.0.0-alpha.3.tgz", - "integrity": "sha512-oSwK1e5mG0AG/Dv6/E7BhXRFB34ZWfVnNJEMgM/K+QTvgV2ozVzEq0juo2GQKLpacq6nI7hpjycVC8PumTb1YA==", + "version": "2.0.0-alpha.5", + "resolved": "https://registry.npmjs.org/telnyx/-/telnyx-2.0.0-alpha.5.tgz", + "integrity": "sha512-+X1WjWsvIR4N2+f7skBczmNT5rGSq4cQTUNRuKjm+gCxkjfgIj4fOUZ2+0tX1He06kekURq6d+vqIv/xj5g6tg==", "license": "MIT", "engines": { "node": "^18 || >=20" diff --git a/examples/messaging/package.json b/examples/messaging/package.json index 363035b..f9725c2 100644 --- a/examples/messaging/package.json +++ b/examples/messaging/package.json @@ -14,7 +14,7 @@ "node": "^18 || >=20" }, "dependencies": { - "telnyx": "2.0.0-alpha.3" + "telnyx": "2.0.0-alpha.5" }, "devDependencies": { "@types/node": "^22.7.4", From 79a287c5e52d5f023c4f979e56f90618beff55e4 Mon Sep 17 00:00:00 2001 From: Lucas Rosa Date: Wed, 9 Oct 2024 13:53:19 -0300 Subject: [PATCH 42/59] update optional types --- CHANGELOG.md | 5 ++++ VERSION | 2 +- package-lock.json | 4 ++-- package.json | 2 +- types/FqdnsResource.d.ts | 20 ++++++++-------- types/IpsResource.d.ts | 20 ++++++++-------- types/MessagesResource.d.ts | 40 +++++++++++++++++++------------ types/StorageBucketsResource.d.ts | 19 +++++++-------- types/Webhooks.d.ts | 16 ++++++------- 9 files changed, 70 insertions(+), 58 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a5f8c84..418c3b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ ## v2 +### v2.0.0-alpha.6 + +- Update optional types on `Webhooks` +- Make optional types on `Fqdns`, `Ips`, `Messages` and `StorageBuckets` resources more strict + ### v2.0.0-alpha.5 - Remove `ClientStateUpdate` resource diff --git a/VERSION b/VERSION index fe5c16b..e5e3d83 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.0.0-alpha.5 +2.0.0-alpha.6 diff --git a/package-lock.json b/package-lock.json index 8d69987..d6d4427 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "telnyx", - "version": "2.0.0-alpha.5", + "version": "2.0.0-alpha.6", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "telnyx", - "version": "2.0.0-alpha.5", + "version": "2.0.0-alpha.6", "license": "MIT", "devDependencies": { "@eslint/js": "^9.10.0", diff --git a/package.json b/package.json index f2ef2d3..f26cbcc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "telnyx", - "version": "2.0.0-alpha.5", + "version": "2.0.0-alpha.6", "description": "Telnyx API Node SDK", "keywords": [ "telnyx", diff --git a/types/FqdnsResource.d.ts b/types/FqdnsResource.d.ts index 2afff27..a1a39d9 100644 --- a/types/FqdnsResource.d.ts +++ b/types/FqdnsResource.d.ts @@ -10,11 +10,11 @@ declare module 'telnyx' { type FqdnsDelResponse = paths['/fqdns/{id}']['delete']['responses']['200']['content']['application/json']; - type FqdnsCreateParams = - | NonNullable< - paths['/fqdns']['post']['requestBody'] - >['content']['application/json'] - | Record; + type FqdnsCreateOptionalParams = NonNullable< + paths['/fqdns']['post']['requestBody'] + >['content']['application/json']; + + type FqdnsCreateParams = FqdnsCreateOptionalParams | Record; type FqdnsCreateResponse = paths['/fqdns']['post']['responses']['201']['content']['application/json']; @@ -36,11 +36,11 @@ declare module 'telnyx' { type FqdnsUpdateId = paths['/fqdns/{id}']['patch']['parameters']['path']['id']; - type FqdnsUpdateParams = - | NonNullable< - paths['/fqdns/{id}']['patch']['requestBody'] - >['content']['application/json'] - | Record; + type FqdnsUpdateOptionalParams = NonNullable< + paths['/fqdns/{id}']['patch']['requestBody'] + >['content']['application/json']; + + type FqdnsUpdateParams = FqdnsUpdateOptionalParams | Record; type FqdnsUpdateResponse = paths['/fqdns/{id}']['patch']['responses']['200']['content']['application/json']; diff --git a/types/IpsResource.d.ts b/types/IpsResource.d.ts index 1e562d6..23e4057 100644 --- a/types/IpsResource.d.ts +++ b/types/IpsResource.d.ts @@ -9,11 +9,11 @@ declare module 'telnyx' { type IpsDelResponse = paths['/ips/{id}']['delete']['responses']['200']['content']['application/json']; - type IpsCreateParams = - | NonNullable< - paths['/ips']['post']['requestBody'] - >['content']['application/json'] - | Record; + type IpsCreateOptionalParams = NonNullable< + paths['/ips']['post']['requestBody'] + >['content']['application/json']; + + type IpsCreateParams = IpsCreateOptionalParams | Record; type IpsCreateResponse = paths['/ips']['post']['responses']['201']['content']['application/json']; @@ -32,11 +32,11 @@ declare module 'telnyx' { type IpsUpdateId = paths['/ips/{id}']['patch']['parameters']['path']['id']; - type IpsUpdateParams = - | NonNullable< - paths['/ips/{id}']['patch']['requestBody'] - >['content']['application/json'] - | Record; + type IpsUpdateOptionalParams = NonNullable< + paths['/ips/{id}']['patch']['requestBody'] + >['content']['application/json']; + + type IpsUpdateParams = IpsUpdateOptionalParams | Record; type IpsUpdateResponse = paths['/ips/{id}']['patch']['responses']['200']['content']['application/json']; diff --git a/types/MessagesResource.d.ts b/types/MessagesResource.d.ts index a69df67..c21e018 100644 --- a/types/MessagesResource.d.ts +++ b/types/MessagesResource.d.ts @@ -2,10 +2,12 @@ import {paths} from './TelnyxAPI.js'; declare module 'telnyx' { namespace Telnyx { + type MessagesCreateOptionalParams = NonNullable< + paths['/messages']['post']['requestBody'] + >['content']['application/json']; + type MessagesCreateParams = - | NonNullable< - paths['/messages']['post']['requestBody'] - >['content']['application/json'] + | MessagesCreateOptionalParams | Record; type MessagesCreateResponse = @@ -17,37 +19,45 @@ declare module 'telnyx' { type MessagesRetrieveResponse = paths['/messages/{id}']['get']['responses']['200']['content']['application/json']; + type MessagesGroupMmsCreateOptionalParams = NonNullable< + paths['/messages/group_mms']['post']['requestBody'] + >['content']['application/json']; + type MessagesGroupMmsCreateParams = - | NonNullable< - paths['/messages/group_mms']['post']['requestBody'] - >['content']['application/json'] + | MessagesGroupMmsCreateOptionalParams | Record; type MessagesGroupMmsCreateResponse = paths['/messages/group_mms']['post']['responses']['200']['content']['application/json']; + type MessagesLongCodeCreateOptionalParams = NonNullable< + paths['/messages/long_code']['post']['requestBody'] + >['content']['application/json']; + type MessagesLongCodeCreateParams = - | NonNullable< - paths['/messages/long_code']['post']['requestBody'] - >['content']['application/json'] + | MessagesLongCodeCreateOptionalParams | Record; type MessagesLongCodeCreateResponse = paths['/messages/long_code']['post']['responses']['200']['content']['application/json']; + type MessagesShortCodeCreateOptionalParams = NonNullable< + paths['/messages/short_code']['post']['requestBody'] + >['content']['application/json']; + type MessagesShortCodeCreateParams = - | NonNullable< - paths['/messages/short_code']['post']['requestBody'] - >['content']['application/json'] + | MessagesShortCodeCreateOptionalParams | Record; type MessagesShortCodeCreateResponse = paths['/messages/short_code']['post']['responses']['200']['content']['application/json']; + type MessagesNumberPoolCreateOptionalParams = NonNullable< + paths['/messages/number_pool']['post']['requestBody'] + >['content']['application/json']; + type MessagesNumberPoolCreateParams = - | NonNullable< - paths['/messages/number_pool']['post']['requestBody'] - >['content']['application/json'] + | MessagesNumberPoolCreateOptionalParams | Record; type MessagesNumberPoolCreateResponse = diff --git a/types/StorageBucketsResource.d.ts b/types/StorageBucketsResource.d.ts index 0b65968..debca88 100644 --- a/types/StorageBucketsResource.d.ts +++ b/types/StorageBucketsResource.d.ts @@ -23,16 +23,13 @@ declare module 'telnyx' { type StorageBucketsDelSSLCertificateName = paths['/storage/buckets/{bucketName}/ssl_certificate']['delete']['parameters']['path']['bucketName']; - type StorageBucketsAddSSLCertificateOptionalParam = - paths['/storage/buckets/{bucketName}/ssl_certificate']['put']['requestBody']; + type StorageBucketsAddSSLCertificateOptionalParams = NonNullable< + paths['/storage/buckets/{bucketName}/ssl_certificate']['put']['requestBody'] + >['content']['multipart/form-data']; - type StorageBucketsAddSSLCertificateParam< - T extends StorageBucketsAddSSLCertificateOptionalParam, - > = T extends undefined - ? undefined - : T extends {content: {'multipart/form-data': infer U}} - ? U - : never; + type StorageBucketsAddSSLCertificateParams = + | StorageBucketsAddSSLCertificateOptionalParams + | Record; type StorageBucketsSSLCertificateResponse = paths['/storage/buckets/{bucketName}/ssl_certificate']['get']['responses']['200']['content']['application/json']; @@ -59,9 +56,9 @@ declare module 'telnyx' { options?: RequestOptions, ): Promise>; - addSslCertificate( + addSslCertificate( bucketName: StorageBucketsSSLCertificateName, - params: StorageBucketsAddSSLCertificateParam, + params: StorageBucketsAddSSLCertificateParams, options?: RequestOptions, ): Promise>; diff --git a/types/Webhooks.d.ts b/types/Webhooks.d.ts index 3fc96b3..55a2771 100644 --- a/types/Webhooks.d.ts +++ b/types/Webhooks.d.ts @@ -7,18 +7,18 @@ declare module 'telnyx' { DEFAULT_TOLERANCE: number; constructEvent: ( payload: WebhookPayload, - signatureHeader: WebhookHeader, - timestampHeader: WebhookHeader, - publicKey: string, - tolerance: number, + signatureHeader: WebhookHeader | undefined, + timestampHeader: string | undefined, + publicKey: Uint8Array, + tolerance?: number, ) => unknown; signature: { verifySignature: ( - payload: string, + payload: WebhookPayload, signatureHeader: WebhookHeader | undefined, - timestampHeader: WebhookHeader | undefined, - publicKey: string, - tolerance: number, + timestampHeader: string, + publicKey: Uint8Array, + tolerance?: number, ) => boolean; }; } From 5ea897c587550351688361810c46791f05cd50e0 Mon Sep 17 00:00:00 2001 From: Lucas Rosa Date: Wed, 9 Oct 2024 19:05:32 -0300 Subject: [PATCH 43/59] export events type defs --- CHANGELOG.md | 4 ++ VERSION | 2 +- package-lock.json | 4 +- package.json | 2 +- types/Events.d.ts | 102 ++++++++++++++++++++++++++++++++++++++++++++++ types/index.d.ts | 1 + 6 files changed, 111 insertions(+), 4 deletions(-) create mode 100644 types/Events.d.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 418c3b4..0206dca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## v2 +### v2.0.0-alpha.7 + +- Export API callback `events` type definitions + ### v2.0.0-alpha.6 - Update optional types on `Webhooks` diff --git a/VERSION b/VERSION index e5e3d83..f6b05cc 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.0.0-alpha.6 +2.0.0-alpha.7 diff --git a/package-lock.json b/package-lock.json index d6d4427..72e78ab 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "telnyx", - "version": "2.0.0-alpha.6", + "version": "2.0.0-alpha.7", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "telnyx", - "version": "2.0.0-alpha.6", + "version": "2.0.0-alpha.7", "license": "MIT", "devDependencies": { "@eslint/js": "^9.10.0", diff --git a/package.json b/package.json index f26cbcc..d0b05ba 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "telnyx", - "version": "2.0.0-alpha.6", + "version": "2.0.0-alpha.7", "description": "Telnyx API Node SDK", "keywords": [ "telnyx", diff --git a/types/Events.d.ts b/types/Events.d.ts new file mode 100644 index 0000000..1cbb325 --- /dev/null +++ b/types/Events.d.ts @@ -0,0 +1,102 @@ +import {components} from './TelnyxAPI.js'; + +declare module 'telnyx' { + namespace Telnyx { + namespace events { + type CallAIGatherEndedEvent = + components['schemas']['CallAIGatherEndedEvent']; + type CallAnsweredEvent = components['schemas']['CallAnsweredEvent']; + type CallBridgedEvent = components['schemas']['CallBridgedEvent']; + type CallDtmfReceivedEvent = + components['schemas']['CallDtmfReceivedEvent']; + type CallEnqueuedEvent = components['schemas']['CallEnqueuedEvent']; + type CallEvent = components['schemas']['CallEvent']; + type CallForkStartedEvent = components['schemas']['CallForkStartedEvent']; + type CallForkStoppedEvent = components['schemas']['CallForkStoppedEvent']; + type CallGatherEndedEvent = components['schemas']['CallGatherEndedEvent']; + type CallHangupEvent = components['schemas']['CallHangupEvent']; + type CallInitiatedEvent = components['schemas']['CallInitiatedEvent']; + type CallLeftQueueEvent = components['schemas']['CallLeftQueueEvent']; + type CallMachineDetectionEndedEvent = + components['schemas']['CallMachineDetectionEndedEvent']; + type CallMachineGreetingEndedEvent = + components['schemas']['CallMachineGreetingEndedEvent']; + type CallMachinePremiumDetectionEndedEvent = + components['schemas']['CallMachinePremiumDetectionEndedEvent']; + type CallMachinePremiumGreetingEndedEvent = + components['schemas']['CallMachinePremiumGreetingEndedEvent']; + type CallPlaybackEndedEvent = + components['schemas']['CallPlaybackEndedEvent']; + type CallPlaybackStartedEvent = + components['schemas']['CallPlaybackStartedEvent']; + type CallRecordingErrorEvent = + components['schemas']['callRecordingErrorEvent']; + type CallRecordingSavedEvent = + components['schemas']['CallRecordingSavedEvent']; + type CallReferCompletedEvent = + components['schemas']['CallReferCompletedEvent']; + type CallReferFailedEvent = components['schemas']['CallReferFailedEvent']; + type CallReferStartedEvent = + components['schemas']['CallReferStartedEvent']; + type CallSpeakEndedEvent = components['schemas']['CallSpeakEndedEvent']; + type CallSpeakStartedEvent = + components['schemas']['CallSpeakStartedEvent']; + type CallStreamingFailedEvent = + components['schemas']['CallStreamingFailedEvent']; + type CallStreamingStartedEvent = + components['schemas']['CallStreamingStartedEvent']; + type CallStreamingStoppedEvent = + components['schemas']['CallStreamingStoppedEvent']; + type CampaignStatusUpdateEvent = + components['schemas']['CampaignStatusUpdateEvent']; + type CompositionCompletedEvent = + components['schemas']['CompositionCompletedEvent']; + type ConferenceCreatedEvent = + components['schemas']['ConferenceCreatedEvent']; + type ConferenceEndedEvent = components['schemas']['ConferenceEndedEvent']; + type ConferenceFloorChangedEvent = + components['schemas']['ConferenceFloorChangedEvent']; + type ConferenceParticipantJoinedEvent = + components['schemas']['ConferenceParticipantJoinedEvent']; + type ConferenceParticipantLeftEvent = + components['schemas']['ConferenceParticipantLeftEvent']; + type ConferenceParticipantPlaybackEndedEvent = + components['schemas']['ConferenceParticipantPlaybackEndedEvent']; + type ConferenceParticipantPlaybackStartedEvent = + components['schemas']['ConferenceParticipantPlaybackStartedEvent']; + type ConferenceParticipantSpeakEndedEvent = + components['schemas']['ConferenceParticipantSpeakEndedEvent']; + type ConferenceParticipantSpeakStartedEvent = + components['schemas']['ConferenceParticipantSpeakStartedEvent']; + type ConferencePlaybackEndedEvent = + components['schemas']['ConferencePlaybackEndedEvent']; + type ConferencePlaybackStartedEvent = + components['schemas']['ConferencePlaybackStartedEvent']; + type ConferenceRecordingSavedEvent = + components['schemas']['ConferenceRecordingSavedEvent']; + type ConferenceSpeakEndedEvent = + components['schemas']['ConferenceSpeakEndedEvent']; + type ConferenceSpeakStartedEvent = + components['schemas']['ConferenceSpeakStartedEvent']; + type CustomerServiceRecordStatusChangedEvent = + components['schemas']['CustomerServiceRecordStatusChangedEvent']; + type InboundMessageEvent = components['schemas']['InboundMessageEvent']; + type NumberOrderBlockEvent = + components['schemas']['NumberOrderBlockEvent']; + type NumberOrderedEvent = components['schemas']['NumberOrderedEvent']; + type OutboundMessageEvent = components['schemas']['OutboundMessageEvent']; + type ParticipantJoinedEvent = + components['schemas']['ParticipantJoinedEvent']; + type ParticipantLeftEvent = components['schemas']['ParticipantLeftEvent']; + type RecordingCompletedEvent = + components['schemas']['RecordingCompletedEvent']; + type RecordingStartedEvent = + components['schemas']['RecordingStartedEvent']; + type ReplacedLinkClickEvent = + components['schemas']['ReplacedLinkClickEvent']; + type SessionEndedEvent = components['schemas']['SessionEndedEvent']; + type SessionStartedEvent = components['schemas']['SessionStartedEvent']; + type TranscriptionEvent = components['schemas']['TranscriptionEvent']; + } + } +} diff --git a/types/index.d.ts b/types/index.d.ts index 5336aa1..dfeb8f0 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -3,6 +3,7 @@ /// /// /// +/// /// // Resources imports From 1275a8144e797daf659a0e3f71af6bea4b859c74 Mon Sep 17 00:00:00 2001 From: Lucas Rosa Date: Thu, 10 Oct 2024 17:47:48 -0300 Subject: [PATCH 44/59] fix nested resources logic --- CHANGELOG.md | 9 + VERSION | 2 +- package-lock.json | 4 +- package.json | 2 +- src/TelnyxResource.ts | 5 +- src/resources/AutorespConfigs.ts | 13 - src/resources/Brands.ts | 2 +- src/resources/Calls.ts | 14 +- src/resources/Conferences.ts | 75 ++-- src/resources/MessagingProfiles.ts | 118 +++-- src/telnyx.ts | 2 - src/test/resources/Calls.test.ts | 40 +- src/test/resources/Conferences.test.ts | 64 ++- src/test/resources/MessagingProfiles.test.ts | 440 +++++++++++++++---- types/AutorespConfigsResource.d.ts | 74 ---- types/BrandsResource.d.ts | 52 +-- types/CallsResource.d.ts | 224 ++++++++-- types/ChannelzonesResource.d.ts | 20 +- types/ConferencesResource.d.ts | 118 ++++- types/MessagingProfilesResource.d.ts | 138 +++++- types/index.d.ts | 2 - 21 files changed, 1045 insertions(+), 373 deletions(-) delete mode 100644 src/resources/AutorespConfigs.ts delete mode 100644 types/AutorespConfigsResource.d.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 0206dca..54a6b53 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,15 @@ ## v2 +### v2.0.0-alpha.8 + +- Move `AutorespConfigs` resource to be nested in `MessagingProfiles` +- Fix nested resources in `Calls`, `MessagingProfiles` and `Conferences` ID usage instead of using constructors data +- Fix nested resources `Calls`, `MessagingProfiles` and `Conferences` method names +- Fix `Brand` resources method name +- Fix bug on `DELETE` operations empty `responseBody` JSON Parsing +- Update types on resources methods with multiple urlParams + ### v2.0.0-alpha.7 - Export API callback `events` type definitions diff --git a/VERSION b/VERSION index f6b05cc..c20cf85 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.0.0-alpha.7 +2.0.0-alpha.8 diff --git a/package-lock.json b/package-lock.json index 72e78ab..7ce2423 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "telnyx", - "version": "2.0.0-alpha.7", + "version": "2.0.0-alpha.8", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "telnyx", - "version": "2.0.0-alpha.7", + "version": "2.0.0-alpha.8", "license": "MIT", "devDependencies": { "@eslint/js": "^9.10.0", diff --git a/package.json b/package.json index d0b05ba..8ad0238 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "telnyx", - "version": "2.0.0-alpha.7", + "version": "2.0.0-alpha.8", "description": "Telnyx API Node SDK", "keywords": [ "telnyx", diff --git a/src/TelnyxResource.ts b/src/TelnyxResource.ts index 1516402..af5cec2 100644 --- a/src/TelnyxResource.ts +++ b/src/TelnyxResource.ts @@ -195,7 +195,10 @@ TelnyxResource.prototype = { try { responseBody = utils.tryParseJSON(response); - if (responseBody.errors) { + // JSON response might be empty on deletion operations + if (!responseBody) { + responseBody = {}; + } else if (responseBody.errors) { const error = {} as TelnyxError.TelnyxRawError; error.errors = diff --git a/src/resources/AutorespConfigs.ts b/src/resources/AutorespConfigs.ts deleted file mode 100644 index ae460c0..0000000 --- a/src/resources/AutorespConfigs.ts +++ /dev/null @@ -1,13 +0,0 @@ -import TelnyxResource from '../TelnyxResource'; -const telnyxMethod = TelnyxResource.method; - -export const AutorespConfigs = TelnyxResource.extend({ - path: 'messaging_profiles/{profile_id}/autoresp_configs', - includeBasic: ['del', 'list', 'create', 'retrieve'], - - update: telnyxMethod({ - method: 'PUT', - path: '/{autoresp_cfg_id}', - urlParams: ['profile_id', 'autoresp_cfg_id'], - }), -}); diff --git a/src/resources/Brands.ts b/src/resources/Brands.ts index f1f299c..dfdc025 100644 --- a/src/resources/Brands.ts +++ b/src/resources/Brands.ts @@ -37,7 +37,7 @@ export const Brands = TelnyxResource.extend({ methodType: 'list', }), - exportExternalVettings: telnyxMethod({ + importExternalVettings: telnyxMethod({ method: 'PUT', path: '/brand/{brandId}/externalVetting', urlParams: ['brandId'], diff --git a/src/resources/Calls.ts b/src/resources/Calls.ts index b0f11a9..affdec3 100644 --- a/src/resources/Calls.ts +++ b/src/resources/Calls.ts @@ -34,12 +34,24 @@ const CALL_COMMANDS = [ ]; function getSpec(callControlId?: string) { + if (callControlId) { + return function (methodName: string) { + return { + method: 'POST', + path: `/{call_control_id}/actions/${methodName}`, + urlParams: ['call_control_id'], + paramsValues: [callControlId], + paramsNames: ['call_control_id'], + methodType: 'create', + }; + }; + } + return function (methodName: string) { return { method: 'POST', path: `/{call_control_id}/actions/${methodName}`, urlParams: ['call_control_id'], - paramsValues: [callControlId as string], paramsNames: ['call_control_id'], methodType: 'create', }; diff --git a/src/resources/Conferences.ts b/src/resources/Conferences.ts index 1640f17..007d879 100644 --- a/src/resources/Conferences.ts +++ b/src/resources/Conferences.ts @@ -1,8 +1,9 @@ import TelnyxResource from '../TelnyxResource'; +import {ResponsePayload, TelnyxObject} from '../Types'; import * as utils from '../utils'; const telnyxMethod = TelnyxResource.method; -const CONFERENCES = [ +const CONFERENCES_COMMANDS = [ 'join', 'mute', 'unmute', @@ -20,18 +21,54 @@ const CONFERENCES = [ ]; function getSpec(conferenceId?: string) { + if (conferenceId) { + return function (methodName: string) { + return { + method: 'POST', + path: `/{conferenceId}/actions/${methodName}`, + urlParams: ['conferenceId'], + paramsValues: [conferenceId], + paramsNames: ['conferenceId'], + methodType: 'create', + }; + }; + } + return function (methodName: string) { return { method: 'POST', path: `/{conferenceId}/actions/${methodName}`, urlParams: ['conferenceId'], - paramsValues: [conferenceId as string], - paramsNames: ['id'], + paramsNames: ['conferenceId'], methodType: 'create', }; }; } +const transformResponseData = ( + response: ResponsePayload, + telnyx: TelnyxObject, +) => { + const methods = utils.createNestedMethods( + telnyxMethod, + CONFERENCES_COMMANDS, + getSpec(response.data.id as string), + ); + + methods.listParticipants = telnyxMethod({ + method: 'GET', + path: '/{conferenceId}/participants', + urlParams: ['conferenceId'], + }); + + return utils.addResourceToResponseData( + response, + telnyx, + 'conferences', + methods, + ); +}; + export const Conferences = TelnyxResource.extend({ path: 'conferences', includeBasic: ['list'], @@ -40,39 +77,15 @@ export const Conferences = TelnyxResource.extend({ method: 'GET', path: '/{id}', urlParams: ['id'], - - transformResponseData: function (response, telnyx) { - return utils.addResourceToResponseData( - response, - telnyx, - 'conferences', - utils.createNestedMethods( - telnyxMethod, - CONFERENCES, - getSpec(response.data.id as string), - ), - ); - }, + transformResponseData: transformResponseData, }), create: telnyxMethod({ method: 'POST', - - transformResponseData: function (response, telnyx) { - return utils.addResourceToResponseData( - response, - telnyx, - 'conferences', - utils.createNestedMethods( - telnyxMethod, - CONFERENCES, - getSpec(response.data.id as string), - ), - ); - }, + transformResponseData: transformResponseData, }), - participants: telnyxMethod({ + listParticipants: telnyxMethod({ method: 'GET', path: '/{conferenceId}/participants', urlParams: ['conferenceId'], @@ -80,7 +93,7 @@ export const Conferences = TelnyxResource.extend({ instanceMethods: utils.createNestedMethods( telnyxMethod, - CONFERENCES, + CONFERENCES_COMMANDS, getSpec(), ), }); diff --git a/src/resources/MessagingProfiles.ts b/src/resources/MessagingProfiles.ts index cbeaf08..78b80f9 100644 --- a/src/resources/MessagingProfiles.ts +++ b/src/resources/MessagingProfiles.ts @@ -1,11 +1,11 @@ -import telnyx from 'telnyx'; +import Telnyx from 'telnyx'; import TelnyxResource from '../TelnyxResource'; import {ResponsePayload, TelnyxObject} from '../Types'; import * as utils from '../utils'; const telnyxMethod = TelnyxResource.method; -const ACTIONS = ['phone_numbers', 'short_codes', 'metrics', 'autoresp_configs']; +const MESSAGING_PROFILES_COMMANDS = ['phone_numbers', 'short_codes']; function getSpec(messagingProfileId?: string) { return function (methodName: string) { @@ -14,19 +14,19 @@ function getSpec(messagingProfileId?: string) { path: `/{messagingProfileId}/${methodName}`, urlParams: ['messagingProfileId'], paramsValues: [messagingProfileId as string], - paramsNames: ['id'], + paramsNames: ['messagingProfileId'], methodType: 'list', }; }; } const transformResponseData = ( - response: ResponsePayload, + response: ResponsePayload, telnyx: TelnyxObject, ) => { const methods = utils.createNestedMethods( telnyxMethod, - ACTIONS, + MESSAGING_PROFILES_COMMANDS, getSpec(response.data.id as string), ); @@ -35,7 +35,59 @@ const transformResponseData = ( path: '/{messagingProfileId}', urlParams: ['messagingProfileId'], paramsValues: [response.data.id as string], - paramsNames: ['id'], + paramsNames: ['messagingProfileId'], + }); + + methods.listAutorespConfigs = telnyxMethod({ + method: 'GET', + path: '/{profileId}/autoresp_configs', + urlParams: ['profileId'], + paramsValues: [response.data.id as string], + paramsNames: ['profileId'], + methodType: 'list', + }); + + methods.createAutorespConfig = telnyxMethod({ + method: 'POST', + path: '/{profileId}/autoresp_configs', + urlParams: ['profileId'], + paramsValues: [response.data.id as string], + paramsNames: ['profileId'], + methodType: 'create', + }); + + methods.delAutorespConfig = telnyxMethod({ + method: 'DELETE', + path: '/{profileId}/autoresp_configs/{autorespCfgId}', + paramsValues: [response.data.id as string], + urlParams: ['profileId', 'autorespCfgId'], + paramsNames: ['profileId', 'autorespCfgId'], + }); + + methods.retrieveAutorespConfig = telnyxMethod({ + method: 'GET', + path: '/{profileId}/autoresp_configs/{autorespCfgId}', + paramsValues: [response.data.id as string], + urlParams: ['profileId', 'autorespCfgId'], + paramsNames: ['profileId', 'autorespCfgId'], + methodType: 'retrieve', + }); + + methods.updateAutorespConfig = telnyxMethod({ + method: 'PUT', + path: '/{profileId}/autoresp_configs/{autorespCfgId}', + paramsValues: [response.data.id as string], + urlParams: ['profileId', 'autorespCfgId'], + paramsNames: ['profileId', 'autorespCfgId'], + }); + + methods.retrieveMetrics = telnyxMethod({ + method: 'GET', + path: '/{messagingProfileId}/metrics', + urlParams: ['messagingProfileId'], + paramsValues: [response.data.id as string], + paramsNames: ['messagingProfileId'], + methodType: 'retrieve', }); return utils.addResourceToResponseData( @@ -70,12 +122,6 @@ export const MessagingProfiles = TelnyxResource.extend({ methodType: 'list', }), - phoneNumbers: telnyxMethod({ - method: 'GET', - path: '/{messagingProfileId}/phone_numbers', - urlParams: ['messagingProfileId'], - }), - listShortCodes: telnyxMethod({ method: 'GET', path: '/{messagingProfileId}/short_codes', @@ -83,30 +129,48 @@ export const MessagingProfiles = TelnyxResource.extend({ methodType: 'list', }), - shortCodes: telnyxMethod({ + listAutorespConfigs: telnyxMethod({ method: 'GET', - path: '/{messagingProfileId}/short_codes', - urlParams: ['messagingProfileId'], + path: '/{profileId}/autoresp_configs', + urlParams: ['profileId'], + paramsNames: ['profileId'], + methodType: 'list', }), - retrieveMetrics: telnyxMethod({ + createAutorespConfig: telnyxMethod({ + method: 'POST', + path: '/{profileId}/autoresp_configs', + urlParams: ['profileId'], + paramsNames: ['profileId'], + methodType: 'create', + }), + + delAutorespConfig: telnyxMethod({ + method: 'DELETE', + path: '/{profileId}/autoresp_configs/{autorespCfgId}', + urlParams: ['profileId', 'autorespCfgId'], + paramsNames: ['profileId', 'autorespCfgId'], + }), + + retrieveAutorespConfig: telnyxMethod({ method: 'GET', - path: '/{messagingProfileId}/metrics', - urlParams: ['messagingProfileId'], + path: '/{profileId}/autoresp_configs/{autorespCfgId}', + urlParams: ['profileId', 'autorespCfgId'], + paramsNames: ['profileId', 'autorespCfgId'], methodType: 'retrieve', }), - autorespConfigs: telnyxMethod({ - method: 'GET', - path: '/{messagingProfileId}/autoresp_configs', - urlParams: ['messagingProfileId'], - methodType: 'list', + updateAutorespConfig: telnyxMethod({ + method: 'PUT', + path: '/{profileId}/autoresp_configs/{autorespCfgId}', + urlParams: ['profileId', 'autorespCfgId'], + paramsNames: ['profileId', 'autorespCfgId'], }), - listAutorespConfigs: telnyxMethod({ + retrieveMetrics: telnyxMethod({ method: 'GET', - path: '/{messagingProfileId}/autoresp_configs', - urlParams: ['messagingProfileId'], - methodType: 'list', + path: '/{id}/metrics', + urlParams: ['id'], + methodType: 'retrieve', }), }); diff --git a/src/telnyx.ts b/src/telnyx.ts index f1bf253..783bae9 100644 --- a/src/telnyx.ts +++ b/src/telnyx.ts @@ -12,7 +12,6 @@ import {Actions} from './resources/Actions'; import {ActionsSimCards} from './resources/ActionsSimCards'; import {ActivateDeactivateBulkCredentials} from './resources/ActivateDeactivateBulkCredentials'; import {Addresses} from './resources/Addresses'; -import {AutorespConfigs} from './resources/AutorespConfigs'; import {AiAssistants} from './resources/AiAssistants'; import {AiAudioTranscriptions} from './resources/AiAudioTranscriptions'; import {AiChatCompletions} from './resources/AiChatCompletions'; @@ -184,7 +183,6 @@ export function createTelnyx() { ActionsSimCards, ActivateDeactivateBulkCredentials, Addresses, - AutorespConfigs, AiAssistants, AiAudioTranscriptions, AiChatCompletions, diff --git a/src/test/resources/Calls.test.ts b/src/test/resources/Calls.test.ts index 247b964..3dae75a 100644 --- a/src/test/resources/Calls.test.ts +++ b/src/test/resources/Calls.test.ts @@ -225,7 +225,7 @@ describe('Calls Resource', function () { telnyxInstance = testUtils.getTelnyxMock(); }); - test('Sends the correct request', function () { + test('Sends the correct request [nested]', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder return telnyxInstance.calls .create(callCreateData) @@ -243,7 +243,8 @@ describe('Calls Resource', function () { ); }); }); - test('Sends the correct request [with specified auth]', function () { + + test('Sends the correct request [nested with specified auth]', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder return telnyxInstance.calls .create(callCreateData) @@ -263,43 +264,30 @@ describe('Calls Resource', function () { }); }); - test('Sends the correct method request [with empty resource instance]', async function () { - // @ts-expect-error TODO: import .d.ts files under src/test folder - const call = new telnyxInstance.Call({ - call_control_id: '3fa85f55-5717-4562-b3fc-2c963f63vga6', - }); - + test('Sends the correct method request [without resource instance]', async function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - await call[utils.snakeToCamelCase(command)]( + return telnyxInstance.calls[utils.snakeToCamelCase(command)]( + '3fa85f55-5717-4562-b3fc-2c963f63vga6', callCommandsData[command] || {'': ''}, // need to pass string due to telnyx mock parse ).then(responseFn); - - // @ts-expect-error TODO: import .d.ts files under src/test folder - return call[utils.snakeToCamelCase(command)]( - callCommandsData[command] || {'': ''}, // need to pass string due to telnyx mock parse - TEST_AUTH_KEY, - ).then(responseFn); }); - test('Sends the correct method request [with empty resource instance and specified auth]', async function () { - // @ts-expect-error TODO: import .d.ts files under src/test folder - const call = new telnyxInstance.Call({ - call_control_id: '3fa85f55-5717-4562-b3fc-2c963f63vga6', - }); - + test('Sends the correct method request [without resource instance and specified auth]', async function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - await call[command]( + return telnyxInstance.calls[command]( + '3fa85f55-5717-4562-b3fc-2c963f63vga6', callCommandsData[command] || {'': ''}, // need to pass string due to telnyx mock parse TEST_AUTH_KEY, ).then(responseFn); - // @ts-expect-error TODO: import .d.ts files under src/test folder - return call[command](callCommandsData[command] || {'': ''}).then( - responseFn, - ); }); if (camelCaseCommand !== command) { describe(camelCaseCommand, function () { + beforeEach(() => { + // make specs independent + telnyxInstance = testUtils.getTelnyxMock(); + }); + test('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder return telnyxInstance.calls.create(callCreateData).then(function ( diff --git a/src/test/resources/Conferences.test.ts b/src/test/resources/Conferences.test.ts index b275da2..4c472ea 100644 --- a/src/test/resources/Conferences.test.ts +++ b/src/test/resources/Conferences.test.ts @@ -43,7 +43,7 @@ describe('Call Conferences', function () { }, speak: { language: 'en-US', - payload: 'Say this to participants', + payload: 'Say this to listParticipants', voice: 'female', }, play: { @@ -129,7 +129,7 @@ describe('Call Conferences', function () { }); }); - describe('participants', function () { + describe('listParticipants', function () { function responseFn(response: ResponsePayloadList) { expect(response.data[0]).toMatchObject({ record_type: 'participant', @@ -144,16 +144,42 @@ describe('Call Conferences', function () { test('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder return telnyx.conferences - .participants(CONFERENCE_ID, {filter: {muted: true}}) + .listParticipants(CONFERENCE_ID, {filter: {muted: true}}) .then(responseFn); }); test('Sends the correct request [with specified auth]', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder return telnyx.conferences - .participants(CONFERENCE_ID, TEST_AUTH_KEY) + .listParticipants(CONFERENCE_ID, TEST_AUTH_KEY) .then(responseFn); }); + + test('Sends the correct request [nested without resource instance]', function () { + return telnyx.conferences.retrieve(CONFERENCE_ID).then(function ( + response: ResponsePayload, + ) { + const conference = response.data; + + // @ts-expect-error TODO: import .d.ts files under src/test folder + return conference + .listParticipants({filter: {muted: true}}) + .then(responseFn); + }); + }); + + test('Sends the correct request [nested without resource instance with specified auth]', function () { + return telnyx.conferences.retrieve(CONFERENCE_ID).then(function ( + response: ResponsePayload, + ) { + const conference = response.data; + + // @ts-expect-error TODO: import .d.ts files under src/test folder + return conference + .listParticipants({filter: {muted: true}}, TEST_AUTH_KEY) + .then(responseFn); + }); + }); }); CONFERENCES.forEach(function (action) { @@ -165,7 +191,7 @@ describe('Call Conferences', function () { telnyxInstance = testUtils.getTelnyxMock(); }); - test('Sends the correct request', function () { + test('Sends the correct request [nested]', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder return telnyxInstance.conferences .create(conferenceCreateData) @@ -177,39 +203,33 @@ describe('Call Conferences', function () { ).then(responseFn); }); }); - test('Sends the correct request [with specified auth]', function () { + test('Sends the correct request [nested with specified auth]', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder return telnyxInstance.conferences .create(conferenceCreateData) .then(function (response: ResponsePayload) { const conference = response.data; + // // @ts-expect-error TODO: import .d.ts files under src/test folder return conference[action]( - // // @ts-expect-error TODO: import .d.ts files under src/test folder callConferencesData[action] || {'': ''}, // need to pass string due to telnyx mock parse TEST_AUTH_KEY, ).then(responseFn); }); }); - test('Sends the correct request [with empty resource instance]', function () { - // @ts-expect-error TODO: import .d.ts files under src/test folder - const conference = new telnyxInstance.Conference({ - id: '891510ac-f3e4-11e8-af5b-de00688a4901', - }); - - return conference[action](callConferencesData[action] || {'': ''}).then( + test('Sends the correct request [without resource instance]', function () { + return telnyxInstance.conferences[action]( + '891510ac-f3e4-11e8-af5b-de00688a4901', + callConferencesData[action] || {'': ''}, + ).then( // need to pass string due to telnyx mock parse responseFn, ); }); - test('Sends the correct request [with empty resource instance and specified auth]', function () { - // @ts-expect-error TODO: import .d.ts files under src/test folder - const conference = new telnyxInstance.Conference({ - id: '891510ac-f3e4-11e8-af5b-de00688a4901', - }); - - return conference[action]( - // // @ts-expect-error TODO: import .d.ts files under src/test folder + test('Sends the correct request [without resource instance and specified auth]', function () { + // // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyxInstance.conferences[action]( + '891510ac-f3e4-11e8-af5b-de00688a4901', callConferencesData[action] || {'': ''}, // need to pass string due to telnyx mock parse TEST_AUTH_KEY, ).then(responseFn); diff --git a/src/test/resources/MessagingProfiles.test.ts b/src/test/resources/MessagingProfiles.test.ts index aeb5775..4a489ed 100644 --- a/src/test/resources/MessagingProfiles.test.ts +++ b/src/test/resources/MessagingProfiles.test.ts @@ -9,8 +9,6 @@ import { } from '../utils'; import * as utils from '../../utils'; -const telnyx = testUtils.getTelnyxMock(); - const TEST_AUTH_KEY = 'KEY187557EC22404DB39975C43ACE661A58_9QdDI7XD5bvyahtaWx1YQo'; const TEST_UUID = '123e4567-e89b-12d3-a456-426614174000'; @@ -27,12 +25,25 @@ type ResponsePayloadMetrics = { }; type ResponsePayloadAutorespConfig = { + data: { + id: string; + }[]; +}; + +type ResponsePayloadCreateAutorespConfig = { data: { id: string; }; }; describe('MessagingProfiles Resource', function () { + let telnyxInstance: TelnyxObject; + + beforeEach(() => { + // make specs independent + telnyxInstance = testUtils.getTelnyxMock(); + }); + function responseFn(response: ResponsePayload) { expect(response.data).toHaveProperty('name'); expect(response.data).toMatchObject({record_type: 'messaging_profile'}); @@ -47,7 +58,7 @@ describe('MessagingProfiles Resource', function () { describe('retrieve', function () { test('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.messagingProfiles + return telnyxInstance.messagingProfiles .retrieve(TEST_UUID) .then(responseFn) .catch(errorFn); @@ -55,7 +66,7 @@ describe('MessagingProfiles Resource', function () { test('Sends the correct request [with specified auth]', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.messagingProfiles + return telnyxInstance.messagingProfiles .retrieve(TEST_UUID, TEST_AUTH_KEY) .then(responseFn) .catch(errorFn); @@ -65,7 +76,7 @@ describe('MessagingProfiles Resource', function () { describe('create', function () { test('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.messagingProfiles + return telnyxInstance.messagingProfiles .create({name: 'Summer Campaign', whitelisted_destinations: ['US']}) .then(responseFn) .catch(errorFn); @@ -73,7 +84,7 @@ describe('MessagingProfiles Resource', function () { test('Sends the correct request [with specified auth]', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.messagingProfiles + return telnyxInstance.messagingProfiles .create( {name: 'Summer Campaign', whitelisted_destinations: ['US']}, TEST_AUTH_KEY, @@ -84,7 +95,7 @@ describe('MessagingProfiles Resource', function () { test('Sends the correct request [with specified auth in options]', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.messagingProfiles + return telnyxInstance.messagingProfiles .create( {name: 'Summer Campaign', whitelisted_destinations: ['US']}, {api_key: TEST_AUTH_KEY}, @@ -97,7 +108,7 @@ describe('MessagingProfiles Resource', function () { describe('update', function () { test('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.messagingProfiles + return telnyxInstance.messagingProfiles .update(TEST_UUID, {name: 'Foo "baz"'}) .then(responseFn) .catch(errorFn); @@ -115,12 +126,15 @@ describe('MessagingProfiles Resource', function () { test('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.messagingProfiles.list().then(responseFn).catch(errorFn); + return telnyxInstance.messagingProfiles + .list() + .then(responseFn) + .catch(errorFn); }); test('Sends the correct request [with specified auth]', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.messagingProfiles + return telnyxInstance.messagingProfiles .list(TEST_AUTH_KEY) .then(responseFn) .catch(errorFn); @@ -140,16 +154,16 @@ describe('MessagingProfiles Resource', function () { describe('listPhoneNumbers', function () { test('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.messagingProfiles - .listPhoneNumbers(TEST_UUID) + return telnyxInstance.messagingProfiles + .listPhoneNumbers(TEST_UUID, {}) .then(responseFn) .catch(errorFn); }); test('Sends the correct request [with specified auth]', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.messagingProfiles - .listPhoneNumbers(TEST_UUID, TEST_AUTH_KEY) + return telnyxInstance.messagingProfiles + .listPhoneNumbers(TEST_UUID, {}, TEST_AUTH_KEY) .then(responseFn) .catch(errorFn); }); @@ -167,16 +181,16 @@ describe('MessagingProfiles Resource', function () { describe('listShortCodes', function () { test('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.messagingProfiles - .listShortCodes(TEST_UUID) + return telnyxInstance.messagingProfiles + .listShortCodes(TEST_UUID, {}) .then(responseFn) .catch(errorFn); }); test('Sends the correct request [with specified auth]', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.messagingProfiles - .listShortCodes(TEST_UUID, TEST_AUTH_KEY) + return telnyxInstance.messagingProfiles + .listShortCodes(TEST_UUID, {}, TEST_AUTH_KEY) .then(responseFn) .catch(errorFn); }); @@ -200,7 +214,7 @@ describe('MessagingProfiles Resource', function () { test('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.messagingProfiles + return telnyxInstance.messagingProfiles .create({name: 'Summer Campaign', whitelisted_destinations: ['US']}) .then(function (response: ResponsePayload) { const mp = response.data; @@ -210,7 +224,7 @@ describe('MessagingProfiles Resource', function () { }); test('Sends the correct request [with specified auth]', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.messagingProfiles + return telnyxInstance.messagingProfiles .create({name: 'Summer Campaign', whitelisted_destinations: ['US']}) .then(function (response: ResponsePayload) { const mp = response.data; @@ -223,7 +237,7 @@ describe('MessagingProfiles Resource', function () { describe(camelCaseAction, function () { test('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.messagingProfiles + return telnyxInstance.messagingProfiles .create({ name: 'Summer Campaign', whitelisted_destinations: ['US'], @@ -237,7 +251,7 @@ describe('MessagingProfiles Resource', function () { }); test('Sends the correct request [with specified auth]', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.messagingProfiles + return telnyxInstance.messagingProfiles .create({ name: 'Summer Campaign', whitelisted_destinations: ['US'], @@ -254,110 +268,368 @@ describe('MessagingProfiles Resource', function () { }); }); }); + }); - describe('Metrics methods', function () { - function metricsNestedResponseFn(response: ResponsePayloadMetrics) { - expect(response.data).toHaveProperty('detailed'); - expect(response.data).toHaveProperty('overview'); - expect(response.data.overview).toHaveProperty('inbound'); - expect(response.data.overview).toHaveProperty('outbound'); - expect(response.data.overview).toHaveProperty('phone_numbers'); - expect(response.data.overview).toHaveProperty('messaging_profile_id'); - expect(response.data.overview).toMatchObject({ - record_type: 'messaging_profile_metrics', - }); - expect(response.data.detailed[0]).toHaveProperty('metrics'); - } + describe('Metrics methods', function () { + function metricsNestedResponseFn(response: ResponsePayloadMetrics) { + expect(response.data).toHaveProperty('detailed'); + expect(response.data).toHaveProperty('overview'); + expect(response.data.overview).toHaveProperty('inbound'); + expect(response.data.overview).toHaveProperty('outbound'); + expect(response.data.overview).toHaveProperty('phone_numbers'); + expect(response.data.overview).toHaveProperty('messaging_profile_id'); + expect(response.data.overview).toMatchObject({ + record_type: 'messaging_profile_metrics', + }); + expect(response.data.detailed[0]).toHaveProperty('metrics'); + } + + describe('retrieveMetrics', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyxInstance.messagingProfiles + .retrieveMetrics(TEST_UUID, {}) + .then(metricsNestedResponseFn); + }); - describe('retrieveMetrics', function () { + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyxInstance.messagingProfiles + .retrieveMetrics(TEST_UUID, {}, TEST_AUTH_KEY) + .then(metricsNestedResponseFn); + }); + }); + + describe('nested metrics', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyxInstance.messagingProfiles + .create({name: 'Summer Campaign', whitelisted_destinations: ['US']}) + .then(function (response: ResponsePayload) { + const mp = response.data; + // @ts-expect-error TODO: import .d.ts files under src/test folder + return mp.retrieveMetrics({}).then(metricsNestedResponseFn); + }); + }); + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyxInstance.messagingProfiles + .retrieve(TEST_UUID) + .then(function (response: ResponsePayload) { + const mp = response.data; + // @ts-expect-error TODO: import .d.ts files under src/test folder + return mp + .retrieveMetrics({}, TEST_AUTH_KEY) + .then(metricsNestedResponseFn); + }); + }); + }); + }); + + describe('AutorespConfigs methods', function () { + function autorespConfigNestedResponseFn( + response: ResponsePayloadAutorespConfig, + ) { + expect(response.data[0]).toHaveProperty('country_code'); + expect(response.data[0]).toHaveProperty('resp_text'); + expect(response.data[0]).toHaveProperty('keywords'); + expect(response.data[0]).toHaveProperty('op'); + expect(response.data[0]).toHaveProperty('id'); + } + + function autorespConfigCreatedNestedResponseFn( + response: ResponsePayloadCreateAutorespConfig, + ) { + expect(response.data).toHaveProperty('country_code'); + expect(response.data).toHaveProperty('resp_text'); + expect(response.data).toHaveProperty('keywords'); + expect(response.data).toHaveProperty('op'); + expect(response.data).toHaveProperty('id'); + } + + describe('listAutorespConfigs', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyxInstance.messagingProfiles + .listAutorespConfigs(TEST_UUID, {}) + .then(autorespConfigNestedResponseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyxInstance.messagingProfiles + .listAutorespConfigs(TEST_UUID, {}, TEST_AUTH_KEY) + .then(autorespConfigNestedResponseFn); + }); + + describe('nested listAutorespConfigs', function () { test('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.messagingProfiles - .retrieveMetrics(TEST_UUID) - .then(metricsNestedResponseFn); + return telnyxInstance.messagingProfiles + .create({ + name: 'Summer Campaign', + whitelisted_destinations: ['US'], + }) + .then(function (response: ResponsePayload) { + const mp = response.data; + // @ts-expect-error TODO: import .d.ts files under src/test folder + return mp + .listAutorespConfigs() + .then(autorespConfigNestedResponseFn); + }); }); - test('Sends the correct request [with specified auth]', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.messagingProfiles - .retrieveMetrics(TEST_UUID, TEST_AUTH_KEY) - .then(metricsNestedResponseFn); + return telnyxInstance.messagingProfiles + .retrieve(TEST_UUID) + .then(function (response: ResponsePayload) { + const mp = response.data; + // @ts-expect-error TODO: import .d.ts files under src/test folder + return mp + .listAutorespConfigs(TEST_AUTH_KEY) + .then(autorespConfigNestedResponseFn); + }); }); }); + }); + + describe('createAutorespConfig', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyxInstance.messagingProfiles + .createAutorespConfig(TEST_UUID, { + op: 'start', + keywords: ['test'], + country_code: 'US', + }) + .then(autorespConfigCreatedNestedResponseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyxInstance.messagingProfiles + .createAutorespConfig( + TEST_UUID, + { + op: 'start', + keywords: ['test'], + country_code: 'US', + }, + TEST_AUTH_KEY, + ) + .then(autorespConfigCreatedNestedResponseFn); + }); - describe('nested metrics', function () { + describe('nested createAutorespConfig', function () { test('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.messagingProfiles - .create({name: 'Summer Campaign', whitelisted_destinations: ['US']}) + return telnyxInstance.messagingProfiles + .create({ + name: 'Summer Campaign', + whitelisted_destinations: ['US'], + }) .then(function (response: ResponsePayload) { const mp = response.data; // @ts-expect-error TODO: import .d.ts files under src/test folder - return mp.metrics().then(metricsNestedResponseFn); + return mp + .createAutorespConfig({ + op: 'start', + keywords: ['test'], + country_code: 'US', + }) + .then(autorespConfigCreatedNestedResponseFn); }); }); test('Sends the correct request [with specified auth]', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.messagingProfiles.retrieve(TEST_UUID).then(function ( - response: ResponsePayload, - ) { - const mp = response.data; - // @ts-expect-error TODO: import .d.ts files under src/test folder - return mp.metrics(TEST_AUTH_KEY).then(metricsNestedResponseFn); - }); + return telnyxInstance.messagingProfiles + .retrieve(TEST_UUID) + .then(function (response: ResponsePayload) { + const mp = response.data; + // @ts-expect-error TODO: import .d.ts files under src/test folder + return mp + .createAutorespConfig( + { + op: 'start', + keywords: ['test'], + country_code: 'US', + }, + TEST_AUTH_KEY, + ) + .then(autorespConfigCreatedNestedResponseFn); + }); }); }); }); - describe('AutorespConfigs methods', function () { - function autorespConfigNestedResponseFn( - response: ResponsePayloadAutorespConfig, - ) { - expect(response.data[0]).toHaveProperty('country_code'); - expect(response.data[0]).toHaveProperty('resp_text'); - expect(response.data[0]).toHaveProperty('keywords'); - expect(response.data[0]).toHaveProperty('op'); - expect(response.data[0]).toHaveProperty('id'); - } + describe('retrieveAutorespConfig', function () { + const autoResponseConfigId = '123e4567-e89b-12d3-a456-000014179999'; + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyxInstance.messagingProfiles + .retrieveAutorespConfig(TEST_UUID, autoResponseConfigId) + .then(autorespConfigCreatedNestedResponseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyxInstance.messagingProfiles + .retrieveAutorespConfig( + TEST_UUID, + autoResponseConfigId, + TEST_AUTH_KEY, + ) + .then(autorespConfigCreatedNestedResponseFn); + }); - describe('autorespConfigs', function () { + describe('nested retrieveAutorespConfig', function () { test('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.messagingProfiles - .listAutorespConfigs(TEST_UUID) - .then(autorespConfigNestedResponseFn); + return telnyxInstance.messagingProfiles + .create({ + name: 'Summer Campaign', + whitelisted_destinations: ['US'], + }) + .then(function (response: ResponsePayload) { + const mp = response.data; + // @ts-expect-error TODO: import .d.ts files under src/test folder + return mp + .retrieveAutorespConfig(autoResponseConfigId) + .then(autorespConfigCreatedNestedResponseFn); + }); + }); + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyxInstance.messagingProfiles + .retrieve(TEST_UUID) + .then(function (response: ResponsePayload) { + const mp = response.data; + // @ts-expect-error TODO: import .d.ts files under src/test folder + return mp + .retrieveAutorespConfig(autoResponseConfigId, TEST_AUTH_KEY) + .then(autorespConfigCreatedNestedResponseFn); + }); }); + }); + }); + + describe('delAutorespConfig', function () { + const autoResponseConfigId = '123e4567-e89b-12d3-a456-000014179999'; + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyxInstance.messagingProfiles.delAutorespConfig( + TEST_UUID, + autoResponseConfigId, + ); + }); + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyxInstance.messagingProfiles.delAutorespConfig( + TEST_UUID, + autoResponseConfigId, + TEST_AUTH_KEY, + ); + }); + + describe('nested delAutorespConfig', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyxInstance.messagingProfiles + .create({ + name: 'Summer Campaign', + whitelisted_destinations: ['US'], + }) + .then(function (response: ResponsePayload) { + const mp = response.data; + // @ts-expect-error TODO: import .d.ts files under src/test folder + return mp.delAutorespConfig(autoResponseConfigId); + }); + }); test('Sends the correct request [with specified auth]', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.messagingProfiles - .listAutorespConfigs(TEST_UUID, TEST_AUTH_KEY) - .then(autorespConfigNestedResponseFn); + return telnyxInstance.messagingProfiles + .retrieve(TEST_UUID) + .then(function (response: ResponsePayload) { + const mp = response.data; + // @ts-expect-error TODO: import .d.ts files under src/test folder + return mp.delAutorespConfig(autoResponseConfigId, TEST_AUTH_KEY); + }); }); }); + }); + + describe('updateAutorespConfig', function () { + const autoResponseConfigId = '123e4567-e89b-12d3-a456-000014179999'; - describe('nested autoresp_configs', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyxInstance.messagingProfiles + .updateAutorespConfig(TEST_UUID, autoResponseConfigId, { + op: 'start', + keywords: ['test'], + country_code: 'US', + }) + .then(autorespConfigCreatedNestedResponseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyxInstance.messagingProfiles + .updateAutorespConfig( + TEST_UUID, + autoResponseConfigId, + { + op: 'start', + keywords: ['test'], + country_code: 'US', + }, + TEST_AUTH_KEY, + ) + .then(autorespConfigCreatedNestedResponseFn); + }); + + describe('nested updateAutorespConfig', function () { test('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.messagingProfiles - .create({name: 'Summer Campaign', whitelisted_destinations: ['US']}) + return telnyxInstance.messagingProfiles + .create({ + name: 'Summer Campaign', + whitelisted_destinations: ['US'], + }) .then(function (response: ResponsePayload) { const mp = response.data; // @ts-expect-error TODO: import .d.ts files under src/test folder - return mp.autorespConfigs().then(autorespConfigNestedResponseFn); + return mp + .updateAutorespConfig(autoResponseConfigId, { + op: 'start', + keywords: ['test'], + country_code: 'US', + }) + .then(autorespConfigCreatedNestedResponseFn); }); }); test('Sends the correct request [with specified auth]', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.messagingProfiles.retrieve(TEST_UUID).then(function ( - response: ResponsePayload, - ) { - const mp = response.data; - // @ts-expect-error TODO: import .d.ts files under src/test folder - return mp - .autorespConfigs(TEST_AUTH_KEY) - .then(autorespConfigNestedResponseFn); - }); + return telnyxInstance.messagingProfiles + .retrieve(TEST_UUID) + .then(function (response: ResponsePayload) { + const mp = response.data; + // @ts-expect-error TODO: import .d.ts files under src/test folder + return mp + .updateAutorespConfig( + autoResponseConfigId, + { + op: 'start', + keywords: ['test'], + country_code: 'US', + }, + TEST_AUTH_KEY, + ) + .then(autorespConfigCreatedNestedResponseFn); + }); }); }); }); diff --git a/types/AutorespConfigsResource.d.ts b/types/AutorespConfigsResource.d.ts deleted file mode 100644 index 6f145ee..0000000 --- a/types/AutorespConfigsResource.d.ts +++ /dev/null @@ -1,74 +0,0 @@ -import {paths} from './TelnyxAPI.js'; - -declare module 'telnyx' { - namespace Telnyx { - type AutorespConfigsRetrievePathParams = - paths['/messaging_profiles/{profile_id}/autoresp_configs/{autoresp_cfg_id}']['get']['parameters']['path']; - - type AutorespConfigsRetrieveResponse = - paths['/messaging_profiles/{profile_id}/autoresp_configs/{autoresp_cfg_id}']['get']['responses']['200']['content']['application/json']; - - type AutorespConfigsCreatePathParams = - paths['/messaging_profiles/{profile_id}/autoresp_configs']['post']['parameters']['path']; - - type AutorespConfigsCreateParams = - paths['/messaging_profiles/{profile_id}/autoresp_configs']['post']['requestBody']['content']['application/json']; - - type AutorespConfigsCreateResponse = - paths['/messaging_profiles/{profile_id}/autoresp_configs']['post']['responses']['200']['content']['application/json']; - - type AutorespConfigsListPathParams = - paths['/messaging_profiles/{profile_id}/autoresp_configs']['get']['parameters']['path']; - - type AutorespConfigsListParams = - paths['/messaging_profiles/{profile_id}/autoresp_configs']['get']['parameters']['query']; - - type AutorespConfigsListResponse = - paths['/messaging_profiles/{profile_id}/autoresp_configs']['get']['responses']['200']['content']['application/json']; - - type AutorespConfigsDelPathParams = - paths['/messaging_profiles/{profile_id}/autoresp_configs/{autoresp_cfg_id}']['delete']['parameters']['path']; - - type AutorespConfigsDelResponse = - paths['/messaging_profiles/{profile_id}/autoresp_configs/{autoresp_cfg_id}']['delete']['responses']['200']['content']['application/json']; - - type AutorespConfigsUpdatePathParams = - paths['/messaging_profiles/{profile_id}/autoresp_configs/{autoresp_cfg_id}']['put']['parameters']['path']; - - type AutorespConfigsUpdateParams = - paths['/messaging_profiles/{profile_id}/autoresp_configs/{autoresp_cfg_id}']['put']['requestBody']['content']['application/json']; - - type AutorespConfigsUpdateResponse = - paths['/messaging_profiles/{profile_id}/autoresp_configs/{autoresp_cfg_id}']['put']['responses']['200']['content']['application/json']; - - class AutorespConfigsResource { - retrieve( - params: AutorespConfigsRetrievePathParams, - options?: RequestOptions, - ): Promise>; - - create( - pathParams: AutorespConfigsCreatePathParams, - params: AutorespConfigsCreateParams, - options?: RequestOptions, - ): Promise>; - - list( - pathParams: AutorespConfigsListPathParams, - params?: AutorespConfigsListParams, - options?: RequestOptions, - ): Promise>; - - del( - params: AutorespConfigsDelPathParams, - options?: RequestOptions, - ): Promise>; - - update( - pathParams: AutorespConfigsUpdatePathParams, - params: AutorespConfigsUpdateParams, - options?: RequestOptions, - ): Promise>; - } - } -} diff --git a/types/BrandsResource.d.ts b/types/BrandsResource.d.ts index 5bad56c..2f8c288 100644 --- a/types/BrandsResource.d.ts +++ b/types/BrandsResource.d.ts @@ -40,29 +40,29 @@ declare module 'telnyx' { type BrandsUpdateResponse = paths['/brand/{brandId}']['put']['responses']['200']['content']['application/json']; - type BrandsResend2faEmailPathParams = - paths['/brand/{brandId}/2faEmail']['post']['parameters']['path']; + type BrandsResend2faEmailId = + paths['/brand/{brandId}/2faEmail']['post']['parameters']['path']['brandId']; type BrandsResend2faEmailResponse = paths['/brand/{brandId}/2faEmail']['post']['responses']['200']['content']; - type BrandsListExternalVettingsPathParams = - paths['/brand/{brandId}/externalVetting']['get']['parameters']['path']; + type BrandsListExternalVettingsId = + paths['/brand/{brandId}/externalVetting']['get']['parameters']['path']['brandId']; type BrandsListExternalVettingsResponse = paths['/brand/{brandId}/externalVetting']['get']['responses']['200']['content']['application/json']; - type BrandsExportExternalVettingsPathParams = - paths['/brand/{brandId}/externalVetting']['put']['parameters']['path']; + type BrandsImportExternalVettingsId = + paths['/brand/{brandId}/externalVetting']['put']['parameters']['path']['brandId']; - type BrandsExportExternalVettingsParams = + type BrandsImportExternalVettingsParams = paths['/brand/{brandId}/externalVetting']['put']['requestBody']['content']['application/json']; - type BrandsExportExternalVettingsResponse = + type BrandsImportExternalVettingsResponse = paths['/brand/{brandId}/externalVetting']['put']['responses']['200']['content']['application/json']; - type BrandsOrderExternalVettingsPathParams = - paths['/brand/{brandId}/externalVetting']['post']['parameters']['path']; + type BrandsOrderExternalVettingsId = + paths['/brand/{brandId}/externalVetting']['post']['parameters']['path']['brandId']; type BrandsOrderExternalVettingsParams = paths['/brand/{brandId}/externalVetting']['post']['requestBody']['content']['application/json']; @@ -70,8 +70,8 @@ declare module 'telnyx' { type BrandsOrderExternalVettingsResponse = paths['/brand/{brandId}/externalVetting']['post']['responses']['200']['content']['application/json']; - type BrandsRevetPathParams = - paths['/brand/{brandId}/revet']['put']['parameters']['path']; + type BrandsRevetid = + paths['/brand/{brandId}/revet']['put']['parameters']['path']['brandId']; type BrandsRevetParams = paths['/brand/{brandId}/externalVetting']['put']['requestBody']['content']['application/json']; @@ -79,10 +79,10 @@ declare module 'telnyx' { type BrandsRevetResponse = paths['/brand/{brandId}/revet']['put']['responses']['200']['content']['application/json']; - type BrandsFeedbackPathParams = - paths['/brand/feedback/{brandId}']['get']['parameters']['path']; + type BrandsFeedbackRetrieveId = + paths['/brand/feedback/{brandId}']['get']['parameters']['path']['brandId']; - type BrandsFeedbackResponse = + type BrandsFeedbackRetrieveResponse = paths['/brand/feedback/{brandId}']['get']['responses']['200']['content']['application/json']; class BrandsResource { @@ -113,37 +113,37 @@ declare module 'telnyx' { ): Promise>; resend2faEmail( - pathParams: BrandsResend2faEmailPathParams, + id: BrandsResend2faEmailId, options?: RequestOptions, ): Promise>; listExternalVettings( - pathParams: BrandsListExternalVettingsPathParams, + id: BrandsListExternalVettingsId, options?: RequestOptions, ): Promise>; - exportExternalVettings( - pathParams: BrandsExportExternalVettingsPathParams, - params: BrandsExportExternalVettingsParams, + importExternalVettings( + id: BrandsImportExternalVettingsId, + params: BrandsImportExternalVettingsParams, options?: RequestOptions, - ): Promise>; + ): Promise>; orderExternalVettings( - pathParams: BrandsOrderExternalVettingsPathParams, + id: BrandsOrderExternalVettingsId, params: BrandsOrderExternalVettingsParams, options?: RequestOptions, ): Promise>; revet( - pathParams: BrandsRevetPathParams, + id: BrandsRevetid, params: BrandsRevetParams, options?: RequestOptions, ): Promise>; - feedback( - pathParams: BrandsFeedbackPathParams, + retrieveFeedback( + id: BrandsFeedbackRetrieveId, options?: RequestOptions, - ): Promise>; + ): Promise>; } } } diff --git a/types/CallsResource.d.ts b/types/CallsResource.d.ts index 05d7b6a..b5c064f 100644 --- a/types/CallsResource.d.ts +++ b/types/CallsResource.d.ts @@ -17,60 +17,116 @@ declare module 'telnyx' { type CallsCreateResponse = paths['/calls']['post']['responses']['200']['content']['application/json']; + type CallsAnswerId = + paths['/calls/{call_control_id}/actions/answer']['post']['parameters']['path']['call_control_id']; type CallsAnswerParams = paths['/calls/{call_control_id}/actions/answer']['post']['requestBody']['content']['application/json']; + type CallsRejectId = + paths['/calls/{call_control_id}/actions/reject']['post']['parameters']['path']['call_control_id']; type CallsRejectParams = paths['/calls/{call_control_id}/actions/reject']['post']['requestBody']['content']['application/json']; + type CallsHangupId = + paths['/calls/{call_control_id}/actions/hangup']['post']['parameters']['path']['call_control_id']; type CallsHangupParams = paths['/calls/{call_control_id}/actions/hangup']['post']['requestBody']['content']['application/json']; + type CallsBridgeId = + paths['/calls/{call_control_id}/actions/bridge']['post']['parameters']['path']['call_control_id']; type CallsBridgeParams = paths['/calls/{call_control_id}/actions/bridge']['post']['requestBody']['content']['application/json']; + type CallsSpeakId = + paths['/calls/{call_control_id}/actions/speak']['post']['parameters']['path']['call_control_id']; type CallsSpeakParams = paths['/calls/{call_control_id}/actions/speak']['post']['requestBody']['content']['application/json']; + type CallsForkStartId = + paths['/calls/{call_control_id}/actions/fork_start']['post']['parameters']['path']['call_control_id']; type CallsForkStartParams = paths['/calls/{call_control_id}/actions/fork_start']['post']['requestBody']['content']['application/json']; + type CallsForkStopId = + paths['/calls/{call_control_id}/actions/fork_stop']['post']['parameters']['path']['call_control_id']; type CallsForkStopParams = paths['/calls/{call_control_id}/actions/fork_stop']['post']['requestBody']['content']['application/json']; + type CallsGatherId = + paths['/calls/{call_control_id}/actions/gather']['post']['parameters']['path']['call_control_id']; type CallsGatherParams = paths['/calls/{call_control_id}/actions/gather']['post']['requestBody']['content']['application/json']; + type CallsGatherUsingAudioId = + paths['/calls/{call_control_id}/actions/gather_using_audio']['post']['parameters']['path']['call_control_id']; type CallsGatherUsingAudioParams = paths['/calls/{call_control_id}/actions/gather_using_audio']['post']['requestBody']['content']['application/json']; + type CallsGatherUsingSpeakId = + paths['/calls/{call_control_id}/actions/gather_using_speak']['post']['parameters']['path']['call_control_id']; type CallsGatherUsingSpeakParams = paths['/calls/{call_control_id}/actions/gather_using_speak']['post']['requestBody']['content']['application/json']; + type CallsGatherStopId = + paths['/calls/{call_control_id}/actions/gather_stop']['post']['parameters']['path']['call_control_id']; type CallsGatherStopParams = paths['/calls/{call_control_id}/actions/gather_stop']['post']['requestBody']['content']['application/json']; + type CallsPlaybackStartId = + paths['/calls/{call_control_id}/actions/playback_start']['post']['parameters']['path']['call_control_id']; type CallsPlaybackStartParams = paths['/calls/{call_control_id}/actions/playback_start']['post']['requestBody']['content']['application/json']; + type CallsPlaybackStopId = + paths['/calls/{call_control_id}/actions/playback_stop']['post']['parameters']['path']['call_control_id']; type CallsPlaybackStopParams = paths['/calls/{call_control_id}/actions/playback_stop']['post']['requestBody']['content']['application/json']; + type CallsRecordStartId = + paths['/calls/{call_control_id}/actions/record_start']['post']['parameters']['path']['call_control_id']; type CallsRecordStartParams = paths['/calls/{call_control_id}/actions/record_start']['post']['requestBody']['content']['application/json']; + type CallsRecordStopId = + paths['/calls/{call_control_id}/actions/record_stop']['post']['parameters']['path']['call_control_id']; type CallsRecordStopParams = paths['/calls/{call_control_id}/actions/record_stop']['post']['requestBody']['content']['application/json']; + type CallsRecordPauseId = + paths['/calls/{call_control_id}/actions/record_pause']['post']['parameters']['path']['call_control_id']; type CallsRecordPauseParams = paths['/calls/{call_control_id}/actions/record_pause']['post']['requestBody']['content']['application/json']; + type CallsRecordResumeId = + paths['/calls/{call_control_id}/actions/record_resume']['post']['parameters']['path']['call_control_id']; type CallsRecordResumeParams = paths['/calls/{call_control_id}/actions/record_resume']['post']['requestBody']['content']['application/json']; + type CallsReferId = + paths['/calls/{call_control_id}/actions/refer']['post']['parameters']['path']['call_control_id']; type CallsReferParams = paths['/calls/{call_control_id}/actions/refer']['post']['requestBody']['content']['application/json']; + type CallsSendDtmfId = + paths['/calls/{call_control_id}/actions/send_dtmf']['post']['parameters']['path']['call_control_id']; type CallsSendDtmfParams = paths['/calls/{call_control_id}/actions/send_dtmf']['post']['requestBody']['content']['application/json']; + type CallsStreamingStartId = + paths['/calls/{call_control_id}/actions/streaming_start']['post']['parameters']['path']['call_control_id']; type CallsStreamingStartParams = paths['/calls/{call_control_id}/actions/streaming_start']['post']['requestBody']['content']['application/json']; + type CallsStreamingStopId = + paths['/calls/{call_control_id}/actions/streaming_stop']['post']['parameters']['path']['call_control_id']; type CallsStreamingStopParams = paths['/calls/{call_control_id}/actions/streaming_stop']['post']['requestBody']['content']['application/json']; + type CallsSuppressionStartId = + paths['/calls/{call_control_id}/actions/suppression_start']['post']['parameters']['path']['call_control_id']; type CallsSuppressionStartParams = paths['/calls/{call_control_id}/actions/suppression_start']['post']['requestBody']['content']['application/json']; + type CallsSuppressionStopId = + paths['/calls/{call_control_id}/actions/suppression_stop']['post']['parameters']['path']['call_control_id']; type CallsSuppressionStopParams = paths['/calls/{call_control_id}/actions/suppression_stop']['post']['requestBody']['content']['application/json']; + type CallsTransferId = + paths['/calls/{call_control_id}/actions/transfer']['post']['parameters']['path']['call_control_id']; type CallsTransferParams = paths['/calls/{call_control_id}/actions/transfer']['post']['requestBody']['content']['application/json']; + type CallsTranscriptionStartId = + paths['/calls/{call_control_id}/actions/transcription_start']['post']['parameters']['path']['call_control_id']; type CallsTranscriptionStartParams = paths['/calls/{call_control_id}/actions/transcription_start']['post']['requestBody']['content']['application/json']; + type CallsTranscriptionStopId = + paths['/calls/{call_control_id}/actions/transcription_stop']['post']['parameters']['path']['call_control_id']; type CallsTranscriptionStopParams = paths['/calls/{call_control_id}/actions/transcription_stop']['post']['requestBody']['content']['application/json']; + type CallsEnqueueId = + paths['/calls/{call_control_id}/actions/enqueue']['post']['parameters']['path']['call_control_id']; type CallsEnqueueParams = paths['/calls/{call_control_id}/actions/enqueue']['post']['requestBody']['content']['application/json']; + type CallsLeaveQueueId = + paths['/calls/{call_control_id}/actions/leave_queue']['post']['parameters']['path']['call_control_id']; type CallsLeaveQueueParams = paths['/calls/{call_control_id}/actions/leave_queue']['post']['requestBody']['content']['application/json']; @@ -132,34 +188,118 @@ declare module 'telnyx' { paths['/calls/{call_control_id}/actions/leave_queue']['post']['responses']['200']['content']['application/json']; type CallsNestedMethods = { - answer: CallsResource['answer']; - reject: CallsResource['reject']; - hangup: CallsResource['hangup']; - bridge: CallsResource['bridge']; - speak: CallsResource['speak']; - forkStart: CallsResource['forkStart']; - forkStop: CallsResource['forkStop']; - gather: CallsResource['gather']; - gatherUsingAudio: CallsResource['gatherUsingAudio']; - gatherUsingSpeak: CallsResource['gatherUsingSpeak']; - gatherStop: CallsResource['gatherStop']; - playbackStart: CallsResource['playbackStart']; - playbackStop: CallsResource['playbackStop']; - recordStart: CallsResource['recordStart']; - recordStop: CallsResource['recordStop']; - recordPause: CallsResource['recordPause']; - recordResume: CallsResource['recordResume']; - refer: CallsResource['refer']; - sendDtmf: CallsResource['sendDtmf']; - streamingStart: CallsResource['streamingStart']; - streamingStop: CallsResource['streamingStop']; - suppressionStart: CallsResource['suppressionStart']; - suppressionStop: CallsResource['suppressionStop']; - transfer: CallsResource['transfer']; - transcriptionStart: CallsResource['transcriptionStart']; - transcriptionStop: CallsResource['transcriptionStop']; - enqueue: CallsResource['enqueue']; - leaveQueue: CallsResource['leaveQueue']; + answer( + params: CallsAnswerParams, + options?: RequestOptions, + ): Promise>; + reject( + params: CallsRejectParams, + options?: RequestOptions, + ): Promise>; + hangup( + params: CallsHangupParams, + options?: RequestOptions, + ): Promise>; + bridge( + params: CallsBridgeParams, + options?: RequestOptions, + ): Promise>; + speak( + params: CallsSpeakParams, + options?: RequestOptions, + ): Promise>; + forkStart( + params: CallsForkStartParams, + options?: RequestOptions, + ): Promise>; + forkStop( + params: CallsForkStopParams, + options?: RequestOptions, + ): Promise>; + gather( + params: CallsGatherParams, + options?: RequestOptions, + ): Promise>; + gatherUsingAudio( + params: CallsGatherUsingAudioParams, + options?: RequestOptions, + ): Promise>; + gatherUsingSpeak( + params: CallsGatherUsingSpeakParams, + options?: RequestOptions, + ): Promise>; + gatherStop( + params: CallsGatherStopParams, + options?: RequestOptions, + ): Promise>; + playbackStart( + params: CallsPlaybackStartParams, + options?: RequestOptions, + ): Promise>; + playbackStop( + params: CallsPlaybackStopParams, + options?: RequestOptions, + ): Promise>; + recordStart( + params: CallsRecordStartParams, + options?: RequestOptions, + ): Promise>; + recordStop( + params: CallsRecordStopParams, + options?: RequestOptions, + ): Promise>; + recordPause( + params: CallsRecordPauseParams, + options?: RequestOptions, + ): Promise>; + recordResume( + params: CallsRecordResumeParams, + options?: RequestOptions, + ): Promise>; + refer( + params: CallsReferParams, + options?: RequestOptions, + ): Promise>; + sendDtmf( + params: CallsSendDtmfParams, + options?: RequestOptions, + ): Promise>; + streamingStart( + params: CallsStreamingStartParams, + options?: RequestOptions, + ): Promise>; + streamingStop( + params: CallsStreamingStopParams, + options?: RequestOptions, + ): Promise>; + suppressionStart( + params: CallsSuppressionStartParams, + options?: RequestOptions, + ): Promise>; + suppressionStop( + params: CallsSuppressionStopParams, + options?: RequestOptions, + ): Promise>; + transfer( + params: CallsTransferParams, + options?: RequestOptions, + ): Promise>; + transcriptionStart( + params: CallsTranscriptionStartParams, + options?: RequestOptions, + ): Promise>; + transcriptionStop( + params: CallsTranscriptionStopParams, + options?: RequestOptions, + ): Promise>; + enqueue( + params: CallsEnqueueParams, + options?: RequestOptions, + ): Promise>; + leaveQueue( + params: CallsLeaveQueueParams, + options?: RequestOptions, + ): Promise>; }; class CallsResource { @@ -189,114 +329,142 @@ declare module 'telnyx' { >; answer( + id: CallsAnswerId, params: CallsAnswerParams, options?: RequestOptions, ): Promise>; reject( + id: CallsRejectId, params: CallsRejectParams, options?: RequestOptions, ): Promise>; hangup( + id: CallsHangupId, params: CallsHangupParams, options?: RequestOptions, ): Promise>; bridge( + id: CallsBridgeId, params: CallsBridgeParams, options?: RequestOptions, ): Promise>; speak( + id: CallsSpeakId, params: CallsSpeakParams, options?: RequestOptions, ): Promise>; forkStart( + id: CallsForkStartId, params: CallsForkStartParams, options?: RequestOptions, ): Promise>; forkStop( + id: CallsForkStopId, params: CallsForkStopParams, options?: RequestOptions, ): Promise>; gather( + id: CallsGatherId, params: CallsGatherParams, options?: RequestOptions, ): Promise>; gatherUsingAudio( + id: CallsGatherUsingAudioId, params: CallsGatherUsingAudioParams, options?: RequestOptions, ): Promise>; gatherUsingSpeak( + id: CallsGatherUsingSpeakId, params: CallsGatherUsingSpeakParams, options?: RequestOptions, ): Promise>; gatherStop( + id: CallsGatherStopId, params: CallsGatherStopParams, options?: RequestOptions, ): Promise>; playbackStart( + id: CallsPlaybackStartId, params: CallsPlaybackStartParams, options?: RequestOptions, ): Promise>; playbackStop( + id: CallsPlaybackStopId, params: CallsPlaybackStopParams, options?: RequestOptions, ): Promise>; recordStart( + id: CallsRecordStartId, params: CallsRecordStartParams, options?: RequestOptions, ): Promise>; recordStop( + id: CallsRecordStopId, params: CallsRecordStopParams, options?: RequestOptions, ): Promise>; recordPause( + id: CallsRecordPauseId, params: CallsRecordPauseParams, options?: RequestOptions, ): Promise>; recordResume( + id: CallsRecordResumeId, params: CallsRecordResumeParams, options?: RequestOptions, ): Promise>; refer( + id: CallsReferId, params: CallsReferParams, options?: RequestOptions, ): Promise>; sendDtmf( + id: CallsSendDtmfId, params: CallsSendDtmfParams, options?: RequestOptions, ): Promise>; streamingStart( + id: CallsStreamingStartId, params: CallsStreamingStartParams, options?: RequestOptions, ): Promise>; streamingStop( + id: CallsStreamingStopId, params: CallsStreamingStopParams, options?: RequestOptions, ): Promise>; suppressionStart( + id: CallsSuppressionStartId, params: CallsSuppressionStartParams, options?: RequestOptions, ): Promise>; suppressionStop( + id: CallsSuppressionStopId, params: CallsSuppressionStopParams, options?: RequestOptions, ): Promise>; transfer( + id: CallsTransferId, params: CallsTransferParams, options?: RequestOptions, ): Promise>; transcriptionStart( + id: CallsTranscriptionStartId, params: CallsTranscriptionStartParams, options?: RequestOptions, ): Promise>; transcriptionStop( + id: CallsTranscriptionStopId, params: CallsTranscriptionStopParams, options?: RequestOptions, ): Promise>; enqueue( + id: CallsEnqueueId, params: CallsEnqueueParams, options?: RequestOptions, ): Promise>; leaveQueue( + id: CallsLeaveQueueId, params: CallsLeaveQueueParams, options?: RequestOptions, ): Promise>; diff --git a/types/ChannelzonesResource.d.ts b/types/ChannelzonesResource.d.ts index b4e7e65..ec12b21 100644 --- a/types/ChannelzonesResource.d.ts +++ b/types/ChannelzonesResource.d.ts @@ -26,7 +26,7 @@ declare module 'telnyx' { type ChannelzonesRetrieveResponse = paths['/channel_zones/{channel_zone_id}']['get']['responses']['200']['content']['application/json']; - type ChannelzonesPhoneNumbersListId = + type ChannelzonesPhoneNumbersListChannelzoneId = paths['/channel_zones/{channel_zone_id}/channel_zone_phone_numbers']['get']['parameters']['path']['channel_zone_id']; type ChannelzonesPhoneNumbersListParams = @@ -35,8 +35,8 @@ declare module 'telnyx' { type ChannelzonesPhoneNumbersListResponse = paths['/channel_zones/{channel_zone_id}/channel_zone_phone_numbers']['get']['responses']['200']['content']['application/json']; - type ChannelzonesPhoneNumbersCreatePathParams = - paths['/channel_zones/{channel_zone_id}/channel_zone_phone_numbers']['post']['parameters']['path']; + type ChannelzonesPhoneNumbersCreateChannelZoneId = + paths['/channel_zones/{channel_zone_id}/channel_zone_phone_numbers']['post']['parameters']['path']['channel_zone_id']; type ChannelzonesPhoneNumbersCreateParams = paths['/channel_zones/{channel_zone_id}/channel_zone_phone_numbers']['post']['requestBody']['content']['application/json']; @@ -44,8 +44,11 @@ declare module 'telnyx' { type ChannelzonesPhoneNumbersCreateResponse = paths['/channel_zones/{channel_zone_id}/channel_zone_phone_numbers']['post']['responses']['200']['content']['application/json']; - type ChannelzonesPhoneNumbersDeletePathParams = - paths['/channel_zones/{channel_zone_id}/channel_zone_phone_numbers/{phone_number}']['delete']['parameters']['path']; + type ChannelzonesPhoneNumbersDeleteChannelzoneId = + paths['/channel_zones/{channel_zone_id}/channel_zone_phone_numbers/{phone_number}']['delete']['parameters']['path']['channel_zone_id']; + + type ChannelzonesPhoneNumbersDeletePhoneNumber = + paths['/channel_zones/{channel_zone_id}/channel_zone_phone_numbers/{phone_number}']['delete']['parameters']['path']['phone_number']; type ChannelzonesPhoneNumbersDeleteResponse = paths['/channel_zones/{channel_zone_id}/channel_zone_phone_numbers/{phone_number}']['delete']['responses']['200']['content']; @@ -68,13 +71,13 @@ declare module 'telnyx' { ): Promise>; listPhoneNumbers( - id: ChannelzonesPhoneNumbersListId, + id: ChannelzonesPhoneNumbersListChannelzoneId, params?: ChannelzonesPhoneNumbersListParams, options?: RequestOptions, ): Promise>; createPhoneNumber( - pathParams: ChannelzonesPhoneNumbersCreatePathParams, + id: ChannelzonesPhoneNumbersCreateChannelZoneId, params: ChannelzonesPhoneNumbersCreateParams, options?: RequestOptions, ): Promise< @@ -82,7 +85,8 @@ declare module 'telnyx' { >; delPhoneNumber( - pathParams: ChannelzonesPhoneNumbersDeletePathParams, + id: ChannelzonesPhoneNumbersDeleteChannelzoneId, + phoneNumber: ChannelzonesPhoneNumbersDeletePhoneNumber, options?: RequestOptions, ): Promise< Telnyx.Response diff --git a/types/ConferencesResource.d.ts b/types/ConferencesResource.d.ts index c1d6a06..39988ec 100644 --- a/types/ConferencesResource.d.ts +++ b/types/ConferencesResource.d.ts @@ -23,32 +23,60 @@ declare module 'telnyx' { type ConferencesCreateResponse = paths['/conferences']['post']['responses']['200']['content']['application/json']; + type ConferencesJoinId = + paths['/conferences/{id}/actions/join']['post']['parameters']['path']['id']; type ConferencesJoinParams = paths['/conferences/{id}/actions/join']['post']['requestBody']['content']['application/json']; + type ConferencesMuteId = + paths['/conferences/{id}/actions/mute']['post']['parameters']['path']['id']; type ConferencesMuteParams = paths['/conferences/{id}/actions/mute']['post']['responses']['200']['content']['application/json']; + type ConferencesUnmuteId = + paths['/conferences/{id}/actions/unmute']['post']['parameters']['path']['id']; type ConferencesUnmuteParams = paths['/conferences/{id}/actions/unmute']['post']['responses']['200']['content']['application/json']; + type ConferencesHoldId = + paths['/conferences/{id}/actions/hold']['post']['parameters']['path']['id']; type ConferencesHoldParams = paths['/conferences/{id}/actions/hold']['post']['responses']['200']['content']['application/json']; + type ConferencesUnholdId = + paths['/conferences/{id}/actions/unhold']['post']['parameters']['path']['id']; type ConferencesUnholdParams = paths['/conferences/{id}/actions/unhold']['post']['responses']['200']['content']['application/json']; + type ConferencesSpeakId = + paths['/conferences/{id}/actions/speak']['post']['parameters']['path']['id']; type ConferencesSpeakParams = paths['/conferences/{id}/actions/speak']['post']['responses']['200']['content']['application/json']; + type ConferencesPlayId = + paths['/conferences/{id}/actions/play']['post']['parameters']['path']['id']; type ConferencesPlayParams = paths['/conferences/{id}/actions/play']['post']['responses']['200']['content']['application/json']; + type ConferencesStopId = + paths['/conferences/{id}/actions/stop']['post']['parameters']['path']['id']; type ConferencesStopParams = paths['/conferences/{id}/actions/stop']['post']['responses']['200']['content']['application/json']; + type ConferencesRecordStartId = + paths['/conferences/{id}/actions/record_start']['post']['parameters']['path']['id']; type ConferencesRecordStartParams = paths['/conferences/{id}/actions/record_start']['post']['responses']['200']['content']['application/json']; + type ConferencesRecordStopId = + paths['/conferences/{id}/actions/record_stop']['post']['parameters']['path']['id']; type ConferencesRecordStopParams = paths['/conferences/{id}/actions/record_stop']['post']['responses']['200']['content']['application/json']; + type ConferencesRecordResumeId = + paths['/conferences/{id}/actions/record_resume']['post']['parameters']['path']['id']; type ConferencesRecordResumeParams = paths['/conferences/{id}/actions/record_resume']['post']['responses']['200']['content']['application/json']; + type ConferencesRecordPauseId = + paths['/conferences/{id}/actions/record_pause']['post']['parameters']['path']['id']; type ConferencesRecordPauseParams = paths['/conferences/{id}/actions/record_pause']['post']['responses']['200']['content']['application/json']; + type ConferencesUpdateId = + paths['/conferences/{id}/actions/update']['post']['parameters']['path']['id']; type ConferencesUpdateParams = paths['/conferences/{id}/actions/update']['post']['responses']['200']['content']['application/json']; + type ConferencesLeaveId = + paths['/conferences/{id}/actions/leave']['post']['parameters']['path']['id']; type ConferencesLeaveParams = paths['/conferences/{id}/actions/leave']['post']['responses']['200']['content']['application/json']; @@ -91,20 +119,66 @@ declare module 'telnyx' { paths['/conferences/{id}']['get']['responses']['200']['content']['application/json']; type ConferencesNestedMethods = { - join: ConferencesResource['join']; - mute: ConferencesResource['mute']; - unmute: ConferencesResource['unmute']; - hold: ConferencesResource['hold']; - unhold: ConferencesResource['unhold']; - speak: ConferencesResource['speak']; - play: ConferencesResource['play']; - stop: ConferencesResource['stop']; - recordStart: ConferencesResource['recordStart']; - recordStop: ConferencesResource['recordStop']; - update: ConferencesResource['update']; - leave: ConferencesResource['leave']; - recordResume: ConferencesResource['recordResume']; - recordPause: ConferencesResource['recordPause']; + join( + params: ConferencesJoinParams, + options?: RequestOptions, + ): Promise>; + mute( + params: ConferencesMuteParams, + options?: RequestOptions, + ): Promise>; + unmute( + params: ConferencesUnmuteParams, + options?: RequestOptions, + ): Promise>; + hold( + params: ConferencesHoldParams, + options?: RequestOptions, + ): Promise>; + unhold( + params: ConferencesUnholdParams, + options?: RequestOptions, + ): Promise>; + speak( + params: ConferencesSpeakParams, + options?: RequestOptions, + ): Promise>; + play( + params: ConferencesPlayParams, + options?: RequestOptions, + ): Promise>; + stop( + params: ConferencesStopParams, + options?: RequestOptions, + ): Promise>; + recordStart( + params: ConferencesRecordStartParams, + options?: RequestOptions, + ): Promise>; + recordStop( + params: ConferencesRecordStopParams, + options?: RequestOptions, + ): Promise>; + update( + params: ConferencesUpdateParams, + options?: RequestOptions, + ): Promise>; + leave( + params: ConferencesLeaveParams, + options?: RequestOptions, + ): Promise>; + recordResume( + params: ConferencesRecordResumeParams, + options?: RequestOptions, + ): Promise>; + recordPause( + params: ConferencesRecordPauseParams, + options?: RequestOptions, + ): Promise>; + listParticipants( + params: ConferencesParticipantsParams, + options?: RequestOptions, + ): Promise>; }; class ConferencesResource { @@ -136,63 +210,77 @@ declare module 'telnyx' { >; join( + id: ConferencesJoinId, params: ConferencesJoinParams, options?: RequestOptions, ): Promise>; mute( + id: ConferencesMuteId, params: ConferencesMuteParams, options?: RequestOptions, ): Promise>; unmute( + id: ConferencesUnmuteId, params: ConferencesUnmuteParams, options?: RequestOptions, ): Promise>; hold( + id: ConferencesHoldId, params: ConferencesHoldParams, options?: RequestOptions, ): Promise>; unhold( + id: ConferencesUnholdId, params: ConferencesUnholdParams, options?: RequestOptions, ): Promise>; speak( + id: ConferencesSpeakId, params: ConferencesSpeakParams, options?: RequestOptions, ): Promise>; play( + id: ConferencesPlayId, params: ConferencesPlayParams, options?: RequestOptions, ): Promise>; stop( + id: ConferencesStopId, params: ConferencesStopParams, options?: RequestOptions, ): Promise>; recordStart( + id: ConferencesRecordStartId, params: ConferencesRecordStartParams, options?: RequestOptions, ): Promise>; recordStop( + id: ConferencesRecordStopId, params: ConferencesRecordStopParams, options?: RequestOptions, ): Promise>; update( + id: ConferencesUpdateId, params: ConferencesUpdateParams, options?: RequestOptions, ): Promise>; leave( + id: ConferencesLeaveId, params: ConferencesLeaveParams, options?: RequestOptions, ): Promise>; recordResume( + id: ConferencesRecordResumeId, params: ConferencesRecordResumeParams, options?: RequestOptions, ): Promise>; recordPause( + id: ConferencesRecordPauseId, params: ConferencesRecordPauseParams, options?: RequestOptions, ): Promise>; - participants( + listParticipants( id: ConferencesParticipantsId, params: ConferencesParticipantsParams, options?: RequestOptions, diff --git a/types/MessagingProfilesResource.d.ts b/types/MessagingProfilesResource.d.ts index e3e6aa0..5a11fce 100644 --- a/types/MessagingProfilesResource.d.ts +++ b/types/MessagingProfilesResource.d.ts @@ -41,12 +41,18 @@ declare module 'telnyx' { type MessagingProfilesCreateResponse = paths['/messaging_profiles']['post']['responses']['200']['content']['application/json']; + type MessagingProfilesListPhoneNumbersId = + paths['/messaging_profiles/{id}/phone_numbers']['get']['parameters']['path']['id']; + type MessagingProfilesListPhoneNumbersParams = paths['/messaging_profiles/{id}/phone_numbers']['get']['parameters']['query']; type MessagingProfilesListPhoneNumbersResponse = paths['/messaging_profiles/{id}/phone_numbers']['get']['responses']['200']['content']['application/json']; + type MessagingProfilesListShortCodesId = + paths['/messaging_profiles/{id}/short_codes']['get']['parameters']['path']['id']; + type MessagingProfilesListShortCodesParams = paths['/messaging_profiles/{id}/short_codes']['get']['parameters']['query']; @@ -62,11 +68,84 @@ declare module 'telnyx' { type MessagingProfilesRetrieveMetricsResponse = paths['/messaging_profiles/{id}/metrics']['get']['responses']['200']['content']['application/json']; + type MessagingProfilesListAutorespConfigsId = + paths['/messaging_profiles/{profile_id}/autoresp_configs']['get']['parameters']['path']['profile_id']; + + type MessagingProfilesListAutorespConfigsParams = + paths['/messaging_profiles/{profile_id}/autoresp_configs']['get']['parameters']['query']; + + type MessagingProfilesListAutorespConfigsResponse = + paths['/messaging_profiles/{profile_id}/autoresp_configs']['get']['responses']['200']['content']['application/json']; + + type MessagingProfilesRetrieveAutorespConfigId = + paths['/messaging_profiles/{profile_id}/autoresp_configs/{autoresp_cfg_id}']['get']['parameters']['path']['profile_id']; + + type MessagingProfilesRetrieveAutorespConfigAutorespConfigId = + paths['/messaging_profiles/{profile_id}/autoresp_configs/{autoresp_cfg_id}']['get']['parameters']['path']['autoresp_cfg_id']; + + type MessagingProfilesRetrieveAutorespConfigResponse = + paths['/messaging_profiles/{profile_id}/autoresp_configs/{autoresp_cfg_id}']['get']['responses']['200']['content']['application/json']; + + type MessagingProfilesCreateAutorespConfigsId = + paths['/messaging_profiles/{profile_id}/autoresp_configs']['post']['parameters']['path']['profile_id']; + + type MessagingProfilesCreateAutorespConfigsParams = + paths['/messaging_profiles/{profile_id}/autoresp_configs']['post']['requestBody']['content']['application/json']; + + type MessagingProfilesCreateAutorespConfigsResponse = + paths['/messaging_profiles/{profile_id}/autoresp_configs']['post']['responses']['200']['content']['application/json']; + + type MessagingProfilesDelAutorespConfigId = + paths['/messaging_profiles/{profile_id}/autoresp_configs/{autoresp_cfg_id}']['delete']['parameters']['path']['profile_id']; + + type MessagingProfilesDelAutorespConfigAutorespConfigId = + paths['/messaging_profiles/{profile_id}/autoresp_configs/{autoresp_cfg_id}']['delete']['parameters']['path']['autoresp_cfg_id']; + + type MessagingProfilesDelAutorespConfigResponse = + paths['/messaging_profiles/{profile_id}/autoresp_configs/{autoresp_cfg_id}']['delete']['responses']['200']['content']['application/json']; + + type MessagingProfilesUpdateAutorespConfigId = + paths['/messaging_profiles/{profile_id}/autoresp_configs/{autoresp_cfg_id}']['put']['parameters']['path']['profile_id']; + + type MessagingProfilesUpdateAutorespConfigAutorespConfigId = + paths['/messaging_profiles/{profile_id}/autoresp_configs/{autoresp_cfg_id}']['put']['parameters']['path']['autoresp_cfg_id']; + + type MessagingProfilesUpdateAutorespConfigParams = + paths['/messaging_profiles/{profile_id}/autoresp_configs/{autoresp_cfg_id}']['put']['requestBody']['content']['application/json']; + + type MessagingProfilesUpdateAutorespConfigResponse = + paths['/messaging_profiles/{profile_id}/autoresp_configs/{autoresp_cfg_id}']['put']['responses']['200']['content']['application/json']; + type MessagingProfilesNestedMethods = { del: MessagingProfilesResource['del']; - phoneNumbers: MessagingProfilesResource['listPhoneNumbers']; - shortCodes: MessagingProfilesResource['listShortCodes']; - metrics: MessagingProfilesResource['retrieveMetrics']; + + phoneNumbers( + params: MessagingProfilesListPhoneNumbersParams, + options?: RequestOptions, + ): Promise< + Telnyx.Response + >; + + shortCodes( + params: MessagingProfilesListShortCodesParams, + options?: RequestOptions, + ): Promise< + Telnyx.Response + >; + + autorespConfigs( + params: MessagingProfilesListAutorespConfigsParams, + options?: RequestOptions, + ): Promise< + Telnyx.Response + >; + + retrieveMetrics( + params: MessagingProfilesRetrieveMetricsParams, + options?: RequestOptions, + ): Promise< + Telnyx.Response + >; }; class MessagingProfilesResource { @@ -108,31 +187,74 @@ declare module 'telnyx' { >; list( - params?: MessagingProfilesListParams, + params: MessagingProfilesListParams, options?: RequestOptions, ): Promise>; listPhoneNumbers( - params?: MessagingProfilesListPhoneNumbersParams, + id: MessagingProfilesListPhoneNumbersId, + params: MessagingProfilesListPhoneNumbersParams, options?: RequestOptions, ): Promise< Telnyx.Response >; listShortCodes( - params?: MessagingProfilesListShortCodesParams, + id: MessagingProfilesListShortCodesId, + params: MessagingProfilesListShortCodesParams, options?: RequestOptions, ): Promise< Telnyx.Response >; retrieveMetrics( - id?: MessagingProfilesRetrieveMetricsId, - params?: MessagingProfilesRetrieveMetricsParams, + id: MessagingProfilesRetrieveMetricsId, + params: MessagingProfilesRetrieveMetricsParams, options?: RequestOptions, ): Promise< Telnyx.Response >; + + listAutorespConfigs( + id: MessagingProfilesListAutorespConfigsId, + params: MessagingProfilesListAutorespConfigsParams, + options?: RequestOptions, + ): Promise< + Telnyx.Response + >; + + createAutorespConfig( + id: MessagingProfilesCreateAutorespConfigsId, + params: MessagingProfilesCreateAutorespConfigsParams, + options?: RequestOptions, + ): Promise< + Telnyx.Response + >; + + delAutorespConfig( + id: MessagingProfilesDelAutorespConfigId, + autorespConfigId: MessagingProfilesDelAutorespConfigAutorespConfigId, + options?: RequestOptions, + ): Promise< + Telnyx.Response + >; + + retrieveAutorespConfig( + id: MessagingProfilesRetrieveAutorespConfigId, + autorespConfigId: MessagingProfilesRetrieveAutorespConfigAutorespConfigId, + options?: RequestOptions, + ): Promise< + Telnyx.Response + >; + + updateAutorespConfig( + id: MessagingProfilesUpdateAutorespConfigId, + autorespConfigId: MessagingProfilesUpdateAutorespConfigAutorespConfigId, + params: MessagingProfilesUpdateAutorespConfigParams, + options?: RequestOptions, + ): Promise< + Telnyx.Response + >; } } } diff --git a/types/index.d.ts b/types/index.d.ts index dfeb8f0..fcb8500 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -20,7 +20,6 @@ /// /// /// -/// /// /// /// @@ -90,7 +89,6 @@ declare module 'telnyx' { accessIpAddress: Telnyx.AccessIpAddressResource; accessIpRanges: Telnyx.AccessIpRangesResource; authenticationProviders: Telnyx.AuthenticationProvidersResource; - autorespConfigs: Telnyx.AutorespConfigsResource; addresses: Telnyx.AddressesResource; availablePhoneNumbers: Telnyx.AvailablePhoneNumbersResource; balance: Telnyx.BalanceResource; From 7ddc895ee003e6c7ec3fe08b5b050306592493e8 Mon Sep 17 00:00:00 2001 From: mpareja-godaddy <83242342+mpareja-godaddy@users.noreply.github.com> Date: Thu, 10 Oct 2024 13:50:01 -0700 Subject: [PATCH 45/59] FIX: README Typo (#186) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 897b13e..071938c 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ callback: ```typescript // Create a new messaging profile and then send a message using that profile: -telnyx.,essagingProfiles.create({ +telnyx.messagingProfiles.create({ name: 'Summer Campaign', }) .then((messagingProfile) => { From 5319f8101648f51fc49f21dda62e0fab8d32b660 Mon Sep 17 00:00:00 2001 From: Lucas Rosa Date: Thu, 10 Oct 2024 18:09:14 -0300 Subject: [PATCH 46/59] bump to beta --- CHANGELOG.md | 3 ++- VERSION | 2 +- examples/call-control/index.ts | 1 + package-lock.json | 4 ++-- package.json | 2 +- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 54a6b53..98ab923 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ ## v2 -### v2.0.0-alpha.8 +### v2.0.0-beta.0 - Move `AutorespConfigs` resource to be nested in `MessagingProfiles` - Fix nested resources in `Calls`, `MessagingProfiles` and `Conferences` ID usage instead of using constructors data @@ -10,6 +10,7 @@ - Fix `Brand` resources method name - Fix bug on `DELETE` operations empty `responseBody` JSON Parsing - Update types on resources methods with multiple urlParams +- FIX: README Typo by @mpareja-godaddy in https://github.com/team-telnyx/telnyx-node/pull/186 ### v2.0.0-alpha.7 diff --git a/VERSION b/VERSION index c20cf85..72e5fcc 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.0.0-alpha.8 +2.0.0-beta.0 diff --git a/examples/call-control/index.ts b/examples/call-control/index.ts index 525884e..700d6a7 100644 --- a/examples/call-control/index.ts +++ b/examples/call-control/index.ts @@ -7,6 +7,7 @@ import Telnyx from 'telnyx'; const telnyx = new Telnyx(process.env.TELNYX_API_KEY || ''); +// update these params accordingly const params: Telnyx.CallsCreateParams = { to: '+18005550100 or sip:username@sip.telnyx.com', from: '+18005550101', diff --git a/package-lock.json b/package-lock.json index 7ce2423..e82dc80 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "telnyx", - "version": "2.0.0-alpha.8", + "version": "2.0.0-beta.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "telnyx", - "version": "2.0.0-alpha.8", + "version": "2.0.0-beta.0", "license": "MIT", "devDependencies": { "@eslint/js": "^9.10.0", diff --git a/package.json b/package.json index 8ad0238..4e8ee3e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "telnyx", - "version": "2.0.0-alpha.8", + "version": "2.0.0-beta.0", "description": "Telnyx API Node SDK", "keywords": [ "telnyx", From 0f10754b657ca626e9d11e35bf83645f61ac6794 Mon Sep 17 00:00:00 2001 From: Lucas Rosa Date: Thu, 10 Oct 2024 18:51:32 -0300 Subject: [PATCH 47/59] fix nested resources methods names --- CHANGELOG.md | 6 ++ VERSION | 2 +- package-lock.json | 4 +- package.json | 2 +- src/resources/Ips.ts | 4 +- src/resources/PortingOrders.ts | 14 ++-- src/resources/Queues.ts | 16 ++--- src/test/resources/DynamicEmergency.test.ts | 8 ++- src/test/resources/Ips.test.ts | 13 ++-- .../resources/MessagingHostedNumbers.test.ts | 24 ++++--- src/test/resources/NumberReservations.test.ts | 2 +- src/test/resources/PortingOrders.test.ts | 65 ++++++++++++------- src/test/resources/Queues.test.ts | 47 +++++++++++--- 13 files changed, 133 insertions(+), 74 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 98ab923..f313289 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ ## v2 +### v2.0.0-beta.1 + +- Fix `Queues` resource nested methods +- Fix `PortingOrders` and `Ips` resource nested methods param names +- Update legacy skipped tests + ### v2.0.0-beta.0 - Move `AutorespConfigs` resource to be nested in `MessagingProfiles` diff --git a/VERSION b/VERSION index 72e5fcc..6060c31 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.0.0-beta.0 +2.0.0-beta.1 diff --git a/package-lock.json b/package-lock.json index e82dc80..95e5336 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "telnyx", - "version": "2.0.0-beta.0", + "version": "2.0.0-beta.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "telnyx", - "version": "2.0.0-beta.0", + "version": "2.0.0-beta.1", "license": "MIT", "devDependencies": { "@eslint/js": "^9.10.0", diff --git a/package.json b/package.json index 4e8ee3e..15f5088 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "telnyx", - "version": "2.0.0-beta.0", + "version": "2.0.0-beta.1", "description": "Telnyx API Node SDK", "keywords": [ "telnyx", diff --git a/src/resources/Ips.ts b/src/resources/Ips.ts index f402595..ea72ead 100644 --- a/src/resources/Ips.ts +++ b/src/resources/Ips.ts @@ -14,7 +14,7 @@ function transformResponseData( path: '/{ipId}', urlParams: ['ipId'], paramsValues: [response.data.id as string], - paramsNames: ['id'], + paramsNames: ['ipId'], }), update: telnyxMethod({ @@ -22,7 +22,7 @@ function transformResponseData( path: '/{ipId}', urlParams: ['ipId'], paramsValues: [response.data.id as string], - paramsNames: ['id'], + paramsNames: ['ipId'], }), }); } diff --git a/src/resources/PortingOrders.ts b/src/resources/PortingOrders.ts index 7460538..3c0b958 100644 --- a/src/resources/PortingOrders.ts +++ b/src/resources/PortingOrders.ts @@ -14,7 +14,7 @@ function transformResponseData( path: '/{portingOrderId}', urlParams: ['portingOrderId'], paramsValues: [response.data.id as string], - paramsNames: ['id'], + paramsNames: ['portingOrderId'], }), update: telnyxMethod({ @@ -22,7 +22,7 @@ function transformResponseData( path: '/{portingOrderId}', urlParams: ['portingOrderId'], paramsValues: [response.data.id as string], - paramsNames: ['id'], + paramsNames: ['portingOrderId'], }), }); } @@ -33,15 +33,11 @@ export const PortingOrders = TelnyxResource.extend({ list: telnyxMethod({ method: 'GET', methodType: 'list', - - transformResponseData: transformResponseData, }), create: telnyxMethod({ method: 'POST', methodType: 'create', - - transformResponseData: transformResponseData, }), // include_phone_numbers query param @@ -68,8 +64,10 @@ export const PortingOrders = TelnyxResource.extend({ cancelOrder: telnyxMethod({ method: 'POST', - path: '/{id}/actions/cancel', - urlParams: ['id'], + path: '/{orderId}/actions/cancel', + urlParams: ['orderId'], + paramsNames: ['orderId'], + methodType: 'create', }), listAllowedFocWindows: telnyxMethod({ diff --git a/src/resources/Queues.ts b/src/resources/Queues.ts index 9e575b0..1f89437 100644 --- a/src/resources/Queues.ts +++ b/src/resources/Queues.ts @@ -28,12 +28,12 @@ function transformResponseData( getSpec(response.data.name as string), ); - methods.retrieve = telnyxMethod({ + methods.retrieveCall = telnyxMethod({ method: 'GET', - path: '/{call_control_id}', - urlParams: ['call_control_id'], - paramsValues: [response.data.call_control_id as string], - paramsNames: ['call_control_id'], + path: '/{queue_name}/calls/{call_control_id}', + urlParams: ['queue_name', 'call_control_id'], + paramsValues: [response.data.queue_name as string], + paramsNames: ['queue_name', 'call_control_id'], }); return utils.addResourceToResponseData(response, telnyx, 'queues', methods); @@ -54,15 +54,13 @@ export const Queues = TelnyxResource.extend({ method: 'GET', path: '/{queue_name}/calls', urlParams: ['queue_name'], - - transformResponseData: transformResponseData, }), retrieveCall: telnyxMethod({ method: 'GET', path: '/{queue_name}/calls/{call_control_id}', urlParams: ['queue_name', 'call_control_id'], - - transformResponseData: transformResponseData, + paramsNames: ['queue_name', 'call_control_id'], + methodType: 'retrieve', }), }); diff --git a/src/test/resources/DynamicEmergency.test.ts b/src/test/resources/DynamicEmergency.test.ts index 32fac5e..1b518d7 100644 --- a/src/test/resources/DynamicEmergency.test.ts +++ b/src/test/resources/DynamicEmergency.test.ts @@ -58,7 +58,7 @@ describe('DynamicEmergency', function () { }); }); - describe.skip('create', function () { + describe('create', function () { test('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder return telnyx.dynamicEmergency.addresses @@ -69,6 +69,8 @@ describe('DynamicEmergency', function () { postal_code: '60654', street_name: 'Superior', country_code: 'US', + // prism mock Violation: request.body Request body must have required property 'country_coude' + country_coude: 'US', }) .then(responseFn); }); @@ -135,7 +137,7 @@ describe('DynamicEmergency', function () { }); }); - describe.skip('create', function () { + describe('create', function () { test('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder return telnyx.dynamicEmergency.endpoints @@ -145,6 +147,8 @@ describe('DynamicEmergency', function () { dynamic_emergency_address_id: '0ccc7b54-4df3-4bca-a65a-3da1ecc777f0', country_code: 'US', + // prism mock Violation: request.body Request body must have required property 'country_coude' + country_coude: 'US', }) .then(responseFn); }); diff --git a/src/test/resources/Ips.test.ts b/src/test/resources/Ips.test.ts index 46f23f4..3f6a1b9 100644 --- a/src/test/resources/Ips.test.ts +++ b/src/test/resources/Ips.test.ts @@ -88,7 +88,7 @@ describe('Ips Resource', function () { } } - describe.skip('del', function () { + describe('del', function () { test('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder return telnyx.ips @@ -101,7 +101,7 @@ describe('Ips Resource', function () { }); test('Sends the correct request [with specified auth]', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.ips.retrieve('123').then(function ( + return telnyx.ips.retrieve(TEST_UUID).then(function ( response: ResponsePayload, ) { const ip = response.data; @@ -129,16 +129,19 @@ describe('Ips Resource', function () { ); }); }); - it.skip('Sends the correct request [with specified auth]', function () { + it('Sends the correct request [with specified auth]', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.ips.retrieve('123').then(function ( + return telnyx.ips.retrieve(TEST_UUID).then(function ( response: ResponsePayload, ) { const ip = response.data; return ( ip // @ts-expect-error TODO: import .d.ts files under src/test folder - .update({connection_id: 'Western BSD-2'}, TEST_AUTH_KEY) + .update( + {connection_id: 'Western BSD-2', ip_address: '192.168.0.0'}, + TEST_AUTH_KEY, + ) .then(responseFn) ); }); diff --git a/src/test/resources/MessagingHostedNumbers.test.ts b/src/test/resources/MessagingHostedNumbers.test.ts index eda0d0f..9129289 100644 --- a/src/test/resources/MessagingHostedNumbers.test.ts +++ b/src/test/resources/MessagingHostedNumbers.test.ts @@ -3,23 +3,29 @@ const telnyx = testUtils.getTelnyxMock(); const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); // skip while openapi spec is not updated -describe.skip('delete', function () { +describe('del', function () { function responseFn(response: ResponsePayload) { - if (response.data) { - expect(response.data).toHaveProperty('id'); - expect(response.data).toMatchObject({ - record_type: 'messaging_hosted_numbers', - }); - } + expect(response).toHaveProperty('data'); + + // prism-mock error [6:28:05 PM] › [VALIDATOR] ✖ error Violation: response.body.data Response body property data must be object + // if (response.data) { + // expect(response.data).toHaveProperty('id'); + // expect(response.data).toHaveProperty('status'); + // expect(response.data).toMatchObject({ + // record_type: 'messaging_hosted_number', + // }); + // } } test('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.messagingHostedNumbers.del('123').then(responseFn); + return telnyx.messagingHostedNumbers + .del('891510ac-f3e4-11e8-af5b-de00688a4901') + .then(responseFn); }); test('Sends the correct request [with specified auth]', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder return telnyx.messagingHostedNumbers - .del('123', TEST_AUTH_KEY) + .del('891510ac-f3e4-11e8-af5b-de00688a4901', TEST_AUTH_KEY) .then(responseFn); }); }); diff --git a/src/test/resources/NumberReservations.test.ts b/src/test/resources/NumberReservations.test.ts index 3fe474d..a39f58c 100644 --- a/src/test/resources/NumberReservations.test.ts +++ b/src/test/resources/NumberReservations.test.ts @@ -88,7 +88,7 @@ describe('NumberReservations Resource', function () { }); }); - describe.skip('extend', function () { + describe('extend', function () { function responseFn(response: ResponsePayload) { expect(response.data).toHaveProperty('id'); expect(response.data).toHaveProperty('status'); diff --git a/src/test/resources/PortingOrders.test.ts b/src/test/resources/PortingOrders.test.ts index 0022c25..e2a289b 100644 --- a/src/test/resources/PortingOrders.test.ts +++ b/src/test/resources/PortingOrders.test.ts @@ -1,14 +1,21 @@ +import {TelnyxObject} from '../../Types'; import { type ResponsePayload, type ResponsePayloadList, utils as testUtils, } from '../utils'; -const telnyx = testUtils.getTelnyxMock(); const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); const TEST_UUID = '123e4567-e89b-12d3-a456-426614174000'; describe('PortingOrders Resource', function () { + let telnyxInstance: TelnyxObject; + + beforeEach(() => { + // make specs independent + telnyxInstance = testUtils.getTelnyxMock(); + }); + function responseFn(response: ResponsePayload) { expect(response.data).toHaveProperty('activation_settings'); expect(response.data).toHaveProperty('end_user'); @@ -30,26 +37,26 @@ describe('PortingOrders Resource', function () { describe('list', function () { test('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.portingOrders.list().then(listResponseFn); + return telnyxInstance.portingOrders.list().then(listResponseFn); }); test('Sends the correct request [with specified auth]', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.portingOrders.list().then(listResponseFn); + return telnyxInstance.portingOrders.list().then(listResponseFn); }); }); describe('create', function () { test('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.portingOrders + return telnyxInstance.portingOrders .create(newPortingOrderParams) .then(listResponseFn); }); test('Sends the correct request [with specified auth]', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.portingOrders + return telnyxInstance.portingOrders .create(newPortingOrderParams, TEST_AUTH_KEY) .then(listResponseFn); }); @@ -58,12 +65,12 @@ describe('PortingOrders Resource', function () { describe('retrieve', function () { test('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.portingOrders.retrieve(TEST_UUID).then(responseFn); + return telnyxInstance.portingOrders.retrieve(TEST_UUID).then(responseFn); }); test('Sends the correct request [with specified auth]', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.portingOrders + return telnyxInstance.portingOrders .retrieve(TEST_UUID, TEST_AUTH_KEY) .then(responseFn); }); @@ -77,12 +84,12 @@ describe('PortingOrders Resource', function () { test('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.portingOrders.listExceptionTypes().then(responseFn); + return telnyxInstance.portingOrders.listExceptionTypes().then(responseFn); }); test('Sends the correct request [with specified auth]', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.portingOrders + return telnyxInstance.portingOrders .listExceptionTypes(TEST_AUTH_KEY) .then(responseFn); }); @@ -99,23 +106,25 @@ describe('PortingOrders Resource', function () { test('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.portingOrders + return telnyxInstance.portingOrders .listActivationJobs(TEST_UUID) .then(responseFn); }); test('Sends the correct request [with specified auth]', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.portingOrders + return telnyxInstance.portingOrders .listActivationJobs(TEST_UUID, TEST_AUTH_KEY) .then(responseFn); }); }); - describe.skip('cancelOrder', function () { + describe('cancelOrder', function () { test('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.portingOrders.cancelOrder(TEST_UUID).then(responseFn); + return telnyxInstance.portingOrders + .cancelOrder(TEST_UUID) + .then(responseFn); }); }); @@ -128,7 +137,7 @@ describe('PortingOrders Resource', function () { test('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.portingOrders + return telnyxInstance.portingOrders .listAllowedFocWindows(TEST_UUID) .then(responseFn); }); @@ -141,14 +150,14 @@ describe('PortingOrders Resource', function () { test('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.portingOrders + return telnyxInstance.portingOrders .retrieveLoaTemplate(TEST_UUID) .then(responseFn); }); test('Sends the correct request [with specified auth]', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.portingOrders + return telnyxInstance.portingOrders .retrieveLoaTemplate(TEST_UUID, TEST_AUTH_KEY) .then(responseFn); }); @@ -157,33 +166,38 @@ describe('PortingOrders Resource', function () { describe('confirmOrder', function () { test('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.portingOrders.confirmOrder(TEST_UUID).then(responseFn); + return telnyxInstance.portingOrders + .confirmOrder(TEST_UUID) + .then(responseFn); }); test('Sends the correct request [with specified auth]', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.portingOrders + return telnyxInstance.portingOrders .confirmOrder(TEST_UUID, TEST_AUTH_KEY) .then(responseFn); }); }); + // must use retrieve for nested since create endpoint returns a list instead of object data describe('update', function () { const INVOICE_ID = '35146afd-df93-4963-b1e9-1a085e2ae875'; test('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.portingOrders.create(newPortingOrderParams).then(function ( + return telnyxInstance.portingOrders.retrieve(TEST_UUID).then(function ( response: ResponsePayload, ) { const po = response.data; + // @ts-expect-error TODO: import .d.ts files under src/test folder return po.update({documents: {invoice: INVOICE_ID}}).then(responseFn); }); }); + test('Sends the correct request [with specified auth]', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.portingOrders.retrieve(TEST_UUID).then(function ( + return telnyxInstance.portingOrders.retrieve(TEST_UUID).then(function ( response: ResponsePayload, ) { const po = response.data; @@ -197,25 +211,26 @@ describe('PortingOrders Resource', function () { }); }); - describe.skip('del', function () { + // must use retrieve for nested since create endpoint returns a list instead of object data + describe('del', function () { test('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.portingOrders.create(newPortingOrderParams).then(function ( + return telnyxInstance.portingOrders.retrieve(TEST_UUID).then(function ( response: ResponsePayload, ) { const po = response.data; // @ts-expect-error TODO: import .d.ts files under src/test folder - return po.del().then(responseFn); + return po.del(); }); }); test('Sends the correct request [with specified auth]', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.portingOrders.retrieve('id').then(function ( + return telnyxInstance.portingOrders.retrieve(TEST_UUID).then(function ( response: ResponsePayload, ) { const po = response.data; // @ts-expect-error TODO: import .d.ts files under src/test folder - return po.del(TEST_AUTH_KEY).then(responseFn); + return po.del(TEST_AUTH_KEY); }); }); }); diff --git a/src/test/resources/Queues.test.ts b/src/test/resources/Queues.test.ts index 65af412..60e4cae 100644 --- a/src/test/resources/Queues.test.ts +++ b/src/test/resources/Queues.test.ts @@ -1,31 +1,46 @@ +import {TelnyxObject} from '../../Types'; import { type ResponsePayloadList, type ResponsePayload, utils as testUtils, } from '../utils'; -const telnyx = testUtils.getTelnyxMock(); const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); describe('Queues Resource', function () { describe('retrieve', function () { + let telnyxInstance: TelnyxObject; + + beforeEach(() => { + // make specs independent + telnyxInstance = testUtils.getTelnyxMock(); + }); + function responseFn(response: ResponsePayload) { expect(response.data).toMatchObject({name: 'support'}); } test('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.queues.retrieve('support').then(responseFn); + return telnyxInstance.queues.retrieve('support').then(responseFn); }); - // TelnyxResource can't handle named param in get like here - test.skip('Sends the correct request [with specified auth]', function () { + test('Sends the correct request [with specified auth]', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.queues.retrieve('support', TEST_AUTH_KEY).then(responseFn); + return telnyxInstance.queues + .retrieve('support', TEST_AUTH_KEY) + .then(responseFn); }); }); describe('listCalls', function () { + let telnyxInstance: TelnyxObject; + + beforeEach(() => { + // make specs independent + telnyxInstance = testUtils.getTelnyxMock(); + }); + function responseFn(response: ResponsePayloadList) { expect(response.data[0]).toHaveProperty('call_control_id'); expect(response.data[0]).toHaveProperty('queue_position'); @@ -34,18 +49,25 @@ describe('Queues Resource', function () { test('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.queues.listCalls('support').then(responseFn); + return telnyxInstance.queues.listCalls('support').then(responseFn); }); test('Sends the correct request [with specified auth]', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.queues - .retrieveCall('support', '891510ac-f3e4-11e8-af5b-de00688a4901') + return telnyxInstance.queues + .listCalls('support', TEST_AUTH_KEY) .then(responseFn); }); }); describe('retrieveCall', function () { + let telnyxInstance: TelnyxObject; + + beforeEach(() => { + // make specs independent + telnyxInstance = testUtils.getTelnyxMock(); + }); + function responseFn(response: ResponsePayload) { expect(response.data).toHaveProperty('call_control_id'); expect(response.data).toHaveProperty('queue_position'); @@ -54,9 +76,16 @@ describe('Queues Resource', function () { test('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.queues + return telnyxInstance.queues .retrieveCall('queue_id', 'call_control_id') .then(responseFn); }); + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyxInstance.queues + .retrieveCall('queue_id', 'call_control_id', TEST_AUTH_KEY) + .then(responseFn); + }); }); }); From 002678687d73ec47c525508f11e1c99c8b269070 Mon Sep 17 00:00:00 2001 From: Lucas Rosa Date: Fri, 11 Oct 2024 12:08:16 -0300 Subject: [PATCH 48/59] fix identity resources --- CHANGELOG.md | 3 + src/resources/IpConnections.ts | 2 - src/resources/Verifications.ts | 93 +++++++++-------- src/resources/VerifiedNumbers.ts | 49 ++++++++- src/resources/Verify.ts | 52 --------- src/resources/VerifyProfiles.ts | 42 +------- src/telnyx.ts | 2 - types/AddressesResource.d.ts | 4 +- types/CallControlApplicationsResource.d.ts | 10 +- types/ConferencesResource.d.ts | 24 +++-- types/FaxApplicationsResource.d.ts | 44 ++++---- types/FaxesResource.d.ts | 16 +-- types/FqdnConnectionsResource.d.ts | 27 ++--- types/FqdnsResource.d.ts | 22 ++-- types/IpConnectionsResource.d.ts | 27 ++--- types/MessagingProfilesResource.d.ts | 4 +- types/VerificationsResource.d.ts | 116 +++++++++++++++++++++ types/VerifiedNumbersResource.d.ts | 108 +++++++++++++++++++ types/VerifyProfilesResource.d.ts | 84 +++++++++++++++ types/index.d.ts | 6 ++ 20 files changed, 516 insertions(+), 219 deletions(-) delete mode 100644 src/resources/Verify.ts create mode 100644 types/VerificationsResource.d.ts create mode 100644 types/VerifiedNumbersResource.d.ts create mode 100644 types/VerifyProfilesResource.d.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index f313289..94c96e7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ - Fix `Queues` resource nested methods - Fix `PortingOrders` and `Ips` resource nested methods param names - Update legacy skipped tests +- Fix `Verifications`, `VerifyProfiles` and `VerifiedNumbers` resources method naming and params +- Remove dupe `Verify` resource +- Update nested methods types to match param values usage ### v2.0.0-beta.0 diff --git a/src/resources/IpConnections.ts b/src/resources/IpConnections.ts index 72325a6..52114cb 100644 --- a/src/resources/IpConnections.ts +++ b/src/resources/IpConnections.ts @@ -33,8 +33,6 @@ export const IpConnections = TelnyxResource.extend({ list: telnyxMethod({ method: 'GET', methodType: 'list', - - transformResponseData: transformResponseData, }), create: telnyxMethod({ diff --git a/src/resources/Verifications.ts b/src/resources/Verifications.ts index 49aef79..005090b 100644 --- a/src/resources/Verifications.ts +++ b/src/resources/Verifications.ts @@ -4,61 +4,41 @@ const telnyxMethod = TelnyxResource.method; import {ResponsePayload, TelnyxObject} from '../Types'; -function transformResponseData( +const transformResponseData = ( response: ResponsePayload, telnyx: TelnyxObject, -) { - return utils.addResourceToResponseData(response, telnyx, 'verification', { - sms: telnyxMethod({ +) => { + return utils.addResourceToResponseData(response, telnyx, 'verifiedNumbers', { + verify: telnyxMethod({ method: 'POST', - path: '/sms', - - transformResponseData: transformResponseData, - }), - - call: telnyxMethod({ - method: 'POST', - path: '/call', - - transformResponseData: transformResponseData, - }), - - flashcall: telnyxMethod({ - method: 'POST', - path: '/flashcall', - - transformResponseData: transformResponseData, - }), - - byPhoneNumber: telnyxMethod({ - method: 'GET', - path: '/verifications/by_phone_number/{phone_number}', - urlParams: ['phone_number'], - paramsValues: [response.data.id as string], - paramsNames: ['id'], - }), - - verifyVerificationCodeByPhoneNumber: telnyxMethod({ - method: 'POST', - path: '/by_phone_number/{phone_number}/actions/verify', - urlParams: ['phone_number'], - paramsValues: [response.data.id as string], - paramsNames: ['id'], - }), - - verifyVerificationCodeById: telnyxMethod({ - method: 'POST', - path: '/by_phone_number/{verification_id}/actions/verify', + path: '/{verification_id}/actions/verify', urlParams: ['verification_id'], + paramsNames: ['verification_id'], paramsValues: [response.data.id as string], - paramsNames: ['id'], }), }); -} +}; export const Verifications = TelnyxResource.extend({ path: 'verifications', - includeBasic: ['update'], + + callVerify: telnyxMethod({ + method: 'POST', + path: '/call', + methodType: 'create', + }), + + flashcallVerify: telnyxMethod({ + method: 'POST', + path: '/flashcall', + methodType: 'create', + }), + + smsVerify: telnyxMethod({ + method: 'POST', + path: '/sms', + methodType: 'create', + }), retrieve: telnyxMethod({ method: 'GET', @@ -67,4 +47,27 @@ export const Verifications = TelnyxResource.extend({ transformResponseData: transformResponseData, }), + + verify: telnyxMethod({ + method: 'POST', + path: '/{verification_id}/actions/verify', + urlParams: ['verification_id'], + paramsNames: ['verification_id'], + }), + + listByPhoneNumber: telnyxMethod({ + method: 'GET', + path: '/by_phone_number/{phone_number}', + urlParams: ['phone_number'], + paramsNames: ['phone_number'], + methodType: 'list', + }), + + verifyByPhoneNumber: telnyxMethod({ + method: 'POST', + path: '/by_phone_number/{phone_number}/actions/verify', + urlParams: ['phone_number'], + paramsNames: ['phone_number'], + methodType: 'create', + }), }); diff --git a/src/resources/VerifiedNumbers.ts b/src/resources/VerifiedNumbers.ts index 6662710..31dbb87 100644 --- a/src/resources/VerifiedNumbers.ts +++ b/src/resources/VerifiedNumbers.ts @@ -1,6 +1,53 @@ import TelnyxResource from '../TelnyxResource'; +import {ResponsePayload, TelnyxObject} from '../Types'; +import * as utils from '../utils'; + +const telnyxMethod = TelnyxResource.method; + +const transformResponseData = ( + response: ResponsePayload, + telnyx: TelnyxObject, +) => { + return utils.addResourceToResponseData(response, telnyx, 'verifiedNumbers', { + verify: telnyxMethod({ + method: 'POST', + path: '/{phone_number}/actions/verify', + urlParams: ['phone_number'], + paramsNames: ['phone_number'], + paramsValues: [response.data.id as string], + }), + }); +}; export const VerifiedNumbers = TelnyxResource.extend({ path: 'verified_numbers', - includeBasic: ['list', 'retrieve', 'del'], + includeBasic: ['list', 'del'], + + retrieve: telnyxMethod({ + method: 'GET', + path: '/{phone_number}', + urlParams: ['phone_number'], + + transformResponseData: transformResponseData, + }), + + create: telnyxMethod({ + method: 'POST', + + transformResponseData: transformResponseData, + }), + + request: telnyxMethod({ + method: 'POST', + + transformResponseData: transformResponseData, + }), + + verify: telnyxMethod({ + method: 'POST', + path: '/{phone_number}/actions/verify', + urlParams: ['phone_number'], + paramsNames: ['phone_number'], + methodType: 'create', + }), }); diff --git a/src/resources/Verify.ts b/src/resources/Verify.ts deleted file mode 100644 index 6689edf..0000000 --- a/src/resources/Verify.ts +++ /dev/null @@ -1,52 +0,0 @@ -import TelnyxResource from '../TelnyxResource'; -const telnyxMethod = TelnyxResource.method; - -export const Verify = TelnyxResource.extend({ - path: 'verify', - includeBasic: ['list', 'retrieve', 'create', 'delete'], - - RetrieveVerification: telnyxMethod({ - method: 'GET', - path: '/verifications/{verification/id}', - urlParams: ['verification_id'], - }), - CreateFlashcallVerification: telnyxMethod({ - method: 'POST', - path: '/verifications/flashcall', - }), - VerifyVerificationCode: telnyxMethod({ - method: 'POST', - path: '/verifications/by_phone_number/{phone/number}/actions/verify', - urlParams: ['phone_number'], - }), - CreateVerificationSms: telnyxMethod({ - method: 'POST', - path: '/verifications/sms', - }), - CreateVerificationPsd2: telnyxMethod({ - method: 'POST', - path: '/verifications/psd2', - }), - ListVerifications: telnyxMethod({ - method: 'GET', - path: '/verifications/by_phone_number/{phone/number}', - urlParams: ['phone_number'], - }), - ListProfiles: telnyxMethod({ - method: 'GET', - path: '/verify_profiles', - }), - CreateVerificationWhatsapp: telnyxMethod({ - method: 'POST', - path: '/verifications/whatsapp', - }), - DeleteProfile: telnyxMethod({ - method: 'DELETE', - path: '/verify_profiles/{verify/profile/id}', - urlParams: ['verify_profile_id'], - }), - CreateVerificationCall: telnyxMethod({ - method: 'POST', - path: '/verifications/call', - }), -}); diff --git a/src/resources/VerifyProfiles.ts b/src/resources/VerifyProfiles.ts index 034f43e..fd2e189 100644 --- a/src/resources/VerifyProfiles.ts +++ b/src/resources/VerifyProfiles.ts @@ -1,46 +1,14 @@ import TelnyxResource from '../TelnyxResource'; -import * as utils from '../utils'; -const telnyxMethod = TelnyxResource.method; - -import {ResponsePayload, TelnyxObject} from '../Types'; -function transformResponseData( - response: ResponsePayload, - telnyx: TelnyxObject, -) { - return utils.addResourceToResponseData(response, telnyx, 'verifyProfiles', { - retrieveVerifyProfileMessageTemplates: telnyxMethod({ - method: 'GET', - path: '/verify_profiles/templates', - }), - }); -} +const telnyxMethod = TelnyxResource.method; export const VerifyProfiles = TelnyxResource.extend({ path: 'verify_profiles', - includeBasic: ['list', 'update', 'del'], - - save: telnyxMethod({ - method: 'PATCH', - path: '/{verify_profile_id}', - urlParams: ['verify_profile_id'], - paramsNames: ['id'], - - transformResponseData: transformResponseData, - }), + includeBasic: ['list', 'create', 'retrieve', 'update', 'del'], - retrieve: telnyxMethod({ + listTemplates: telnyxMethod({ method: 'GET', - path: '/{verify_profile_id}', - urlParams: ['verify_profile_id'], - paramsNames: ['id'], - - transformResponseData: transformResponseData, - }), - - create: telnyxMethod({ - method: 'POST', - - transformResponseData: transformResponseData, + path: '/templates', + methodType: 'list', }), }); diff --git a/src/telnyx.ts b/src/telnyx.ts index 783bae9..92ad56f 100644 --- a/src/telnyx.ts +++ b/src/telnyx.ts @@ -134,7 +134,6 @@ import {TelephonyCredentials} from './resources/TelephonyCredentials'; import {TexmlApplications} from './resources/TexmlApplications'; import {Verifications} from './resources/Verifications'; import {VerifiedNumbers} from './resources/VerifiedNumbers'; -import {Verify} from './resources/Verify'; import {VerifyProfiles} from './resources/VerifyProfiles'; import {VirtualCrossConnects} from './resources/VirtualCrossConnects'; import {WdrDetailReports} from './resources/WdrDetailReports'; @@ -305,7 +304,6 @@ export function createTelnyx() { TexmlApplications, Verifications, VerifiedNumbers, - Verify, VerifyProfiles, VirtualCrossConnects, WdrDetailReports, diff --git a/types/AddressesResource.d.ts b/types/AddressesResource.d.ts index ec1a9bd..91e5486 100644 --- a/types/AddressesResource.d.ts +++ b/types/AddressesResource.d.ts @@ -39,7 +39,9 @@ declare module 'telnyx' { paths['/addresses/{id}']['delete']['responses']['200']['content']['application/json']; type AddressesNestedMethods = { - del: AddressesResource['del']; + del( + options?: RequestOptions, + ): Promise>; }; class AddressesResource { diff --git a/types/CallControlApplicationsResource.d.ts b/types/CallControlApplicationsResource.d.ts index 61a4421..51c3f01 100644 --- a/types/CallControlApplicationsResource.d.ts +++ b/types/CallControlApplicationsResource.d.ts @@ -42,8 +42,14 @@ declare module 'telnyx' { paths['/call_control_applications/{id}']['delete']['responses']['200']['content']['application/json']; type CallControlApplicationsNestedMethods = { - create: MessagingProfilesResource['create']; - del: MessagingProfilesResource['del']; + del( + options?: RequestOptions, + ): Promise>; + + update( + params: CallControlApplicationsUpdateParams, + options?: RequestOptions, + ): Promise>; }; class CallControlApplicationsResource { diff --git a/types/ConferencesResource.d.ts b/types/ConferencesResource.d.ts index 39988ec..a81754f 100644 --- a/types/ConferencesResource.d.ts +++ b/types/ConferencesResource.d.ts @@ -191,22 +191,26 @@ declare module 'telnyx' { id: ConferencesRetrieveId, options?: RequestOptions, ): Promise< - Telnyx.Response & - NestedResponseData< - ConferencesRetrieveResponse['data'], - ConferencesNestedMethods - > + Telnyx.Response< + Telnyx.ConferencesRetrieveResponse & + NestedResponseData< + ConferencesRetrieveResponse['data'], + ConferencesNestedMethods + > + > >; create( params: ConferencesCreateParams, options?: RequestOptions, ): Promise< - Telnyx.Response & - NestedResponseData< - ConferencesCreateResponse['data'], - ConferencesNestedMethods - > + Telnyx.Response< + Telnyx.ConferencesCreateResponse & + NestedResponseData< + ConferencesCreateResponse['data'], + ConferencesNestedMethods + > + > >; join( diff --git a/types/FaxApplicationsResource.d.ts b/types/FaxApplicationsResource.d.ts index e861879..e1e3430 100644 --- a/types/FaxApplicationsResource.d.ts +++ b/types/FaxApplicationsResource.d.ts @@ -2,14 +2,11 @@ import {paths} from './TelnyxAPI.js'; declare module 'telnyx' { namespace Telnyx { - type FaxApplicationsDelId = - paths['/fax_applications/{id}']['delete']['parameters']['path']['id']; - - type FaxApplicationsDelParams = - paths['/fax_applications/{id}']['delete']['parameters']['query']; + type FaxApplicationsListParams = + paths['/fax_applications']['get']['parameters']['query']; - type FaxApplicationsDelResponse = - paths['/fax_applications/{id}']['delete']['responses']['200']['content']['application/json']; + type FaxApplicationsListResponse = + paths['/fax_applications']['get']['responses']['200']['content']['application/json']; type FaxApplicationsCreateParams = paths['/fax_applications']['post']['requestBody']['content']['application/json']; @@ -26,11 +23,14 @@ declare module 'telnyx' { type FaxApplicationsRetrieveResponse = paths['/fax_applications/{id}']['get']['responses']['200']['content']['application/json']; - type FaxApplicationsListParams = - paths['/fax_applications']['get']['parameters']['query']; + type FaxApplicationsDelId = + paths['/fax_applications/{id}']['delete']['parameters']['path']['id']; - type FaxApplicationsListResponse = - paths['/fax_applications']['get']['responses']['200']['content']['application/json']; + type FaxApplicationsDelParams = + paths['/fax_applications/{id}']['delete']['parameters']['query']; + + type FaxApplicationsDelResponse = + paths['/fax_applications/{id}']['delete']['responses']['200']['content']['application/json']; type FaxApplicationsUpdateId = paths['/fax_applications/{id}']['patch']['parameters']['path']['id']; @@ -42,15 +42,21 @@ declare module 'telnyx' { paths['/fax_applications/{id}']['patch']['responses']['200']['content']['application/json']; type FaxApplicationsNestedMethods = { - create: FaxApplicationsResource['create']; - del: FaxApplicationsResource['del']; + del( + options?: RequestOptions, + ): Promise>; + + update( + params: FaxApplicationsUpdateParams, + options?: RequestOptions, + ): Promise>; }; class FaxApplicationsResource { - del( - id: FaxApplicationsDelId, + list( + params?: FaxApplicationsListParams, options?: RequestOptions, - ): Promise>; + ): Promise>; create( params: FaxApplicationsCreateParams, @@ -78,10 +84,10 @@ declare module 'telnyx' { > >; - list( - params?: FaxApplicationsListParams, + del( + id: FaxApplicationsDelId, options?: RequestOptions, - ): Promise>; + ): Promise>; update( id: FaxApplicationsUpdateId, diff --git a/types/FaxesResource.d.ts b/types/FaxesResource.d.ts index c0a9c74..95be2dd 100644 --- a/types/FaxesResource.d.ts +++ b/types/FaxesResource.d.ts @@ -31,14 +31,16 @@ declare module 'telnyx' { paths['/faxes']['get']['responses']['200']['content']['application/json']; type FaxesNestedMethods = { - del: FaxApplicationsResource['del']; + del( + options?: RequestOptions, + ): Promise>; }; class FaxesResource { - del( - id: FaxesDelId, + list( + params?: FaxesListParams, options?: RequestOptions, - ): Promise>; + ): Promise>; create( params: FaxesCreateParams, @@ -73,10 +75,10 @@ declare module 'telnyx' { > >; - list( - params?: FaxesListParams, + del( + id: FaxesDelId, options?: RequestOptions, - ): Promise>; + ): Promise>; } } } diff --git a/types/FqdnConnectionsResource.d.ts b/types/FqdnConnectionsResource.d.ts index 038a679..ddde0e0 100644 --- a/types/FqdnConnectionsResource.d.ts +++ b/types/FqdnConnectionsResource.d.ts @@ -42,15 +42,21 @@ declare module 'telnyx' { paths['/fqdn_connections/{id}']['patch']['responses']['200']['content']['application/json']; type FqdnConnectionsNestedMethods = { - create: FqdnConnectionsResource['create']; - del: FqdnConnectionsResource['del']; + del( + options?: RequestOptions, + ): Promise>; + + update( + params: FqdnConnectionsUpdateParams, + options?: RequestOptions, + ): Promise>; }; class FqdnConnectionsResource { - del( - id: FqdnConnectionsDelId, + list( + params?: FqdnConnectionsListParams, options?: RequestOptions, - ): Promise>; + ): Promise>; create( params: FqdnConnectionsCreateParams, @@ -77,17 +83,6 @@ declare module 'telnyx' { > > >; - - list( - params?: FqdnConnectionsListParams, - options?: RequestOptions, - ): Promise>; - - update( - id: FqdnConnectionsUpdateId, - params: FqdnConnectionsUpdateParams, - options?: RequestOptions, - ): Promise>; } } } diff --git a/types/FqdnsResource.d.ts b/types/FqdnsResource.d.ts index a1a39d9..6276660 100644 --- a/types/FqdnsResource.d.ts +++ b/types/FqdnsResource.d.ts @@ -46,15 +46,21 @@ declare module 'telnyx' { paths['/fqdns/{id}']['patch']['responses']['200']['content']['application/json']; type FqdnsNestedMethods = { - create: FqdnsResource['create']; - del: FqdnsResource['del']; + del( + options?: RequestOptions, + ): Promise>; + + update( + params: FqdnsUpdateParams, + options?: RequestOptions, + ): Promise>; }; class FqdnsResource { - del( - id: FqdnsDelId, + list( + params?: FqdnsListParams, options?: RequestOptions, - ): Promise>; + ): Promise>; create( params: FqdnsCreateParams, @@ -79,10 +85,10 @@ declare module 'telnyx' { > >; - list( - params?: FqdnsListParams, + del( + id: FqdnsDelId, options?: RequestOptions, - ): Promise>; + ): Promise>; update( id: FqdnsUpdateId, diff --git a/types/IpConnectionsResource.d.ts b/types/IpConnectionsResource.d.ts index eefb095..770566f 100644 --- a/types/IpConnectionsResource.d.ts +++ b/types/IpConnectionsResource.d.ts @@ -42,15 +42,21 @@ declare module 'telnyx' { paths['/ip_connections/{id}']['patch']['responses']['200']['content']['application/json']; type IpConnectionsNestedMethods = { - create: FqdnsResource['create']; - del: FqdnsResource['del']; + del( + options?: RequestOptions, + ): Promise>; + + update( + params: IpConnectionsUpdateParams, + options?: RequestOptions, + ): Promise>; }; class IpConnectionsResource { - del( - id: IpConnectionsDelId, + list( + params?: IpConnectionsListParams, options?: RequestOptions, - ): Promise>; + ): Promise>; create( params: IpConnectionsCreateParams, @@ -77,17 +83,6 @@ declare module 'telnyx' { > > >; - - list( - params?: IpConnectionsListParams, - options?: RequestOptions, - ): Promise>; - - update( - id: IpConnectionsUpdateId, - params: IpConnectionsUpdateParams, - options?: RequestOptions, - ): Promise>; } } } diff --git a/types/MessagingProfilesResource.d.ts b/types/MessagingProfilesResource.d.ts index 5a11fce..b1dbb73 100644 --- a/types/MessagingProfilesResource.d.ts +++ b/types/MessagingProfilesResource.d.ts @@ -117,7 +117,9 @@ declare module 'telnyx' { paths['/messaging_profiles/{profile_id}/autoresp_configs/{autoresp_cfg_id}']['put']['responses']['200']['content']['application/json']; type MessagingProfilesNestedMethods = { - del: MessagingProfilesResource['del']; + del( + options?: RequestOptions, + ): Promise>; phoneNumbers( params: MessagingProfilesListPhoneNumbersParams, diff --git a/types/VerificationsResource.d.ts b/types/VerificationsResource.d.ts new file mode 100644 index 0000000..4edab5d --- /dev/null +++ b/types/VerificationsResource.d.ts @@ -0,0 +1,116 @@ +import {paths} from './TelnyxAPI.js'; + +declare module 'telnyx' { + namespace Telnyx { + type VerificationsCallCreateParams = + paths['/verifications/call']['post']['requestBody']['content']['application/json']; + + type VerificationsCallCreateResponse = + paths['/verifications/call']['post']['responses']['200']['content']['application/json']; + + type VerificationsFlashcallCreateParams = + paths['/verifications/flashcall']['post']['requestBody']['content']['application/json']; + + type VerificationsFlashcallCreateResponse = + paths['/verifications/flashcall']['post']['responses']['200']['content']['application/json']; + + type VerificationsSmsCreateParams = + paths['/verifications/sms']['post']['requestBody']['content']['application/json']; + + type VerificationsSmsCreateResponse = + paths['/verifications/sms']['post']['responses']['200']['content']['application/json']; + + type VerificationsRetrieveId = + paths['/verifications/{verification_id}']['get']['parameters']['path']['verification_id']; + + type VerificationsRetrieveResponse = + paths['/verifications/{verification_id}']['get']['responses']['200']['content']['application/json']; + + type VerificationsVerifyId = + paths['/verifications/{verification_id}/actions/verify']['post']['parameters']['path']['verification_id']; + + type VerificationsVerifyParams = + paths['/verifications/{verification_id}/actions/verify']['post']['requestBody']['content']['application/json']; + + type VerificationsVerifyResponse = + paths['/verifications/{verification_id}/actions/verify']['post']['responses']['200']['content']['application/json']; + + type VerificationsListByPhoneNumberPhoneNumber = + paths['/verifications/by_phone_number/{phone_number}']['get']['parameters']['path']['phone_number']; + + type VerificationsListByPhoneNumberParams = + | paths['/verifications/by_phone_number/{phone_number}']['get']['parameters']['query'] + | Record; + + type VerificationsListByPhoneNumberResponse = + paths['/verifications/by_phone_number/{phone_number}']['get']['responses']['200']['content']['application/json']; + + type VerificationsVerifyByPhoneNumberPhoneNumber = + paths['/verifications/by_phone_number/{phone_number}/actions/verify']['post']['parameters']['path']['phone_number']; + + type VerificationsVerifyByPhoneNumberParams = + paths['/verifications/by_phone_number/{phone_number}/actions/verify']['post']['requestBody']['content']['application/json']; + + type VerificationsVerifyByPhoneNumberResponse = + paths['/verifications/by_phone_number/{phone_number}/actions/verify']['post']['responses']['200']['content']['application/json']; + + type VerificationsNestedMethods = { + verify( + params: VerificationsVerifyParams, + options?: RequestOptions, + ): Promise>; + }; + + class VerificationsResource { + callVerify( + params: VerificationsCallCreateParams, + options?: RequestOptions, + ): Promise>; + + flashcallVerify( + params: VerificationsFlashcallCreateParams, + options?: RequestOptions, + ): Promise>; + + smsVerify( + params: VerificationsSmsCreateParams, + options?: RequestOptions, + ): Promise>; + + retrieve( + id: VerificationsRetrieveId, + options?: RequestOptions, + ): Promise< + Telnyx.Response< + Telnyx.VerificationsRetrieveResponse & + NestedResponseData< + VerificationsRetrieveResponse['data'], + VerificationsNestedMethods + > + > + >; + + verify( + id: VerificationsVerifyId, + params: VerificationsVerifyParams, + options?: RequestOptions, + ): Promise>; + + listByPhoneNumber( + phoneNumber: VerificationsListByPhoneNumberPhoneNumber, + params: VerificationsListByPhoneNumberParams, + options?: RequestOptions, + ): Promise< + Telnyx.Response + >; + + verifyByPhoneNumber( + phoneNumber: VerificationsVerifyByPhoneNumberPhoneNumber, + params: VerificationsVerifyByPhoneNumberParams, + options?: RequestOptions, + ): Promise< + Telnyx.Response + >; + } + } +} diff --git a/types/VerifiedNumbersResource.d.ts b/types/VerifiedNumbersResource.d.ts new file mode 100644 index 0000000..aa4d497 --- /dev/null +++ b/types/VerifiedNumbersResource.d.ts @@ -0,0 +1,108 @@ +import {paths} from './TelnyxAPI.js'; + +declare module 'telnyx' { + namespace Telnyx { + type VerifiedNumbersListParams = + paths['/verified_numbers']['get']['parameters']['query']; + + type VerifiedNumbersListResponse = + paths['/verified_numbers']['get']['responses']['200']['content']['application/json']; + + type VerifiedNumbersCreateParams = + paths['/verified_numbers']['post']['requestBody']['content']['application/json']; + + type VerifiedNumbersCreateResponse = + paths['/verified_numbers']['post']['responses']['200']['content']['application/json']; + + type VerifiedNumbersRetrievePhoneNumber = + paths['/verified_numbers/{phone_number}']['get']['parameters']['path']['phone_number']; + + type VerifiedNumbersRetrieveParams = + paths['/verified_numbers/{phone_number}']['get']['parameters']['query']; + + type VerifiedNumbersRetrieveResponse = + paths['/verified_numbers/{phone_number}']['get']['responses']['200']['content']['application/json']; + + type VerifiedNumbersDelPhoneNumber = + paths['/verified_numbers/{phone_number}']['delete']['parameters']['path']['phone_number']; + + type VerifiedNumbersDelParams = + paths['/verified_numbers/{phone_number}']['delete']['parameters']['query']; + + type VerifiedNumbersDelResponse = + paths['/verified_numbers/{phone_number}']['delete']['responses']['200']['content']['application/json']; + + type VerifiedNumbersVerifyPhoneNumber = + paths['/verified_numbers/{phone_number}/actions/verify']['post']['parameters']['path']['phone_number']; + + type VerifiedNumbersVerifyParams = + paths['/verified_numbers/{phone_number}/actions/verify']['post']['requestBody']['content']['application/json']; + + type VerifiedNumbersVerifyResponse = + paths['/verified_numbers/{phone_number}/actions/verify']['post']['responses']['200']['content']['application/json']; + + type VerifiedNumbersNestedMethods = { + verify( + params: VerifiedNumbersVerifyParams, + options?: RequestOptions, + ): Promise>; + }; + + class VerifiedNumbersResource { + list( + params?: VerifiedNumbersListParams, + options?: RequestOptions, + ): Promise>; + + create( + params: VerifiedNumbersCreateParams, + options?: RequestOptions, + ): Promise< + Telnyx.Response< + Telnyx.VerifiedNumbersCreateResponse & + NestedResponseData< + VerifiedNumbersCreateResponse, + VerifiedNumbersNestedMethods + > + > + >; + + request( + params: VerifiedNumbersCreateParams, + options?: RequestOptions, + ): Promise< + Telnyx.Response< + Telnyx.VerifiedNumbersCreateResponse & + NestedResponseData< + VerifiedNumbersCreateResponse, + VerifiedNumbersNestedMethods + > + > + >; + + verify( + phoneNumber: VerifiedNumbersVerifyPhoneNumber, + params: VerifiedNumbersVerifyParams, + options?: RequestOptions, + ): Promise>; + + retrieve( + phoneNumber: VerifiedNumbersRetrievePhoneNumber, + options?: RequestOptions, + ): Promise< + Telnyx.Response< + Telnyx.VerifiedNumbersRetrieveResponse & + NestedResponseData< + VerifiedNumbersRetrieveResponse['data'], + VerifiedNumbersNestedMethods + > + > + >; + + del( + phoneNumber: VerifiedNumbersDelPhoneNumber, + options?: RequestOptions, + ): Promise>; + } + } +} diff --git a/types/VerifyProfilesResource.d.ts b/types/VerifyProfilesResource.d.ts new file mode 100644 index 0000000..0ce13b2 --- /dev/null +++ b/types/VerifyProfilesResource.d.ts @@ -0,0 +1,84 @@ +import {paths} from './TelnyxAPI.js'; + +declare module 'telnyx' { + namespace Telnyx { + type VerifyProfilesListParams = + paths['/verify_profiles']['get']['parameters']['query']; + + type VerifyProfilesListResponse = + paths['/verify_profiles']['get']['responses']['200']['content']['application/json']; + + type VerifyProfilesCreateParams = + paths['/verify_profiles']['post']['requestBody']['content']['application/json']; + + type VerifyProfilesCreateResponse = + paths['/verify_profiles']['post']['responses']['200']['content']['application/json']; + + type VerifyProfilesRetrieveId = + paths['/verify_profiles/{verify_profile_id}']['get']['parameters']['path']['verify_profile_id']; + + type VerifyProfilesRetrieveParams = + paths['/verify_profiles/{verify_profile_id}']['get']['parameters']['query']; + + type VerifyProfilesRetrieveResponse = + paths['/verify_profiles/{verify_profile_id}']['get']['responses']['200']['content']['application/json']; + + type VerifyProfilesDelId = + paths['/verify_profiles/{verify_profile_id}']['delete']['parameters']['path']['verify_profile_id']; + + type VerifyProfilesDelParams = + paths['/verify_profiles/{verify_profile_id}']['delete']['parameters']['query']; + + type VerifyProfilesDelResponse = + paths['/verify_profiles/{verify_profile_id}']['delete']['responses']['200']['content']['application/json']; + + type VerifyProfilesUpdateId = + paths['/verify_profiles/{verify_profile_id}']['patch']['parameters']['path']['verify_profile_id']; + + type VerifyProfilesUpdateParams = + paths['/verify_profiles/{verify_profile_id}']['patch']['requestBody']['content']['application/json']; + + type VerifyProfilesUpdateResponse = + paths['/verify_profiles/{verify_profile_id}']['patch']['responses']['200']['content']['application/json']; + + type VerifyProfilesListTemplatesParams = + | paths['/verify_profiles/templates']['get']['parameters']['query'] + | Record; + + type VerifyProfilesListTemplatesResponse = + paths['/verify_profiles/templates']['get']['responses']['200']['content']['application/json']; + + class VerifyProfilesResource { + list( + params?: VerifyProfilesListParams, + options?: RequestOptions, + ): Promise>; + + create( + params: VerifyProfilesCreateParams, + options?: RequestOptions, + ): Promise>; + + retrieve( + id: VerifyProfilesRetrieveId, + options?: RequestOptions, + ): Promise>; + + del( + id: VerifyProfilesDelId, + options?: RequestOptions, + ): Promise>; + + update( + id: VerifyProfilesUpdateId, + params: VerifyProfilesUpdateParams, + options?: RequestOptions, + ): Promise>; + + listTemplates( + params?: VerifyProfilesListTemplatesParams, + options?: RequestOptions, + ): Promise>; + } + } +} diff --git a/types/index.d.ts b/types/index.d.ts index fcb8500..f358ad8 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -61,6 +61,9 @@ /// /// /// +/// +/// +/// // declare module 'telnyx' { @@ -130,6 +133,9 @@ declare module 'telnyx' { telephonyCredentials: Telnyx.TelephonyCredentialsResource; texmlApplications: Telnyx.TexmlApplicationsResource; storageBuckets: Telnyx.StorageBucketsResource; + verifications: Telnyx.VerificationsResource; + verifiedNumbers: Telnyx.VerifiedNumbersResource; + verifyProfiles: Telnyx.VerifyProfilesResource; // webhooks: Telnyx.Webhooks; From 4b029f34c62f6c38c4fa520e8f46e3150597496d Mon Sep 17 00:00:00 2001 From: Lucas Rosa Date: Fri, 11 Oct 2024 15:55:04 -0300 Subject: [PATCH 49/59] add missing Texml resource methods --- CHANGELOG.md | 4 ++ VERSION | 2 +- package-lock.json | 4 +- package.json | 2 +- src/resources/CallControlApplications.ts | 2 +- src/resources/Texml.ts | 28 ++++++++++++ src/resources/TexmlApplications.ts | 48 +++++++++++++++++++- src/telnyx.ts | 2 + src/test/resources/TexmlApplications.test.ts | 41 +++++++++++------ types/TexmlApplicationsResource.d.ts | 32 ++++++++++++- types/TexmlResource.d.ts | 48 ++++++++++++++++++++ types/index.d.ts | 2 + 12 files changed, 192 insertions(+), 23 deletions(-) create mode 100644 src/resources/Texml.ts create mode 100644 types/TexmlResource.d.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 94c96e7..0522652 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## v2 +### v2.0.0-beta.2 + +- Add missing `Texml` resource methods + ### v2.0.0-beta.1 - Fix `Queues` resource nested methods diff --git a/VERSION b/VERSION index 6060c31..e2d1981 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.0.0-beta.1 +2.0.0-beta.2 diff --git a/package-lock.json b/package-lock.json index 95e5336..7b1cf5f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "telnyx", - "version": "2.0.0-beta.1", + "version": "2.0.0-beta.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "telnyx", - "version": "2.0.0-beta.1", + "version": "2.0.0-beta.2", "license": "MIT", "devDependencies": { "@eslint/js": "^9.10.0", diff --git a/package.json b/package.json index 15f5088..393d156 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "telnyx", - "version": "2.0.0-beta.1", + "version": "2.0.0-beta.2", "description": "Telnyx API Node SDK", "keywords": [ "telnyx", diff --git a/src/resources/CallControlApplications.ts b/src/resources/CallControlApplications.ts index abfe4d5..f4cb8d9 100644 --- a/src/resources/CallControlApplications.ts +++ b/src/resources/CallControlApplications.ts @@ -34,7 +34,7 @@ function transformResponseData( export const CallControlApplications = TelnyxResource.extend({ path: 'call_control_applications', - includeBasic: ['list', 'update'], + includeBasic: ['list', 'update', 'del'], create: telnyxMethod({ method: 'POST', diff --git a/src/resources/Texml.ts b/src/resources/Texml.ts new file mode 100644 index 0000000..5f846f7 --- /dev/null +++ b/src/resources/Texml.ts @@ -0,0 +1,28 @@ +import TelnyxResource from '../TelnyxResource'; + +const telnyxMethod = TelnyxResource.method; + +export const Texml = TelnyxResource.extend({ + path: 'texml', + + createSecret: telnyxMethod({ + method: 'POST', + path: '/secrets', + methodType: 'create', + }), + + createCall: telnyxMethod({ + method: 'POST', + path: '/calls/{application_id}', + urlParams: ['application_id'], + paramsNames: ['application_id'], + methodType: 'create', + }), + + updateCall: telnyxMethod({ + method: 'POST', + path: '/calls/{call_sid}/update', + urlParams: ['call_sid'], + paramsNames: ['call_sid'], + }), +}); diff --git a/src/resources/TexmlApplications.ts b/src/resources/TexmlApplications.ts index 47f1d96..892020c 100644 --- a/src/resources/TexmlApplications.ts +++ b/src/resources/TexmlApplications.ts @@ -1,6 +1,52 @@ import TelnyxResource from '../TelnyxResource'; +import {ResponsePayload, TelnyxObject} from '../Types'; +import * as utils from '../utils'; + +const telnyxMethod = TelnyxResource.method; + +function transformResponseData( + response: ResponsePayload, + telnyx: TelnyxObject, +) { + return utils.addResourceToResponseData( + response, + telnyx, + 'texmlApplications', + { + del: telnyxMethod({ + method: 'DELETE', + path: '/{texmlApplicationId}', + urlParams: ['texmlApplicationId'], + paramsValues: [response.data.id as string], + paramsNames: ['texmlApplicationId'], + }), + + update: telnyxMethod({ + method: 'PATCH', + path: '/{texmlApplicationId}', + urlParams: ['texmlApplicationId'], + paramsValues: [response.data.id as string], + paramsNames: ['texmlApplicationId'], + }), + }, + ); +} export const TexmlApplications = TelnyxResource.extend({ path: 'texml_applications', - includeBasic: ['list', 'create', 'retrieve', 'del', 'update'], + includeBasic: ['list', 'update', 'del'], + + create: telnyxMethod({ + method: 'POST', + + transformResponseData: transformResponseData, + }), + + retrieve: telnyxMethod({ + method: 'GET', + path: '/{id}', + urlParams: ['id'], + + transformResponseData: transformResponseData, + }), }); diff --git a/src/telnyx.ts b/src/telnyx.ts index 92ad56f..4993593 100644 --- a/src/telnyx.ts +++ b/src/telnyx.ts @@ -131,6 +131,7 @@ import {SimCardOrders} from './resources/SimCardOrders'; import {SimCards} from './resources/SimCards'; import {StorageBuckets} from './resources/StorageBuckets'; import {TelephonyCredentials} from './resources/TelephonyCredentials'; +import {Texml} from './resources/Texml'; import {TexmlApplications} from './resources/TexmlApplications'; import {Verifications} from './resources/Verifications'; import {VerifiedNumbers} from './resources/VerifiedNumbers'; @@ -301,6 +302,7 @@ export function createTelnyx() { SimCards, StorageBuckets, TelephonyCredentials, + Texml, TexmlApplications, Verifications, VerifiedNumbers, diff --git a/src/test/resources/TexmlApplications.test.ts b/src/test/resources/TexmlApplications.test.ts index db1c5bf..dbe4a28 100644 --- a/src/test/resources/TexmlApplications.test.ts +++ b/src/test/resources/TexmlApplications.test.ts @@ -1,14 +1,21 @@ +import {TelnyxObject} from '../../Types'; import { type ResponsePayloadList, type ResponsePayload, utils as testUtils, } from '../utils'; -const telnyx = testUtils.getTelnyxMock(); const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); const TEST_UUID = '123e4567-e89b-12d3-a456-426614174000'; describe('TeXML Apps', function () { + let telnyxInstance: TelnyxObject; + + beforeEach(() => { + // make specs independent + telnyxInstance = testUtils.getTelnyxMock(); + }); + describe('list', function () { function responseFn(response: ResponsePayloadList) { expect(response).toHaveProperty('data'); @@ -23,7 +30,7 @@ describe('TeXML Apps', function () { test('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.texmlApplications + return telnyxInstance.texmlApplications .list({ page: { number: 1, @@ -41,7 +48,7 @@ describe('TeXML Apps', function () { test('Sends the correct request [with specified auth]', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.texmlApplications + return telnyxInstance.texmlApplications .list( { page: { @@ -69,7 +76,7 @@ describe('TeXML Apps', function () { test('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.texmlApplications + return telnyxInstance.texmlApplications .create({ active: false, anchorsite_override: 'Amsterdam, Netherlands', @@ -97,7 +104,7 @@ describe('TeXML Apps', function () { test('Sends the correct request [with specified auth]', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.texmlApplications + return telnyxInstance.texmlApplications .create( { active: false, @@ -127,40 +134,44 @@ describe('TeXML Apps', function () { }); }); - describe('del', function () { + describe('retrieve', function () { function responseFn(response: ResponsePayload) { expect(response).toHaveProperty('data'); } test('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.texmlApplications.del(TEST_UUID).then(responseFn); + return telnyxInstance.texmlApplications + .retrieve(TEST_UUID) + .then(responseFn); }); test('Sends the correct request [with specified auth]', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.texmlApplications - .del(TEST_UUID, TEST_AUTH_KEY) + return telnyxInstance.texmlApplications + .retrieve(TEST_UUID, TEST_AUTH_KEY) .then(responseFn); }); }); - describe('retrieve', function () { + + describe('del', function () { function responseFn(response: ResponsePayload) { expect(response).toHaveProperty('data'); } test('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.texmlApplications.retrieve(TEST_UUID).then(responseFn); + return telnyxInstance.texmlApplications.del(TEST_UUID).then(responseFn); }); test('Sends the correct request [with specified auth]', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.texmlApplications - .retrieve(TEST_UUID, TEST_AUTH_KEY) + return telnyxInstance.texmlApplications + .del(TEST_UUID, TEST_AUTH_KEY) .then(responseFn); }); }); + describe('update', function () { function responseFn(response: ResponsePayload) { expect(response).toHaveProperty('data'); @@ -190,7 +201,7 @@ describe('TeXML Apps', function () { voice_url: 'https://example.com', }; // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.texmlApplications + return telnyxInstance.texmlApplications .update(TEST_UUID, requestBody) .then(responseFn); }); @@ -219,7 +230,7 @@ describe('TeXML Apps', function () { voice_url: 'https://example.com', }; // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.texmlApplications + return telnyxInstance.texmlApplications .update(TEST_UUID, requestBody, TEST_AUTH_KEY) .then(responseFn); }); diff --git a/types/TexmlApplicationsResource.d.ts b/types/TexmlApplicationsResource.d.ts index 44cc4e6..f5fccda 100644 --- a/types/TexmlApplicationsResource.d.ts +++ b/types/TexmlApplicationsResource.d.ts @@ -41,6 +41,17 @@ declare module 'telnyx' { type TexmlApplicationsUpdateResponse = paths['/texml_applications/{id}']['patch']['responses']['200']['content']['application/json']; + type TexmlApplicationsNestedMethods = { + del( + options?: RequestOptions, + ): Promise>; + + update( + params: TexmlApplicationsUpdateParams, + options?: RequestOptions, + ): Promise>; + }; + class TexmlApplicationsResource { del( id: TexmlApplicationsDelId, @@ -50,12 +61,29 @@ declare module 'telnyx' { create( params: TexmlApplicationsCreateParams, options?: RequestOptions, - ): Promise>; + ): Promise< + Telnyx.Response< + Telnyx.TexmlApplicationsCreateResponse & + NestedResponseData< + TexmlApplicationsCreateResponse['data'], + TexmlApplicationsNestedMethods + > + > + >; retrieve( id: TexmlApplicationsRetrieveId, options?: RequestOptions, - ): Promise>; + ): Promise< + Telnyx.Response< + Telnyx.TexmlApplicationsRetrieveResponse & + NestedResponseData< + TexmlApplicationsRetrieveResponse['data'], + TexmlApplicationsNestedMethods + > + > + >; + // ): Promise>; list( params?: TexmlApplicationsListParams, diff --git a/types/TexmlResource.d.ts b/types/TexmlResource.d.ts new file mode 100644 index 0000000..f026c08 --- /dev/null +++ b/types/TexmlResource.d.ts @@ -0,0 +1,48 @@ +import {paths} from './TelnyxAPI.js'; + +declare module 'telnyx' { + namespace Telnyx { + type TexmlCreateSecretParams = + paths['/texml/secrets']['post']['requestBody']['content']['application/json']; + + type TexmlCreateSecretResponse = + paths['/texml/secrets']['post']['responses']['201']['content']['application/json']; + + type TexmlCreateCallApplicationId = + paths['/texml/calls/{application_id}']['post']['parameters']['path']['application_id']; + + type TexmlCreateCallParams = + paths['/texml/calls/{application_id}']['post']['requestBody']['content']['application/json']; + + type TexmlCreateCallResponse = + paths['/texml/calls/{application_id}']['post']['responses']['200']['content']['application/json']; + + type TexmlUpdateCallCallSid = + paths['/texml/calls/{call_sid}/update']['post']['parameters']['path']['call_sid']; + + type TexmlUpdateCallParams = + paths['/texml/calls/{call_sid}/update']['post']['requestBody']['content']['application/json']; + + type TexmlUpdateCallResponse = + paths['/texml/calls/{call_sid}/update']['post']['responses']['200']['content']['application/json']; + + class TexmlResource { + createSecret( + params: TexmlCreateSecretParams, + options?: RequestOptions, + ): Promise>; + + createCall( + applicationId: TexmlCreateCallApplicationId, + params: TexmlCreateCallParams, + options?: RequestOptions, + ): Promise>; + + updateCall( + callSid: TexmlUpdateCallCallSid, + params: TexmlUpdateCallParams, + options?: RequestOptions, + ): Promise>; + } + } +} diff --git a/types/index.d.ts b/types/index.d.ts index f358ad8..9abbb80 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -59,6 +59,7 @@ /// /// /// +/// /// /// /// @@ -131,6 +132,7 @@ declare module 'telnyx' { portingEvents: Telnyx.PortingEventsResource; portoutEvents: Telnyx.PortoutEventsResource; telephonyCredentials: Telnyx.TelephonyCredentialsResource; + texml: Telnyx.TexmlResource; texmlApplications: Telnyx.TexmlApplicationsResource; storageBuckets: Telnyx.StorageBucketsResource; verifications: Telnyx.VerificationsResource; From 2d203d679f28e73f601703a499986303b47206eb Mon Sep 17 00:00:00 2001 From: Lucas Rosa Date: Fri, 11 Oct 2024 20:29:29 -0300 Subject: [PATCH 50/59] add missing inventory resources and methods --- CHANGELOG.md | 2 + src/resources/AvailablePhoneNumbersBlocks.ts | 6 + src/resources/NumberOrders.ts | 35 +++- src/resources/PhoneNumberSearch.ts | 16 -- src/resources/PhoneNumbers.ts | 87 ++++++-- src/resources/PhoneNumbersInboundChannels.ts | 34 +-- ... => PhoneNumbersRegulatoryRequirements.ts} | 3 +- src/resources/PhoneNumbersSlim.ts | 6 + src/telnyx.ts | 10 +- src/test/resources/NumberOrders.test.ts | 25 ++- src/test/resources/PhoneNumbers.test.ts | 91 ++++++-- ...ts => PhoneNumbersInboundChannels.test.ts} | 6 +- ...PhoneNumbersRegulatoryRequirements.test.ts | 4 +- .../AvailablePhoneNumbersBlocksResource.d.ts | 20 ++ types/NumberOrdersResource.d.ts | 78 +++++++ .../PhoneNumbersInboundChannelsResource.d.ts | 33 +++ types/PhoneNumbersMessagingResource.d.ts | 18 ++ ...NumbersRegulatoryRequirementsResource.d.ts | 20 ++ types/PhoneNumbersResource.d.ts | 195 ++++++++++++++++++ types/PhoneNumbersSlimResource.d.ts | 18 ++ types/PhoneNumbersVoiceResource.d.ts | 18 ++ types/RegulatoryRequirementsResource.d.ts | 18 ++ types/index.d.ts | 18 ++ 23 files changed, 664 insertions(+), 97 deletions(-) create mode 100644 src/resources/AvailablePhoneNumbersBlocks.ts delete mode 100644 src/resources/PhoneNumberSearch.ts rename src/resources/{PhoneNumberRegulatoryRequirements.ts => PhoneNumbersRegulatoryRequirements.ts} (63%) create mode 100644 src/resources/PhoneNumbersSlim.ts rename src/test/resources/{PhoneNumberInboundChannels.test.ts => PhoneNumbersInboundChannels.test.ts} (91%) create mode 100644 types/AvailablePhoneNumbersBlocksResource.d.ts create mode 100644 types/NumberOrdersResource.d.ts create mode 100644 types/PhoneNumbersInboundChannelsResource.d.ts create mode 100644 types/PhoneNumbersMessagingResource.d.ts create mode 100644 types/PhoneNumbersRegulatoryRequirementsResource.d.ts create mode 100644 types/PhoneNumbersResource.d.ts create mode 100644 types/PhoneNumbersSlimResource.d.ts create mode 100644 types/PhoneNumbersVoiceResource.d.ts create mode 100644 types/RegulatoryRequirementsResource.d.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 0522652..661b4de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ ### v2.0.0-beta.2 - Add missing `Texml` resource methods +- Add missing `PhoneNumbers`, `NumberOrders` and `RegulatoryRequirements` resource methods +- Update types on stale resources methods ### v2.0.0-beta.1 diff --git a/src/resources/AvailablePhoneNumbersBlocks.ts b/src/resources/AvailablePhoneNumbersBlocks.ts new file mode 100644 index 0000000..af7af9d --- /dev/null +++ b/src/resources/AvailablePhoneNumbersBlocks.ts @@ -0,0 +1,6 @@ +import TelnyxResource from '../TelnyxResource'; + +export const AvailablePhoneNumbersBlocks = TelnyxResource.extend({ + path: 'available_phone_number_blocks', + includeBasic: ['list'], +}); diff --git a/src/resources/NumberOrders.ts b/src/resources/NumberOrders.ts index ade46b9..eb5dbb1 100644 --- a/src/resources/NumberOrders.ts +++ b/src/resources/NumberOrders.ts @@ -1,6 +1,39 @@ import TelnyxResource from '../TelnyxResource'; +import {ResponsePayload, TelnyxObject} from '../Types'; +import * as utils from '../utils'; + +const telnyxMethod = TelnyxResource.method; + +function transformResponseData( + response: ResponsePayload, + telnyx: TelnyxObject, +) { + return utils.addResourceToResponseData(response, telnyx, 'numberOrders', { + update: telnyxMethod({ + method: 'PATCH', + path: '/{number_order_id}', + urlParams: ['number_order_id'], + paramsValues: [response.data.id as string], + paramsNames: ['number_order_id'], + }), + }); +} export const NumberOrders = TelnyxResource.extend({ path: 'number_orders', - includeBasic: ['list', 'retrieve', 'create', 'update'], + includeBasic: ['list', 'update'], + + create: telnyxMethod({ + method: 'POST', + + transformResponseData: transformResponseData, + }), + + retrieve: telnyxMethod({ + method: 'GET', + path: '/{number_order_id}', + urlParams: ['number_order_id'], + + transformResponseData: transformResponseData, + }), }); diff --git a/src/resources/PhoneNumberSearch.ts b/src/resources/PhoneNumberSearch.ts deleted file mode 100644 index fa7c6ee..0000000 --- a/src/resources/PhoneNumberSearch.ts +++ /dev/null @@ -1,16 +0,0 @@ -import TelnyxResource from '../TelnyxResource'; -const telnyxMethod = TelnyxResource.method; - -export const PhoneNumberSearch = TelnyxResource.extend({ - path: 'phone_number_search', - includeBasic: ['list', 'retrieve'], - - ListAvailablePhoneNumbers: telnyxMethod({ - method: 'GET', - path: '/available_phone_numbers', - }), - ListAvailablePhoneNumberBlocks: telnyxMethod({ - method: 'GET', - path: '/available_phone_number_blocks', - }), -}); diff --git a/src/resources/PhoneNumbers.ts b/src/resources/PhoneNumbers.ts index b14ed1e..3df8d1e 100644 --- a/src/resources/PhoneNumbers.ts +++ b/src/resources/PhoneNumbers.ts @@ -1,13 +1,39 @@ import TelnyxResource from '../TelnyxResource'; -const telnyxMethod = TelnyxResource.method; +import {ResponsePayload, TelnyxObject} from '../Types'; +import * as utils from '../utils'; import {PhoneNumbersMessaging} from './PhoneNumbersMessaging'; import {PhoneNumbersVoice} from './PhoneNumbersVoice'; import {PhoneNumbersInboundChannels} from './PhoneNumbersInboundChannels'; +const telnyxMethod = TelnyxResource.method; + +function transformResponseData( + response: ResponsePayload, + telnyx: TelnyxObject, +) { + return utils.addResourceToResponseData(response, telnyx, 'phoneNumbers', { + del: telnyxMethod({ + method: 'DELETE', + path: '/{intId}', + urlParams: ['intId'], + paramsValues: [response.data.id as string], + paramsNames: ['intId'], + }), + + update: telnyxMethod({ + method: 'PATCH', + path: '/{intId}', + urlParams: ['intId'], + paramsValues: [response.data.id as string], + paramsNames: ['intId'], + }), + }); +} + export const PhoneNumbers = TelnyxResource.extend({ path: 'phone_numbers', - includeBasic: ['list', 'retrieve', 'update', 'del'], + includeBasic: ['list', 'update', 'del'], nestedResources: { Messaging: PhoneNumbersMessaging, @@ -15,35 +41,70 @@ export const PhoneNumbers = TelnyxResource.extend({ Inbound: PhoneNumbersInboundChannels, }, - retrieveVoiceSettings: telnyxMethod({ + retrieve: telnyxMethod({ method: 'GET', - path: '/{id}/voice', + path: '/{id}', urlParams: ['id'], + + transformResponseData: transformResponseData, + }), + + retrieveVoiceSettings: telnyxMethod({ + method: 'GET', + path: '/{intId}/voice', + urlParams: ['intId'], + paramsNames: ['intId'], methodType: 'retrieve', }), updateVoiceSettings: telnyxMethod({ method: 'PATCH', - path: '/{id}/voice', - urlParams: ['id'], + path: '/{intId}/voice', + urlParams: ['intId'], + paramsNames: ['intId'], }), retrieveMessagingSettings: telnyxMethod({ method: 'GET', - path: '/{id}/messaging', - urlParams: ['id'], + path: '/{intId}/messaging', + urlParams: ['intId'], + paramsNames: ['intId'], methodType: 'retrieve', }), updateMessagingSettings: telnyxMethod({ method: 'PATCH', - path: '/{id}/messaging', - urlParams: ['id'], + path: '/{intId}/messaging', + urlParams: ['intId'], + paramsNames: ['intId'], }), - setEmergencySettings: telnyxMethod({ + enableEmergencySettings: telnyxMethod({ method: 'POST', - path: '/{id}/actions/enable_emergency', - urlParams: ['id'], + path: '/{intId}/actions/enable_emergency', + urlParams: ['intId'], + paramsNames: ['intId'], + }), + + retrieveVoicemail: telnyxMethod({ + method: 'GET', + path: '/{phone_number_id}/voicemail', + urlParams: ['phone_number_id'], + paramsNames: ['phone_number_id'], + methodType: 'retrieve', + }), + + createVoicemail: telnyxMethod({ + method: 'POST', + path: '/{phone_number_id}/voicemail', + urlParams: ['phone_number_id'], + paramsNames: ['phone_number_id'], + }), + + updateVoicemail: telnyxMethod({ + method: 'PATCH', + path: '/{phone_number_id}/voicemail', + urlParams: ['phone_number_id'], + paramsNames: ['phone_number_id'], }), }); diff --git a/src/resources/PhoneNumbersInboundChannels.ts b/src/resources/PhoneNumbersInboundChannels.ts index 37501d5..07f6ae9 100644 --- a/src/resources/PhoneNumbersInboundChannels.ts +++ b/src/resources/PhoneNumbersInboundChannels.ts @@ -1,37 +1,13 @@ import TelnyxResource from '../TelnyxResource'; -import * as utils from '../utils'; -const telnyxMethod = TelnyxResource.method; - -import {ResponsePayload, TelnyxObject} from '../Types'; -function transformResponseData( - response: ResponsePayload, - telnyx: TelnyxObject, -) { - return utils.addResourceToResponseData( - response, - telnyx, - 'phoneNumbersInboundChannels', - { - update: telnyxMethod({ - method: 'PATCH', - path: '', - urlParams: ['channels'], - paramsValues: [response.data.id as string], - paramsNames: ['channels'], - }), - }, - ); -} +const telnyxMethod = TelnyxResource.method; export const PhoneNumbersInboundChannels = TelnyxResource.extend({ path: 'phone_numbers/inbound_channels', + includeBasic: ['list'], - retrieve: telnyxMethod({ - method: 'GET', - path: '', - urlParams: [], - - transformResponseData: transformResponseData, + update: telnyxMethod({ + method: 'PATCH', + methodType: 'update', }), }); diff --git a/src/resources/PhoneNumberRegulatoryRequirements.ts b/src/resources/PhoneNumbersRegulatoryRequirements.ts similarity index 63% rename from src/resources/PhoneNumberRegulatoryRequirements.ts rename to src/resources/PhoneNumbersRegulatoryRequirements.ts index 48a5441..bd6fc01 100644 --- a/src/resources/PhoneNumberRegulatoryRequirements.ts +++ b/src/resources/PhoneNumbersRegulatoryRequirements.ts @@ -1,7 +1,6 @@ import TelnyxResource from '../TelnyxResource'; -export const PhoneNumberRegulatoryRequirements = TelnyxResource.extend({ +export const PhoneNumbersRegulatoryRequirements = TelnyxResource.extend({ path: 'phone_numbers_regulatory_requirements', - includeBasic: ['list'], }); diff --git a/src/resources/PhoneNumbersSlim.ts b/src/resources/PhoneNumbersSlim.ts new file mode 100644 index 0000000..9e779bf --- /dev/null +++ b/src/resources/PhoneNumbersSlim.ts @@ -0,0 +1,6 @@ +import TelnyxResource from '../TelnyxResource'; + +export const PhoneNumbersSlim = TelnyxResource.extend({ + path: 'phone_numbers/slim', + includeBasic: ['list'], +}); diff --git a/src/telnyx.ts b/src/telnyx.ts index 4993593..94b7dc0 100644 --- a/src/telnyx.ts +++ b/src/telnyx.ts @@ -90,11 +90,11 @@ import {PhoneNumberBlockOrders} from './resources/PhoneNumberBlockOrders'; import {PhoneNumberBlocksBackgroundJobs} from './resources/PhoneNumberBlocksBackgroundJobs'; import {PhoneNumberCampaigns} from './resources/PhoneNumberCampaigns'; import {PhoneNumberOrderDocuments} from './resources/PhoneNumberOrderDocuments'; -import {PhoneNumberRegulatoryRequirements} from './resources/PhoneNumberRegulatoryRequirements'; import {PhoneNumbers} from './resources/PhoneNumbers'; -import {PhoneNumberSearch} from './resources/PhoneNumberSearch'; import {PhoneNumbersInboundChannels} from './resources/PhoneNumbersInboundChannels'; import {PhoneNumbersMessaging} from './resources/PhoneNumbersMessaging'; +import {PhoneNumbersRegulatoryRequirements} from './resources/PhoneNumbersRegulatoryRequirements'; +import {PhoneNumbersSlim} from './resources/PhoneNumbersSlim'; import {PhoneNumbersVoice} from './resources/PhoneNumbersVoice'; import {PortabilityChecks} from './resources/PortabilityChecks'; import {PortingEvents} from './resources/PortingEvents'; @@ -146,6 +146,7 @@ import {WirelessDetailRecordReports} from './resources/WirelessDetailRecordRepor import TelnyxResource from './TelnyxResource'; import * as _Error from './Error'; import Webhooks from './Webhooks'; +import {AvailablePhoneNumbersBlocks} from './resources/AvailablePhoneNumbersBlocks'; export function createTelnyx() { Telnyx.DEFAULT_HOST = process.env.TELNYX_API_BASE || 'api.telnyx.com'; @@ -193,6 +194,7 @@ export function createTelnyx() { AiSummarize, AuthenticationProviders, AvailablePhoneNumbers, + AvailablePhoneNumbersBlocks, Balance, BillingGroups, Brands, @@ -260,9 +262,9 @@ export function createTelnyx() { PhoneNumberBlocksBackgroundJobs, PhoneNumberCampaigns, PhoneNumberOrderDocuments, - PhoneNumberRegulatoryRequirements, + PhoneNumbersRegulatoryRequirements, + PhoneNumbersSlim, PhoneNumbers, - PhoneNumberSearch, PhoneNumbersInboundChannels, PhoneNumbersMessaging, PhoneNumbersVoice, diff --git a/src/test/resources/NumberOrders.test.ts b/src/test/resources/NumberOrders.test.ts index 2c2b7d6..8247f82 100644 --- a/src/test/resources/NumberOrders.test.ts +++ b/src/test/resources/NumberOrders.test.ts @@ -1,13 +1,20 @@ +import {TelnyxObject} from '../../Types'; import { type ResponsePayloadList, type ResponsePayload, utils as testUtils, } from '../utils'; -const telnyx = testUtils.getTelnyxMock(); const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); describe('NumberOrders Resource', function () { + let telnyxInstance: TelnyxObject; + + beforeEach(() => { + // make specs independent + telnyxInstance = testUtils.getTelnyxMock(); + }); + describe('retrieve', function () { function responseFn(response: ResponsePayload) { expect(response.data).toMatchObject({ @@ -18,14 +25,14 @@ describe('NumberOrders Resource', function () { test('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.numberOrders + return telnyxInstance.numberOrders .retrieve('12ade33a-21c0-473b-b055-b3c836e1c292') .then(responseFn); }); test('Sends the correct request [with specified auth]', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.numberOrders + return telnyxInstance.numberOrders .retrieve('12ade33a-21c0-473b-b055-b3c836e1c292', TEST_AUTH_KEY) .then(responseFn); }); @@ -43,19 +50,19 @@ describe('NumberOrders Resource', function () { test('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.numberOrders.list().then(responseFn); + return telnyxInstance.numberOrders.list().then(responseFn); }); test('Sends the correct request [with specified auth]', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.numberOrders.list(TEST_AUTH_KEY).then(responseFn); + return telnyxInstance.numberOrders.list(TEST_AUTH_KEY).then(responseFn); }); }); describe('update', function () { test('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.numberOrders + return telnyxInstance.numberOrders .update('12ade33a-21c0-473b-b055-b3c836e1c292', { customer_reference: 'MY REF 002', }) @@ -92,7 +99,7 @@ describe('NumberOrders Resource', function () { requirements_id: '36aaf27d-986b-493c-bd1b-de16af2e4292', }; // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.numberOrders.create(requestBody).then(responseFn); + return telnyxInstance.numberOrders.create(requestBody).then(responseFn); }); test('Sends the correct request [with specified auth]', function () { @@ -102,14 +109,14 @@ describe('NumberOrders Resource', function () { requirements_id: '36aaf27d-986b-493c-bd1b-de16af2e4292', }; // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.numberOrders + return telnyxInstance.numberOrders .create(requestBody, TEST_AUTH_KEY) .then(responseFn); }); test('Sends the correct request [with specified auth and no body]', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.numberOrders + return telnyxInstance.numberOrders .create({'': ''}, TEST_AUTH_KEY) .then(responseFnNoBody); }); diff --git a/src/test/resources/PhoneNumbers.test.ts b/src/test/resources/PhoneNumbers.test.ts index 8804483..754e0b3 100644 --- a/src/test/resources/PhoneNumbers.test.ts +++ b/src/test/resources/PhoneNumbers.test.ts @@ -1,9 +1,9 @@ +import {TelnyxObject} from '../../Types'; import { type ResponsePayloadList, type ResponsePayload, utils as testUtils, } from '../utils'; -const telnyx = testUtils.getTelnyxMock(); const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); const TEST_UUID = '123e4567-e89b-12d3-a456-426614174000'; @@ -15,6 +15,13 @@ type ResponsePayloadPhoneNumbers = ResponsePayload & { }; describe('PhoneNumbers Resource', function () { + let telnyxInstance: TelnyxObject; + + beforeEach(() => { + // make specs independent + telnyxInstance = testUtils.getTelnyxMock(); + }); + function responseFn(response: ResponsePayload) { expect(response.data).toHaveProperty('id'); expect(response.data).toHaveProperty('phone_number'); @@ -24,7 +31,7 @@ describe('PhoneNumbers Resource', function () { describe('update', function () { test('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.phoneNumbers + return telnyxInstance.phoneNumbers .update(TEST_UUID, {status: 'active'}) .then(responseFn); }); @@ -33,7 +40,7 @@ describe('PhoneNumbers Resource', function () { describe('del', function () { test('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.phoneNumbers.del(TEST_UUID).then(responseFn); + return telnyxInstance.phoneNumbers.del(TEST_UUID).then(responseFn); }); }); @@ -46,30 +53,32 @@ describe('PhoneNumbers Resource', function () { test('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.phoneNumbers.list().then(listResponseFn); + return telnyxInstance.phoneNumbers.list().then(listResponseFn); }); test('Sends the correct request [with specified auth]', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.phoneNumbers.list(TEST_AUTH_KEY).then(listResponseFn); + return telnyxInstance.phoneNumbers + .list(TEST_AUTH_KEY) + .then(listResponseFn); }); }); describe('retrieve', function () { test('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.phoneNumbers.retrieve(TEST_UUID).then(responseFn); + return telnyxInstance.phoneNumbers.retrieve(TEST_UUID).then(responseFn); }); test('Sends the correct request [with specified auth]', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.phoneNumbers + return telnyxInstance.phoneNumbers .retrieve(TEST_UUID, TEST_AUTH_KEY) .then(responseFn); }); }); - describe('setEmergencySettings', function () { + describe('enableEmergencySettings', function () { function responseFn(response: ResponsePayloadPhoneNumbers) { expect(response.data).toHaveProperty('id'); expect(response.data).toMatchObject({record_type: 'voice_settings'}); @@ -82,8 +91,8 @@ describe('PhoneNumbers Resource', function () { test('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.phoneNumbers - .setEmergencySettings(TEST_UUID, { + return telnyxInstance.phoneNumbers + .enableEmergencySettings(TEST_UUID, { emergency_enabled: true, emergency_address_id: '1315261609962112019', }) @@ -92,8 +101,8 @@ describe('PhoneNumbers Resource', function () { test('Sends the correct request [with specified auth]', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.phoneNumbers - .setEmergencySettings( + return telnyxInstance.phoneNumbers + .enableEmergencySettings( TEST_UUID, { emergency_enabled: true, @@ -116,14 +125,14 @@ describe('PhoneNumbers Resource', function () { describe('retrieveVoiceSettings', function () { test('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.phoneNumbers + return telnyxInstance.phoneNumbers .retrieveVoiceSettings(TEST_UUID) .then(responseFn); }); test('Sends the correct request [with specified auth]', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.phoneNumbers + return telnyxInstance.phoneNumbers .retrieveVoiceSettings(TEST_UUID, TEST_AUTH_KEY) .then(responseFn); }); @@ -132,7 +141,7 @@ describe('PhoneNumbers Resource', function () { describe('updateVoiceSettings', function () { test('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.phoneNumbers + return telnyxInstance.phoneNumbers .updateVoiceSettings(TEST_UUID, { tech_prefix_enabled: true, }) @@ -152,14 +161,14 @@ describe('PhoneNumbers Resource', function () { describe('retrieveMessagingSettings', function () { test('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.phoneNumbers + return telnyxInstance.phoneNumbers .retrieveMessagingSettings(TEST_UUID) .then(responseFn); }); test('Sends the correct request [with specified auth]', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.phoneNumbers + return telnyxInstance.phoneNumbers .retrieveMessagingSettings(TEST_UUID, TEST_AUTH_KEY) .then(responseFn); }); @@ -168,7 +177,7 @@ describe('PhoneNumbers Resource', function () { describe('updateMessagingSettings', function () { test('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.phoneNumbers + return telnyxInstance.phoneNumbers .updateMessagingSettings(TEST_UUID, { messaging_product: 'P2P', }) @@ -176,4 +185,50 @@ describe('PhoneNumbers Resource', function () { }); }); }); + + describe('Voicemail methods', function () { + function responseFn(response: ResponsePayload) { + expect(response.data).toHaveProperty('enabled'); + expect(response.data).toHaveProperty('pin'); + } + + describe('retrieveVoicemail', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyxInstance.phoneNumbers + .retrieveVoicemail(TEST_UUID) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyxInstance.phoneNumbers + .retrieveVoicemail(TEST_UUID, TEST_AUTH_KEY) + .then(responseFn); + }); + }); + + describe('createVoicemail', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyxInstance.phoneNumbers + .createVoicemail(TEST_UUID, { + pin: '1234', + enabled: true, + }) + .then(responseFn); + }); + }); + + describe('updateVoicemail', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyxInstance.phoneNumbers + .updateVoicemail(TEST_UUID, { + pin: '1234', + }) + .then(responseFn); + }); + }); + }); }); diff --git a/src/test/resources/PhoneNumberInboundChannels.test.ts b/src/test/resources/PhoneNumbersInboundChannels.test.ts similarity index 91% rename from src/test/resources/PhoneNumberInboundChannels.test.ts rename to src/test/resources/PhoneNumbersInboundChannels.test.ts index 766b4a1..41a7245 100644 --- a/src/test/resources/PhoneNumberInboundChannels.test.ts +++ b/src/test/resources/PhoneNumbersInboundChannels.test.ts @@ -4,7 +4,7 @@ const telnyx = testUtils.getTelnyxMock(); const TEST_AUTH_KEY = testUtils.getUserTelnyxKey(); describe('Phone Numbers Inbound Channels', function () { - describe('retrieve', function () { + describe('list', function () { function responseFn(response: ResponsePayload) { expect(response.data).toMatchObject({ record_type: 'inbound_channels', @@ -13,13 +13,13 @@ describe('Phone Numbers Inbound Channels', function () { test('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyx.phoneNumbersInboundChannels.retrieve().then(responseFn); + return telnyx.phoneNumbersInboundChannels.list().then(responseFn); }); test('Sends the correct request [with specified auth]', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder return telnyx.phoneNumbersInboundChannels - .retrieve(TEST_AUTH_KEY) + .list(TEST_AUTH_KEY) .then(responseFn); }); }); diff --git a/src/test/resources/PhoneNumbersRegulatoryRequirements.test.ts b/src/test/resources/PhoneNumbersRegulatoryRequirements.test.ts index deb2c11..de7b51c 100644 --- a/src/test/resources/PhoneNumbersRegulatoryRequirements.test.ts +++ b/src/test/resources/PhoneNumbersRegulatoryRequirements.test.ts @@ -36,7 +36,7 @@ describe('PhoneNumberRegulatoryRequirements Resource', function () { test('Sends the correct request', function () { return ( // @ts-expect-error TODO: import .d.ts files under src/test folder - telnyx.phoneNumberRegulatoryRequirements + telnyx.phoneNumbersRegulatoryRequirements // this is due to https://github.com/stoplightio/prism/issues/2443 .list({'filter%5bphone_number%5d': '5120000000'}) .then(responseFn) @@ -46,7 +46,7 @@ describe('PhoneNumberRegulatoryRequirements Resource', function () { test('Sends the correct request [with specified auth]', function () { return ( // @ts-expect-error TODO: import .d.ts files under src/test folder - telnyx.phoneNumberRegulatoryRequirements + telnyx.phoneNumbersRegulatoryRequirements // this is due to https://github.com/stoplightio/prism/issues/2443 .list({'filter%5bphone_number%5d': '5120000000'}, TEST_AUTH_KEY) .then(responseFn) diff --git a/types/AvailablePhoneNumbersBlocksResource.d.ts b/types/AvailablePhoneNumbersBlocksResource.d.ts new file mode 100644 index 0000000..488b520 --- /dev/null +++ b/types/AvailablePhoneNumbersBlocksResource.d.ts @@ -0,0 +1,20 @@ +import {paths} from './TelnyxAPI.js'; + +declare module 'telnyx' { + namespace Telnyx { + type AvailablePhoneNumbersBlocksListParams = + paths['/available_phone_number_blocks']['get']['parameters']['query']; + + type AvailablePhoneNumbersBlocksListResponse = + paths['/available_phone_number_blocks']['get']['responses']['200']['content']['application/json']; + + class AvailablePhoneNumbersBlocksResource { + list( + params?: AvailablePhoneNumbersBlocksListParams, + options?: RequestOptions, + ): Promise< + Telnyx.Response + >; + } + } +} diff --git a/types/NumberOrdersResource.d.ts b/types/NumberOrdersResource.d.ts new file mode 100644 index 0000000..4f983a2 --- /dev/null +++ b/types/NumberOrdersResource.d.ts @@ -0,0 +1,78 @@ +import {paths} from './TelnyxAPI.js'; + +declare module 'telnyx' { + namespace Telnyx { + type NumberOrdersListParams = + paths['/number_orders']['get']['parameters']['query']; + + type NumberOrdersListResponse = + paths['/number_orders']['get']['responses']['200']['content']['application/json']; + + type NumberOrdersCreateParams = + paths['/number_orders']['post']['requestBody']['content']['application/json']; + + type NumberOrdersCreateResponse = + paths['/number_orders']['post']['responses']['200']['content']['application/json']; + + type NumberOrdersRetrieveId = + paths['/number_orders/{number_order_id}']['get']['parameters']['path']['number_order_id']; + + type NumberOrdersRetrieveResponse = + paths['/number_orders/{number_order_id}']['get']['responses']['200']['content']['application/json']; + + type NumberOrdersUpdateId = + paths['/number_orders/{number_order_id}']['patch']['parameters']['path']['number_order_id']; + + type NumberOrdersUpdateParams = + paths['/number_orders/{number_order_id}']['patch']['requestBody']['content']['application/json']; + + type NumberOrdersUpdateResponse = + paths['/number_orders/{number_order_id}']['patch']['responses']['200']['content']['application/json']; + + type NumberOrdersNestedMethods = { + update( + params: NumberOrdersUpdateParams, + options?: RequestOptions, + ): Promise>; + }; + + class NumberOrdersResource { + list( + params?: NumberOrdersListParams, + options?: RequestOptions, + ): Promise>; + + create( + params: NumberOrdersCreateParams, + options?: RequestOptions, + ): Promise< + Telnyx.Response< + Telnyx.NumberOrdersCreateResponse & + NestedResponseData< + NumberOrdersCreateResponse['data'], + NumberOrdersNestedMethods + > + > + >; + + retrieve( + id: NumberOrdersRetrieveId, + options?: RequestOptions, + ): Promise< + Telnyx.Response< + Telnyx.NumberOrdersRetrieveResponse & + NestedResponseData< + NumberOrdersRetrieveResponse['data'], + NumberOrdersNestedMethods + > + > + >; + + update( + id: NumberOrdersUpdateId, + params: NumberOrdersUpdateParams, + options?: RequestOptions, + ): Promise>; + } + } +} diff --git a/types/PhoneNumbersInboundChannelsResource.d.ts b/types/PhoneNumbersInboundChannelsResource.d.ts new file mode 100644 index 0000000..11bfa91 --- /dev/null +++ b/types/PhoneNumbersInboundChannelsResource.d.ts @@ -0,0 +1,33 @@ +import {paths} from './TelnyxAPI.js'; + +declare module 'telnyx' { + namespace Telnyx { + type PhoneNumbersInboundChannelsListParams = + paths['/phone_numbers/inbound_channels']['get']['parameters']['query']; + + type PhoneNumbersInboundChannelsListResponse = + paths['/phone_numbers/inbound_channels']['get']['responses']['200']['content']['application/json']; + + type PhoneNumbersInboundChannelsUpdateParams = + paths['/phone_numbers/inbound_channels']['patch']['requestBody']['content']['application/json']; + + type PhoneNumbersInboundChannelsUpdateResponse = + paths['/phone_numbers/inbound_channels']['patch']['responses']['200']['content']['application/json']; + + class PhoneNumbersInboundChannelsResource { + list( + params?: PhoneNumbersInboundChannelsListParams, + options?: RequestOptions, + ): Promise< + Telnyx.Response + >; + + update( + params: PhoneNumbersInboundChannelsUpdateParams, + options?: RequestOptions, + ): Promise< + Telnyx.Response + >; + } + } +} diff --git a/types/PhoneNumbersMessagingResource.d.ts b/types/PhoneNumbersMessagingResource.d.ts new file mode 100644 index 0000000..d848947 --- /dev/null +++ b/types/PhoneNumbersMessagingResource.d.ts @@ -0,0 +1,18 @@ +import {paths} from './TelnyxAPI.js'; + +declare module 'telnyx' { + namespace Telnyx { + type PhoneNumbersMessagingListParams = + paths['/phone_numbers/messaging']['get']['parameters']['query']; + + type PhoneNumbersMessagingListResponse = + paths['/phone_numbers/messaging']['get']['responses']['200']['content']['application/json']; + + class PhoneNumbersMessagingResource { + list( + params?: PhoneNumbersMessagingListParams, + options?: RequestOptions, + ): Promise>; + } + } +} diff --git a/types/PhoneNumbersRegulatoryRequirementsResource.d.ts b/types/PhoneNumbersRegulatoryRequirementsResource.d.ts new file mode 100644 index 0000000..a22447f --- /dev/null +++ b/types/PhoneNumbersRegulatoryRequirementsResource.d.ts @@ -0,0 +1,20 @@ +import {paths} from './TelnyxAPI.js'; + +declare module 'telnyx' { + namespace Telnyx { + type PhoneNumbersRegulatoryRequirementsListParams = + paths['/phone_numbers_regulatory_requirements']['get']['parameters']['query']; + + type PhoneNumbersRegulatoryRequirementsListResponse = + paths['/phone_numbers_regulatory_requirements']['get']['responses']['200']['content']['application/json']; + + class PhoneNumbersRegulatoryRequirementsResource { + list( + params?: PhoneNumbersRegulatoryRequirementsListParams, + options?: RequestOptions, + ): Promise< + Telnyx.Response + >; + } + } +} diff --git a/types/PhoneNumbersResource.d.ts b/types/PhoneNumbersResource.d.ts new file mode 100644 index 0000000..921d394 --- /dev/null +++ b/types/PhoneNumbersResource.d.ts @@ -0,0 +1,195 @@ +import {paths} from './TelnyxAPI.js'; + +declare module 'telnyx' { + namespace Telnyx { + type PhoneNumbersListParams = + paths['/phone_numbers']['get']['parameters']['query']; + + type PhoneNumbersListResponse = + paths['/phone_numbers']['get']['responses']['200']['content']['application/json']; + + type PhoneNumbersRetrieveId = + paths['/phone_numbers/{id}']['get']['parameters']['path']['id']; + + type PhoneNumbersRetrieveResponse = + paths['/phone_numbers/{id}']['get']['responses']['200']['content']['application/json']; + + type PhoneNumbersDelId = + paths['/phone_numbers/{id}']['delete']['parameters']['path']['id']; + + type PhoneNumbersDelParams = + paths['/phone_numbers/{id}']['delete']['parameters']['query']; + + type PhoneNumbersDelResponse = + paths['/phone_numbers/{id}']['delete']['responses']['200']['content']['application/json']; + + type PhoneNumbersUpdateId = + paths['/phone_numbers/{id}']['patch']['parameters']['path']['id']; + + type PhoneNumbersUpdateParams = + paths['/phone_numbers/{id}']['patch']['requestBody']['content']['application/json']; + + type PhoneNumbersUpdateResponse = + paths['/phone_numbers/{id}']['patch']['responses']['200']['content']['application/json']; + + type PhoneNumbersRetrieveVoiceSettingsId = + paths['/phone_numbers/{id}/voice']['get']['parameters']['path']['id']; + + type PhoneNumbersRetrieveVoiceSettingsResponse = + paths['/phone_numbers/{id}/voice']['get']['responses']['200']['content']['application/json']; + + type PhoneNumbersRetrieveMessagingSettingsId = + paths['/phone_numbers/{id}/messaging']['get']['parameters']['path']['id']; + + type PhoneNumbersRetrieveMessagingSettingsResponse = + paths['/phone_numbers/{id}/messaging']['get']['responses']['200']['content']['application/json']; + + type PhoneNumbersRetrieveVoicemailId = + paths['/phone_numbers/{phone_number_id}/voicemail']['get']['parameters']['path']['phone_number_id']; + + type PhoneNumbersRetrieveVoicemailResponse = + paths['/phone_numbers/{phone_number_id}/voicemail']['get']['responses']['200']['content']['application/json']; + + type PhoneNumbersVoiceSettingsUpdateId = + paths['/phone_numbers/{id}/voice']['patch']['parameters']['path']['id']; + + type PhoneNumbersVoiceSettingsUpdateParams = + paths['/phone_numbers/{id}/voice']['patch']['requestBody']['content']['application/json']; + + type PhoneNumbersVoiceSettingsUpdateResponse = + paths['/phone_numbers/{id}/voice']['patch']['responses']['200']['content']['application/json']; + + type PhoneNumbersMessagingSettingsUpdateId = + paths['/phone_numbers/{id}/messaging']['patch']['parameters']['path']['id']; + + type PhoneNumbersMessagingSettingsUpdateParams = + paths['/phone_numbers/{id}/messaging']['patch']['requestBody']['content']['application/json']; + + type PhoneNumbersMessagingSettingsUpdateResponse = + paths['/phone_numbers/{id}/messaging']['patch']['responses']['200']['content']['application/json']; + + type PhoneNumbersVoicemailUpdateId = + paths['/phone_numbers/{phone_number_id}/voicemail']['patch']['parameters']['path']['phone_number_id']; + + type PhoneNumbersVoicemailUpdateParams = + paths['/phone_numbers/{phone_number_id}/voicemail']['patch']['requestBody']['content']['application/json']; + + type PhoneNumbersVoicemailUpdateResponse = + paths['/phone_numbers/{phone_number_id}/voicemail']['patch']['responses']['200']['content']['application/json']; + + type PhoneNumbersMessagingSettingsEnableId = + paths['/phone_numbers/{id}/actions/enable_emergency']['post']['parameters']['path']['id']; + + type PhoneNumbersMessagingSettingsEnableParams = + paths['/phone_numbers/{id}/actions/enable_emergency']['post']['requestBody']['content']['application/json']; + + type PhoneNumbersMessagingSettingsEnableResponse = + paths['/phone_numbers/{id}/actions/enable_emergency']['post']['responses']['200']['content']['application/json']; + + type PhoneNumbersVoicemailCreateId = + paths['/phone_numbers/{phone_number_id}/voicemail']['post']['parameters']['path']['phone_number_id']; + + type PhoneNumbersVoicemailCreateParams = + paths['/phone_numbers/{phone_number_id}/voicemail']['post']['requestBody']['content']['application/json']; + + type PhoneNumbersVoicemailCreateResponse = + paths['/phone_numbers/{phone_number_id}/voicemail']['post']['responses']['200']['content']['application/json']; + + type PhoneNumbersNestedMethods = { + del( + options?: RequestOptions, + ): Promise>; + + update( + params: PhoneNumbersUpdateParams, + options?: RequestOptions, + ): Promise>; + }; + + class PhoneNumbersResource { + list( + params?: PhoneNumbersListParams, + options?: RequestOptions, + ): Promise>; + + retrieve( + id: PhoneNumbersRetrieveId, + options?: RequestOptions, + ): Promise< + Telnyx.Response< + Telnyx.PhoneNumbersRetrieveResponse & + NestedResponseData< + PhoneNumbersRetrieveResponse['data'], + PhoneNumbersNestedMethods + > + > + >; + + del( + id: PhoneNumbersDelId, + options?: RequestOptions, + ): Promise>; + + update( + id: PhoneNumbersUpdateId, + params: PhoneNumbersUpdateParams, + options?: RequestOptions, + ): Promise>; + + retrieveVoiceSettings( + id: PhoneNumbersRetrieveVoiceSettingsId, + options?: RequestOptions, + ): Promise< + Telnyx.Response + >; + + retrieveMessagingSettings( + id: PhoneNumbersRetrieveMessagingSettingsId, + options?: RequestOptions, + ): Promise< + Telnyx.Response + >; + + retrieveVoicemail( + id: PhoneNumbersRetrieveVoicemailId, + options?: RequestOptions, + ): Promise>; + + updateVoiceSettings( + id: PhoneNumbersVoiceSettingsUpdateId, + params: PhoneNumbersVoiceSettingsUpdateParams, + options?: RequestOptions, + ): Promise< + Telnyx.Response + >; + + updateMessagingSettings( + id: PhoneNumbersMessagingSettingsUpdateId, + params: PhoneNumbersMessagingSettingsUpdateParams, + options?: RequestOptions, + ): Promise< + Telnyx.Response + >; + + updateVoicemail( + id: PhoneNumbersVoicemailUpdateId, + params: PhoneNumbersVoicemailUpdateParams, + options?: RequestOptions, + ): Promise>; + + enableEmergencySettings( + id: PhoneNumbersMessagingSettingsEnableId, + params: PhoneNumbersMessagingSettingsEnableParams, + options?: RequestOptions, + ): Promise< + Telnyx.Response + >; + + createVoicemail( + id: PhoneNumbersVoicemailCreateId, + params: PhoneNumbersVoicemailCreateParams, + options?: RequestOptions, + ): Promise>; + } + } +} diff --git a/types/PhoneNumbersSlimResource.d.ts b/types/PhoneNumbersSlimResource.d.ts new file mode 100644 index 0000000..82c942d --- /dev/null +++ b/types/PhoneNumbersSlimResource.d.ts @@ -0,0 +1,18 @@ +import {paths} from './TelnyxAPI.js'; + +declare module 'telnyx' { + namespace Telnyx { + type PhoneNumbersSlimListParams = + paths['/phone_numbers/slim']['get']['parameters']['query']; + + type PhoneNumbersSlimListResponse = + paths['/phone_numbers/slim']['get']['responses']['200']['content']['application/json']; + + class PhoneNumbersSlimResource { + list( + params?: PhoneNumbersSlimListParams, + options?: RequestOptions, + ): Promise>; + } + } +} diff --git a/types/PhoneNumbersVoiceResource.d.ts b/types/PhoneNumbersVoiceResource.d.ts new file mode 100644 index 0000000..c217a3c --- /dev/null +++ b/types/PhoneNumbersVoiceResource.d.ts @@ -0,0 +1,18 @@ +import {paths} from './TelnyxAPI.js'; + +declare module 'telnyx' { + namespace Telnyx { + type PhoneNumbersVoiceListParams = + paths['/phone_numbers/voice']['get']['parameters']['query']; + + type PhoneNumbersVoiceListResponse = + paths['/phone_numbers/voice']['get']['responses']['200']['content']['application/json']; + + class PhoneNumbersVoiceResource { + list( + params?: PhoneNumbersVoiceListParams, + options?: RequestOptions, + ): Promise>; + } + } +} diff --git a/types/RegulatoryRequirementsResource.d.ts b/types/RegulatoryRequirementsResource.d.ts new file mode 100644 index 0000000..845668b --- /dev/null +++ b/types/RegulatoryRequirementsResource.d.ts @@ -0,0 +1,18 @@ +import {paths} from './TelnyxAPI.js'; + +declare module 'telnyx' { + namespace Telnyx { + type RegulatoryRequirementsListParams = + paths['/regulatory_requirements']['get']['parameters']['query']; + + type RegulatoryRequirementsListResponse = + paths['/regulatory_requirements']['get']['responses']['200']['content']['application/json']; + + class RegulatoryRequirementsResource { + list( + params?: RegulatoryRequirementsListParams, + options?: RequestOptions, + ): Promise>; + } + } +} diff --git a/types/index.d.ts b/types/index.d.ts index 9abbb80..8e79767 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -22,6 +22,7 @@ /// /// /// +/// /// /// /// @@ -54,10 +55,18 @@ /// /// /// +/// /// /// +/// +/// +/// +/// +/// +/// /// /// +/// /// /// /// @@ -95,6 +104,7 @@ declare module 'telnyx' { authenticationProviders: Telnyx.AuthenticationProvidersResource; addresses: Telnyx.AddressesResource; availablePhoneNumbers: Telnyx.AvailablePhoneNumbersResource; + availablePhoneNumbersBlocks: Telnyx.AvailablePhoneNumbersBlocksResource; balance: Telnyx.BalanceResource; brands: Telnyx.BrandsResource; billingGroups: Telnyx.BillingGroupsResource; @@ -127,10 +137,18 @@ declare module 'telnyx' { messagingProfileMetrics: Telnyx.MessagingProfileMetricsResource; messagingProfiles: Telnyx.MessagingProfilesResource; notificationEvents: Telnyx.NotificationEventsResource; + numberOrders: Telnyx.NumberOrdersResource; phoneNumberAssignmentByProfile: Telnyx.PhoneNumberAssignmentByProfileResource; phoneNumbersCsvDownloads: Telnyx.PhoneNumbersCsvDownloadsResource; + phoneNumbersInboundChannels: Telnyx.PhoneNumbersInboundChannelsResource; + phoneNumbersMessaging: Telnyx.PhoneNumbersMessagingResource; + phoneNumbersVoice: Telnyx.PhoneNumbersVoiceResource; + phoneNumbersSlim: Telnyx.PhoneNumbersSlimResource; + phoneNumbersRegulatoryRequirements: Telnyx.PhoneNumbersRegulatoryRequirementsResource; + phoneNumbers: Telnyx.PhoneNumbersResource; portingEvents: Telnyx.PortingEventsResource; portoutEvents: Telnyx.PortoutEventsResource; + regulatoryRequirements: Telnyx.RegulatoryRequirementsResource; telephonyCredentials: Telnyx.TelephonyCredentialsResource; texml: Telnyx.TexmlResource; texmlApplications: Telnyx.TexmlApplicationsResource; From 3c7c4b5a0df4665d28a19ed03ac086f66682aad1 Mon Sep 17 00:00:00 2001 From: Lucas Rosa Date: Mon, 14 Oct 2024 20:39:36 -0300 Subject: [PATCH 51/59] update package deps --- package-lock.json | 29 +++++++---------------------- package.json | 10 ++++++---- 2 files changed, 13 insertions(+), 26 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7b1cf5f..356dd58 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,6 +8,11 @@ "name": "telnyx", "version": "2.0.0-beta.2", "license": "MIT", + "dependencies": { + "qs": "^6.13.0", + "tweetnacl": "^1.0.3", + "uuid": "^9.0.1" + }, "devDependencies": { "@eslint/js": "^9.10.0", "@stoplight/prism-cli": "^5.10.0", @@ -25,13 +30,10 @@ "nyc": "^15.1.0", "plop": "^4.0.1", "prettier": "^3.0.0", - "qs": "^6.11.2", "ts-jest": "^29.2.5", "ts-node": "^10.9.2", - "tweetnacl": "^1.0.3", "typescript": "^5.6.2", - "typescript-eslint": "^8.8.0", - "uuid": "^9.0.1" + "typescript-eslint": "^8.8.0" }, "engines": { "node": "^18 || >=20" @@ -2721,7 +2723,6 @@ "version": "1.0.7", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", - "dev": true, "dependencies": { "es-define-property": "^1.0.0", "es-errors": "^1.3.0", @@ -3239,7 +3240,6 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", - "dev": true, "dependencies": { "es-define-property": "^1.0.0", "es-errors": "^1.3.0", @@ -3493,7 +3493,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", - "dev": true, "dependencies": { "get-intrinsic": "^1.2.4" }, @@ -3505,7 +3504,6 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", - "dev": true, "engines": { "node": ">= 0.4" } @@ -4295,7 +4293,6 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "dev": true, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -4335,7 +4332,6 @@ "version": "1.2.4", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", - "dev": true, "dependencies": { "es-errors": "^1.3.0", "function-bind": "^1.1.2", @@ -4480,7 +4476,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", - "dev": true, "dependencies": { "get-intrinsic": "^1.1.3" }, @@ -4542,7 +4537,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", - "dev": true, "dependencies": { "es-define-property": "^1.0.0" }, @@ -4554,7 +4548,6 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", - "dev": true, "engines": { "node": ">= 0.4" }, @@ -4566,7 +4559,6 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", - "dev": true, "engines": { "node": ">= 0.4" }, @@ -4603,7 +4595,6 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", - "dev": true, "dependencies": { "function-bind": "^1.1.2" }, @@ -6963,7 +6954,6 @@ "version": "1.13.2", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz", "integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==", - "dev": true, "engines": { "node": ">= 0.4" }, @@ -7881,7 +7871,6 @@ "version": "6.13.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", - "dev": true, "dependencies": { "side-channel": "^1.0.6" }, @@ -8275,7 +8264,6 @@ "version": "1.2.2", "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", - "dev": true, "dependencies": { "define-data-property": "^1.1.4", "es-errors": "^1.3.0", @@ -8313,7 +8301,6 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", - "dev": true, "dependencies": { "call-bind": "^1.0.7", "es-errors": "^1.3.0", @@ -8921,8 +8908,7 @@ "node_modules/tweetnacl": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz", - "integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==", - "dev": true + "integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==" }, "node_modules/type-check": { "version": "0.4.0", @@ -9133,7 +9119,6 @@ "version": "9.0.1", "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", - "dev": true, "funding": [ "https://github.com/sponsors/broofa", "https://github.com/sponsors/ctavan" diff --git a/package.json b/package.json index 393d156..3a6ac5f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "telnyx", - "version": "2.0.0-beta.2", + "version": "2.0.0-beta.3", "description": "Telnyx API Node SDK", "keywords": [ "telnyx", @@ -47,12 +47,14 @@ "nyc": "^15.1.0", "plop": "^4.0.1", "prettier": "^3.0.0", - "qs": "^6.11.2", "ts-jest": "^29.2.5", "ts-node": "^10.9.2", - "tweetnacl": "^1.0.3", "typescript": "^5.6.2", - "typescript-eslint": "^8.8.0", + "typescript-eslint": "^8.8.0" + }, + "dependencies": { + "qs": "^6.13.0", + "tweetnacl": "^1.0.3", "uuid": "^9.0.1" }, "overrides": { From 3551f33cf3758b601556a2482040c15e17305753 Mon Sep 17 00:00:00 2001 From: Lucas Rosa Date: Mon, 14 Oct 2024 20:41:26 -0300 Subject: [PATCH 52/59] add missing Errors type def --- types/Errors.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/Errors.d.ts b/types/Errors.d.ts index 0d4fe77..22a6562 100644 --- a/types/Errors.d.ts +++ b/types/Errors.d.ts @@ -42,7 +42,7 @@ declare module 'telnyx' { | 'TelnyxServiceUnavailableError' | 'TelnyxConnectionError' | 'TelnyxSignatureVerificationError'; - readonly raw: unknown; + readonly raw: TelnyxRawError; readonly headers?: TelnyxRawError['headers']; readonly requestId?: string; readonly detail?: string | Error; From 4849d7fa56065978f456e76719bc50cbe1bca9f5 Mon Sep 17 00:00:00 2001 From: Lucas Rosa Date: Mon, 14 Oct 2024 20:41:36 -0300 Subject: [PATCH 53/59] add Versions info --- README.md | 11 ++++++++--- VERSION | 2 +- VERSIONS.md | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 44 insertions(+), 4 deletions(-) create mode 100644 VERSIONS.md diff --git a/README.md b/README.md index 071938c..83374e3 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,10 @@ applications written in server-side JavaScript. See the [Node API docs](https://developers.telnyx.com/docs/api/v2/overview?lang=node#getting-started). +## Versions + +`telnyx-node` uses a slightly modified version of [Semantic Versioning](https://semver.org) for all changes. [See this document](VERSIONS.md) for details. + ## Installation Install the package with: @@ -43,9 +47,10 @@ callback: ```typescript // Create a new messaging profile and then send a message using that profile: -telnyx.messagingProfiles.create({ - name: 'Summer Campaign', -}) +telnyx.messagingProfiles + .create({ + name: 'Summer Campaign', + }) .then((messagingProfile) => { return telnyx.messagingPhoneNumbers.update('+18005554000', { messaging_profile_id: messagingProfile.data.id, diff --git a/VERSION b/VERSION index e2d1981..96cabdf 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.0.0-beta.2 +2.0.0-beta.3 diff --git a/VERSIONS.md b/VERSIONS.md new file mode 100644 index 0000000..3e9aa90 --- /dev/null +++ b/VERSIONS.md @@ -0,0 +1,35 @@ +# Versioning Strategy + +`telnyx-node` uses a modified version of [Semantic Versioning][semver] for +all changes to the helper library. It is strongly encouraged that you pin at +least the major version and potentially the minor version to avoid pulling in +breaking changes. + +Semantic Versions take the form of `MAJOR.MINOR.PATCH` + +When bugs are fixed in the library in a backwards-compatible way, the `PATCH` +level will be incremented by one. When new features are added to the library +in a backwards-compatible way, the `PATCH` level will be incremented by one. +`PATCH` changes should _not_ break your code and are generally safe for upgrade. + +When a new large feature set comes online or a small breaking change is +introduced, the `MINOR` version will be incremented by one and the `PATCH` +version reset to zero. `MINOR` changes _may_ require some amount of manual code +change for upgrade. These backwards-incompatible changes will generally be +limited to a small number of function signature changes. + +The `MAJOR` version is used to indicate the family of technology represented by +the helper library. Breaking changes that require extensive reworking of code +will cause the `MAJOR` version to be incremented by one, and the `MINOR` and +`PATCH` versions will be reset to zero. Telnyx understands that this can be very +disruptive, so we will only introduce this type of breaking change when +absolutely necessary. New `MAJOR` versions will be communicated in advance with +`Release Candidates` and a schedule. + +## Supported Versions + +Only the current `MAJOR` version of `telnyx-node` is supported. New +features, functionality, bug fixes, and security updates will only be added to +the current `MAJOR` version. + +[semver]: https://semver.org From 2b9ca9d9a08b9368d79f1f43b803dbebd379a4fc Mon Sep 17 00:00:00 2001 From: Lucas Rosa Date: Mon, 14 Oct 2024 20:41:45 -0300 Subject: [PATCH 54/59] update changelog --- CHANGELOG.md | 6 ++++++ package-lock.json | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 661b4de..026a096 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ ## v2 +### v2.0.0-beta.3 + +- Add `Errors` type declaration +- Add `VERSIONS.md` information +- Update package dependencies for runtime usage + ### v2.0.0-beta.2 - Add missing `Texml` resource methods diff --git a/package-lock.json b/package-lock.json index 356dd58..aa71761 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "telnyx", - "version": "2.0.0-beta.2", + "version": "2.0.0-beta.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "telnyx", - "version": "2.0.0-beta.2", + "version": "2.0.0-beta.3", "license": "MIT", "dependencies": { "qs": "^6.13.0", From 7dbe904fcb48027f83cfd019385ced30e0dc2060 Mon Sep 17 00:00:00 2001 From: Lucas Rosa Date: Mon, 14 Oct 2024 21:14:53 -0300 Subject: [PATCH 55/59] update examples telnyx package dependency version --- examples/addresses/package-lock.json | 239 +++++++++++++++++++++++- examples/addresses/package.json | 2 +- examples/call-control/package-lock.json | 239 +++++++++++++++++++++++- examples/call-control/package.json | 2 +- examples/messaging/package-lock.json | 239 +++++++++++++++++++++++- examples/messaging/package.json | 2 +- 6 files changed, 708 insertions(+), 15 deletions(-) diff --git a/examples/addresses/package-lock.json b/examples/addresses/package-lock.json index d9dc9c0..6d98ec3 100644 --- a/examples/addresses/package-lock.json +++ b/examples/addresses/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "ISC", "dependencies": { - "telnyx": "2.0.0-alpha.5" + "telnyx": "2.0.0-beta.3" }, "devDependencies": { "@types/node": "^22.7.4", @@ -988,6 +988,25 @@ "node": ">=8" } }, + "node_modules/call-bind": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -1089,6 +1108,44 @@ "license": "MIT", "peer": true }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "license": "MIT", + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/esbuild": { "version": "0.23.1", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.23.1.tgz", @@ -1508,6 +1565,34 @@ "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-intrinsic": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/get-tsconfig": { "version": "4.8.1", "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.8.1.tgz", @@ -1549,6 +1634,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "license": "MIT", + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/graphemer": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", @@ -1567,6 +1664,54 @@ "node": ">=8" } }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/ignore": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", @@ -1801,6 +1946,18 @@ "dev": true, "license": "MIT" }, + "node_modules/object-inspect": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz", + "integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/optionator": { "version": "0.9.4", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", @@ -1925,6 +2082,21 @@ "node": ">=6" } }, + "node_modules/qs": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", + "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", + "license": "BSD-3-Clause", + "dependencies": { + "side-channel": "^1.0.6" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -2015,6 +2187,23 @@ "node": ">=10" } }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "license": "MIT", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -2040,6 +2229,24 @@ "node": ">=8" } }, + "node_modules/side-channel": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", + "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", @@ -2083,10 +2290,15 @@ } }, "node_modules/telnyx": { - "version": "2.0.0-alpha.5", - "resolved": "https://registry.npmjs.org/telnyx/-/telnyx-2.0.0-alpha.5.tgz", - "integrity": "sha512-+X1WjWsvIR4N2+f7skBczmNT5rGSq4cQTUNRuKjm+gCxkjfgIj4fOUZ2+0tX1He06kekURq6d+vqIv/xj5g6tg==", + "version": "2.0.0-beta.3", + "resolved": "https://registry.npmjs.org/telnyx/-/telnyx-2.0.0-beta.3.tgz", + "integrity": "sha512-s9Fy0GWGz1qCjQfVM1HJdpVrFNHjpyA9KAyfRQ4+D2pWAWIN01sue6cZwcG0235W3xxR2FHBtftL/e3EoznwhQ==", "license": "MIT", + "dependencies": { + "qs": "^6.13.0", + "tweetnacl": "^1.0.3", + "uuid": "^9.0.1" + }, "engines": { "node": "^18 || >=20" } @@ -2145,6 +2357,12 @@ "fsevents": "~2.3.3" } }, + "node_modules/tweetnacl": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz", + "integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==", + "license": "Unlicense" + }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -2215,6 +2433,19 @@ "punycode": "^2.1.0" } }, + "node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", diff --git a/examples/addresses/package.json b/examples/addresses/package.json index b898597..cadaf51 100644 --- a/examples/addresses/package.json +++ b/examples/addresses/package.json @@ -14,7 +14,7 @@ "node": "^18 || >=20" }, "dependencies": { - "telnyx": "2.0.0-alpha.5" + "telnyx": "2.0.0-beta.3" }, "devDependencies": { "@types/node": "^22.7.4", diff --git a/examples/call-control/package-lock.json b/examples/call-control/package-lock.json index b929480..34fe26e 100644 --- a/examples/call-control/package-lock.json +++ b/examples/call-control/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "ISC", "dependencies": { - "telnyx": "2.0.0-alpha.5" + "telnyx": "2.0.0-beta.3" }, "devDependencies": { "@types/node": "^22.7.4", @@ -988,6 +988,25 @@ "node": ">=8" } }, + "node_modules/call-bind": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -1089,6 +1108,44 @@ "license": "MIT", "peer": true }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "license": "MIT", + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/esbuild": { "version": "0.23.1", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.23.1.tgz", @@ -1508,6 +1565,34 @@ "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-intrinsic": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/get-tsconfig": { "version": "4.8.1", "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.8.1.tgz", @@ -1549,6 +1634,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "license": "MIT", + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/graphemer": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", @@ -1567,6 +1664,54 @@ "node": ">=8" } }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/ignore": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", @@ -1801,6 +1946,18 @@ "dev": true, "license": "MIT" }, + "node_modules/object-inspect": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz", + "integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/optionator": { "version": "0.9.4", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", @@ -1925,6 +2082,21 @@ "node": ">=6" } }, + "node_modules/qs": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", + "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", + "license": "BSD-3-Clause", + "dependencies": { + "side-channel": "^1.0.6" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -2015,6 +2187,23 @@ "node": ">=10" } }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "license": "MIT", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -2040,6 +2229,24 @@ "node": ">=8" } }, + "node_modules/side-channel": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", + "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", @@ -2083,10 +2290,15 @@ } }, "node_modules/telnyx": { - "version": "2.0.0-alpha.5", - "resolved": "https://registry.npmjs.org/telnyx/-/telnyx-2.0.0-alpha.5.tgz", - "integrity": "sha512-+X1WjWsvIR4N2+f7skBczmNT5rGSq4cQTUNRuKjm+gCxkjfgIj4fOUZ2+0tX1He06kekURq6d+vqIv/xj5g6tg==", + "version": "2.0.0-beta.3", + "resolved": "https://registry.npmjs.org/telnyx/-/telnyx-2.0.0-beta.3.tgz", + "integrity": "sha512-s9Fy0GWGz1qCjQfVM1HJdpVrFNHjpyA9KAyfRQ4+D2pWAWIN01sue6cZwcG0235W3xxR2FHBtftL/e3EoznwhQ==", "license": "MIT", + "dependencies": { + "qs": "^6.13.0", + "tweetnacl": "^1.0.3", + "uuid": "^9.0.1" + }, "engines": { "node": "^18 || >=20" } @@ -2145,6 +2357,12 @@ "fsevents": "~2.3.3" } }, + "node_modules/tweetnacl": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz", + "integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==", + "license": "Unlicense" + }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -2215,6 +2433,19 @@ "punycode": "^2.1.0" } }, + "node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", diff --git a/examples/call-control/package.json b/examples/call-control/package.json index 01c6a67..67c2055 100644 --- a/examples/call-control/package.json +++ b/examples/call-control/package.json @@ -14,7 +14,7 @@ "node": "^18 || >=20" }, "dependencies": { - "telnyx": "2.0.0-alpha.5" + "telnyx": "2.0.0-beta.3" }, "devDependencies": { "@types/node": "^22.7.4", diff --git a/examples/messaging/package-lock.json b/examples/messaging/package-lock.json index a5ca2ab..02d6b1a 100644 --- a/examples/messaging/package-lock.json +++ b/examples/messaging/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "ISC", "dependencies": { - "telnyx": "2.0.0-alpha.5" + "telnyx": "2.0.0-beta.3" }, "devDependencies": { "@types/node": "^22.7.4", @@ -988,6 +988,25 @@ "node": ">=8" } }, + "node_modules/call-bind": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -1089,6 +1108,44 @@ "license": "MIT", "peer": true }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "license": "MIT", + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/esbuild": { "version": "0.23.1", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.23.1.tgz", @@ -1508,6 +1565,34 @@ "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-intrinsic": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/get-tsconfig": { "version": "4.8.1", "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.8.1.tgz", @@ -1549,6 +1634,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "license": "MIT", + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/graphemer": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", @@ -1567,6 +1664,54 @@ "node": ">=8" } }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/ignore": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", @@ -1801,6 +1946,18 @@ "dev": true, "license": "MIT" }, + "node_modules/object-inspect": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz", + "integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/optionator": { "version": "0.9.4", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", @@ -1925,6 +2082,21 @@ "node": ">=6" } }, + "node_modules/qs": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", + "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", + "license": "BSD-3-Clause", + "dependencies": { + "side-channel": "^1.0.6" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -2015,6 +2187,23 @@ "node": ">=10" } }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "license": "MIT", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -2040,6 +2229,24 @@ "node": ">=8" } }, + "node_modules/side-channel": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", + "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", @@ -2083,10 +2290,15 @@ } }, "node_modules/telnyx": { - "version": "2.0.0-alpha.5", - "resolved": "https://registry.npmjs.org/telnyx/-/telnyx-2.0.0-alpha.5.tgz", - "integrity": "sha512-+X1WjWsvIR4N2+f7skBczmNT5rGSq4cQTUNRuKjm+gCxkjfgIj4fOUZ2+0tX1He06kekURq6d+vqIv/xj5g6tg==", + "version": "2.0.0-beta.3", + "resolved": "https://registry.npmjs.org/telnyx/-/telnyx-2.0.0-beta.3.tgz", + "integrity": "sha512-s9Fy0GWGz1qCjQfVM1HJdpVrFNHjpyA9KAyfRQ4+D2pWAWIN01sue6cZwcG0235W3xxR2FHBtftL/e3EoznwhQ==", "license": "MIT", + "dependencies": { + "qs": "^6.13.0", + "tweetnacl": "^1.0.3", + "uuid": "^9.0.1" + }, "engines": { "node": "^18 || >=20" } @@ -2145,6 +2357,12 @@ "fsevents": "~2.3.3" } }, + "node_modules/tweetnacl": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz", + "integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==", + "license": "Unlicense" + }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -2215,6 +2433,19 @@ "punycode": "^2.1.0" } }, + "node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", diff --git a/examples/messaging/package.json b/examples/messaging/package.json index f9725c2..b8815c6 100644 --- a/examples/messaging/package.json +++ b/examples/messaging/package.json @@ -14,7 +14,7 @@ "node": "^18 || >=20" }, "dependencies": { - "telnyx": "2.0.0-alpha.5" + "telnyx": "2.0.0-beta.3" }, "devDependencies": { "@types/node": "^22.7.4", From dcd1d6462f260b00932b75eda734d464fc9bc3e1 Mon Sep 17 00:00:00 2001 From: Lucas Rosa Date: Mon, 28 Oct 2024 20:29:53 -0300 Subject: [PATCH 56/59] add contributing section --- CHANGELOG.md | 5 ++ CONTRIBUTING.md | 146 +++++++++++++++++++++++++++++++++++++++++++ README.md | 18 +++++- VERSION | 2 +- package-lock.json | 4 +- package.json | 2 +- src/resources/Ips.ts | 2 - 7 files changed, 171 insertions(+), 8 deletions(-) create mode 100644 CONTRIBUTING.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 026a096..39f5801 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ ## v2 +### v2.0.0-beta.4 + +- Add `CONTRIBUTING.md` guidelines +- Update `README.md` + ### v2.0.0-beta.3 - Add `Errors` type declaration diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..d79bc2e --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,146 @@ +# Contributing to `telnyx-node` + +We'd love for you to contribute to our source code and to make `telnyx-node` +even better than it is today! Here are the guidelines we'd like you to follow: + +- [Code of Conduct](#code-of-conduct) +- [Question or Problem?](#got-an-api-product-question-or-problem) +- [Issues and Bugs](#found-an-issue) +- [Feature Requests](#want-a-feature) +- [Documentation fixes](#want-a-doc-fix) +- [Submission Guidelines](#submission-guidelines) +- [Coding Rules](#coding-rules) + +## Code of Conduct + +Please be kind to and considerate of other developers, as we all have the same goal: make `telnyx-node` as good as +it can be. + +## Got an API/Product Question or Problem? + +If you have questions about how to use `telnyx-node`, please see our +[docs](./README.md), and if you don't find the answer there, please contact +[Telnyx Support](https://telnyx.com/contact-us) with any issues you have. + +## Found an Issue? + +If you find a bug in the source code or a mistake in the documentation, you can +help us by submitting [an issue][issue-link]. If the file in which the error +exists is autogenerated, the change will need to be made by us, but +submitting an issue will help us track it and keep you up-to-date. If the file +isn't generated, you can help us out even more by submitting a Pull Request with +a fix. + +**Please see the [Submission Guidelines](#submit) below.** + +## Want a Feature? + +You can request a new feature by submitting an issue to our +[GitHub Repository][github]. If you would like to implement a new feature then +consider what kind of change it is: + +- **Major Changes** that you wish to contribute to the project should be + discussed first with `telnyx-node` contributors in an issue or pull request so + that we can develop a proper solution and better coordinate our efforts, + prevent duplication of work, and help you to craft the change so that it is + successfully accepted into the project. +- **Small Changes** can be crafted and submitted to the + [GitHub Repository][github] as a Pull Request. + +## Want a Doc Fix? + +If you want to help improve the docs in the helper library, it's a good idea to +let others know what you're working on to minimize duplication of effort. Create +a new issue (or comment on a related existing one) to let others know what +you're working on. + +For large fixes, please build and test the documentation before submitting the +PR to be sure you haven't accidentally introduced layout or formatting issues. + +## Submission Guidelines + +### Submitting an Issue + +Before you submit your issue search the archive, maybe your question was already +answered. + +If your issue appears to be a bug, and hasn't been reported, open a new issue. +Help us to maximize the effort we can spend fixing issues and adding new +features by not reporting duplicate issues. Providing the following information +will increase the chances of your issue being dealt with quickly: + +- **Overview of the Issue** - if an error is being thrown a non-minified stack + trace helps +- **Motivation for or Use Case** - explain why this is a bug for you +- **`telnyx-node` Version(s)** - is it a regression? +- **Operating System (if relevant)** - is this a problem with all systems or + only specific ones? +- **Reproduce the Error** - provide an isolated code snippet or an unambiguous + set of steps. +- **Related Issues** - has a similar issue been reported before? +- **Suggest a Fix** - if you can't fix the bug yourself, perhaps you can point + to what might be causing the problem (line of code or commit) + +**If you get help, help others. Good karma rules!** + +### Submitting a Pull Request + +Before you submit your pull request consider the following guidelines: + +- Search [GitHub][github] for an open or closed Pull Request that relates to + your submission. You don't want to duplicate effort. +- Make your changes in a new git branch: + +```shell +git checkout -b my-fix-branch master +``` + +- Create your patch, **including appropriate test cases**. +- Follow our [Coding Rules](#rules). +- Run the full `telnyx-node` test suite (aliased by `make test`), and ensure + that all tests pass. +- Commit your changes using a descriptive commit message. + +```shell +git commit -a +``` + +Note: the optional commit `-a` command line option will automatically "add" +and "rm" edited files. + +- Build your changes locally to ensure all the tests pass: + +```shell +make test +``` + +- Push your branch to GitHub: + +```shell +git push origin my-fix-branch +``` + +In GitHub, send a pull request to `telnyx-node:master`. +If we suggest changes, then: + +- Make the required updates. +- Re-run the `telnyx-node` test suite to ensure tests are still passing. +- Commit your changes to your branch (e.g. `my-fix-branch`). +- Push the changes to your GitHub repository (this will update your Pull Request). + +That's it! Thank you for your contribution! + +#### After your pull request is merged + +After your pull request is merged, you can safely delete your branch and pull +the changes from the main (upstream) repository. + +## Coding Rules + +To ensure consistency throughout the source code, keep these rules in mind as +you are working: + +- All new resources or resource methods **must be tested** by one or more tests. + +[issue-link]: https://github.com/team-telnyx/telnyx-node/issues/new +[github]: https://github.com/team-telnyx/telnyx-node diff --git a/README.md b/README.md index 83374e3..b2cbc04 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ applications written in server-side JavaScript. ## Documentation -See the [Node API docs](https://developers.telnyx.com/docs/api/v2/overview?lang=node#getting-started). +See the [Node API docs](https://developers.telnyx.com/api#get-started). ## Versions @@ -150,7 +150,7 @@ telnyx.off('request', onRequest); Telnyx signs the webhook events it sends to your endpoint, allowing you to validate that they were not sent by a third-party. You can read more about it -[here](https://developers.telnyx.com/docs/v2/call-control/receiving-webhooks). +[here](https://developers.telnyx.com/docs/voice/programmable-voice/receiving-webhooks). Please note that you must pass the _raw_ request body, exactly as received from Telnyx, to the `constructEvent()` function; this will not work with a parsed @@ -300,6 +300,20 @@ const allMessagingProfiles = await telnyx.messagingProfiles .autoPagingToArray({limit: 10000}); ``` +## Getting help + +If you need help installing or using the library, please check the [Telnyx Documentation](https://developers.telnyx.com) first, and [contact Telnyx support](https://telnyx.com/contact-us) if you don't find an answer to your question. + +If you've instead found a bug in the library or would like new features added, go ahead and open issues or pull requests against this repo! + +## Contributing + +Bug fixes, docs, and library improvements are always welcome. Please refer to our [Contributing Guide](CONTRIBUTING.md) for detailed information on how you can contribute. + +> Note: Please be aware that a good share of the files are auto-generated. You are welcome to suggest changes and submit PRs illustrating the changes. However, we'll have to make the changes in the underlying tool. You can find more info about this in the [Contributing Guide](CONTRIBUTING.md). + +If you're not familiar with the GitHub pull request/contribution process, [this is a nice tutorial](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork). + ## Development ### Setup diff --git a/VERSION b/VERSION index 96cabdf..20c4e26 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.0.0-beta.3 +2.0.0-beta.4 diff --git a/package-lock.json b/package-lock.json index aa71761..d94aad3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "telnyx", - "version": "2.0.0-beta.3", + "version": "2.0.0-beta.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "telnyx", - "version": "2.0.0-beta.3", + "version": "2.0.0-beta.4", "license": "MIT", "dependencies": { "qs": "^6.13.0", diff --git a/package.json b/package.json index 3a6ac5f..d3af569 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "telnyx", - "version": "2.0.0-beta.3", + "version": "2.0.0-beta.4", "description": "Telnyx API Node SDK", "keywords": [ "telnyx", diff --git a/src/resources/Ips.ts b/src/resources/Ips.ts index ea72ead..e7b1656 100644 --- a/src/resources/Ips.ts +++ b/src/resources/Ips.ts @@ -33,8 +33,6 @@ export const Ips = TelnyxResource.extend({ list: telnyxMethod({ method: 'GET', methodType: 'list', - - transformResponseData: transformResponseData, }), create: telnyxMethod({ From ed1d0f537ff8986eea998a6cdb1d9f4fb9045b62 Mon Sep 17 00:00:00 2001 From: Lucas Rosa Date: Mon, 28 Oct 2024 20:31:58 -0300 Subject: [PATCH 57/59] fix transformResponseData usage --- CHANGELOG.md | 1 + src/resources/ManagedAccounts.ts | 1 - src/resources/NumberPortouts.ts | 1 - src/resources/SimCardGroups.ts | 2 -- src/resources/SimCards.ts | 2 -- 5 files changed, 1 insertion(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 39f5801..19ddbd8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - Add `CONTRIBUTING.md` guidelines - Update `README.md` +- Fix `tranformResponseData` misusage on `list` resource methods ### v2.0.0-beta.3 diff --git a/src/resources/ManagedAccounts.ts b/src/resources/ManagedAccounts.ts index 2340427..9d42c48 100644 --- a/src/resources/ManagedAccounts.ts +++ b/src/resources/ManagedAccounts.ts @@ -22,7 +22,6 @@ export const ManagedAccounts = TelnyxResource.extend({ path: '/managed_accounts', list: telnyxMethod({ method: 'GET', - transformResponseData: transformResponseData, }), create: telnyxMethod({ method: 'POST', diff --git a/src/resources/NumberPortouts.ts b/src/resources/NumberPortouts.ts index 27cf428..d6ff524 100644 --- a/src/resources/NumberPortouts.ts +++ b/src/resources/NumberPortouts.ts @@ -31,7 +31,6 @@ export const NumberPortouts = TelnyxResource.extend({ path: 'portouts', list: telnyxMethod({ method: 'GET', - transformResponseData: transformResponseData, }), retrieve: telnyxMethod({ method: 'GET', diff --git a/src/resources/SimCardGroups.ts b/src/resources/SimCardGroups.ts index 58b60a3..8b96bae 100644 --- a/src/resources/SimCardGroups.ts +++ b/src/resources/SimCardGroups.ts @@ -33,8 +33,6 @@ export const SimCardGroups = TelnyxResource.extend({ list: telnyxMethod({ method: 'GET', methodType: 'list', - - transformResponseData: transformResponseData, }), create: telnyxMethod({ diff --git a/src/resources/SimCards.ts b/src/resources/SimCards.ts index 3c8d18d..016648f 100644 --- a/src/resources/SimCards.ts +++ b/src/resources/SimCards.ts @@ -106,8 +106,6 @@ export const SimCards = TelnyxResource.extend({ list: telnyxMethod({ method: 'GET', methodType: 'list', - - transformResponseData: transformResponseData, }), create: telnyxMethod({ From b113497ddbdf59ee7f4bee817f1d531cb16ac26e Mon Sep 17 00:00:00 2001 From: Lucas Rosa Date: Mon, 28 Oct 2024 20:37:33 -0300 Subject: [PATCH 58/59] fix porting types --- CHANGELOG.md | 1 + src/resources/NumberPortouts.ts | 1 - src/resources/PortabilityChecks.ts | 1 + src/resources/PortingEvents.ts | 7 + src/resources/PortingLoaConfigurations.ts | 15 ++ src/resources/PortingOrders.ts | 209 ++++++++++++++++-- src/resources/PortingReports.ts | 6 + src/telnyx.ts | 4 + src/test/resources/PortabilityChecks.test.ts | 16 ++ src/test/resources/PortingOrders.test.ts | 78 ++++++- .../resources/TelephonyCredentials.test.ts | 2 +- types/PortabilityChecksResource.d.ts | 18 ++ types/PortingEventsResource.d.ts | 5 + types/PortingLoaConfigurationsResource.d.ts | 91 ++++++++ types/PortingOrdersResource.d.ts | 72 ++++++ types/PortingPhoneNumbersResource.d.ts | 18 ++ types/PortingReportsResource.d.ts | 40 ++++ types/index.d.ts | 10 + 18 files changed, 568 insertions(+), 26 deletions(-) create mode 100644 src/resources/PortingLoaConfigurations.ts create mode 100644 src/resources/PortingReports.ts create mode 100644 types/PortabilityChecksResource.d.ts create mode 100644 types/PortingLoaConfigurationsResource.d.ts create mode 100644 types/PortingOrdersResource.d.ts create mode 100644 types/PortingPhoneNumbersResource.d.ts create mode 100644 types/PortingReportsResource.d.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 19ddbd8..865098a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ - Add `CONTRIBUTING.md` guidelines - Update `README.md` - Fix `tranformResponseData` misusage on `list` resource methods +- Update stale types on Portability, Porting and Portout resources methods ### v2.0.0-beta.3 diff --git a/src/resources/NumberPortouts.ts b/src/resources/NumberPortouts.ts index d6ff524..34e36dc 100644 --- a/src/resources/NumberPortouts.ts +++ b/src/resources/NumberPortouts.ts @@ -56,7 +56,6 @@ export const NumberPortouts = TelnyxResource.extend({ method: 'GET', path: '/{id}/supporting_documents', urlParams: ['id'], - transformResponseData: transformResponseData, }), createListOfSupportingDocuments: telnyxMethod({ method: 'POST', diff --git a/src/resources/PortabilityChecks.ts b/src/resources/PortabilityChecks.ts index 2b8bc34..3b60f5e 100644 --- a/src/resources/PortabilityChecks.ts +++ b/src/resources/PortabilityChecks.ts @@ -3,6 +3,7 @@ const telnyxMethod = TelnyxResource.method; export const PortabilityChecks = TelnyxResource.extend({ path: 'portability_checks', + includeBasic: ['create'], run: telnyxMethod({ method: 'POST', diff --git a/src/resources/PortingEvents.ts b/src/resources/PortingEvents.ts index c6a9552..1aa2301 100644 --- a/src/resources/PortingEvents.ts +++ b/src/resources/PortingEvents.ts @@ -6,6 +6,13 @@ export const PortingEvents = TelnyxResource.extend({ path: 'porting/events', includeBasic: ['list', 'retrieve'], + show: telnyxMethod({ + method: 'GET', + path: '/{id}', + urlParams: ['id'], + methodType: 'retrieve', + }), + republish: telnyxMethod({ method: 'POST', path: '/{id}/republish', diff --git a/src/resources/PortingLoaConfigurations.ts b/src/resources/PortingLoaConfigurations.ts new file mode 100644 index 0000000..c1dad45 --- /dev/null +++ b/src/resources/PortingLoaConfigurations.ts @@ -0,0 +1,15 @@ +import TelnyxResource from '../TelnyxResource'; + +const telnyxMethod = TelnyxResource.method; + +export const PortingLoaConfigurations = TelnyxResource.extend({ + path: 'porting/loa_configurations', + includeBasic: ['list', 'create', 'retrieve', 'del', 'update'], + + preview: telnyxMethod({ + method: 'GET', + path: '/{id}/preview', + urlParams: ['id'], + methodType: 'retrieve', + }), +}); diff --git a/src/resources/PortingOrders.ts b/src/resources/PortingOrders.ts index 3c0b958..3f677f9 100644 --- a/src/resources/PortingOrders.ts +++ b/src/resources/PortingOrders.ts @@ -24,16 +24,48 @@ function transformResponseData( paramsValues: [response.data.id as string], paramsNames: ['portingOrderId'], }), + + activate: telnyxMethod({ + method: 'POST', + path: '/{porting_order_id}/actions/activate', + urlParams: ['porting_order_id'], + paramsValues: [response.data.id as string], + paramsNames: ['porting_order_id'], + methodType: 'create', + }), + + cancel: telnyxMethod({ + method: 'POST', + path: '/{porting_order_id}/actions/activate', + urlParams: ['porting_order_id'], + paramsValues: [response.data.id as string], + paramsNames: ['porting_order_id'], + methodType: 'create', + }), + + confirm: telnyxMethod({ + method: 'POST', + path: '/{porting_order_id}/actions/activate', + urlParams: ['porting_order_id'], + paramsValues: [response.data.id as string], + paramsNames: ['porting_order_id'], + methodType: 'create', + }), + + share: telnyxMethod({ + method: 'POST', + path: '/{porting_order_id}/actions/activate', + urlParams: ['porting_order_id'], + paramsValues: [response.data.id as string], + paramsNames: ['porting_order_id'], + methodType: 'create', + }), }); } export const PortingOrders = TelnyxResource.extend({ path: 'porting_orders', - - list: telnyxMethod({ - method: 'GET', - methodType: 'list', - }), + includeBasic: ['list', 'del', 'update'], create: telnyxMethod({ method: 'POST', @@ -55,21 +87,33 @@ export const PortingOrders = TelnyxResource.extend({ methodType: 'list', }), - listActivationJobs: telnyxMethod({ + listPhoneNumberConfigurations: telnyxMethod({ method: 'GET', - path: '/{id}/activation_jobs', + path: '/phone_number_configurations', methodType: 'list', urlParams: ['id'], }), - cancelOrder: telnyxMethod({ + createPhoneNumberConfigurations: telnyxMethod({ method: 'POST', - path: '/{orderId}/actions/cancel', - urlParams: ['orderId'], - paramsNames: ['orderId'], + path: '/phone_number_configurations', methodType: 'create', }), + listActivationJobs: telnyxMethod({ + method: 'GET', + path: '/{id}/activation_jobs', + methodType: 'list', + urlParams: ['id'], + }), + + retrieveActivationJob: telnyxMethod({ + method: 'GET', + path: '/{id}/activation_jobs/{activationJobId}', + urlParams: ['id', 'activationJobId'], + paramsNames: ['id', 'activationJobId'], + }), + listAllowedFocWindows: telnyxMethod({ method: 'GET', path: '/{id}/allowed_foc_windows', @@ -77,27 +121,160 @@ export const PortingOrders = TelnyxResource.extend({ urlParams: ['id'], }), + listAdditionalDocuments: telnyxMethod({ + method: 'GET', + path: '/{id}/additional_documents', + methodType: 'list', + urlParams: ['id'], + }), + + createAdditionalDocuments: telnyxMethod({ + method: 'POST', + path: '/{porting_order_id}/additional_documents', + urlParams: ['porting_order_id'], + paramsNames: ['porting_order_id'], + methodType: 'create', + }), + + delAdditionalDocuments: telnyxMethod({ + method: 'DELETE', + path: '/{porting_order_id}/additional_documents/{additional_document_id}', + urlParams: ['porting_order_id', 'additional_document_id'], + paramsNames: ['porting_order_id', 'additional_document_id'], + }), + retrieveLoaTemplate: telnyxMethod({ method: 'GET', path: '/{id}/loa_template', urlParams: ['id'], + methodType: 'retrieve', }), - confirmOrder: telnyxMethod({ + activate: telnyxMethod({ method: 'POST', - path: '/{id}/actions/confirm', - urlParams: ['id'], + path: '/{porting_order_id}/actions/activate', + urlParams: ['porting_order_id'], + paramsNames: ['porting_order_id'], + methodType: 'create', + }), + + cancel: telnyxMethod({ + method: 'POST', + path: '/{porting_order_id}/actions/cancel', + urlParams: ['porting_order_id'], + paramsNames: ['porting_order_id'], + methodType: 'create', + }), + + confirm: telnyxMethod({ + method: 'POST', + path: '/{porting_order_id}/actions/confirm', + urlParams: ['porting_order_id'], + paramsNames: ['porting_order_id'], + methodType: 'create', }), + + share: telnyxMethod({ + method: 'POST', + path: '/{porting_order_id}/actions/share', + urlParams: ['porting_order_id'], + paramsNames: ['porting_order_id'], + methodType: 'create', + }), + createComment: telnyxMethod({ method: 'POST', - path: '/{id}/comments', + path: '/{porting_order_id}/comments', methodType: 'create', - urlParams: ['id'], + urlParams: ['porting_order_id'], + paramsNames: ['porting_order_id'], }), + listComments: telnyxMethod({ method: 'GET', path: '/{id}/comments', methodType: 'list', urlParams: ['id'], }), + + listRequirements: telnyxMethod({ + method: 'GET', + path: '/{id}/requirements', + methodType: 'list', + urlParams: ['id'], + }), + + listVerificationCodes: telnyxMethod({ + method: 'GET', + path: '/{id}/verification_codes', + methodType: 'list', + urlParams: ['id'], + }), + + retrieveSubRequest: telnyxMethod({ + method: 'GET', + path: '/{id}/sub_request', + methodType: 'retrieve', + urlParams: ['id'], + }), + + sendVerificationCode: telnyxMethod({ + method: 'POST', + path: '/{porting_order_id}/verification_codes/send', + methodType: 'create', + urlParams: ['porting_order_id'], + paramsNames: ['porting_order_id'], + }), + + verifyVerificationCode: telnyxMethod({ + method: 'POST', + path: '/{porting_order_id}/verification_codes/verify', + methodType: 'create', + urlParams: ['porting_order_id'], + paramsNames: ['porting_order_id'], + }), + + listPhoneNumberBlocks: telnyxMethod({ + method: 'GET', + path: '/{porting_order_id}/phone_number_blocks', + methodType: 'list', + urlParams: ['porting_order_id'], + }), + + createPhoneNumberBlock: telnyxMethod({ + method: 'POST', + path: '/{porting_order_id}/phone_number_blocks', + methodType: 'create', + urlParams: ['porting_order_id'], + paramsNames: ['porting_order_id'], + }), + + delPhoneNumberBlock: telnyxMethod({ + method: 'DELETE', + path: '/{porting_order_id}/phone_number_blocks/{id}', + urlParams: ['porting_order_id', 'id'], + paramsNames: ['porting_order_id', 'id'], + }), + + listPhoneNumberExtensions: telnyxMethod({ + method: 'GET', + path: '/{porting_order_id}/phone_number_extensions', + methodType: 'list', + urlParams: ['porting_order_id'], + }), + + createPhoneNumberExtension: telnyxMethod({ + method: 'POST', + path: '/{porting_order_id}/phone_number_extensions', + methodType: 'create', + urlParams: ['porting_order_id'], + paramsNames: ['porting_order_id'], + }), + + delPhoneNumberExtension: telnyxMethod({ + method: 'DELETE', + path: '/{porting_order_id}/phone_number_extensions/{id}', + urlParams: ['porting_order_id', 'id'], + paramsNames: ['porting_order_id', 'id'], + }), }); diff --git a/src/resources/PortingReports.ts b/src/resources/PortingReports.ts new file mode 100644 index 0000000..8161292 --- /dev/null +++ b/src/resources/PortingReports.ts @@ -0,0 +1,6 @@ +import TelnyxResource from '../TelnyxResource'; + +export const PortingReports = TelnyxResource.extend({ + path: 'porting/reports', + includeBasic: ['list', 'create', 'retrieve'], +}); diff --git a/src/telnyx.ts b/src/telnyx.ts index 94b7dc0..7f8fee8 100644 --- a/src/telnyx.ts +++ b/src/telnyx.ts @@ -98,6 +98,8 @@ import {PhoneNumbersSlim} from './resources/PhoneNumbersSlim'; import {PhoneNumbersVoice} from './resources/PhoneNumbersVoice'; import {PortabilityChecks} from './resources/PortabilityChecks'; import {PortingEvents} from './resources/PortingEvents'; +import {PortingLoaConfigurations} from './resources/PortingLoaConfigurations'; +import {PortingReports} from './resources/PortingReports'; import {PortoutEvents} from './resources/PortoutEvents'; import {PortingOrders} from './resources/PortingOrders'; import {PortingPhoneNumbers} from './resources/PortingPhoneNumbers'; @@ -272,7 +274,9 @@ export function createTelnyx() { PortingEvents, PortoutEvents, PortabilityChecks, + PortingLoaConfigurations, PortingOrders, + PortingReports, PortingPhoneNumbers, PortoutRequests, PresignedObjectUrls, diff --git a/src/test/resources/PortabilityChecks.test.ts b/src/test/resources/PortabilityChecks.test.ts index 1adca23..a337747 100644 --- a/src/test/resources/PortabilityChecks.test.ts +++ b/src/test/resources/PortabilityChecks.test.ts @@ -17,6 +17,22 @@ describe('PortabilityChecks Resource', function () { phone_numbers: ['+15555555555', '+16666666667'], }; + describe('create', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.portabilityChecks + .create(portabilityChecksParams) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyx.portabilityChecks + .create(portabilityChecksParams, TEST_AUTH_KEY) + .then(responseFn); + }); + }); + describe('run', function () { test('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder diff --git a/src/test/resources/PortingOrders.test.ts b/src/test/resources/PortingOrders.test.ts index e2a289b..9aeb105 100644 --- a/src/test/resources/PortingOrders.test.ts +++ b/src/test/resources/PortingOrders.test.ts @@ -119,12 +119,10 @@ describe('PortingOrders Resource', function () { }); }); - describe('cancelOrder', function () { + describe('cancel', function () { test('Sends the correct request', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder - return telnyxInstance.portingOrders - .cancelOrder(TEST_UUID) - .then(responseFn); + return telnyxInstance.portingOrders.cancel(TEST_UUID).then(responseFn); }); }); @@ -145,7 +143,7 @@ describe('PortingOrders Resource', function () { describe('retrieveLoaTemplate', function () { function responseFn(response: ResponsePayloadList) { - expect(response.data).not.toBeNull(); + expect(response.data).toBeDefined(); } test('Sends the correct request', function () { @@ -163,18 +161,82 @@ describe('PortingOrders Resource', function () { }); }); - describe('confirmOrder', function () { + describe('retrieveSubRequest', function () { + function responseFn(response: ResponsePayloadList) { + expect(response.data).toBeDefined(); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyxInstance.portingOrders + .retrieveSubRequest(TEST_UUID) + .then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyxInstance.portingOrders + .retrieveSubRequest(TEST_UUID, TEST_AUTH_KEY) + .then(responseFn); + }); + }); + + describe('activate', function () { + function responseFn(response: ResponsePayloadList) { + expect(response.data).toBeDefined(); + } + + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyxInstance.portingOrders.activate(TEST_UUID).then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyxInstance.portingOrders + .activate(TEST_UUID, TEST_AUTH_KEY) + .then(responseFn); + }); + }); + + describe('cancel', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyxInstance.portingOrders.cancel(TEST_UUID).then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyxInstance.portingOrders + .cancel(TEST_UUID, TEST_AUTH_KEY) + .then(responseFn); + }); + }); + + describe('confirm', function () { test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyxInstance.portingOrders.confirm(TEST_UUID).then(responseFn); + }); + + test('Sends the correct request [with specified auth]', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder return telnyxInstance.portingOrders - .confirmOrder(TEST_UUID) + .confirm(TEST_UUID, TEST_AUTH_KEY) .then(responseFn); }); + }); + + describe('cancel', function () { + test('Sends the correct request', function () { + // @ts-expect-error TODO: import .d.ts files under src/test folder + return telnyxInstance.portingOrders.cancel(TEST_UUID).then(responseFn); + }); test('Sends the correct request [with specified auth]', function () { // @ts-expect-error TODO: import .d.ts files under src/test folder return telnyxInstance.portingOrders - .confirmOrder(TEST_UUID, TEST_AUTH_KEY) + .cancel(TEST_UUID, TEST_AUTH_KEY) .then(responseFn); }); }); diff --git a/src/test/resources/TelephonyCredentials.test.ts b/src/test/resources/TelephonyCredentials.test.ts index 7f3f7be..4d370eb 100644 --- a/src/test/resources/TelephonyCredentials.test.ts +++ b/src/test/resources/TelephonyCredentials.test.ts @@ -69,7 +69,7 @@ describe('TelephonyCredentials Resource', function () { describe('createToken', function () { function responseFn(response: ResponsePayload) { - expect(response.data).not.toBeNull(); + expect(response.data).toBeDefined(); } test('Sends the correct request', function () { diff --git a/types/PortabilityChecksResource.d.ts b/types/PortabilityChecksResource.d.ts new file mode 100644 index 0000000..4d1a3d3 --- /dev/null +++ b/types/PortabilityChecksResource.d.ts @@ -0,0 +1,18 @@ +import {paths} from './TelnyxAPI.js'; + +declare module 'telnyx' { + namespace Telnyx { + type PortabilityChecksCreateParams = + paths['/portability_checks']['post']['requestBody']['content']['application/json']; + + type PortabilityChecksCreateResponse = + paths['/portability_checks']['post']['responses']['201']['content']['application/json']; + + class PortabilityChecksResource { + create( + params: PortabilityChecksCreateParams, + options?: RequestOptions, + ): Promise>; + } + } +} diff --git a/types/PortingEventsResource.d.ts b/types/PortingEventsResource.d.ts index 651efe5..9f8caf5 100644 --- a/types/PortingEventsResource.d.ts +++ b/types/PortingEventsResource.d.ts @@ -29,6 +29,11 @@ declare module 'telnyx' { options?: RequestOptions, ): Promise>; + show( + id: PortingEventsRetrieveId, + options?: RequestOptions, + ): Promise>; + retrieve( id: PortingEventsRetrieveId, options?: RequestOptions, diff --git a/types/PortingLoaConfigurationsResource.d.ts b/types/PortingLoaConfigurationsResource.d.ts new file mode 100644 index 0000000..c66bf94 --- /dev/null +++ b/types/PortingLoaConfigurationsResource.d.ts @@ -0,0 +1,91 @@ +import {paths} from './TelnyxAPI.js'; + +declare module 'telnyx' { + namespace Telnyx { + type PortingLoaConfigurationsListParams = + paths['/porting/loa_configurations']['get']['parameters']['query']; + + type PortingLoaConfigurationsListResponse = + paths['/porting/loa_configurations']['get']['responses']['200']['content']['application/json']; + + type PortingLoaConfigurationsCreateParams = + paths['/porting/loa_configurations']['post']['requestBody']['content']['application/json']; + + type PortingLoaConfigurationsCreateResponse = + paths['/porting/loa_configurations']['post']['responses']['201']['content']['application/json']; + + type PortingLoaConfigurationsRetrieveId = + paths['/porting/loa_configurations/{id}']['get']['parameters']['path']['id']; + + type PortingLoaConfigurationsRetrieveParams = + paths['/porting/loa_configurations/{id}']['get']['parameters']['query']; + + type PortingLoaConfigurationsRetrieveResponse = + paths['/porting/loa_configurations/{id}']['get']['responses']['200']['content']['application/json']; + + type PortingLoaConfigurationsDelId = + paths['/porting/loa_configurations/{id}']['delete']['parameters']['path']['id']; + + type PortingLoaConfigurationsDelParams = + paths['/porting/loa_configurations/{id}']['delete']['parameters']['query']; + + type PortingLoaConfigurationsDelResponse = + paths['/porting/loa_configurations/{id}']['delete']['responses']['204']['content']; + + type PortingLoaConfigurationsUpdateId = + paths['/porting/loa_configurations/{id}']['patch']['parameters']['path']['id']; + + type PortingLoaConfigurationsUpdateParams = + paths['/porting/loa_configurations/{id}']['patch']['requestBody']['content']['application/json']; + + type PortingLoaConfigurationsUpdateResponse = + paths['/porting/loa_configurations/{id}']['patch']['responses']['200']['content']['application/json']; + + type PortingLoaConfigurationsPreviewId = + paths['/porting/loa_configurations/{id}']['get']['parameters']['path']['id']; + + type PortingLoaConfigurationsPreviewResponse = + paths['/porting/loa_configurations/{id}']['get']['responses']['200']['content']['application/json']; + + class PortingLoaConfigurationsResource { + list( + params?: PortingLoaConfigurationsListParams, + options?: RequestOptions, + ): Promise>; + + create( + params: PortingLoaConfigurationsCreateParams, + options?: RequestOptions, + ): Promise< + Telnyx.Response + >; + + retrieve( + id: PortingLoaConfigurationsRetrieveId, + options?: RequestOptions, + ): Promise< + Telnyx.Response + >; + + del( + id: PortingLoaConfigurationsDelId, + options?: RequestOptions, + ): Promise>; + + update( + id: PortingLoaConfigurationsUpdateId, + params: PortingLoaConfigurationsUpdateParams, + options?: RequestOptions, + ): Promise< + Telnyx.Response + >; + + preview( + id: PortingLoaConfigurationsPreviewId, + options?: RequestOptions, + ): Promise< + Telnyx.Response + >; + } + } +} diff --git a/types/PortingOrdersResource.d.ts b/types/PortingOrdersResource.d.ts new file mode 100644 index 0000000..1a81920 --- /dev/null +++ b/types/PortingOrdersResource.d.ts @@ -0,0 +1,72 @@ +import {paths} from './TelnyxAPI.js'; + +declare module 'telnyx' { + namespace Telnyx { + type PortingOrdersListParams = + paths['/porting_orders']['get']['parameters']['query']; + + type PortingOrdersListResponse = + paths['/porting_orders']['get']['responses']['200']['content']['application/json']; + + type PortingOrdersCreateParams = + paths['/porting_orders']['post']['requestBody']['content']['application/json']; + + type PortingOrdersCreateResponse = + paths['/porting_orders']['post']['responses']['201']['content']['application/json']; + + type PortingOrdersRetrieveId = + paths['/porting_orders/{id}']['get']['parameters']['path']['id']; + + type PortingOrdersRetrieveParams = + paths['/porting_orders/{id}']['get']['parameters']['query']; + + type PortingOrdersRetrieveResponse = + paths['/porting_orders/{id}']['get']['responses']['200']['content']['application/json']; + + type PortingOrdersDelId = + paths['/porting_orders/{id}']['delete']['parameters']['path']['id']; + + type PortingOrdersDelParams = + paths['/porting_orders/{id}']['delete']['parameters']['query']; + + type PortingOrdersDelResponse = + paths['/porting_orders/{id}']['delete']['responses']['204']['content']; + + type PortingOrdersUpdateId = + paths['/porting_orders/{id}']['patch']['parameters']['path']['id']; + + type PortingOrdersUpdateParams = + paths['/porting_orders/{id}']['patch']['requestBody']['content']['application/json']; + + type PortingOrdersUpdateResponse = + paths['/porting_orders/{id}']['patch']['responses']['200']['content']['application/json']; + + class PortingOrdersResource { + list( + params?: PortingOrdersListParams, + options?: RequestOptions, + ): Promise>; + + create( + params: PortingOrdersCreateParams, + options?: RequestOptions, + ): Promise>; + + retrieve( + id: PortingOrdersRetrieveId, + options?: RequestOptions, + ): Promise>; + + del( + id: PortingOrdersDelId, + options?: RequestOptions, + ): Promise>; + + update( + id: PortingOrdersUpdateId, + params: PortingOrdersUpdateParams, + options?: RequestOptions, + ): Promise>; + } + } +} diff --git a/types/PortingPhoneNumbersResource.d.ts b/types/PortingPhoneNumbersResource.d.ts new file mode 100644 index 0000000..0bd13d9 --- /dev/null +++ b/types/PortingPhoneNumbersResource.d.ts @@ -0,0 +1,18 @@ +import {paths} from './TelnyxAPI.js'; + +declare module 'telnyx' { + namespace Telnyx { + type PortingPhoneNumbersListParams = + paths['/porting_phone_numbers']['get']['parameters']['query']; + + type PortingPhoneNumbersListResponse = + paths['/porting_phone_numbers']['get']['responses']['200']['content']['application/json']; + + class PortingPhoneNumbersResource { + list( + params?: PortingPhoneNumbersListParams, + options?: RequestOptions, + ): Promise>; + } + } +} diff --git a/types/PortingReportsResource.d.ts b/types/PortingReportsResource.d.ts new file mode 100644 index 0000000..0b0edb7 --- /dev/null +++ b/types/PortingReportsResource.d.ts @@ -0,0 +1,40 @@ +import {paths} from './TelnyxAPI.js'; + +declare module 'telnyx' { + namespace Telnyx { + type PortingReportsListParams = + paths['/porting/reports']['get']['parameters']['query']; + + type PortingReportsListResponse = + paths['/porting/reports']['get']['responses']['200']['content']['application/json']; + + type PortingReportsCreateParams = + paths['/porting/reports']['post']['requestBody']['content']['application/json']; + + type PortingReportsCreateResponse = + paths['/porting/reports']['post']['responses']['201']['content']['application/json']; + + type PortingReportsRetrieveId = + paths['/porting/reports/{id}']['get']['parameters']['path']['id']; + + type PortingReportsRetrieveResponse = + paths['/porting/reports/{id}']['get']['responses']['200']['content']['application/json']; + + class PortingReportsResource { + list( + params?: PortingReportsListParams, + options?: RequestOptions, + ): Promise>; + + create( + params: PortingReportsCreateParams, + options?: RequestOptions, + ): Promise>; + + retrieve( + id: PortingReportsRetrieveId, + options?: RequestOptions, + ): Promise>; + } + } +} diff --git a/types/index.d.ts b/types/index.d.ts index 8e79767..828876f 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -64,7 +64,12 @@ /// /// /// +/// /// +/// +/// +/// +/// /// /// /// @@ -146,7 +151,12 @@ declare module 'telnyx' { phoneNumbersSlim: Telnyx.PhoneNumbersSlimResource; phoneNumbersRegulatoryRequirements: Telnyx.PhoneNumbersRegulatoryRequirementsResource; phoneNumbers: Telnyx.PhoneNumbersResource; + portabilityChecks: Telnyx.PortabilityChecksResource; portingEvents: Telnyx.PortingEventsResource; + portingLoaConfigurations: Telnyx.PortingLoaConfigurationsResource; + portingPhoneNumbers: Telnyx.PortingPhoneNumbersResource; + portingOrders: Telnyx.PortingOrdersResource; + portingReports: Telnyx.PortingReportsResource; portoutEvents: Telnyx.PortoutEventsResource; regulatoryRequirements: Telnyx.RegulatoryRequirementsResource; telephonyCredentials: Telnyx.TelephonyCredentialsResource; From 6132d479b55f6a98d0a01db277cc9733da2e8bfb Mon Sep 17 00:00:00 2001 From: Lucas Rosa Date: Thu, 14 Nov 2024 20:01:23 +0000 Subject: [PATCH 59/59] update examples to use beta 4 --- examples/addresses/package-lock.json | 8 ++++---- examples/addresses/package.json | 2 +- examples/call-control/package-lock.json | 8 ++++---- examples/call-control/package.json | 2 +- examples/messaging/package-lock.json | 8 ++++---- examples/messaging/package.json | 2 +- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/examples/addresses/package-lock.json b/examples/addresses/package-lock.json index 6d98ec3..a2d8ccd 100644 --- a/examples/addresses/package-lock.json +++ b/examples/addresses/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "ISC", "dependencies": { - "telnyx": "2.0.0-beta.3" + "telnyx": "2.0.0-beta.4" }, "devDependencies": { "@types/node": "^22.7.4", @@ -2290,9 +2290,9 @@ } }, "node_modules/telnyx": { - "version": "2.0.0-beta.3", - "resolved": "https://registry.npmjs.org/telnyx/-/telnyx-2.0.0-beta.3.tgz", - "integrity": "sha512-s9Fy0GWGz1qCjQfVM1HJdpVrFNHjpyA9KAyfRQ4+D2pWAWIN01sue6cZwcG0235W3xxR2FHBtftL/e3EoznwhQ==", + "version": "2.0.0-beta.4", + "resolved": "https://registry.npmjs.org/telnyx/-/telnyx-2.0.0-beta.4.tgz", + "integrity": "sha512-ni8wflPmsRrOZYUJhjD2blf/pjZjv7esytwQZa6ydjlrFCHWHJiVYnTZLG3nKrnFJPnB7vp1JCIUUKZQ0t4aYA==", "license": "MIT", "dependencies": { "qs": "^6.13.0", diff --git a/examples/addresses/package.json b/examples/addresses/package.json index cadaf51..11536d9 100644 --- a/examples/addresses/package.json +++ b/examples/addresses/package.json @@ -14,7 +14,7 @@ "node": "^18 || >=20" }, "dependencies": { - "telnyx": "2.0.0-beta.3" + "telnyx": "2.0.0-beta.4" }, "devDependencies": { "@types/node": "^22.7.4", diff --git a/examples/call-control/package-lock.json b/examples/call-control/package-lock.json index 34fe26e..882d7de 100644 --- a/examples/call-control/package-lock.json +++ b/examples/call-control/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "ISC", "dependencies": { - "telnyx": "2.0.0-beta.3" + "telnyx": "2.0.0-beta.4" }, "devDependencies": { "@types/node": "^22.7.4", @@ -2290,9 +2290,9 @@ } }, "node_modules/telnyx": { - "version": "2.0.0-beta.3", - "resolved": "https://registry.npmjs.org/telnyx/-/telnyx-2.0.0-beta.3.tgz", - "integrity": "sha512-s9Fy0GWGz1qCjQfVM1HJdpVrFNHjpyA9KAyfRQ4+D2pWAWIN01sue6cZwcG0235W3xxR2FHBtftL/e3EoznwhQ==", + "version": "2.0.0-beta.4", + "resolved": "https://registry.npmjs.org/telnyx/-/telnyx-2.0.0-beta.4.tgz", + "integrity": "sha512-ni8wflPmsRrOZYUJhjD2blf/pjZjv7esytwQZa6ydjlrFCHWHJiVYnTZLG3nKrnFJPnB7vp1JCIUUKZQ0t4aYA==", "license": "MIT", "dependencies": { "qs": "^6.13.0", diff --git a/examples/call-control/package.json b/examples/call-control/package.json index 67c2055..5b351c3 100644 --- a/examples/call-control/package.json +++ b/examples/call-control/package.json @@ -14,7 +14,7 @@ "node": "^18 || >=20" }, "dependencies": { - "telnyx": "2.0.0-beta.3" + "telnyx": "2.0.0-beta.4" }, "devDependencies": { "@types/node": "^22.7.4", diff --git a/examples/messaging/package-lock.json b/examples/messaging/package-lock.json index 02d6b1a..4534dc1 100644 --- a/examples/messaging/package-lock.json +++ b/examples/messaging/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "ISC", "dependencies": { - "telnyx": "2.0.0-beta.3" + "telnyx": "2.0.0-beta.4" }, "devDependencies": { "@types/node": "^22.7.4", @@ -2290,9 +2290,9 @@ } }, "node_modules/telnyx": { - "version": "2.0.0-beta.3", - "resolved": "https://registry.npmjs.org/telnyx/-/telnyx-2.0.0-beta.3.tgz", - "integrity": "sha512-s9Fy0GWGz1qCjQfVM1HJdpVrFNHjpyA9KAyfRQ4+D2pWAWIN01sue6cZwcG0235W3xxR2FHBtftL/e3EoznwhQ==", + "version": "2.0.0-beta.4", + "resolved": "https://registry.npmjs.org/telnyx/-/telnyx-2.0.0-beta.4.tgz", + "integrity": "sha512-ni8wflPmsRrOZYUJhjD2blf/pjZjv7esytwQZa6ydjlrFCHWHJiVYnTZLG3nKrnFJPnB7vp1JCIUUKZQ0t4aYA==", "license": "MIT", "dependencies": { "qs": "^6.13.0", diff --git a/examples/messaging/package.json b/examples/messaging/package.json index b8815c6..00de2e5 100644 --- a/examples/messaging/package.json +++ b/examples/messaging/package.json @@ -14,7 +14,7 @@ "node": "^18 || >=20" }, "dependencies": { - "telnyx": "2.0.0-beta.3" + "telnyx": "2.0.0-beta.4" }, "devDependencies": { "@types/node": "^22.7.4",